about summary refs log tree commit diff
path: root/src/libstore
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2010-03-11T10·33+0000
committerLudovic Courtès <ludo@gnu.org>2010-03-11T10·33+0000
commitc752c9f41aa88ff2129cdc0863fe74f76328835c (patch)
tree41656ba46ffc243577e680d096d7c7492968fd41 /src/libstore
parent2e8eaca573ccda707ff42c136a6f38a34f2975b4 (diff)
Fix thinko in r20547.
* src/libstore/build.cc (nix::DerivationGoal::startBuilder): Fix the GID
  of the build user in /etc/passwd.
Diffstat (limited to 'src/libstore')
-rw-r--r--src/libstore/build.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc
index 85948f799f6b..4d542e31d32b 100644
--- a/src/libstore/build.cc
+++ b/src/libstore/build.cc
@@ -1568,15 +1568,15 @@ void DerivationGoal::startBuilder()
 
         /* Create a /etc/passwd with entries for the build user and the
            nobody account.  The latter is kind of a hack to support
-           Samba-in-QEMU.  For the sake of consistency with the setgroups(2)
-           call below, the build user has no supplementary groups. */
+           Samba-in-QEMU.  */
         createDirs(chrootRootDir + "/etc");
 
         writeFile(chrootRootDir + "/etc/passwd",
             (format(
-                "nixbld:x:%1%:%1%:Nix build user:/:/noshell\n"
+                "nixbld:x:%1%:%2%:Nix build user:/:/noshell\n"
                 "nobody:x:65534:65534:Nobody:/:/noshell\n")
-                % (buildUser.enabled() ? buildUser.getUID() : getuid())).str());
+                % (buildUser.enabled() ? buildUser.getUID() : getuid())
+	        % (buildUser.enabled() ? buildUser.getGID() : getgid())).str());
 
         /* Bind-mount a user-configurable set of directories from the
            host file system.  The `/dev/pts' directory must be mounted