Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 2 Feb 2010 17:55:00 GMT
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 174164 for review
Message-ID:  <201002021755.o12Ht0ID094647@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/chv.cgi?CH=174164

Change 174164 by rwatson@rwatson_vimage_client on 2010/02/02 17:54:38

	When creating a sandbox from within a sandbox, look in the global
	fdlist inherited from the parent sandbox to find the runtime linker.

Affected files ...

.. //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_host.c#15 edit

Differences ...

==== //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_host.c#15 (text+ko) ====

@@ -30,7 +30,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $P4: //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_host.c#14 $
+ * $P4: //depot/projects/trustedbsd/capabilities/src/lib/libcapsicum/libcapsicum_host.c#15 $
  */
 
 #include <sys/param.h>
@@ -276,7 +276,14 @@
 	bzero(lcsp, sizeof(*lcsp));
 
 	if (ld_insandbox()) {
-		if (ld_libcache_lookup(LD_ELF_CAP_SO, &fd_rtld) < 0)
+		struct lc_fdlist *globals;
+		int pos = 0;
+
+		globals = lc_fdlist_global();
+		if (globals == NULL)
+			goto out_error;
+		if (lc_fdlist_lookup(globals, RTLD_CAP_FQNAME, "rtld", NULL,
+		    &fd_rtld, &pos) < 0)
 			goto out_error;
 	} else {
 		fd_rtld = open(PATH_LD_ELF_CAP_SO "/" LD_ELF_CAP_SO,



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