diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2020-01-03 09:46:42 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2020-01-03 09:46:42 +0000 |
commit | db87b06ffbc16a574bbc753b6ea96d9490e2ecf6 (patch) | |
tree | 11603cc497bd199d371b31d6c7e2dfb2162c8930 /sys | |
parent | 78f833cd7d632f5101c9396e42802f383ac1eff0 (diff) |
Retire csignal() the last users were converted to use pgsigio(9) instead.
OK visa@ anton@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/kern_sig.c | 29 | ||||
-rw-r--r-- | sys/sys/signalvar.h | 3 |
2 files changed, 2 insertions, 30 deletions
diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index 776ef7382bf..b42384cf7f8 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_sig.c,v 1.238 2019/12/31 13:48:32 visa Exp $ */ +/* $OpenBSD: kern_sig.c,v 1.239 2020/01/03 09:46:41 claudio Exp $ */ /* $NetBSD: kern_sig.c,v 1.54 1996/04/22 01:38:32 christos Exp $ */ /* @@ -712,33 +712,6 @@ killpg1(struct proc *cp, int signum, int pgid, int all) CANDELIVER((cr)->cr_ruid, (cr)->cr_uid, (pr)) /* - * Deliver signum to pgid, but first check uid/euid against each - * process and see if it is permitted. - */ -void -csignal(pid_t pgid, int signum, uid_t uid, uid_t euid) -{ - struct pgrp *pgrp; - struct process *pr; - - if (pgid == 0) - return; - if (pgid < 0) { - pgid = -pgid; - if ((pgrp = pgfind(pgid)) == NULL) - return; - LIST_FOREACH(pr, &pgrp->pg_members, ps_pglist) - if (CANDELIVER(uid, euid, pr)) - prsignal(pr, signum); - } else { - if ((pr = prfind(pgid)) == NULL) - return; - if (CANDELIVER(uid, euid, pr)) - prsignal(pr, signum); - } -} - -/* * Send a signal to a process group. If checktty is 1, * limit to members which have a controlling terminal. */ diff --git a/sys/sys/signalvar.h b/sys/sys/signalvar.h index 6181b28c63c..3db07dab10e 100644 --- a/sys/sys/signalvar.h +++ b/sys/sys/signalvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: signalvar.h,v 1.36 2019/05/13 19:21:31 bluhm Exp $ */ +/* $OpenBSD: signalvar.h,v 1.37 2020/01/03 09:46:41 claudio Exp $ */ /* $NetBSD: signalvar.h,v 1.17 1996/04/22 01:23:31 christos Exp $ */ /* @@ -160,7 +160,6 @@ struct sigio_ref; */ int coredump(struct proc *p); void execsigs(struct proc *p); -void csignal(pid_t pgid, int signum, uid_t uid, uid_t euid); int issignal(struct proc *p); void pgsigio(struct sigio_ref *sir, int sig, int checkctty); void pgsignal(struct pgrp *pgrp, int sig, int checkctty); |