From nobody Wed Nov 27 14:26:58 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xz1wg1qrKz5fH4n; Wed, 27 Nov 2024 14:26:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xz1wg0MHHz4Y84; Wed, 27 Nov 2024 14:26:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732717619; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=E2yiNHdd8Eh69bg6/OQZfAHh0xGtUBV3td+nt54I7mo=; b=db24t6SCAVNVG+yohrZEeeOGSj4+ojebTZ3PDxE1KM7p+GwXrmVTBXRGRf0g4UNILLGpOt /lZCzpCWyuymdYfuHFS5bYKlmXCkx/ci9pcAXDjNW6HB49AGTNKGPx9IC7JGk8T23MaEFC aGBHNAHg2cVQA2KgkVQzNMU5FIZEiBGqisR+OtSwX0SDHEnxVoh34ZPBXtdJnTLQr0SFHP 0QJTdN6mkEcoMWrFAoq70Ygl+K1WTPrjS4l+VHHNyQybbG+yAqHQqL/gahmAyVYQU7r4ac 9g6iP0OhpCb6+Hl/1nj2uvz7WRk4M+HxTVsVMo2Q1WjVL91fh6FOFE1SW3mGfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732717619; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=E2yiNHdd8Eh69bg6/OQZfAHh0xGtUBV3td+nt54I7mo=; b=oBgrtKYPnmpx49e5GsubRbkFdfDi2K5ItO+sn1Ih+USUUNfPwKuWfbZU3sxJMqVCWA1REq +sF3+zs4ABySZp2m4J0XQWFYMWE9I49jLVad6+tAzzc/c0K8SZrdJAC2IYlwVwA3DeM2uH ejDAj38PnAVGZkdMHeM/1hRQ934D8mjaYC2maBb9l2gcVvl5heGThd1xQj1rcaMVzTxM6Q /IghJy3CeBSkcRe8AEAqg5ElGOr8OSeSq0Y+rTu5fFIp7BcpkYT9Jiz6E8VOAGkkYWv8tO K+QmZusbN2CjIUzsgCIZSoJtQsfUJT8s/JNpRaIQF7L842Q8WwVCgS40ZBp06Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732717619; a=rsa-sha256; cv=none; b=A6Ys5DYcl3O/WFyjtvbWr4+uJ9pzZUdbLza2nzvXk79hi+TxxMkTl8j2jgpHe48fqwEqyI yvruWcnqjQ5sYTjyA4AxCOjXbzKSdmpe+/NzemE8GFBLgynQwRCVMk3iGUr59be9z5HAgA sDkZmLcrC56fkTNGIjHLkjUruD+27YahguQkfTq/jRHjxd21gcAEz6h3hMgNrXQ+dVO+Ef 8SeypxeQrqJsKypJbhI5gKvvqmMwgvOu7SeIOOn3ImfSWTVRD+KbO8gPJPkslOHb/4PM0I NCI03L+xXudPtTHE+7qo8v1X8wP8WSbUvLMPWCRlk37QnRErKm5+sGzPnA4HXg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xz1wf75TGz1CRf; Wed, 27 Nov 2024 14:26:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AREQw0O033392; Wed, 27 Nov 2024 14:26:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AREQwen033389; Wed, 27 Nov 2024 14:26:58 GMT (envelope-from git) Date: Wed, 27 Nov 2024 14:26:58 GMT Message-Id: <202411271426.4AREQwen033389@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mariusz Zaborski Subject: git: adc02d5e3cfa - main - perror(1): Capsicumise List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: oshogbo X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: adc02d5e3cfad9c9d7e12f776cad651795d9ad78 Auto-Submitted: auto-generated The branch main has been updated by oshogbo: URL: https://cgit.FreeBSD.org/src/commit/?id=adc02d5e3cfad9c9d7e12f776cad651795d9ad78 commit adc02d5e3cfad9c9d7e12f776cad651795d9ad78 Author: Faraz Vahedi AuthorDate: 2024-10-26 18:38:08 +0000 Commit: Mariusz Zaborski CommitDate: 2024-11-27 14:26:51 +0000 perror(1): Capsicumise Signed-off-by: Faraz Vahedi Reviewed by: markj, oshogbo MFC after: 1 week Pull Request: https://github.com/freebsd/freebsd-src/pull/1492 --- usr.bin/perror/perror.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/usr.bin/perror/perror.c b/usr.bin/perror/perror.c index 9b7eda8d9f70..6341928e9024 100644 --- a/usr.bin/perror/perror.c +++ b/usr.bin/perror/perror.c @@ -36,6 +36,8 @@ #include #include +#include + static void usage(void) __dead2; int @@ -46,6 +48,11 @@ main(int argc, char **argv) long errnum; (void) setlocale(LC_MESSAGES, ""); + + caph_cache_catpages(); + if (caph_limit_stdio() < 0 || caph_enter() < 0) + err(EXIT_FAILURE, "capsicum"); + if (argc != 2) usage();