From owner-svn-src-projects@FreeBSD.ORG Tue Feb 2 20:55:12 2010 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CC5C5106566B; Tue, 2 Feb 2010 20:55:12 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BC4278FC17; Tue, 2 Feb 2010 20:55:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o12KtCLs074651; Tue, 2 Feb 2010 20:55:12 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o12KtClG074649; Tue, 2 Feb 2010 20:55:12 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <201002022055.o12KtClG074649@svn.freebsd.org> From: Robert Watson Date: Tue, 2 Feb 2010 20:55:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203404 - projects/capabilities8/usr.bin/gzip X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Feb 2010 20:55:12 -0000 Author: rwatson Date: Tue Feb 2 20:55:12 2010 New Revision: 203404 URL: http://svn.freebsd.org/changeset/base/203404 Log: Merge c174161 from the p4 TrustedBSD Capabilities branch to capabilities8: Garbage collect historic library behavior of libcapsicum: no special library logic is required in gzip anymore. Modified: projects/capabilities8/usr.bin/gzip/gzsandbox.c Modified: projects/capabilities8/usr.bin/gzip/gzsandbox.c ============================================================================== --- projects/capabilities8/usr.bin/gzip/gzsandbox.c Tue Feb 2 20:51:35 2010 (r203403) +++ projects/capabilities8/usr.bin/gzip/gzsandbox.c Tue Feb 2 20:55:12 2010 (r203404) @@ -49,27 +49,10 @@ __FBSDID("$FreeBSD$"); #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 int gzsandbox_enabled; static void gzsandbox_initialize(void) { - u_int i; if (gzsandbox_initialized) return; @@ -93,17 +75,7 @@ gzsandbox_initialize(void) 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); }