From patchwork Tue May 14 11:50:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Enge X-Patchwork-Id: 64424 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id A56C927BBEA; Tue, 14 May 2024 12:56:32 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_PASS autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 321B427BBE2 for ; Tue, 14 May 2024 12:56:32 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s6qlZ-0007Vc-7y; Tue, 14 May 2024 07:56:21 -0400 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 1s6qlS-0007Uv-G3 for guix-patches@gnu.org; Tue, 14 May 2024 07:56:18 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s6qlF-0008H4-UA for guix-patches@gnu.org; Tue, 14 May 2024 07:56:13 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s6qlG-0003xH-EJ for guix-patches@gnu.org; Tue, 14 May 2024 07:56:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70933] [PATCH] system: Do not add "--disable-chroot" to containers. Resent-From: Andreas Enge Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 14 May 2024 11:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 70933 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 70933@debbugs.gnu.org Cc: Andreas Enge X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.171568775515195 (code B ref -1); Tue, 14 May 2024 11:56:02 +0000 Received: (at submit) by debbugs.gnu.org; 14 May 2024 11:55:55 +0000 Received: from localhost ([127.0.0.1]:38910 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s6ql8-0003x1-L4 for submit@debbugs.gnu.org; Tue, 14 May 2024 07:55:54 -0400 Received: from lists.gnu.org ([209.51.188.17]:37642) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s6ql4-0003wv-2e for submit@debbugs.gnu.org; Tue, 14 May 2024 07:55:53 -0400 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 1s6ql2-0007NL-LK for guix-patches@gnu.org; Tue, 14 May 2024 07:55:48 -0400 Received: from hera.aquilenet.fr ([2a0c:e300::1]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s6qky-000833-1i for guix-patches@gnu.org; Tue, 14 May 2024 07:55:48 -0400 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 486381AF1; Tue, 14 May 2024 13:55:38 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at hera.aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mwXudKHg1Mbc; Tue, 14 May 2024 13:55:37 +0200 (CEST) Received: from jurong.as207910.net (unknown [IPv6:2001:678:984:800:7aea:3b12:7efa:b1bc]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 893C715D; Tue, 14 May 2024 13:55:37 +0200 (CEST) From: Andreas Enge Date: Tue, 14 May 2024 13:50:34 +0200 Message-ID: <67f49b23cfe3755c6802e2fc3351ef3cf0dcdfda.1715687434.git.andreas@enge.fr> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Received-SPF: pass client-ip=2a0c:e300::1; envelope-from=andreas@enge.fr; helo=hera.aquilenet.fr X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, 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: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches The rationale for these lines is that they enable non-privileged docker containers. But I would like to create a privileged container with chroot (in an openshift environment, where I suppose this environment does additional encapsulation to enforce security), which these lines prevent. Users can still add the option. Alternatively, we could add an additional field "chroot? (default: #t)" to guix-configuration. Andreas * gnu/system/linux-container.scm (containerized-operating-system): Do not add "--disable-chroot". Change-Id: I1eff9aa0d02d6e53bd4e42f3aeb07d0ab42616a8 --- gnu/system/linux-container.scm | 11 ----------- 1 file changed, 11 deletions(-) base-commit: a682ddd70846d488cfbd82d65e8566ec6739813c diff --git a/gnu/system/linux-container.scm b/gnu/system/linux-container.scm index c780b68fba..2fc54a8121 100644 --- a/gnu/system/linux-container.scm +++ b/gnu/system/linux-container.scm @@ -159,17 +159,6 @@ (define* (containerized-operating-system os mappings (nscd-configuration (inherit (service-value s)) (caches %nscd-container-caches)))) - ((eq? guix-service-type (service-kind s)) - ;; Pass '--disable-chroot' so that - ;; guix-daemon can build thing even in - ;; Docker without '--privileged'. - (service guix-service-type - (guix-configuration - (inherit (service-value s)) - (extra-options - (cons "--disable-chroot" - (guix-configuration-extra-options - (service-value s))))))) (else s))) (operating-system-user-services os)))) (file-systems (append (map mapping->fs