GNU logs - #78256, boring messages


Message sent to guix-patches@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: [bug#78256] [PATCH] daemon: Use the actual overflow UID and GID in /etc/passwd.
Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: guix-patches@HIDDEN
Resent-Date: Mon, 05 May 2025 09:01:02 +0000
Resent-Message-ID: <handler.78256.B.174643560312816 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 78256
X-GNU-PR-Package: guix-patches
X-GNU-PR-Keywords: patch
To: 78256 <at> debbugs.gnu.org
Cc: keinflue <keinflue@HIDDEN>, Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
X-Debbugs-Original-To: guix-patches@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.174643560312816
          (code B ref -1); Mon, 05 May 2025 09:01:02 +0000
Received: (at submit) by debbugs.gnu.org; 5 May 2025 09:00:03 +0000
Received: from localhost ([127.0.0.1]:38584 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1uBrgA-0003KE-0X
	for submit <at> debbugs.gnu.org; Mon, 05 May 2025 05:00:03 -0400
Received: from lists.gnu.org ([2001:470:142::17]:37028)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1uBrg6-0003JU-Oe
 for submit <at> debbugs.gnu.org; Mon, 05 May 2025 04:59:59 -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 <ludo@HIDDEN>) id 1uBrfx-0000h2-2n
 for guix-patches@HIDDEN; Mon, 05 May 2025 04:59:49 -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 <ludo@HIDDEN>)
 id 1uBrfv-0004q9-Nw; Mon, 05 May 2025 04:59:47 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:Date:Subject:To:From:in-reply-to:
 references; bh=PuhvjVuCgZBnFKg+jFL1gqNjlaO4qtcGPbiL8Xes71U=; b=dumpjpGoaaGpXi
 fvgFMO3nx5dpBbn1eGCXbX3feuWnOFI3NvAcO7KAwsJLgmdBAl46BycjSH19VKEJ+pncI2teT1GjS
 EMV0txmpdiLyGNGMvM+mkR1Lk9t1qYGz1MokwRv/qpBiQIX29QkA9AW6fJevd5nhSUjNRVWY3cHXF
 LSIVC0ea0Wm8siJ3x4iqww5RIDyzpyHF6/MKIxurm7VLTvapuieoMwL3PjcaDfXIbkxoHc5mx7fbY
 sRq8pjYbBR3/r8tFdoLJ4I0AL9sR81ARl3di6h/Yj+RLkQDRtr3f9eE0sY61G6jO0l9Pc9tXtqHve
 kw8pTqlbBxSAB9q0uJQA==;
From: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Date: Mon,  5 May 2025 10:59:34 +0200
Message-ID: <30197546d98c6e9527ce2b92a47c1457a1ced673.1746392495.git.ludo@HIDDEN>
X-Mailer: git-send-email 2.49.0
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.3 (/)

Partly fixes <https://issues.guix.gnu.org/77862>.

* nix/libstore/build.cc (fileContent, overflowUID, overflowGID): New
functions.
(DerivationGoal::startBuilder): Use them to populate /etc/passwd when
‘buildUser.enabled()’ is false.

Reported-by: keinflue <keinflue@HIDDEN>
Change-Id: I695c697629c739d096933274c1c8a70d08468d4a
---
 nix/libstore/build.cc | 37 +++++++++++++++++++++++++++++++++++--
 1 file changed, 35 insertions(+), 2 deletions(-)

diff --git a/nix/libstore/build.cc b/nix/libstore/build.cc
index a1f39d9a8b..773dcf1a01 100644
--- a/nix/libstore/build.cc
+++ b/nix/libstore/build.cc
@@ -13,6 +13,7 @@
 #include <map>
 #include <sstream>
 #include <algorithm>
+#include <iostream>
 
 #include <limits.h>
 #include <time.h>
@@ -1646,6 +1647,36 @@ static void initializeUserNamespace(pid_t child,
 	      (format("%d %d 1") % guestGID % hostGID).str());
 }
 
