summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2002-05-14 23:07:15 +0000
committerrwatson <rwatson@FreeBSD.org>2002-05-14 23:07:15 +0000
commit61d5a9043fbea6647d345d31063ded3995f3c151 (patch)
tree25cd63dc436389d3eb5d1060696e3c347743b413
parent4e7e0a7753e533b441b6af6aac09020994de60d3 (diff)
downloadFreeBSD-src-61d5a9043fbea6647d345d31063ded3995f3c151.zip
FreeBSD-src-61d5a9043fbea6647d345d31063ded3995f3c151.tar.gz
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
-rw-r--r--sys/kern/kern_sig.c4
1 files changed, 2 insertions, 2 deletions
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);
OpenPOWER on IntegriCloud