From owner-p4-projects@FreeBSD.ORG Tue Feb 2 17:15:20 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8A8E51065670; Tue, 2 Feb 2010 17:15:20 +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 4EC7E106566C for ; Tue, 2 Feb 2010 17:15:20 +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 3C8F08FC19 for ; Tue, 2 Feb 2010 17:15:20 +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 o12HFKGT091745 for ; Tue, 2 Feb 2010 17:15:20 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 o12HFK91091743 for perforce@freebsd.org; Tue, 2 Feb 2010 17:15:20 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Tue, 2 Feb 2010 17:15:20 GMT Message-Id: <201002021715.o12HFK91091743@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 174161 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:15:20 -0000 http://p4web.freebsd.org/chv.cgi?CH=174161 Change 174161 by rwatson@rwatson_vimage_client on 2010/02/02 17:14:40 Garbage collect historic library behavior of libcapsicum: no special library logic is required in gzip anymore. Affected files ... .. //depot/projects/trustedbsd/capabilities/src/usr.bin/gzip/gzsandbox.c#13 edit Differences ... ==== //depot/projects/trustedbsd/capabilities/src/usr.bin/gzip/gzsandbox.c#13 (text+ko) ==== @@ -49,27 +49,10 @@ #include "gzip.h" -/* - * In the future, these library dependencies won't need to be explicit, so - * this will go away. - */ -#define LC_LIB_LIBZ_SO "/lib/libz.so.5" -#define LC_LIBZ_SO "libz.so.5" - -#define LC_USR_LIB_LIBBZ2_SO "/usr/lib/libbz2.so.4" -#define LC_LIBBZ2_SO "libbz2.so.4" - #define LC_USR_BIN_GZIP_SANDBOX "/usr/bin/gzip" #ifndef NO_SANDBOX_SUPPORT -struct lc_library gzsandbox_libs[] = { - { LC_LIB_LIBZ_SO, LC_LIBZ_SO, -1 }, - { LC_USR_LIB_LIBBZ2_SO, LC_LIBBZ2_SO, -1 }, -}; -static const u_int gzsandbox_libs_count = sizeof(gzsandbox_libs) / - sizeof(gzsandbox_libs[0]); - static char *lc_sandbox_argv[] = { __DECONST(char *, LC_USR_BIN_GZIP_SANDBOX), NULL }; @@ -84,7 +67,6 @@ static void gzsandbox_initialize(void) { - u_int i; if (gzsandbox_initialized) return; @@ -93,17 +75,7 @@ if (!gzsandbox_enabled) return; - /* - * If sandboxes are in use, open libraries that we'll require in the - * sandbox and kick it off. - */ - for (i = 0; i < gzsandbox_libs_count; i++) { - gzsandbox_libs[i].lcl_fd = - open(gzsandbox_libs[i].lcl_libpath, O_RDONLY); - if (gzsandbox_libs[i].lcl_fd < 0) - err(-1, "open: %s", gzsandbox_libs[i].lcl_libname); - } - if (lch_start_libs(LC_USR_BIN_GZIP_SANDBOX, lc_sandbox_argv, + if (lch_start(LC_USR_BIN_GZIP_SANDBOX, lc_sandbox_argv, LCH_PERMIT_STDERR, NULL, &lcsp) < 0) err(-1, "lch_start %s", LC_USR_BIN_GZIP_SANDBOX); }