From owner-p4-projects@FreeBSD.ORG Wed Jun 17 11:29:42 2009 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A9708106566C; Wed, 17 Jun 2009 11:29:42 +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 697F11065673 for ; Wed, 17 Jun 2009 11:29:42 +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 562438FC15 for ; Wed, 17 Jun 2009 11:29:42 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n5HBTgUO053206 for ; Wed, 17 Jun 2009 11:29:42 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 n5HBTgLx053203 for perforce@freebsd.org; Wed, 17 Jun 2009 11:29:42 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Wed, 17 Jun 2009 11:29:42 GMT Message-Id: <200906171129.n5HBTgLx053203@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 Cc: Subject: PERFORCE change 164570 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Jun 2009 11:29:43 -0000 http://perforce.freebsd.org/chv.cgi?CH=164570 Change 164570 by rwatson@rwatson_freebsd_capabilities on 2009/06/17 11:29:06 Make lcs_get() error reporting cleaner -- now that people can't run sandboxed binaries by mistake, we report it in a programmer-centric way. Affected files ... .. //depot/projects/trustedbsd/capabilities/src/tools/cap/fdrpc/fdrpc.c#2 edit .. //depot/projects/trustedbsd/capabilities/src/tools/cap/fdsendrecv/fdsendrecv.c#2 edit .. //depot/projects/trustedbsd/capabilities/src/tools/cap/sandbox_echo/sandbox_echo.c#7 edit Differences ... ==== //depot/projects/trustedbsd/capabilities/src/tools/cap/fdrpc/fdrpc.c#2 (text+ko) ==== @@ -97,7 +97,7 @@ size_t len; if (lcs_get(&lchp) < 0) - errx(-1, "libcapability sandbox binary"); + err(-1, "lcs_get"); while (1) { fdcount = 2; ==== //depot/projects/trustedbsd/capabilities/src/tools/cap/fdsendrecv/fdsendrecv.c#2 (text+ko) ==== @@ -93,7 +93,7 @@ int fdarray[2], fdcount; if (lcs_get(&lchp) < 0) - errx(-1, "libcapability sandbox binary"); + err(-1, "lcs_get"); while (1) { fdcount = 2; ==== //depot/projects/trustedbsd/capabilities/src/tools/cap/sandbox_echo/sandbox_echo.c#7 (text+ko) ==== @@ -96,7 +96,7 @@ int fd; if (lcs_get(&lchp) < 0) - errx(-1, "libcapability sandbox binary"); + err(-1, "lcs_get"); /* * If 'nested mode is requested, launch a further sandbox and proxy