Author: ed
Date: Thu Apr  6 13:50:23 2017
New Revision: 316569
URL: https://svnweb.freebsd.org/changeset/base/316569

Log:
  MFC r315860:
  
    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.

Modified:
  stable/11/sys/kern/imgact_elf.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/kern/imgact_elf.c
==============================================================================
--- stable/11/sys/kern/imgact_elf.c     Thu Apr  6 13:30:31 2017        
(r316568)
+++ stable/11/sys/kern/imgact_elf.c     Thu Apr  6 13:50:23 2017        
(r316569)
@@ -309,8 +309,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)) {
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to