summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2015-11-02 23:17:24 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2015-11-02 23:17:24 +0000
commitc1cbf8f45c17e01bf79f19dd18e74ffd6d9a42c0 (patch)
tree4df27b9f8da11b438ac50a878ae402de90696134
parent3868378771ec99ba127c73ebc3130812abdadb0a (diff)
some tweaks to the signal code.
allow signals to any thread (they'll be checked within process later). guenther also notes the pid check should be process pid, not proc pid.
-rw-r--r--sys/kern/kern_pledge.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_pledge.c b/sys/kern/kern_pledge.c
index fbb49f89fcc..35fc3485d8b 100644
--- a/sys/kern/kern_pledge.c
+++ b/sys/kern/kern_pledge.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_pledge.c,v 1.100 2015/11/02 17:53:00 semarie Exp $ */
+/* $OpenBSD: kern_pledge.c,v 1.101 2015/11/02 23:17:23 tedu Exp $ */
/*
* Copyright (c) 2015 Nicholas Marriott <nicm@openbsd.org>
@@ -1363,7 +1363,7 @@ pledge_kill(struct proc *p, pid_t pid)
return 0;
if (p->p_p->ps_pledge & PLEDGE_PROC)
return 0;
- if (pid == 0 || pid == p->p_pid || pid == p->p_pid + THREAD_PID_OFFSET)
+ if (pid == 0 || pid == p->p_p->ps_pid || pid > THREAD_PID_OFFSET)
return 0;
return pledge_fail(p, EPERM, PLEDGE_PROC);
}