o Remove KSE race in setuid() in which oldcred was preserved before giant
was grabbed. This was introduced in 1.101 when the giant pushdown for kern_prot.c was originally performed.
This commit is contained in:
@@ -500,10 +500,10 @@ setuid(td, uap)
|
||||
uid_t uid;
|
||||
int error;
|
||||
|
||||
oldcred = p->p_ucred;
|
||||
uid = uap->uid;
|
||||
mtx_lock(&Giant);
|
||||
error = 0;
|
||||
oldcred = p->p_ucred;
|
||||
/*
|
||||
* See if we have "permission" by POSIX 1003.1 rules.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user