From nobody Wed Nov 27 14:10:14 2024 X-Original-To: dev-commits-src-all@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 4Xz1YM0gtqz5fG2j; Wed, 27 Nov 2024 14:10:15 +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 4Xz1YL537Fz4VMZ; Wed, 27 Nov 2024 14:10:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732716614; 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=JJImtjoG99vvyM+X5Q5d0NDTeMqCPe6ythTnZmWXirM=; b=cGIEVtg2phuqschXuXWPR/7U+aj6CAiXWcBIUmfMXBdgLRCfK9HYIZXTtAOAX32K8oNeqV YW0DgvKfXDy0H6VCWFyVpmetk1Gu8XDGoPPgMT7DyxrdP/8dbjfuZQCtTJyMxheiFkBDf2 NXIyz9P2jXhZu2G0JrQLbtsZy4Wu6eS0fkogNR4S1Kq149XJoHmMKeHql81WHUw+ceavk/ M+tTa8lG3pPLoNRP1C/TJS35Jhv7prFx25C/xQXk39+UsA6HwYGBZLbx0O6DQFa5Uh3ITz HtoKwSSOK8kRxcCckPyq21a0dzp6aXbqklKrckOzfB1i2TdqJ2PvlNG/qEfnmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732716614; 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=JJImtjoG99vvyM+X5Q5d0NDTeMqCPe6ythTnZmWXirM=; b=rhRd+EfyC64Y6NMbmJOnp2ZEc5cFraZzR1MjiM7OI2Qh8eiauC8euVvHHvr5HMk1QNkBHr 3WRFhFuTZdKOc+600a3yaeTZBW9LvVq0ZQ0OJKTLVyjTQ1vv3m3LUtOluGFleQPOPdPg2b ZIcs3rF4TUFEsVqeOrLEY8lXrtnUdJAroeW7fNlAao8XVfAlAmpsk4h1x9YS/krrlZ6vs/ e6n+RUMcxsWNUTYepTznrO2M0hEou8qZIj7QZUN6CVUI+SJ+eB7n3r4pLbSqY7563Ux8yh tzFBokwy2dnUvajCBVznqM9wxzQpBxuquUX5xKaA9pffPfEuo1m5dA/r20BAtA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732716614; a=rsa-sha256; cv=none; b=yxFd1CwgSVdDjPQHbVebh0VzyDJlXzwnNrk442SYyD98y+ctXDRHpNQUPsvdOpdSz2FXBp OuJsr/2ZYelBLa8Re7vPnAkaWqwhreUNamOehsnA8UNEfWPZHq4ABmWN+YBCb9iIkCf/co eZx45meSWw/+7sjNxU1M3jZA4yMSIlZUtY+e5fDLjK37C+wG7U7ggBVixygrVJg8chE1Zm 5MdpQP0v0C439ygw5GYeW6bzea/pUpVmHnxebhu6M+0UeI/HfJzLjXVnvHFTaaIhjedS06 +1rJvCI4KFgim08ChUaIl9T8XrDCLt4sAUqXdyCzfFF0E/Y+Xtq65ZunJpWLLg== 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 4Xz1YL4fk5z1C6X; Wed, 27 Nov 2024 14:10:14 +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 4AREAEjo003883; Wed, 27 Nov 2024 14:10:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AREAEqG003875; Wed, 27 Nov 2024 14:10:14 GMT (envelope-from git) Date: Wed, 27 Nov 2024 14:10:14 GMT Message-Id: <202411271410.4AREAEqG003875@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: 24a7303821ad - main - leave(1): Capsicumise List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 24a7303821ad2343b9239ab3d12a569a70a2b99a Auto-Submitted: auto-generated The branch main has been updated by oshogbo: URL: https://cgit.FreeBSD.org/src/commit/?id=24a7303821ad2343b9239ab3d12a569a70a2b99a commit 24a7303821ad2343b9239ab3d12a569a70a2b99a Author: Faraz Vahedi AuthorDate: 2024-10-27 16:34:33 +0000 Commit: Mariusz Zaborski CommitDate: 2024-11-27 14:10:29 +0000 leave(1): Capsicumise Signed-off-by: Faraz Vahedi Reviewed by: oshogbo MFC after: 1 week Pull Request: https://github.com/freebsd/freebsd-src/pull/1499 --- usr.bin/leave/leave.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/usr.bin/leave/leave.c b/usr.bin/leave/leave.c index d4db4349d4de..73507190369e 100644 --- a/usr.bin/leave/leave.c +++ b/usr.bin/leave/leave.c @@ -37,6 +37,8 @@ #include #include +#include + static void doalarm(u_int); static void usage(void) __dead2; @@ -61,6 +63,10 @@ main(int argc, char **argv) if (setlocale(LC_TIME, "") == NULL) warn("setlocale"); + caph_cache_catpages(); + if (caph_limit_stdio() < 0 || caph_enter() < 0) + err(EXIT_FAILURE, "capsicum"); + if (argc < 2) { #define MSG1 "When do you have to leave? " (void)write(STDOUT_FILENO, MSG1, sizeof(MSG1) - 1);