Do not include the ELF 'catch all' entry in execsw[] by default, which
used to make ELF binaries unmatched by any signature check to be run under NetBSD 'emulation'. This causes problems like kern/12253. The old behaviour is available with option EXEC_ELF_CATCHALL.
This commit is contained in:
parent
27e3cda68b
commit
3fd1ca0fc9
@ -1,4 +1,4 @@
|
||||
# $NetBSD: files,v 1.447 2001/06/16 12:00:03 jdolecek Exp $
|
||||
# $NetBSD: files,v 1.448 2001/06/19 17:58:41 jdolecek Exp $
|
||||
|
||||
# @(#)files.newconf 7.5 (Berkeley) 5/10/93
|
||||
|
||||
@ -34,7 +34,7 @@ defopt opt_poollog.h POOL_LOGSIZE
|
||||
|
||||
defopt opt_revcache.h NAMECACHE_ENTER_REVERSE
|
||||
|
||||
defopt opt_execfmt.h EXEC_AOUT EXEC_COFF EXEC_ECOFF EXEC_ELF32 EXEC_ELF64 EXEC_SCRIPT
|
||||
defopt opt_execfmt.h EXEC_AOUT EXEC_COFF EXEC_ECOFF EXEC_ELF32 EXEC_ELF64 EXEC_SCRIPT EXEC_ELF_CATCHALL
|
||||
|
||||
# compatibility options
|
||||
defopt COMPAT_FREEBSD
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: exec_conf.c,v 1.56 2001/05/15 02:00:12 lukem Exp $ */
|
||||
/* $NetBSD: exec_conf.c,v 1.57 2001/06/19 17:58:41 jdolecek Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1993, 1994 Christopher G. Demetriou
|
||||
@ -246,10 +246,12 @@ const struct execsw execsw_builtin[] = {
|
||||
IBCS2_ELF_AUX_ARGSIZ, elf32_copyargs, setregs },
|
||||
/* SCO 32bit ELF bins (not 64bit safe) */
|
||||
#endif
|
||||
#ifdef EXEC_ELF_CATCHALL
|
||||
{ sizeof (Elf32_Ehdr), exec_elf32_makecmds, { NULL },
|
||||
&emul_netbsd, EXECSW_PRIO_LAST, /* catch all entry */
|
||||
&emul_netbsd, EXECSW_PRIO_LAST,
|
||||
howmany(ELF_AUX_ENTRIES * sizeof(Aux32Info), sizeof (Elf32_Addr)),
|
||||
elf32_copyargs, setregs }, /* NetBSD 32bit ELF bins */
|
||||
elf32_copyargs, setregs }, /* catch all - run as NetBSD 32bit ELF */
|
||||
#endif
|
||||
#endif /* EXEC_ELF32 */
|
||||
#ifdef EXEC_ELF64
|
||||
/* 64bit ELF bins */
|
||||
@ -272,10 +274,12 @@ const struct execsw execsw_builtin[] = {
|
||||
SVR4_AUX_ARGSIZ64,
|
||||
svr4_copyargs64, svr4_setregs }, /* SVR4 64bit ELF bins (not 64bit safe) */
|
||||
#endif
|
||||
#ifdef EXEC_ELF_CATCHALL
|
||||
{ sizeof (Elf64_Ehdr), exec_elf64_makecmds, { NULL },
|
||||
&emul_netbsd, EXECSW_PRIO_ANY,
|
||||
howmany(ELF_AUX_ENTRIES * sizeof(Aux64Info), sizeof (Elf64_Addr)),
|
||||
elf64_copyargs, setregs }, /* NetBSD 64bit ELF bins */
|
||||
elf64_copyargs, setregs }, /* catch all - run as NetBSD 64bit ELF */
|
||||
#endif
|
||||
#endif /* EXEC_ELF64 */
|
||||
#ifdef COMPAT_SUNOS
|
||||
#ifdef COMPAT_NETBSD32
|
||||
|
Loading…
Reference in New Issue
Block a user