From owner-svn-src-head@freebsd.org Sat Feb 17 12:32:54 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6C16EF0906D; Sat, 17 Feb 2018 12:32:54 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 20DC37B7B0; Sat, 17 Feb 2018 12:32:54 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1BC811CBF8; Sat, 17 Feb 2018 12:32:54 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w1HCWr5G002234; Sat, 17 Feb 2018 12:32:53 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w1HCWr8N002233; Sat, 17 Feb 2018 12:32:53 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201802171232.w1HCWr8N002233@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Sat, 17 Feb 2018 12:32:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r329453 - head/bin/uuidgen X-SVN-Group: head X-SVN-Commit-Author: oshogbo X-SVN-Commit-Paths: head/bin/uuidgen X-SVN-Commit-Revision: 329453 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Feb 2018 12:32:54 -0000 Author: oshogbo Date: Sat Feb 17 12:32:53 2018 New Revision: 329453 URL: https://svnweb.freebsd.org/changeset/base/329453 Log: Capsicumize uuidgen. Modified: head/bin/uuidgen/uuidgen.c Modified: head/bin/uuidgen/uuidgen.c ============================================================================== --- head/bin/uuidgen/uuidgen.c Sat Feb 17 12:22:29 2018 (r329452) +++ head/bin/uuidgen/uuidgen.c Sat Feb 17 12:32:53 2018 (r329453) @@ -28,6 +28,9 @@ #include __FBSDID("$FreeBSD$"); +#include + +#include #include #include #include @@ -79,6 +82,12 @@ main(int argc, char *argv[]) if (argc) usage(); + + caph_cache_catpages(); + if (caph_limit_stdio() < 0) + err(1, "Unable to limit stdio"); + if (cap_enter() < 0 && errno != ENOSYS) + err(1, "Unable to enter capability mode"); if (count == -1) count = 1;