From owner-p4-projects@FreeBSD.ORG Tue Feb 2 17:55:00 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 90D5910656A4; Tue, 2 Feb 2010 17:55:00 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 55632106568B for ; Tue, 2 Feb 2010 17:55:00 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 42F568FC16 for ; Tue, 2 Feb 2010 17:55:00 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o12Ht0Vo094649 for ; Tue, 2 Feb 2010 17:55:00 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o12Ht0ID094647 for perforce@freebsd.org; Tue, 2 Feb 2010 17:55:00 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Tue, 2 Feb 2010 17:55:00 GMT Message-Id: <201002021755.o12Ht0ID094647@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 174164 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2010 17:55:00 -0000 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 @@ -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,