summaryrefslogtreecommitdiff
path: root/sys/compat/svr4
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2008-06-12 04:33:00 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2008-06-12 04:33:00 +0000
commit686fb6d90a55f9fc0f6cf0969e65468738f5ca47 (patch)
tree551e55151786c0ef5bf06ba459793baa765e3fdd /sys/compat/svr4
parent10bd7100021123bd8ef1604bdd460bfb7c9755f9 (diff)
Do not attempt to recognize foreign ELF binaries if emulation is disabled;
also recognize modern Linux binaries without branding, but with a ``GNU'' ABI note.
Diffstat (limited to 'sys/compat/svr4')
-rw-r--r--sys/compat/svr4/svr4_exec.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/compat/svr4/svr4_exec.c b/sys/compat/svr4/svr4_exec.c
index 0f06a6ce105..d7b9cc55853 100644
--- a/sys/compat/svr4/svr4_exec.c
+++ b/sys/compat/svr4/svr4_exec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: svr4_exec.c,v 1.15 2006/01/19 17:54:56 mickey Exp $ */
+/* $OpenBSD: svr4_exec.c,v 1.16 2008/06/12 04:32:59 miod Exp $ */
/* $NetBSD: svr4_exec.c,v 1.16 1995/10/14 20:24:20 christos Exp $ */
/*
@@ -126,6 +126,9 @@ svr4_elf_probe(p, epp, itp, pos, os)
int error;
size_t len;
+ if (!(emul_svr4.e_flags & EMUL_ENABLED))
+ return (ENOEXEC);
+
if (itp) {
if ((error = emul_find(p, NULL, svr4_emul_path, itp, &bp, 0)))
return (error);