svn commit: r315860 - head/sys/kern
Ed Schouten
ed at FreeBSD.org
Thu Mar 23 14:09:46 UTC 2017
Author: ed
Date: Thu Mar 23 14:09:45 2017
New Revision: 315860
URL: https://svnweb.freebsd.org/changeset/base/315860
Log:
Don't require the presence of the compat_3_brand.
The existing ELF image activator requires the brandinfo to provide such
a string unconditionally, even if the executable format in question
doesn't use this type of branding. Skip matching when it's a null
pointer.
Reviewed by: kib
MFC after: 2 weeks
Modified:
head/sys/kern/imgact_elf.c
Modified: head/sys/kern/imgact_elf.c
==============================================================================
--- head/sys/kern/imgact_elf.c Thu Mar 23 13:28:16 2017 (r315859)
+++ head/sys/kern/imgact_elf.c Thu Mar 23 14:09:45 2017 (r315860)
@@ -312,8 +312,9 @@ __elfN(get_brandinfo)(struct image_param
continue;
if (hdr->e_machine == bi->machine &&
(hdr->e_ident[EI_OSABI] == bi->brand ||
+ (bi->compat_3_brand != NULL &&
strcmp((const char *)&hdr->e_ident[OLD_EI_BRAND],
- bi->compat_3_brand) == 0)) {
+ bi->compat_3_brand) == 0))) {
/* Looks good, but give brand a chance to veto */
if (!bi->header_supported ||
bi->header_supported(imgp)) {
More information about the svn-src-all
mailing list