+/* Return the content of FILE as an integer, or DFLT if FILE could not be
+   opened or parsed.  */
+static unsigned int fileContent(const std::string &file, int dflt)
+{
+    AutoCloseFD fd;
+    fd = open(file.c_str(), O_RDONLY|O_CLOEXEC);
+    if (fd == -1)
+	return dflt;
+    else {
+	char buf[64];
+	ssize_t count = read (fd, buf, sizeof buf);
+	if (count <= 0) return dflt;
+
+	unsigned int result = dflt;
+	std::string str = buf;
+	try { result = std::stoi(str); } catch (...) {};
+	return result;
+    }
+}
+
+static uid_t overflowUID()
+{
+    return fileContent("/proc/sys/kernel/overflowuid", 65534);
+}
+
+static gid_t overflowGID()
+{
+    return fileContent("/proc/sys/kernel/overflowgid", 65534);
+}
+
 void DerivationGoal::startBuilder()
 {
     auto f = format(
@@ -1846,9 +1877,11 @@ void DerivationGoal::startBuilder()
         writeFile(chrootRootDir + "/etc/passwd",
             (format(
                 "nixbld:x:%1%:%2%:Nix build user:/:/noshell\n"
-                "nobody:x:65534:65534:Nobody:/:/noshell\n")
+                "nobody:x:%3%:%4%:Nobody:/:/noshell\n")
                 % (buildUser.enabled() ? buildUser.getUID() : guestUID)
-                % (buildUser.enabled() ? buildUser.getGID() : guestGID)).str());
+                % (buildUser.enabled() ? buildUser.getGID() : guestGID)
+	        % (buildUser.enabled() ? 65534 : overflowUID())
+	        % (buildUser.enabled() ? 65534 : overflowGID())).str());
 
         /* Declare the build user's group so that programs get a consistent
            view of the system (e.g., "id -gn"). */

base-commit: c2c4bc8758616ebc0148e1bce9311a80658ace88
-- 
2.49.0





Message sent:


Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.505 (Entity 5.505)
Content-Type: text/plain; charset=utf-8
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Subject: bug#78256: Acknowledgement ([PATCH] daemon: Use the actual
 overflow UID and GID in /etc/passwd.)
Message-ID: <handler.78256.B.174643560312816.ack <at> debbugs.gnu.org>
References: <30197546d98c6e9527ce2b92a47c1457a1ced673.1746392495.git.ludo@HIDDEN>
X-Gnu-PR-Message: ack 78256
X-Gnu-PR-Package: guix-patches
X-Gnu-PR-Keywords: patch
Reply-To: 78256 <at> debbugs.gnu.org
Date: Mon, 05 May 2025 09:01:02 +0000

Thank you for filing a new bug report with debbugs.gnu.org.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

Your message has been sent to the package maintainer(s):
 guix-patches@HIDDEN

If you wish to submit further information on this problem, please
send it to 78256 <at> debbugs.gnu.org.

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

--=20
78256: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D78256
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems


Message sent to guix-patches@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: [bug#78256] [PATCH] daemon: Use the actual overflow UID and GID in /etc/passwd.
Resent-From: keinflue <keinflue@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: guix-patches@HIDDEN
Resent-Date: Mon, 05 May 2025 10:45:02 +0000
Resent-Message-ID: <handler.78256.B.17464418561953 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 78256
X-GNU-PR-Package: guix-patches
X-GNU-PR-Keywords: patch
To: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Cc: 78256 <at> debbugs.gnu.org
X-Debbugs-Original-Cc: guix-patches@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.17464418561953
          (code B ref -1); Mon, 05 May 2025 10:45:02 +0000
Received: (at submit) by debbugs.gnu.org; 5 May 2025 10:44:16 +0000
Received: from localhost ([127.0.0.1]:39027 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1uBtJ1-0000VQ-It
	for submit <at> debbugs.gnu.org; Mon, 05 May 2025 06:44:16 -0400
Received: from lists.gnu.org ([2001:470:142::17]:51328)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <keinflue@HIDDEN>)
 id 1uBtIz-0000V4-Gi
 for submit <at> debbugs.gnu.org; Mon, 05 May 2025 06:44:14 -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 <keinflue@HIDDEN>)
 id 1uBtIt-0006ee-P5
 for guix-patches@HIDDEN; Mon, 05 May 2025 06:44:07 -0400
