diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2018-07-20 21:57:27 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2018-07-20 21:57:27 +0000 |
commit | dd385324cfd12c1c8b2d939d11ae8d0b91ecd7da (patch) | |
tree | b0ac1ede7408775061472390e6b12c23ca79949b /sys | |
parent | 4f1deb50a2493333eaa78753dc0d1afc3b938c50 (diff) |
Remove a few leftovers from the days of emulation, which could result in
a bad/corrupt binary not returning ENOEXEC but some other error.
ok guenther kettenis bluhm
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/exec_elf.c | 5 | ||||
-rw-r--r-- | sys/kern/init_main.c | 5 | ||||
-rw-r--r-- | sys/kern/kern_exec.c | 4 | ||||
-rw-r--r-- | sys/sys/proc.h | 6 |
4 files changed, 6 insertions, 14 deletions
diff --git a/sys/kern/exec_elf.c b/sys/kern/exec_elf.c index 328e549157b..4af0134b9b0 100644 --- a/sys/kern/exec_elf.c +++ b/sys/kern/exec_elf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: exec_elf.c,v 1.144 2018/07/20 21:48:27 kettenis Exp $ */ +/* $OpenBSD: exec_elf.c,v 1.145 2018/07/20 21:57:26 deraadt Exp $ */ /* * Copyright (c) 1996 Per Fogelstrom @@ -147,8 +147,7 @@ struct emul emul_elf = { coredump_elf, sigcode, esigcode, - sigcoderet, - EMUL_ENABLED | EMUL_NATIVE, + sigcoderet }; /* diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c index f4381ae8bd6..397d8f8f2a6 100644 --- a/sys/kern/init_main.c +++ b/sys/kern/init_main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: init_main.c,v 1.278 2018/07/10 04:19:59 guenther Exp $ */ +/* $OpenBSD: init_main.c,v 1.279 2018/07/20 21:57:26 deraadt Exp $ */ /* $NetBSD: init_main.c,v 1.84.4.1 1996/06/02 09:08:06 mrg Exp $ */ /* @@ -174,8 +174,7 @@ struct emul emul_native = { NULL, /* coredump */ sigcode, esigcode, - sigcoderet, - EMUL_ENABLED | EMUL_NATIVE, + sigcoderet }; diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index 98a30c4aee0..0f71fb9d972 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_exec.c,v 1.199 2018/07/13 09:25:23 beck Exp $ */ +/* $OpenBSD: kern_exec.c,v 1.200 2018/07/20 21:57:26 deraadt Exp $ */ /* $NetBSD: kern_exec.c,v 1.75 1996/02/09 18:59:28 christos Exp $ */ /*- @@ -185,8 +185,6 @@ check_exec(struct proc *p, struct exec_package *epp) if (execsw[i].es_check == NULL) continue; newerror = (*execsw[i].es_check)(p, epp); - if (!newerror && !(epp->ep_emul->e_flags & EMUL_ENABLED)) - newerror = EPERM; /* make sure the first "interesting" error code is saved. */ if (!newerror || error == ENOEXEC) error = newerror; diff --git a/sys/sys/proc.h b/sys/sys/proc.h index a797838c3f3..a0910150c31 100644 --- a/sys/sys/proc.h +++ b/sys/sys/proc.h @@ -1,4 +1,4 @@ -/* $OpenBSD: proc.h,v 1.252 2018/07/13 09:25:23 beck Exp $ */ +/* $OpenBSD: proc.h,v 1.253 2018/07/20 21:57:26 deraadt Exp $ */ /* $NetBSD: proc.h,v 1.44 1996/04/22 01:23:21 christos Exp $ */ /*- @@ -112,12 +112,8 @@ struct emul { char *e_sigcode; /* Start of sigcode */ char *e_esigcode; /* End of sigcode */ char *e_esigret; /* sigaction RET position */ - int e_flags; /* Flags, see below */ struct uvm_object *e_sigobject; /* shared sigcode object */ }; -/* Flags for e_flags */ -#define EMUL_ENABLED 0x0001 /* Allow exec to continue */ -#define EMUL_NATIVE 0x0002 /* Always enabled */ /* * time usage: accumulated times in ticks |