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:
Robert Watson
2001-12-02 15:15:29 +00:00
parent eb725b4e6a
commit f605567c24
+1 -1
View File
@@ -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.
*