Pass P_SUGID on to the child of a fork(). It was possible to get rlogin
to coredump previously since it (somewhat uniquely) is setuid and forks without execing, and thus without passing P_SUGID the child could coredump and possibly divulge sensitive information (such as encrypted passwords from the passwd database).
This commit is contained in:
parent
2731fd39ed
commit
70e534e78f
@ -275,6 +275,10 @@ fork1(p1, flags, retval)
|
||||
p2->p_limit->p_refcnt++;
|
||||
}
|
||||
|
||||
/*
|
||||
* Preserve some flags in subprocess.
|
||||
*/
|
||||
p2->p_flag |= p1->p_flag & P_SUGID;
|
||||
if (p1->p_session->s_ttyvp != NULL && p1->p_flag & P_CONTROLT)
|
||||
p2->p_flag |= P_CONTROLT;
|
||||
if (flags & RFPPWAIT)
|
||||
|
Loading…
Reference in New Issue
Block a user