From dd385324cfd12c1c8b2d939d11ae8d0b91ecd7da Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Fri, 20 Jul 2018 21:57:27 +0000 Subject: 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 --- sys/kern/kern_exec.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'sys/kern/kern_exec.c') 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; -- cgit v1.2.3