summaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2002-05-08 19:24:43 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2002-05-08 19:24:43 +0000
commitd06c4761af4af3f145f3896e61034e335b7ed0fa (patch)
treeee79611fd7c8b8271d6c5ad018cfd9644563d15a /sys/kern
parent23148d9df85bd3053d6d527cd6f0ef1ab0c19945 (diff)
A process can always signal itself--no need to restrict signals even if
it is setugid. deraadt@ ok
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/kern_sig.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c
index aa456f3cbc4..ea11da63661 100644
--- a/sys/kern/kern_sig.c
+++ b/sys/kern/kern_sig.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_sig.c,v 1.57 2002/04/18 08:25:04 miod Exp $ */
+/* $OpenBSD: kern_sig.c,v 1.58 2002/05/08 19:24:42 millert Exp $ */
/* $NetBSD: kern_sig.c,v 1.54 1996/04/22 01:38:32 christos Exp $ */
/*
@@ -101,6 +101,9 @@ cansignal(p, pc, q, signum)
if (pc->pc_ucred->cr_uid == 0)
return (1); /* root can always signal */
+ if (p == q)
+ return (1); /* process can always signal itself */
+
if (signum == SIGCONT && q->p_session == p->p_session)
return (1); /* SIGCONT in session */