diff options
author | rwatson <rwatson@FreeBSD.org> | 2001-12-02 15:22:56 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2001-12-02 15:22:56 +0000 |
commit | de0f8b15daac8b82159645926c12d3a796ffcef2 (patch) | |
tree | 453db4e6fe346860a77be727b5b489de5d14b364 /sys | |
parent | dbe003dc3e5c6c4c5b59ab7d32c56382449b5249 (diff) | |
download | FreeBSD-src-de0f8b15daac8b82159645926c12d3a796ffcef2.zip FreeBSD-src-de0f8b15daac8b82159645926c12d3a796ffcef2.tar.gz |
o Uniformly copy uap arguments into local variables before grabbing
giant, and make whitespace more consistent around giant-frobbing.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/kern_prot.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index df0dd41..01216bd 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -642,7 +642,6 @@ setgid(td, uap) int error; gid = uap->gid; - mtx_lock(&Giant); error = 0; oldcred = p->p_ucred; @@ -773,8 +772,8 @@ setgroups(td, uap) u_int ngrp; int error; - mtx_lock(&Giant); ngrp = uap->gidsetsize; + mtx_lock(&Giant); oldcred = p->p_ucred; if ((error = suser_xxx(oldcred, NULL, PRISON_ROOT)) != 0) goto done2; @@ -1007,7 +1006,6 @@ setresgid(td, uap) egid = uap->egid; rgid = uap->rgid; sgid = uap->sgid; - mtx_lock(&Giant); oldcred = p->p_ucred; if (((rgid != (gid_t)-1 && rgid != oldcred->cr_rgid && |