summaryrefslogtreecommitdiff
path: root/guix/scripts/environment.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2019-03-26 18:07:58 +0100
committerLudovic Courtès <ludo@gnu.org>2019-03-26 18:11:52 +0100
commit952afb6f8c209692e52f9561965ee39e143e1d88 (patch)
tree21325fb90568cc4d7bec5ce8e05ebf8969f389d4 /guix/scripts/environment.scm
parent8a9922bdee875b3b5e1d928fc8e2121ffa99663a (diff)
environment: Create /etc/group in containers.
Reported by Pierre Neidhardt <mail@ambrevar.xyz>. * guix/scripts/environment.scm (launch-environment/container): Create GROUPS and call 'write-group'. * tests/guix-environment-container.sh: Test it.
Diffstat (limited to 'guix/scripts/environment.scm')
-rw-r--r--guix/scripts/environment.scm4
1 files changed, 4 insertions, 0 deletions
diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm
index 597a5b4ab1..c27edc7982 100644
--- a/guix/scripts/environment.scm
+++ b/guix/scripts/environment.scm
@@ -469,6 +469,9 @@ will be used for the passwd entry. LINK-PROFILE? creates a symbolic link from
(directory (if user
(string-append "/home/" user)
(passwd:dir pwd))))))
+ (groups (list (group-entry (name "users") (gid 0))
+ (group-entry (gid 65534) ;the overflow GID
+ (name "overflow"))))
(home-dir (password-entry-directory passwd))
;; Bind-mount all requisite store items, user-specified mappings,
;; /bin/sh, the current working directory, and possibly networking
@@ -528,6 +531,7 @@ will be used for the passwd entry. LINK-PROFILE? creates a symbolic link from
;; sharing the host's network namespace.
(mkdir-p "/etc")
(write-passwd (list passwd))
+ (write-group groups)
;; For convenience, start in the user's current working
;; directory rather than the root directory.