Received: from mout02.posteo.de ([185.67.36.66])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <keinflue@HIDDEN>)
 id 1uBtIr-0003bR-9S
 for guix-patches@HIDDEN; Mon, 05 May 2025 06:44:07 -0400
Received: from submission (posteo.de [185.67.36.169]) 
 by mout02.posteo.de (Postfix) with ESMTPS id D24C2240103
 for <guix-patches@HIDDEN>; Mon,  5 May 2025 12:43:59 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1746441839; bh=JnBtf8PWJ9cZObVcwnoKwPxyTjwODgN8jYSVSbPazr8=;
 h=MIME-Version:Date:From:To:Cc:Subject:Message-ID:Content-Type:
 Content-Transfer-Encoding:From;
 b=Y2pKur929LegyVEBvR+T1oFADPL7j5rCAFB/pL7Jr0+qB6fcYaOkqmrdekDqHl5xy
 DLvK+Ah8Bd76TB4H76yn5XhOQORMPOqeQuoyYO4sNcppo5mlHWewaTi87teAqqPk2t
 7SAnnyJFrwiRMQzB/v+XoIgcpsyHjbmfVsyji3ycFqt03F3nZHD4auxNaGIwV4jINZ
 zfzIMAEDEfzGj2HP8qYLspb0V/FUI7hcztb65Qw7Vs3v3JT8Y612fE8qu3G/63MQ2l
 dKlOS77mgqa9dPNN66YjUx/w0SuAZ3oPdcPK1gM5qcUcEj21KhRIg2/xdE2iQ+2dA+
 mh8LfRPnz0Q5Q==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4ZrdRz2SRYz6tvZ;
 Mon,  5 May 2025 12:43:59 +0200 (CEST)
MIME-Version: 1.0
Date: Mon, 05 May 2025 10:43:59 +0000
From: keinflue <keinflue@HIDDEN>
In-Reply-To: <30197546d98c6e9527ce2b92a47c1457a1ced673.1746392495.git.ludo@HIDDEN>
References: <30197546d98c6e9527ce2b92a47c1457a1ced673.1746392495.git.ludo@HIDDEN>
Message-ID: <7c9d63b0990786bcff7548a9f0c58506@HIDDEN>
Content-Type: text/plain; charset=UTF-8;
 format=flowed
Content-Transfer-Encoding: quoted-printable
Received-SPF: pass client-ip=185.67.36.66; envelope-from=keinflue@HIDDEN;
 helo=mout02.posteo.de
