summaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2012-03-13 17:28:33 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2012-03-13 17:28:33 +0000
commitba9e78c52aa5df2ea83f2f2badcc9a6f25dd9d0d (patch)
tree705e6fa64fc50b75730d1b6c623ba3bfd48b6a40 /sys/kern
parentdc2c7169226001061050134399de1b4aa7a45526 (diff)
0 is a valid uid for files sysctl, don't skip it. ok guenther
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/kern_sysctl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c
index e4004860236..6d0880d6033 100644
--- a/sys/kern/kern_sysctl.c
+++ b/sys/kern/kern_sysctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_sysctl.c,v 1.215 2012/03/10 05:54:28 guenther Exp $ */
+/* $OpenBSD: kern_sysctl.c,v 1.216 2012/03/13 17:28:32 tedu Exp $ */
/* $NetBSD: kern_sysctl.c,v 1.17 1996/05/20 17:49:05 mrg Exp $ */
/*-
@@ -1318,7 +1318,7 @@ sysctl_file2(int *name, u_int namelen, char *where, size_t *sizep,
|| (pp->p_p->ps_flags & PS_EXITING)
|| pp->p_stat == SIDL || pp->p_stat == SZOMB)
continue;
- if (arg > 0 && pp->p_ucred->cr_uid != (uid_t)arg) {
+ if (arg >= 0 && pp->p_ucred->cr_uid != (uid_t)arg) {
/* not the uid we are looking for */
continue;
}