From owner-svn-soc-all@FreeBSD.ORG Mon Jun 17 17:18:32 2013 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 5CB5021A for ; Mon, 17 Jun 2013 17:18:32 +0000 (UTC) (envelope-from dpl@FreeBSD.org) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::16:124]) by mx1.freebsd.org (Postfix) with ESMTP id 4E32312A1 for ; Mon, 17 Jun 2013 17:18:32 +0000 (UTC) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.7/8.14.7) with ESMTP id r5HHIWCl027255 for ; Mon, 17 Jun 2013 17:18:32 GMT (envelope-from dpl@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.7/8.14.6/Submit) id r5HHIW43027248 for svn-soc-all@FreeBSD.org; Mon, 17 Jun 2013 17:18:32 GMT (envelope-from dpl@FreeBSD.org) Date: Mon, 17 Jun 2013 17:18:32 GMT Message-Id: <201306171718.r5HHIW43027248@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to dpl@FreeBSD.org using -f From: dpl@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r253095 - in soc2013/dpl: bzip2 head/contrib/bzip2 mk MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Jun 2013 17:18:32 -0000 Author: dpl Date: Mon Jun 17 17:18:32 2013 New Revision: 253095 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=253095 Log: Work in contrib now. Deleted: soc2013/dpl/bzip2/ soc2013/dpl/mk/ Modified: soc2013/dpl/head/contrib/bzip2/bzip2.c Modified: soc2013/dpl/head/contrib/bzip2/bzip2.c ============================================================================== --- soc2013/dpl/head/contrib/bzip2/bzip2.c Mon Jun 17 15:42:21 2013 (r253094) +++ soc2013/dpl/head/contrib/bzip2/bzip2.c Mon Jun 17 17:18:32 2013 (r253095) @@ -88,6 +88,15 @@ # define SET_BINARY_MODE(fd) /**/ +/* Capsicum Support */ +# ifdef __FreeBSD__ +# include +# if __FreeBSD_version >= 900041 +# define CAPSICUM +# include +# endif +# endif + # ifdef __GNUC__ # define NORETURN __attribute__ ((noreturn)) # else @@ -1812,6 +1821,13 @@ # endif # endif +# ifdef CAPSICUM + if (cap_enter() < 0) { + fprintf ( stderr, "%s: Couldn't enter capability mode.\n", progName ); + exit(1); + } +# endif + copyFileName ( inName, (Char*)"(none)" ); copyFileName ( outName, (Char*)"(none)" );