From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.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 GN9mAZ8xX2LfvwAAbAwnHQ (envelope-from ) for ; Wed, 20 Apr 2022 00:03:11 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id YAGPAJ8xX2IHeQAAG6o9tA (envelope-from ) for ; Wed, 20 Apr 2022 00:03:11 +0200 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 5D88317F2B for ; Wed, 20 Apr 2022 00:03:10 +0200 (CEST) Received: from localhost ([::1]:56182 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ngvwD-0002Nq-Fe for larch@yhetil.org; Tue, 19 Apr 2022 18:03:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56136) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ngvw6-0002NS-Oy for guix-patches@gnu.org; Tue, 19 Apr 2022 18:03:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:50455) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ngvw6-00066w-Gc for guix-patches@gnu.org; Tue, 19 Apr 2022 18:03:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ngvw6-0003go-E2 for guix-patches@gnu.org; Tue, 19 Apr 2022 18:03:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#54997] [PATCH 00/12] Add "least authority" program wrapper Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 19 Apr 2022 22:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54997 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxime Devos Cc: 54997@debbugs.gnu.org Received: via spool by 54997-submit@debbugs.gnu.org id=B54997.165040575614149 (code B ref 54997); Tue, 19 Apr 2022 22:03:02 +0000 Received: (at 54997) by debbugs.gnu.org; 19 Apr 2022 22:02:36 +0000 Received: from localhost ([127.0.0.1]:44352 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ngvvf-0003g9-MP for submit@debbugs.gnu.org; Tue, 19 Apr 2022 18:02:35 -0400 Received: from eggs.gnu.org ([209.51.188.92]:34590) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ngvve-0003fw-1L for 54997@debbugs.gnu.org; Tue, 19 Apr 2022 18:02:34 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:50164) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ngvvY-00064v-FB; Tue, 19 Apr 2022 18:02:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=AvZwtU8uJWDpPKX1GYzuJ+rYQ0CiMmf9k8BqZgW4yx4=; b=JP8VBNr6va5LvR1Vm32H OrjMzdXrnED83yrV+WAP49hVXg/OTv5ZvcQROmFfd6JN1OF0EGgmvChYt0zH0E0OULZxqH3xbOBOB WCepuUEdjGwpzYbYXpZXmSG349V8zthQjsjCZbpk9sIANlARdInKqH4peelQ3c8r4WEPbPdDE9zZy HHjKv4kM6r0BIuRfZ2ExufrR9k/MQBmivrQRK23qWc4BOaMSDGTo1k8YkOInpSXvzHdyJouWxNu3o l3+WqpUNkQxVclgEqSQX3BBdp+Ru6cUgB0aCi+v72rObM+wTPehDTfZ4jsZlfI8/37qVDUeiHOHBF sngctScv47zRiw==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:65127 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ngvvY-0000Ih-2k; Tue, 19 Apr 2022 18:02:28 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20220417210453.27884-1-ludo@gnu.org> <20220417210453.27884-9-ludo@gnu.org> <4eac7fd571ddafd46bcadfa2ef5c6b3e41a162ab.camel@telenet.be> Date: Wed, 20 Apr 2022 00:02:26 +0200 In-Reply-To: <4eac7fd571ddafd46bcadfa2ef5c6b3e41a162ab.camel@telenet.be> (Maxime Devos's message of "Mon, 18 Apr 2022 11:08:02 +0200") Message-ID: <8735i8ratp.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1650405790; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=AvZwtU8uJWDpPKX1GYzuJ+rYQ0CiMmf9k8BqZgW4yx4=; b=bfkIkEF1X5vsCTLYaEUEBPXjDNds+lqsH71Wn0RIeEJ1+ADRjBC7avWA8tz+jhzLbeoIar lpS84fDiRjakoEK+a9lYYjMRB7PZ91rigZ5sOc1bdUekTbNziCRDTgDGR3lV+ZGNCcOwAa gafLxZLAkn88Xgqd8zK2Ehel5ixLJaKi5b6/c4aShAG0z5eKl2aL6dO5vPc2B/kbch4HuJ 4X2MtbQ6FNOxOJ5F3bXN0ZaYqQQEgXfNBckDSFkdXGXOXRE7RSqqZE1oXXs3Q8d3W4YpBq eDxCKx3LTiwJiHw13sYCey4T5wQMSHwu9cajjZSzznI75CkiH8eULHhkkVGl2w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1650405790; a=rsa-sha256; cv=none; b=R1Vz42dKp0jG0f0Un3Mpfli+ysHIm1XtUjgB/6xuj6YrF5bS/UyJU30uaJ1lmmq/4PSiT3 gyBPc/cufMs9j1+p7N3SiYiZcUWk+1JBN08p57t7I6PTVJnNGFbGlm33b4vanJHUmVwDUH oRkHSeQmBOtC3PZYMLNO9T0uAFePzGcURU+XOsUAH/T4iKk7XCtYEB7pT8JHuexP7aAxZP J6raoQu27IzHLA9qHS8ugeKsd59tZuvIfV5sNG+k9Vbf4HkT+RnBk7m3gRd9UZg14eC1Gy UWLjGw7Iw3MuE7CkiiMGcBbNQNxWMxZ+L71KLZQmNvwniq0xKM06HqvuUqZ46g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=JP8VBNr6; 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-Spam-Score: -5.04 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=JP8VBNr6; 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-Queue-Id: 5D88317F2B X-Spam-Score: -5.04 X-Migadu-Scanner: scn0.migadu.com X-TUID: CtvhHrZrIDnp Maxime Devos skribis: > Ludovic Court=C3=A8s schreef op zo 17-04-2022 om 23:04 [+0200]: >> [...] >> =C2=A0 >> =C2=A0(define (ipfs-binary config) >> -=C2=A0 (file-append (ipfs-configuration-package config) "/bin/ipfs")) >> +=C2=A0 (define command >> +=C2=A0=C2=A0=C2=A0 (file-append (ipfs-configuration-package config) "/b= in/ipfs")) >> + >> +=C2=A0 (least-authority-wrapper >> +=C2=A0=C2=A0 command >> +=C2=A0=C2=A0 #:name "ipfs" >> +=C2=A0=C2=A0 #:mappings (list %ipfs-home-mapping) >> +=C2=A0=C2=A0 #:namespaces (delq 'net %namespaces))) > > To simplify things later, could #:user "ipfs" and #:group "ipfs" be > added to the least-authority wrapper (and implemented in the 'least- > authority procedre)? Then ... To me it=E2=80=99s setuid/setgid is beyond the scope of =E2=80=98least-authority-wrapper=E2=80=99. And indeed, this place is the o= nly one that needs it. > would become simpler as it wouldn't need to fork, exec, waitpid and > dynamic-wind. Alternatively, if associating a user and group with a > pola wrapper is problematic (*), what do you think of defining a > 'system*/with-capabilities' or 'invoke/with-capabilities' in a central > location? I=E2=80=99m not sure what these procedures would do. I think we should build the house one brick at a time; this is the first brick but I=E2=80=99m sure there=E2=80=99ll be others as we gain more exper= ience and clearer use cases. Ludo=E2=80=99.