X-Spam_score_int: -42
X-Spam_score: -4.3
X-Spam_bar: ----
X-Spam_report: (-4.3 / 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_MED=-2.3, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001,
 RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001,
 URIBL_SBL_A=0.1 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 1.7 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  On 05.05.2025 10:59, Ludovic =?UTF-8?Q?Court=C3=A8s?= wrote: > Partly fixes
    <https://issues.guix.gnu.org/77862>. > > * nix/libstore/build.cc (fileContent,
    overflowUID, overflowGID): New > functions. > (DerivationGoal [...] 
 
 Content analysis details:   (1.7 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
                              no trust
                             [2001:470:142:0:0:0:0:17 listed in]
                             [list.dnswl.org]
  0.1 URIBL_SBL_A            Contains URL's A record listed in the Spamhaus SBL
                             blocklist
                             [URIs: build.cc]
  0.6 URIBL_SBL              Contains an URL's NS IP listed in the Spamhaus SBL
                             blocklist
                             [URIs: build.cc]
  1.0 SPF_SOFTFAIL           SPF: sender does not match SPF record (softfail)
 -0.0 SPF_HELO_PASS          SPF: HELO matches SPF record
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.7 (/)



On 05.05.2025 10:59, Ludovic Court=C3=A8s wrote:
> Partly fixes <https://issues.guix.gnu.org/77862>.
>=20
> * nix/libstore/build.cc (fileContent, overflowUID, overflowGID): New
> functions.
> (DerivationGoal::startBuilder): Use them to populate /etc/passwd when
> =E2=80=98buildUser.enabled()=E2=80=99 is false.
>=20
> Reported-by: keinflue <keinflue@HIDDEN>
> Change-Id: I695c697629c739d096933274c1c8a70d08468d4a
> ---
>  nix/libstore/build.cc | 37 +++++++++++++++++++++++++++++++++++--
>  1 file changed, 35 insertions(+), 2 deletions(-)
>=20
> diff --git a/nix/libstore/build.cc b/nix/libstore/build.cc
> index a1f39d9a8b..773dcf1a01 100644
> --- a/nix/libstore/build.cc
> +++ b/nix/libstore/build.cc
> @@ -13,6 +13,7 @@
>  #include <map>
>  #include <sstream>
>  #include <algorithm>
> +#include <iostream>
>=20
>  #include <limits.h>
>  #include <time.h>
> @@ -1646,6 +1647,36 @@ static void initializeUserNamespace(pid_t child,
>  	      (format("%d %d 1") % guestGID % hostGID).str());
>  }
>=20
> +/* Return the content of FILE as an integer, or DFLT if FILE could not=
=20
> be
> +   opened or parsed.  */
> +static unsigned int fileContent(const std::string &file, int dflt)

I think dflt should also be unsigned here? (I don't think POSIX=20
specifies signdness of the ids, but they are unsigned on Linux.)

> +{
> +    AutoCloseFD fd;
> +    fd =3D open(file.c_str(), O_RDONLY|O_CLOEXEC);
> +    if (fd =3D=3D -1)
> +	return dflt;
> +    else {
> +	char buf[64];
> +	ssize_t count =3D read (fd, buf, sizeof buf);

I am not sure it can happen in the /proc file system, but generally=20
there is no guarantee that this will read the whole file even if it is=20
smaller than the buffer size. The read may return with partial result on=20
a signal and EINTR may also occur.

> +	if (count <=3D 0) return dflt;
> +
> +	unsigned int result =3D dflt;
> +	std::string str =3D buf;

buf is not null-terminated, but this constructor of std::string requires=20
a null-terminated byte string as argument. std::string has another=20
constructor that takes a count:

std::string str(buf, count);

> +	try { result =3D std::stoi(str); } catch (...) {};

std::stoi converts to signed int. It will throw for the upper half of=20
valid uids/gids and it will accept negative values. I'd recommend to use=20
std::stoll instead and to make result have type signed long long. Then=20
at the end of the function it is possible to check the values range if=20
desired:

if(result < 0 || result > std::numeric_limits<unsigned int>::max())
     return dlft;
else
     return result;

> +	return result;
> +    }
> +}
> +
> +static uid_t overflowUID()
> +{
> +    return fileContent("/proc/sys/kernel/overflowuid", 65534);
> +}
> +
> +static gid_t overflowGID()
> +{
> +    return fileContent("/proc/sys/kernel/overflowgid", 65534);
> +}
> +
>  void DerivationGoal::startBuilder()
>  {
>      auto f =3D format(
> @@ -1846,9 +1877,11 @@ void DerivationGoal::startBuilder()
>          writeFile(chrootRootDir + "/etc/passwd",
>              (format(
>                  "nixbld:x:%1%:%2%:Nix build user:/:/noshell\n"
> -                "nobody:x:65534:65534:Nobody:/:/noshell\n")
> +                "nobody:x:%3%:%4%:Nobody:/:/noshell\n")
>                  % (buildUser.enabled() ? buildUser.getUID() :=20
> guestUID)
> -                % (buildUser.enabled() ? buildUser.getGID() :
> guestGID)).str());
> +                % (buildUser.enabled() ? buildUser.getGID() :=20
> guestGID)
> +	        % (buildUser.enabled() ? 65534 : overflowUID())
> +	        % (buildUser.enabled() ? 65534 : overflowGID())).str());
>=20
>          /* Declare the build user's group so that programs get a=20
> consistent
>             view of the system (e.g., "id -gn"). */
>=20
> base-commit: c2c4bc8758616ebc0148e1bce9311a80658ace88

In general, after some more thoughts about it, I am not really sure that=20
the ids of "nobody" must reflect the overflowids. It seems that this=20
user/group name has/had multiple different purposes and it is not clear=20
to me which one exactly is intended for the build environment.

Best,
keinflue




