diff options
author | sobomax <sobomax@FreeBSD.org> | 2005-12-26 21:23:57 +0000 |
---|---|---|
committer | sobomax <sobomax@FreeBSD.org> | 2005-12-26 21:23:57 +0000 |
commit | 34fa5a81a54eaa10eb4a68d7f7e3345ece4f9e28 (patch) | |
tree | 915d25cef97f2d33bc2aa9fb449ee4c0faa7722d /sys/i386 | |
parent | b9da93266fdc570180552a109592b65aedf45357 (diff) | |
download | FreeBSD-src-34fa5a81a54eaa10eb4a68d7f7e3345ece4f9e28.zip FreeBSD-src-34fa5a81a54eaa10eb4a68d7f7e3345ece4f9e28.tar.gz |
Remove kern.elf32.can_exec_dyn sysctl. Instead extend Brandinfo structure
with flags bitfield and set BI_CAN_EXEC_DYN flag for all brands that usually
allow executing elf dynamic binaries (aka shared libraries). When it is
requested to execute ET_DYN elf image check if this flag is on after we
know the elf brand allowing execution if so.
PR: kern/87615
Submitted by: Marcin Koziej <creep@desk.pl>
Diffstat (limited to 'sys/i386')
-rw-r--r-- | sys/i386/i386/elf_machdep.c | 2 | ||||
-rw-r--r-- | sys/i386/linux/linux_sysvec.c | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/sys/i386/i386/elf_machdep.c b/sys/i386/i386/elf_machdep.c index d8756cc..2b3ffb4 100644 --- a/sys/i386/i386/elf_machdep.c +++ b/sys/i386/i386/elf_machdep.c @@ -82,6 +82,7 @@ static Elf32_Brandinfo freebsd_brand_info = { "/libexec/ld-elf.so.1", &elf32_freebsd_sysvec, NULL, + 0, }; SYSINIT(elf32, SI_SUB_EXEC, SI_ORDER_ANY, @@ -96,6 +97,7 @@ static Elf32_Brandinfo freebsd_brand_oinfo = { "/usr/libexec/ld-elf.so.1", &elf32_freebsd_sysvec, NULL, + 0, }; SYSINIT(oelf32, SI_SUB_EXEC, SI_ORDER_ANY, diff --git a/sys/i386/linux/linux_sysvec.c b/sys/i386/linux/linux_sysvec.c index f28371d..1335f9a 100644 --- a/sys/i386/linux/linux_sysvec.c +++ b/sys/i386/linux/linux_sysvec.c @@ -868,6 +868,7 @@ static Elf32_Brandinfo linux_brand = { "/lib/ld-linux.so.1", &elf_linux_sysvec, NULL, + BI_CAN_EXEC_DYN, }; static Elf32_Brandinfo linux_glibc2brand = { @@ -878,6 +879,7 @@ static Elf32_Brandinfo linux_glibc2brand = { "/lib/ld-linux.so.2", &elf_linux_sysvec, NULL, + BI_CAN_EXEC_DYN, }; Elf32_Brandinfo *linux_brandlist[] = { |