From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id sOq2MBlQ6WPxJQEAbAwnHQ (envelope-from ) for ; Sun, 12 Feb 2023 21:46:17 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id yD7SMBlQ6WOX7gAAauVa8A (envelope-from ) for ; Sun, 12 Feb 2023 21:46:17 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id A2AA9115D9 for ; Sun, 12 Feb 2023 21:46:17 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pRJEa-0003Cf-Ky; Sun, 12 Feb 2023 15:46:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pRJEY-0003C9-Hl for guix-patches@gnu.org; Sun, 12 Feb 2023 15:46:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pRJEY-00015d-8l for guix-patches@gnu.org; Sun, 12 Feb 2023 15:46:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pRJEX-0004WX-Ui for guix-patches@gnu.org; Sun, 12 Feb 2023 15:46:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61462] Add support for file capabilities(7) Resent-From: Tobias Geerinckx-Rice Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 12 Feb 2023 20:46:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 61462 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 61462@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.167623471817324 (code B ref -1); Sun, 12 Feb 2023 20:46:01 +0000 Received: (at submit) by debbugs.gnu.org; 12 Feb 2023 20:45:18 +0000 Received: from localhost ([127.0.0.1]:46957 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pRJDq-0004VL-Ak for submit@debbugs.gnu.org; Sun, 12 Feb 2023 15:45:18 -0500 Received: from lists.gnu.org ([209.51.188.17]:54442) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pRJDo-0004VD-J1 for submit@debbugs.gnu.org; Sun, 12 Feb 2023 15:45:16 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pRJDn-0002WH-Vy for guix-patches@gnu.org; Sun, 12 Feb 2023 15:45:16 -0500 Received: from tobias.gr ([2a02:c205:2020:6054::1]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pRJDk-0000tl-TH for guix-patches@gnu.org; Sun, 12 Feb 2023 15:45:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; s=2018; bh=48mqN4ozzI93N As3Xg8tnAUTIE+Gv+HIjmMu4HdIqG8=; h=date:subject:to:from; d=tobias.gr; b=ics9WN2xNmUAeM1QmgZA0UdxFCbGY5xRjMsSiKiOItDVR7VSHUPkTVlMdFMMn+7tOj5V l2F+Bj6lyheQnWMVVCsShldzzAQCxD9JTd86+iPquWAaDbEdz2NfjjsPfNgHwV7/4p2K43 mMyzKTTTt6U43NrtdWuKqFbJs3ON8xhXUir+SSKbY9kI7z0eRHHZMEyS6w85eizcyPzfGm n/3fwRXfyhDEWmtrABwSAj1WQorLQEY/37ABn0h58RjwjpHOGM01ChJi4J+MB59ARBRJSi o87HkdhQgN6VkDcHv4cTeVrEwbnvOJAPOF5boT6er2x/Zaw1fkJX6g0FDogRIGmw== Received: by submission.tobias.gr (OpenSMTPD) with ESMTPSA id 552c9a40 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for ; Sun, 12 Feb 2023 20:45:06 +0000 (UTC) Date: Sun, 12 Feb 2023 21:37:54 +0100 BIMI-Selector: v=BIMI1; s=default; Message-ID: <87r0uuehlr.fsf@nckx> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Received-SPF: pass client-ip=2a02:c205:2020:6054::1; envelope-from=me@tobias.gr; helo=tobias.gr X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Tobias Geerinckx-Rice X-ACL-Warn: , Tobias Geerinckx-Rice via Guix-patches From: Tobias Geerinckx-Rice via Guix-patches via Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Seal: i=1; s=key1; d=yhetil.org; t=1676234777; a=rsa-sha256; cv=none; b=phUxc8SHbWStLDk+w39IFT70HG9rFOrC9L03qHM33JUD3QhYOas9pNH0JZsntnJpX3Yexd sWaOinjmcQ1Wh+gWE5CV/9HGkh2MuXEn//SS/Ey9jQKXfcitZf6YlGRYDVVc4rh5FR/KJR HCI23Dk5+9EtpBwjQOOh+jh8cVIz1rFJ2wWcVxJA/6R+SYue95zx+t+bWXPjQJQlshezVv ElWIPNnm5z3WsmejsmXKVAWyucgKBNIo9t+jFjlK5QveQNhqN9IFHg4YTov2luMFporwdE ulxKOaumtWDQQHltiIkTRCzSDU5rXo5VqvnPyGLi2T6fLba1fbtvXXXJc8T+VQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tobias.gr header.s=2018 header.b=ics9WN2x; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1676234777; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:list-id:list-help:list-unsubscribe:list-subscribe: list-post:dkim-signature; bh=48mqN4ozzI93NAs3Xg8tnAUTIE+Gv+HIjmMu4HdIqG8=; b=fRVVYGcr25umJ8okRZWFR5LhiOVRtr/9a9NPAWwH9JQ469TMxuph6gwjWnWJX303IuO3Q9 7McM68KlfdPURYknBxokcv5imnZgNJBVZ/EhiyIUkkmQG8IMkVW2DQtVlvlnQhqzg8djdD GSZxim39j43aSMTaEJplUbMKOpTYp6ZwAa6UgHuk5BAh4/avGMb7DflBidpAWwd3qFLJd8 UqcHqec0MDxBOeBnw5IyVEuao0m84e76kbGWQnDy9zSSP7AbkbaUmko7w935iPCCjpkjuN RrT3eJxf4Tm9kuaEORcwsLc1IQHm/GOg4uMpVGu7JdqZkeG0/pXPlYlkkI1MzQ== X-Migadu-Queue-Id: A2AA9115D9 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tobias.gr header.s=2018 header.b=ics9WN2x; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Scanner: scn0.migadu.com X-Migadu-Spam-Score: -4.22 X-Spam-Score: -4.22 X-TUID: WpZwrxgro56J --=-=-= Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Hi Guix, I need to offload some of my eternally rebased local patches.=20 Here's one that makes it easy to assign capabilities(7) =E2=80=94=20 currently through setcap(8) =E2=80=94 to programmes like we can=20 set{u,g}id. There are many packages that benefit from this. Mine are: (privileged-programs (cons* (privileged-program (file-append mtr "/sbin/mtr") (capabilities "cap_net_raw+ep")) (privileged-program (file-append nethogs "/sbin/nethogs") (capabilities "cap_net_admin,cap_new_raw+ep")) (privileged-program (file-append light "/bin/light") (setuid? #t)) %default-privileged-programs)) The set's over a year old and needs a bit of love. Some details=20 might have bitrot, I probably forgot a to-do or two in that year,=20 and there's something unguixy about calling setcap(8) instead of=20 writing a completely new Guile binding/module :-) I'm quite opinionated about the setuid-programs unification: there=20 should not be multiple confusing and masking layers of privilege,=20 and it should be possible to setgid a capable executable. Kind regards, T G-R --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iIMEARYKACsWIQT12iAyS4c9C3o4dnINsP+IT1VteQUCY+lQYA0cbWVAdG9iaWFz LmdyAAoJEA2w/4hPVW15h3kBAOtjELUR1tSfAWbx7f7qjNB0pyTrg2RiycYVSiWu cBUuAQC0JQh8dHFZx3vQLwN8HH5iZt2nmiHI49u7qlNWdWiECQ== =RXHi -----END PGP SIGNATURE----- --=-=-=--