diff options
author | alfred <alfred@FreeBSD.org> | 2002-06-18 22:41:35 +0000 |
---|---|---|
committer | alfred <alfred@FreeBSD.org> | 2002-06-18 22:41:35 +0000 |
commit | 90955db2d946be00597cb98b6e3ae44930588c53 (patch) | |
tree | 7f5b1f7b1555d2c00118493ee7c237af58691eb6 /sys | |
parent | 2ddb82d19126abe4eba15d7524c82af64c611d11 (diff) | |
download | FreeBSD-src-90955db2d946be00597cb98b6e3ae44930588c53.zip FreeBSD-src-90955db2d946be00597cb98b6e3ae44930588c53.tar.gz |
setsugid() touches p->p_flag so assert that the proc is locked.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/kern_prot.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index e3d857d..cadfd62 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -1862,6 +1862,8 @@ setlogin(struct thread *td, struct setlogin_args *uap) void setsugid(struct proc *p) { + + PROC_LOCK_ASSERT(p, MA_OWNED); p->p_flag |= P_SUGID; if (!(p->p_pfsflags & PF_ISUGID)) p->p_stops = 0; |