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 cKGsHlqI8mKmUAAAbAwnHQ (envelope-from ) for ; Tue, 09 Aug 2022 18:16:26 +0200 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 qKFlHlqI8mIobwAAauVa8A (envelope-from ) for ; Tue, 09 Aug 2022 18:16:26 +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 49CEA9941 for ; Tue, 9 Aug 2022 18:16:26 +0200 (CEST) Received: from localhost ([::1]:42844 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oLRu5-0002gB-Eq for larch@yhetil.org; Tue, 09 Aug 2022 12:16:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59438) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oLRRo-0000ov-47 for guix-devel@gnu.org; Tue, 09 Aug 2022 11:47:12 -0400 Received: from sender4-of-o51.zoho.com ([136.143.188.51]:21195) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oLRRm-0005jI-3M for guix-devel@gnu.org; Tue, 09 Aug 2022 11:47:11 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1660060025; cv=none; d=zohomail.com; s=zohoarc; b=lcZzlgQ/2Ak0c0b1hQYVX9a209jqtnDeVi//ja35Z1OnO5i/Q8aDDRcJZcZvlcycofzrCUqKJRiI1LfvkkkmQOT71dqKwpPSLy8fc4vksMhfEQf9EflUMzpeyyqfDiMja2/tRyc8wHpsbdB81VL+WuJuLxq4NV2hQUlB6E/BDEQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1660060025; h=Content-Type:Content-Transfer-Encoding:Date:From:MIME-Version:Message-ID:Subject:To; bh=u4iVoiYyspPhDvkeimpqirb/CjxmCJd+0X6WmyfCQ40=; b=krxhYnM2AIkxvuJh42Jx5rFWsLNt3lCsPdwJKHGl8HDIK55qVhVGiXyWeZI4NgLuny86nEv2c9euY6XV0D+mjkvzs0CKVp6AUbUpF/DmwOT9AdaAeWcdrNGwd+ituhGCaMaICHjoDKqXldscj7Gvfcn3Bof36BflvjC138SDjQU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=elephly.net; spf=pass smtp.mailfrom=rekado@elephly.net; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1660060025; s=zoho; d=elephly.net; i=rekado@elephly.net; h=From:From:To:To:Subject:Subject:Date:Date:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-Id:Reply-To:Cc; bh=u4iVoiYyspPhDvkeimpqirb/CjxmCJd+0X6WmyfCQ40=; b=V+HarGErFyinFXIGFa5dt3LEwQoKolJ6fgjvrY2/PIbp/AIGM9lx1ZEZrXrK/Zcg rrK486AUisF+aB6sF/S4NXicinl2g2IUrrhFm9RCu57oZgG8r0pdnir6luKZZ9gNS37 u7UrwQuRKpts4sApMZXGQ6yhklEqNR8rV2v2Nm7g= Received: from localhost (i5E862C49.versanet.de [94.134.44.73]) by mx.zohomail.com with SMTPS id 1660060024090727.0780928513342; Tue, 9 Aug 2022 08:47:04 -0700 (PDT) User-agent: mu4e 1.8.7; emacs 28.1 From: Ricardo Wurmus To: guix-devel@gnu.org Subject: =?utf-8?Q?=E2=80=9Cguix?= system =?utf-8?Q?container=E2=80=9D?= script must run as root Date: Tue, 09 Aug 2022 17:13:28 +0200 X-URL: https://elephly.net X-PGP-Key: https://elephly.net/rekado.pubkey X-PGP-Fingerprint: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC Message-ID: <87y1vxv2q3.fsf@elephly.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External Received-SPF: pass client-ip=136.143.188.51; envelope-from=rekado@elephly.net; helo=sender4-of-o51.zoho.com 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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1660061786; h=from:from:sender:sender: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:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=u4iVoiYyspPhDvkeimpqirb/CjxmCJd+0X6WmyfCQ40=; b=q4I+qll1cU5mcdEm/QiQQCPs6EISmj59syuT0HQh2beeRGY97qBmDUG40adlE3NcYvi5O1 e8TTOix2qr5/rdHKdeSu/03Rh9K1AWDSkcDhsZXp1X0diXB7YtoLwRMxQa4OTjXwGTDHrm k8T+3kS0FJ1U+pF0XwBIqEywwvyef4pt8mP3eHU6MNXgjXL+ZvF9WaAyIXGL4o2Ek+Q7eD JPtjr/XVhC2zG63RjPhUYx3Kqvtc7zB76VV/Ak1F8W+fc8PcHJo4t2mDU+zvMF85q5MrQf a6SWEK0Ozk9YRoS7TKrLtf8jgIgdYYmRrAboalv1vaungJ80lnxUsG0XkxG6dQ== ARC-Seal: i=2; s=key1; d=yhetil.org; t=1660061786; a=rsa-sha256; cv=pass; b=WJYB6BJAumy5AZTlEKEbMSZsrOMbrKsrOaliqIQIAUEcRpjNmhDR5KJj/4v2+herisFQdx IV10i9R7jq8a2L79E3J8uzitvSm6BwuI4yDfI26SsY/pedOR4KIxMXtvws2iKDedgDgBtS 6wXHTBtT68gm/TuIWUnl23kyxSp9Igqmv06TOXlwXKZQrXmhhoA2kRtrIJpI3jTNguWjRi lhimWtyPfm2hefFDuwRtOCNXr9oLNt6A5wHODArCiPozoaRWeG+khZ9pHLIqcxSSjmPF+3 378BtxGQAIPeIXFW2I2oN3IQ/t1MLihTj8qVIwCsvHcAV7g4E1df30PQJfY+eA== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=pass header.d=elephly.net header.s=zoho header.b=V+HarGEr; arc=pass ("zohomail.com:s=zohoarc:i=1"); dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -5.89 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=elephly.net header.s=zoho header.b=V+HarGEr; arc=pass ("zohomail.com:s=zohoarc:i=1"); dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 49CEA9941 X-Spam-Score: -5.89 X-Migadu-Scanner: scn0.migadu.com X-TUID: XZwfA77TraB6 Hi Guix, I see that the container script generated by =E2=80=9Cguix system container= =E2=80=9D must be run as root. Looking at =E2=80=9Cinitialize-user-namespace=E2=80= =9D in (gnu build linux-container) there is conditional code to be executed only when running as an unprivileged user, namely writing to /proc/pid/setgroups. This makes me think that this was originally meant to be usable without root privileges. Without root privileges write access to /proc/pid/* is denied. The child process here is the result of issuing a clone syscall. Why can=E2=80=99t the parent process write to the child=E2=80=99s /proc/pid= /* files? Why does the parent process need to do this at all? Can=E2=80=99t the child process take care of writing its /proc/self/uid_map? --=20 Ricardo