Date: Thu, 23 Mar 2017 14:09:45 +0000 (UTC) From: Ed Schouten <ed@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315860 - head/sys/kern Message-ID: <201703231409.v2NE9jwm038181@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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)) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201703231409.v2NE9jwm038181>