Message sent to guix-patches@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: [bug#78256] [PATCH] daemon: Use the actual overflow UID and GID in /etc/passwd.
Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: guix-patches@HIDDEN
Resent-Date: Fri, 23 May 2025 09:35:02 +0000
Resent-Message-ID: <handler.78256.B78256.17479928932151 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 78256
X-GNU-PR-Package: guix-patches
X-GNU-PR-Keywords: patch
To: keinflue <keinflue@HIDDEN>
Cc: 78256 <at> debbugs.gnu.org
Received: via spool by 78256-submit <at> debbugs.gnu.org id=B78256.17479928932151
          (code B ref 78256); Fri, 23 May 2025 09:35:02 +0000
Received: (at 78256) by debbugs.gnu.org; 23 May 2025 09:34:53 +0000
Received: from localhost ([127.0.0.1]:45725 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1uIOnk-0000Yd-UV
	for submit <at> debbugs.gnu.org; Fri, 23 May 2025 05:34:53 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:33632)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1uIOng-0000Y1-8s
 for 78256 <at> debbugs.gnu.org; Fri, 23 May 2025 05:34:50 -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 <ludo@HIDDEN>)
 id 1uIOna-0005aQ-JH; Fri, 23 May 2025 05:34:42 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To:
 From; bh=c7seOpe+eBtDvoapr93P0bsLA9848TryTIEHn4t6Ndc=; b=HJb2yPXWObdAtDDgLe41
 cGtTUBK/3gPNoD+W6SoFaaEW7pzAUWgqbwZaW1/0VgAgQvvwP5K0HWyLNEhAGrYr4LLgIDRjk53Ux
 5315TrOQLsQQRsPm2rtUffJ8uN0w6HluyyiAJ44y69MPbg4LDB0fGtxqpB64WomAeB/lqae3qTU89
 z469EicpHW+057OI+ESSDcmnh4SIqJ+sY9XnQiZErT8dIm+TPZL68K0pTPS0izr1KJ6/GjUbFj4T6
 AlYYuIAQwGxBEJ6qxS0ZAajCB6SNTognWIroecjYtmZBUZQj2SrOuScrYnpCJaZnLXWvfXkYCqyXv
 YUJ/R4yqJrvH2g==;
From: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
In-Reply-To: <7c9d63b0990786bcff7548a9f0c58506@HIDDEN>
 (keinflue@HIDDEN's message of "Mon, 05 May 2025 10:43:59 +0000")
References: <30197546d98c6e9527ce2b92a47c1457a1ced673.1746392495.git.ludo@HIDDEN>
 <7c9d63b0990786bcff7548a9f0c58506@HIDDEN>
Date: Fri, 23 May 2025 11:26:12 +0200
Message-ID: <87v7pr1xvv.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Hello,

keinflue <keinflue@HIDDEN> writes:

> On 05.05.2025 10:59, Ludovic Court=C3=A8s wrote:
>> Partly fixes <https://issues.guix.gnu.org/77862>.
>> * nix/libstore/build.cc (fileContent, overflowUID, overflowGID): New
>> functions.
>> (DerivationGoal::startBuilder): Use them to populate /etc/passwd when
>> =E2=80=98buildUser.enabled()=E2=80=99 is false.
>> Reported-by: keinflue <keinflue@HIDDEN>
>> Change-Id: I695c697629c739d096933274c1c8a70d08468d4a

Thanks for your comments on the C++ code.

> In general, after some more thoughts about it, I am not really sure
> that the ids of "nobody" must reflect the overflowids. It seems that
> this user/group name has/had multiple different purposes and it is not
> clear to me which one exactly is intended for the build environment.

Yeah actually I wonder.  I think the main goal here was to have an entry
for =E2=80=9Cnobody=E2=80=9D in /etc/passwd, probably because there exists =
code out
there that assumes that =E2=80=9Cnobody=E2=80=9D exists, but most likely it=
s UID doesn=E2=80=99t
matter much.

Build processes can see files whose group is the overflow GID (as we=E2=80=
=99ve
discussed regarding supplementary groups) but I believe it cannot see
file whose owner is the overflow UID, right?  In that case, this patch
doesn=E2=80=99t even provide a useful UID-to-name mapping.

Thanks,
Ludo=E2=80=99.




Message received at control <at> debbugs.gnu.org:


Received: (at control) by debbugs.gnu.org; 13 Jul 2025 14:41:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jul 13 10:41:09 2025
Received: from localhost ([127.0.0.1]:54186 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1uaxt6-0000Dh-Lq
	for submit <at> debbugs.gnu.org; Sun, 13 Jul 2025 10:41:08 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:48912)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1uaxt5-0000Cw-6U
 for control <at> debbugs.gnu.org; Sun, 13 Jul 2025 10:41:07 -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 <ludo@HIDDEN>) id 1uaxsz-0003Kr-UU
 for control <at> debbugs.gnu.org; Sun, 13 Jul 2025 10:41:01 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-version:Subject:From:To:Date:in-reply-to:
 references; bh=cMmLDuzAZVlwOzqKPNjwLKv1MXxxl7a2k1wIRHXrXWA=; b=jZJstPzeNeN+WG
 jv4EXdQRdBrS6hbtGUfsqKEaE0X3ogAwilLOCjyUH7/6iVHVo9j9LB0FIfXaEgSnO/5YyIVzZ8RrI
 YpxlKxifip7rJIniB+Z8VjhMsEBjy88FwD8kkGzIW/X1mZuwANSkVl5YrtnBuIodYbMNz2Mi1I2AR
 SZO1i8LLFcTpC6R51N4TVcMNjU4uquIVJ7jYQwdJBiqDsoTyEI3P3fRH8HazQxzaDrRSjTYivtbWK
 gKKuTCWSJ84UqzjosvfXUO1XH7j2m2G9LrEaATzA4FASKw9VP24rOMoAS0mmEMoIGoJAneJbGucDm
 vcz0OCWSSuwYxngodoBA==;
