From 5ae72ca8a2356f9f6c263bc06c840dd3f7934b66 Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Tue, 13 Mar 2012 17:28:52 +0000 Subject: 0 is a valid uid for files sysctl, don't skip it. reminded by guenther --- lib/libkvm/kvm_file2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/libkvm/kvm_file2.c') 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 @@ -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; } -- cgit v1.2.3