svn commit: r293449 - stable/10/sys/kern

Konstantin Belousov kib at FreeBSD.org
Sat Jan 9 00:34:50 UTC 2016


Author: kib
Date: Sat Jan  9 00:34:48 2016
New Revision: 293449
URL: https://svnweb.freebsd.org/changeset/base/293449

Log:
  MFC r292749:
  Do not substitute interpeter if the brand interpreter path is
  different from the interpreter path requested by the binary.

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

Modified: stable/10/sys/kern/imgact_elf.c
==============================================================================
--- stable/10/sys/kern/imgact_elf.c	Sat Jan  9 00:31:24 2016	(r293448)
+++ stable/10/sys/kern/imgact_elf.c	Sat Jan  9 00:34:48 2016	(r293449)
@@ -986,7 +986,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)


More information about the svn-src-all mailing list