Date: Sun, 13 Jul 2025 16:38:12 +0200
Message-Id: <87ms986trf.fsf@HIDDEN>
To: control <at> debbugs.gnu.org
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
Subject: control message for bug #78256
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: control
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

tags 78256 wontfix
close 78256
quit





Message received at control <at> debbugs.gnu.org:


Received: (at control) by debbugs.gnu.org; 13 Jul 2025 14:41:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jul 13 10:41:09 2025
Received: from localhost ([127.0.0.1]:54186 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1uaxt6-0000Dh-Lq
	for submit <at> debbugs.gnu.org; Sun, 13 Jul 2025 10:41:08 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:48912)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1uaxt5-0000Cw-6U
 for control <at> debbugs.gnu.org; Sun, 13 Jul 2025 10:41:07 -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 <ludo@HIDDEN>) id 1uaxsz-0003Kr-UU
 for control <at> debbugs.gnu.org; Sun, 13 Jul 2025 10:41:01 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-version:Subject:From:To:Date:in-reply-to:
 references; bh=cMmLDuzAZVlwOzqKPNjwLKv1MXxxl7a2k1wIRHXrXWA=; b=jZJstPzeNeN+WG
 jv4EXdQRdBrS6hbtGUfsqKEaE0X3ogAwilLOCjyUH7/6iVHVo9j9LB0FIfXaEgSnO/5YyIVzZ8RrI
 YpxlKxifip7rJIniB+Z8VjhMsEBjy88FwD8kkGzIW/X1mZuwANSkVl5YrtnBuIodYbMNz2Mi1I2AR
 SZO1i8LLFcTpC6R51N4TVcMNjU4uquIVJ7jYQwdJBiqDsoTyEI3P3fRH8HazQxzaDrRSjTYivtbWK
 gKKuTCWSJ84UqzjosvfXUO1XH7j2m2G9LrEaATzA4FASKw9VP24rOMoAS0mmEMoIGoJAneJbGucDm
 vcz0OCWSSuwYxngodoBA==;
Date: Sun, 13 Jul 2025 16:38:12 +0200
Message-Id: <87ms986trf.fsf@HIDDEN>
To: control <at> debbugs.gnu.org
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
Subject: control message for bug #78256
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: control
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

tags 78256 wontfix
close 78256
quit






Last modified: Sun, 13 Jul 2025 14:45:01 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.