summaryrefslogtreecommitdiff
path: root/lib/libkvm/kvm_file2.c
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2012-03-13 17:28:52 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2012-03-13 17:28:52 +0000
commit5ae72ca8a2356f9f6c263bc06c840dd3f7934b66 (patch)
tree8c2cba7f29cb98579599041c7ae10bf6ed63b1f5 /lib/libkvm/kvm_file2.c
parentba9e78c52aa5df2ea83f2f2badcc9a6f25dd9d0d (diff)
0 is a valid uid for files sysctl, don't skip it. reminded by guenther
Diffstat (limited to 'lib/libkvm/kvm_file2.c')
-rw-r--r--lib/libkvm/kvm_file2.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libkvm/kvm_file2.c b/lib/libkvm/kvm_file2.c
index 37b8485b883..cfb11f92043 100644
--- a/lib/libkvm/kvm_file2.c
+++ b/lib/libkvm/kvm_file2.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kvm_file2.c,v 1.19 2012/01/07 05:38:12 guenther Exp $ */
+/* $OpenBSD: kvm_file2.c,v 1.20 2012/03/13 17:28:51 tedu Exp $ */
/*
* Copyright (c) 2009 Todd C. Miller <Todd.Miller@courtesan.com>
@@ -327,7 +327,7 @@ kvm_deadfile2_byid(kvm_t *kd, int op, int arg, size_t esize, int *cnt)
continue;
}
} else /* if (op == KERN_FILE_BYUID) */ {
- if (arg > 0 && proc.p_ucred->cr_uid != (uid_t)arg) {
+ if (arg >= 0 && proc.p_ucred->cr_uid != (uid_t)arg) {
/* not the uid we are looking for */
continue;
}