summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/kern_prot.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c
index 1bae10b9f492..8ced323613be 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);