From patchwork Thu Mar 20 20:54:44 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 40532 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 E771E27BBEA; Thu, 20 Mar 2025 20:58:28 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED 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 A9BE627BBE2 for ; Thu, 20 Mar 2025 20:58:28 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tvMxr-00034N-9z; Thu, 20 Mar 2025 16:58:07 -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 1tvMxp-00032V-Dm for guix-patches@gnu.org; Thu, 20 Mar 2025 16:58:05 -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 1tvMxp-0002np-4U for guix-patches@gnu.org; Thu, 20 Mar 2025 16:58:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=VxUd1aOcvzD/pYxOxBWjge8/c0+rM0LNoWab4Huyg4s=; b=HAwijRnk/IcBBg9YbA5Z5m0QKKRirkquVJ1tLTtGc0WMsKHesUTyccY+2eOGhqRfvPr1IfjM/wtRx2K6VfZaci76tvLRkGHVgxdjI3C6YSfyBKbtomOtVXYKHLwlEHN3CfgUGW4bkf29nXY/aZ53glztGBJa/iicfXwgttSoocdvIPw7RJxyDCK3bIzW6JPFqOpP9Sy9yYwdhh9b3C7fjCBRSL3b3eMH3rpHbRcfArr/6FWcjDFqx33tP5AHstBYnokFai8nVcstAUWBFmqnd3+7JXvvXisan96s76A+A2Yze6ek7I8Ao9KbzNvMwWXGFOv1cnB/XmI/RayAwwmfsw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tvMxo-0006fu-Ts for guix-patches@gnu.org; Thu, 20 Mar 2025 16:58:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#75810] [PATCH v7 11/16] linux-container: =?utf-8?q?=E2=80=98un?= =?utf-8?q?privileged-user-namespace-supported=3F=E2=80=99?= returns #f on non-Linux. Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 20 Mar 2025 20:58:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75810 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 75810@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= , Reepca Russelstein Received: via spool by 75810-submit@debbugs.gnu.org id=B75810.174250424425355 (code B ref 75810); Thu, 20 Mar 2025 20:58:04 +0000 Received: (at 75810) by debbugs.gnu.org; 20 Mar 2025 20:57:24 +0000 Received: from localhost ([127.0.0.1]:59197 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tvMx6-0006aR-Ip for submit@debbugs.gnu.org; Thu, 20 Mar 2025 16:57:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43276) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tvMwF-0006SU-Qh for 75810@debbugs.gnu.org; Thu, 20 Mar 2025 16:56:31 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tvMwA-0001Hu-6I; Thu, 20 Mar 2025 16:56:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=VxUd1aOcvzD/pYxOxBWjge8/c0+rM0LNoWab4Huyg4s=; b=sOIW8HgIG9yji1FC69p9 fcpPRcY+R3yPMeO+3jLKZZ9uxsNTZA70jxiZisQwpR95+Ea8a6+z6Ei2t6Vf7DlRICecSr4H1wUTf ez4BNrDPJhQlqjy3aoxfLbg6qg89fQW0OrEACoCDgYirBdTDFTr/3k4ef6T5c7AsP9DaUGy5/hih6 okC0t+c5HTXOpoVa0lgLhQSZf4owf0f6Tj0ku9itw0gexL3T/PsEex6PDl4pFAk5hZgXjUSdCFlPc p02MLyETwosDnDOJDy6HNzU5WOErh1ZwCM50pWFE01l3GcFTe+cXOv/otAmxPTa8wzbM+7Jv/gLqP FWyY351rylHxGw==; From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Thu, 20 Mar 2025 21:54:44 +0100 Message-ID: <83d801db84571a21ca93b2d177fca07888b99644.1742503591.git.ludo@gnu.org> X-Mailer: git-send-email 2.48.1 In-Reply-To: References: MIME-Version: 1.0 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 Previously this procedure would return #t on non-Linux systems. * gnu/build/linux-container.scm (unprivileged-user-namespace-supported?): When USERNS-FILE doesn’t exist, return (user-namespace-supported?). Reported-by: Reepca Russelstein Change-Id: I92050338b8b68bc3bd87100317eba69fcdf14a0a --- gnu/build/linux-container.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/build/linux-container.scm b/gnu/build/linux-container.scm index 5c303da8c8..a5c5d8962e 100644 --- a/gnu/build/linux-container.scm +++ b/gnu/build/linux-container.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2015 David Thompson -;;; Copyright © 2017-2019, 2022, 2023 Ludovic Courtès +;;; Copyright © 2017-2019, 2022-2023, 2025 Ludovic Courtès ;;; ;;; This file is part of GNU Guix. ;;; @@ -44,7 +44,7 @@ (define (unprivileged-user-namespace-supported?) (let ((userns-file "/proc/sys/kernel/unprivileged_userns_clone")) (if (file-exists? userns-file) (eqv? #\1 (call-with-input-file userns-file read-char)) - #t))) + (user-namespace-supported?)))) (define (setgroups-supported?) "Return #t if the setgroups proc file, introduced in Linux-libre 3.19,