summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2005-03-09 17:41:30 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2005-03-09 17:41:30 +0000
commite72b6c81d823b982b711bef1f9deed02e903581f (patch)
tree2be262ce7ad236490f829b06338e77852169535a /sys
parentf7315ed78513cedd17863b938f387163d1391136 (diff)
Fail exec for disabled compat with EPERM rather than ENOEXEC.
ok deraadt@ mickey@ millert@
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/kern_exec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c
index bb01a0e6d07..1e31b84c477 100644
--- a/sys/kern/kern_exec.c
+++ b/sys/kern/kern_exec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_exec.c,v 1.90 2004/08/24 23:01:26 mickey Exp $ */
+/* $OpenBSD: kern_exec.c,v 1.91 2005/03/09 17:41:29 miod Exp $ */
/* $NetBSD: kern_exec.c,v 1.75 1996/02/09 18:59:28 christos Exp $ */
/*-
@@ -183,7 +183,7 @@ check_exec(p, epp)
continue;
newerror = (*execsw[i].es_check)(p, epp);
if (!newerror && !(epp->ep_emul->e_flags & EMUL_ENABLED))
- newerror = ENOEXEC;
+ newerror = EPERM;
/* make sure the first "interesting" error code is saved. */
if (!newerror || error == ENOEXEC)
error = newerror;