summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_exec.c
diff options
context:
space:
mode:
authorguenther <guenther@openbsd.org>2017-02-08 20:58:30 +0000
committerguenther <guenther@openbsd.org>2017-02-08 20:58:30 +0000
commit58d298927afa44b2ca4a8979012796027d4b8803 (patch)
tree5e2ee96c015ae23a85270f42d5972dac56f03830 /sys/kern/kern_exec.c
parentAvoid printf %s NULL. From semarie@, OK djm@ (diff)
downloadwireguard-openbsd-58d298927afa44b2ca4a8979012796027d4b8803.tar.xz
wireguard-openbsd-58d298927afa44b2ca4a8979012796027d4b8803.zip
Delete the obsolete fork/exec/exit emulation hooks.
ok mpi@ dlg@
Diffstat (limited to 'sys/kern/kern_exec.c')
-rw-r--r--sys/kern/kern_exec.c23
1 files changed, 1 insertions, 22 deletions
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c
index 38a561a6c13..b69df723edf 100644
--- a/sys/kern/kern_exec.c
+++ b/sys/kern/kern_exec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_exec.c,v 1.185 2017/01/21 05:42:03 guenther Exp $ */
+/* $OpenBSD: kern_exec.c,v 1.186 2017/02/08 20:58:30 guenther Exp $ */
/* $NetBSD: kern_exec.c,v 1.75 1996/02/09 18:59:28 christos Exp $ */
/*-
@@ -680,20 +680,6 @@ sys_execve(struct proc *p, void *v, register_t *retval)
free(pack.ep_hdr, M_EXEC, pack.ep_hdrlen);
- /*
- * Call emulation specific exec hook. This can setup per-process
- * p->p_emuldata or do any other per-process stuff an emulation needs.
- *
- * If we are executing process of different emulation than the
- * original forked process, call e_proc_exit() of the old emulation
- * first, then e_proc_exec() of new emulation. If the emulation is
- * same, the exec hook code should deallocate any old emulation
- * resources held previously by this process.
- */
- if (pr->ps_emul && pr->ps_emul->e_proc_exit &&
- pr->ps_emul != pack.ep_emul)
- (*pr->ps_emul->e_proc_exit)(p);
-
p->p_descfd = 255;
if ((pack.ep_flags & EXEC_HASFD) && pack.ep_fd < 255)
p->p_descfd = pack.ep_fd;
@@ -703,13 +689,6 @@ sys_execve(struct proc *p, void *v, register_t *retval)
else
p->p_p->ps_flags &= ~PS_WXNEEDED;
- /*
- * Call exec hook. Emulation code may NOT store reference to anything
- * from &pack.
- */
- if (pack.ep_emul->e_proc_exec)
- (*pack.ep_emul->e_proc_exec)(p, &pack);
-
/* update ps_emul, the old value is no longer needed */
pr->ps_emul = pack.ep_emul;