diff options
author | Joel Sing <jsing@cvs.openbsd.org> | 2016-09-04 17:22:41 +0000 |
---|---|---|
committer | Joel Sing <jsing@cvs.openbsd.org> | 2016-09-04 17:22:41 +0000 |
commit | ac3776f61ec9e8c70155fedfaebe9009cdf286f9 (patch) | |
tree | b766047bdc63c4a9e13ae0329cca9d35dfef1bbf /sys/kern | |
parent | 126a03edb94120f0cafacbd82de5482701b4d82e (diff) |
Remove sys_o58_kill since OpenBSD 6.0 has been tagged/released.
ok deraadt@
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/kern_pledge.c | 3 | ||||
-rw-r--r-- | sys/kern/kern_sig.c | 59 | ||||
-rw-r--r-- | sys/kern/syscalls.master | 4 |
3 files changed, 4 insertions, 62 deletions
diff --git a/sys/kern/kern_pledge.c b/sys/kern/kern_pledge.c index 207970b1ed4..6de36a6d4c5 100644 --- a/sys/kern/kern_pledge.c +++ b/sys/kern/kern_pledge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_pledge.c,v 1.181 2016/08/31 07:22:43 ratchov Exp $ */ +/* $OpenBSD: kern_pledge.c,v 1.182 2016/09/04 17:22:40 jsing Exp $ */ /* * Copyright (c) 2015 Nicholas Marriott <nicm@openbsd.org> @@ -230,7 +230,6 @@ const uint64_t pledge_syscalls[SYS_MAXSYSCALL] = { * Can kill self with "stdio". Killing another pid * requires "proc" */ - [SYS_o58_kill] = PLEDGE_STDIO, [SYS_kill] = PLEDGE_STDIO, /* diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index 4a82a43f764..ac06d6eff6c 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_sig.c,v 1.203 2016/08/25 00:00:02 dlg Exp $ */ +/* $OpenBSD: kern_sig.c,v 1.204 2016/09/04 17:22:40 jsing Exp $ */ /* $NetBSD: kern_sig.c,v 1.54 1996/04/22 01:38:32 christos Exp $ */ /* @@ -561,63 +561,6 @@ sys_sigaltstack(struct proc *p, void *v, register_t *retval) } int -sys_o58_kill(struct proc *cp, void *v, register_t *retval) -{ - struct sys_o58_kill_args /* { - syscallarg(int) pid; - syscallarg(int) signum; - } */ *uap = v; - struct proc *p; - int pid = SCARG(uap, pid); - int signum = SCARG(uap, signum); - int error; - - if (pid <= THREAD_PID_OFFSET && (error = pledge_kill(cp, pid)) != 0) - return (error); - if (((u_int)signum) >= NSIG) - return (EINVAL); - if (pid > 0) { - enum signal_type type = SPROCESS; - - /* - * If the target pid is > THREAD_PID_OFFSET then this - * must be a kill of another thread in the same process. - * Otherwise, this is a process kill and the target must - * be a main thread. - */ - if (pid > THREAD_PID_OFFSET) { - if ((p = pfind(pid - THREAD_PID_OFFSET)) == NULL) - return (ESRCH); - if (p->p_p != cp->p_p) - return (ESRCH); - type = STHREAD; - } else { - /* XXX use prfind() */ - if ((p = pfind(pid)) == NULL) - return (ESRCH); - if (p->p_flag & P_THREAD) - return (ESRCH); - if (!cansignal(cp, p->p_p, signum)) - return (EPERM); - } - - /* kill single process or thread */ - if (signum) - ptsignal(p, signum, type); - return (0); - } - switch (pid) { - case -1: /* broadcast signal */ - return (killpg1(cp, signum, 0, 1)); - case 0: /* signal own process group */ - return (killpg1(cp, signum, 0, 0)); - default: /* negative explicit process group */ - return (killpg1(cp, signum, -pid, 0)); - } - /* NOTREACHED */ -} - -int sys_kill(struct proc *cp, void *v, register_t *retval) { struct sys_kill_args /* { diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master index 12f7e5fac6d..5f5606bc4f7 100644 --- a/sys/kern/syscalls.master +++ b/sys/kern/syscalls.master @@ -1,4 +1,4 @@ -; $OpenBSD: syscalls.master,v 1.173 2016/06/27 16:50:07 jsing Exp $ +; $OpenBSD: syscalls.master,v 1.174 2016/09/04 17:22:40 jsing Exp $ ; $NetBSD: syscalls.master,v 1.32 1996/04/23 10:24:21 mycroft Exp $ ; @(#)syscalls.master 8.2 (Berkeley) 1/13/94 @@ -105,7 +105,7 @@ 34 STD { int sys_chflags(const char *path, u_int flags); } 35 STD { int sys_fchflags(int fd, u_int flags); } 36 STD { void sys_sync(void); } -37 STD { int sys_o58_kill(int pid, int signum); } +37 OBSOL o58_kill 38 STD { int sys_stat(const char *path, struct stat *ub); } 39 STD { pid_t sys_getppid(void); } 40 STD { int sys_lstat(const char *path, struct stat *ub); } |