diff options
author | rwatson <rwatson@FreeBSD.org> | 2001-03-29 22:59:44 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2001-03-29 22:59:44 +0000 |
commit | ee8ddd6ff34a44f958b574a02f55c29d2de51eb3 (patch) | |
tree | c56d946729c3d66cd63111f9bcd2a692d36488f6 /sys/kern/kern_prot.c | |
parent | 934e9969934849c43a131ad90e71a6240362ff75 (diff) | |
download | FreeBSD-src-ee8ddd6ff34a44f958b574a02f55c29d2de51eb3.zip FreeBSD-src-ee8ddd6ff34a44f958b574a02f55c29d2de51eb3.tar.gz |
o Restructure privilege check associated with process visibility for
ps_showallprocs such that if superuser is present to override process
hiding, the search falls through [to success]. When additional
restrictions are placed on process visibility, such as MAC, new clauses
will be placed above the return(0).
Obtained from: TrustedBSD Project
Diffstat (limited to 'sys/kern/kern_prot.c')
-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 1bae10b..8ced323 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -984,9 +984,7 @@ u_cansee(struct ucred *u1, struct ucred *u2) if ((error = prison_check(u1, u2))) return (error); if (!ps_showallprocs && u1->cr_uid != u2->cr_uid) { - if (suser_xxx(u1, NULL, PRISON_ROOT) == 0) - return (0); - else + if (suser_xxx(u1, NULL, PRISON_ROOT) != 0) return (ESRCH); } return (0); |