From 61d5a9043fbea6647d345d31063ded3995f3c151 Mon Sep 17 00:00:00 2001 From: rwatson Date: Tue, 14 May 2002 23:07:15 +0000 Subject: p_cansignal() returns an errno value; at some point, the check for inter-process signalling ceased to preserve and return that value, instead always returning EPERM. This meant that it was possible to "probe" the pid space for processes that were not otherwise visible. This change reverts that reversion. Obtained from: TrustedBSD Project Sponsored by: DARPA, NAI Labs --- sys/kern/kern_sig.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys') diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index 83182d9..3b01366 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -1084,9 +1084,9 @@ kill(td, uap) /* kill single process */ if ((p = pfind(uap->pid)) == NULL) { error = ESRCH; - } else if (p_cansignal(td->td_proc, p, uap->signum)) { + } else if ((error = p_cansignal(td->td_proc, p, uap->signum)) + != 0) { PROC_UNLOCK(p); - error = EPERM; } else { if (uap->signum) psignal(p, uap->signum); -- cgit v1.1