diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2002-05-08 19:24:43 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2002-05-08 19:24:43 +0000 |
commit | d06c4761af4af3f145f3896e61034e335b7ed0fa (patch) | |
tree | ee79611fd7c8b8271d6c5ad018cfd9644563d15a /sys/kern | |
parent | 23148d9df85bd3053d6d527cd6f0ef1ab0c19945 (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.c | 5 |
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 */ |