Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 26 Dec 2015 15:40:12 +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: r292749 - head/sys/kern
Message-ID:  <201512261540.tBQFeCYU073089@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Sat Dec 26 15:40:12 2015
New Revision: 292749
URL: https://svnweb.freebsd.org/changeset/base/292749

Log:
  Do not substitute interpeter if the brand interpreter path is
  different from the interpreter path requested by the binary.
  
  Before this change, it is impossible to activate non-default
  interpreter for 32bit image on amd64, when /libexec/ld-elf32.so.1 file
  exists.
  
  Sponsored by:	The FreeBSD Foundation
  MFC after:	2 weeks

Modified:
  head/sys/kern/imgact_elf.c

Modified: head/sys/kern/imgact_elf.c
==============================================================================
--- head/sys/kern/imgact_elf.c	Sat Dec 26 14:23:35 2015	(r292748)
+++ head/sys/kern/imgact_elf.c	Sat Dec 26 15:40:12 2015	(r292749)
@@ -1002,7 +1002,9 @@ __CONCAT(exec_, __elfN(imgact))(struct i
 			if (error == 0)
 				have_interp = TRUE;
 		}
-		if (!have_interp && newinterp != NULL) {
+		if (!have_interp && newinterp != NULL &&
+		    (brand_info->interp_path == NULL ||
+		    strcmp(interp, brand_info->interp_path) == 0)) {
 			error = __elfN(load_file)(imgp->proc, newinterp, &addr,
 			    &imgp->entry_addr, sv->sv_pagesize);
 			if (error == 0)



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