Subject: Re: P_SUGID flag forgotten at fork() time
To: Luke Mewburn <lukem@connect.com.au>
From: Jason Thorpe <thorpej@nas.nasa.gov>
List: tech-security
Date: 03/23/1997 09:07:27
On Mon, 24 Mar 1997 00:26:57 +1100 
 Luke Mewburn <lukem@connect.com.au> wrote:

 > I believe that in /sys/kern/kern_fork.c (relative to 1.30) we need:
 > 
 > *** kern_fork.c.orig	Mon Mar 24 01:14:20 1997
 > --- kern_fork.c	Mon Mar 24 01:15:30 1997
 > ***************
 > *** 195,200 ****
 > --- 195,201 ----
 >   	p2->p_emul = p1->p_emul;
 >   	if (p1->p_flag & P_PROFIL)
 >   		startprofclock(p2);
 > + 	p2->p_flag |= (p1->p_flag & P_SUGID);
 >   	MALLOC(p2->p_cred, struct pcred *, sizeof(struct pcred),
 >   	    M_SUBPROC, M_WAITOK);
 >   	bcopy(p1->p_cred, p2->p_cred, sizeof(*p2->p_cred));
 > 
 > Objections to fixing this?

Looks perfectly reasonable to me ... "go for it."

Jason R. Thorpe                                       thorpej@nas.nasa.gov
NASA Ames Research Center                               Home: 408.866.1912
NAS: M/S 258-6                                          Work: 415.604.0935
Moffett Field, CA 94035                                Pager: 415.428.6939