summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2025-12-09 15:55:14 +0900
committerMaxim Cournoyer <maxim@guixotic.coop>2025-12-09 15:55:14 +0900
commitc5b76579e86a0813e48aca79369c10a1243fb066 (patch)
tree196b311fc236d377ded817f42afccedd023ed3ce
parent99b0b7aa1f36f6ede4de495ff3db7e2b87ec8db1 (diff)
scripts/environment: Do not attempt to map GID 0.add-tests-for-guix-shell-container
* guix/scripts/environment.scm (launch-environment/container): Do not attempt to map GID 0. Fixes: #4234 Change-Id: If196430de5f09932e5dd736a55b75bbcda8cd7be
-rw-r--r--guix/scripts/environment.scm6
1 files changed, 5 insertions, 1 deletions
diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm
index 1b3b1312ea3..116e01380a6 100644
--- a/guix/scripts/environment.scm
+++ b/guix/scripts/environment.scm
@@ -828,7 +828,11 @@ WHILE-LIST."
828 (let* ((cwd (getcwd)) 828 (let* ((cwd (getcwd))
829 (home (getenv "HOME")) 829 (home (getenv "HOME"))
830 (uid (if user 1000 (getuid))) 830 (uid (if user 1000 (getuid)))
831 (gid (if user 1000 (getgid))) 831 (gid (if user
832 1000
833 (match (getgid)
834 (0 1000)
835 (gid gid))))
832 836
833 ;; On a foreign distro, the name service switch might be 837 ;; On a foreign distro, the name service switch might be
834 ;; dysfunctional and 'getpwuid' throws. Don't let that hamper 838 ;; dysfunctional and 'getpwuid' throws. Don't let that hamper