diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2008-06-12 04:33:00 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2008-06-12 04:33:00 +0000 |
commit | 686fb6d90a55f9fc0f6cf0969e65468738f5ca47 (patch) | |
tree | 551e55151786c0ef5bf06ba459793baa765e3fdd /sys/compat/freebsd | |
parent | 10bd7100021123bd8ef1604bdd460bfb7c9755f9 (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/freebsd')
-rw-r--r-- | sys/compat/freebsd/freebsd_exec.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/compat/freebsd/freebsd_exec.c b/sys/compat/freebsd/freebsd_exec.c index 6c545c299ca..3a750dce41d 100644 --- a/sys/compat/freebsd/freebsd_exec.c +++ b/sys/compat/freebsd/freebsd_exec.c @@ -1,4 +1,4 @@ -/* $OpenBSD: freebsd_exec.c,v 1.17 2006/01/19 17:54:50 mickey Exp $ */ +/* $OpenBSD: freebsd_exec.c,v 1.18 2008/06/12 04:32:57 miod Exp $ */ /* $NetBSD: freebsd_exec.c,v 1.2 1996/05/18 16:02:08 christos Exp $ */ /* @@ -166,6 +166,9 @@ freebsd_elf_probe(p, epp, itp, pos, os) int error; size_t len; + if (!(emul_freebsd_elf.e_flags & EMUL_ENABLED)) + return (ENOEXEC); + /* * Older FreeBSD ELF binaries use a brand; newer ones use EI_OSABI */ |