Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Mar 2017 22:06:48 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r315749 - head/sys/kern
Message-ID:  <201703222206.v2MM6mck040543@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Wed Mar 22 22:06:48 2017
New Revision: 315749
URL: https://svnweb.freebsd.org/changeset/base/315749

Log:
  Adjust r314851 to not require every brand to specify interpreter path.
  
  Reported and tested by:	ed
  Sponsored by:	The FreeBSD Foundation
  MFC after:	1 week

Modified:
  head/sys/kern/imgact_elf.c

Modified: head/sys/kern/imgact_elf.c
==============================================================================
--- head/sys/kern/imgact_elf.c	Wed Mar 22 22:01:53 2017	(r315748)
+++ head/sys/kern/imgact_elf.c	Wed Mar 22 22:06:48 2017	(r315749)
@@ -318,7 +318,11 @@ __elfN(get_brandinfo)(struct image_param
 				 * Again, prefer strictly matching
 				 * interpreter path.
 				 */
-				if (strlen(bi->interp_path) + 1 ==
+				if (interp_name_len == 0 &&
+				    bi->interp_path == NULL)
+					return (bi);
+				if (bi->interp_path != NULL &&
+				    strlen(bi->interp_path) + 1 ==
 				    interp_name_len && strncmp(interp,
 				    bi->interp_path, interp_name_len) == 0)
 					return (bi);



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