From db87b06ffbc16a574bbc753b6ea96d9490e2ecf6 Mon Sep 17 00:00:00 2001 From: Claudio Jeker Date: Fri, 3 Jan 2020 09:46:42 +0000 Subject: Retire csignal() the last users were converted to use pgsigio(9) instead. OK visa@ anton@ --- sys/kern/kern_sig.c | 29 +---------------------------- sys/sys/signalvar.h | 3 +-- 2 files changed, 2 insertions(+), 30 deletions(-) (limited to 'sys') 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 $ */ /* @@ -711,33 +711,6 @@ killpg1(struct proc *cp, int signum, int pgid, int all) #define CANSIGIO(cr, pr) \ 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); -- cgit v1.2.3