Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Apr 2017 13:50:23 +0000 (UTC)
From:      Ed Schouten <ed@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r316569 - stable/11/sys/kern
Message-ID:  <201704061350.v36DoNQd078884@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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)) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201704061350.v36DoNQd078884>