aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2010-03-11 10:52:52 +0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2010-03-11 10:52:52 +0000
commit070057c1b9335ef2c5ff0fe12adb76e214f945ba (patch)
tree97c35e93bc77a4a1b3f0787d9c837490f8328673 /src
parent03afc34805c0dbd5f354b823cb8391fed99c6539 (diff)
parentc752c9f41aa88ff2129cdc0863fe74f76328835c (diff)
* Sync with the trunk.
Diffstat (limited to 'src')
-rw-r--r--src/libstore/build.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc
index f4478a4db..d0d051f08 100644
--- a/src/libstore/build.cc
+++ b/src/libstore/build.cc
@@ -1566,16 +1566,17 @@ void DerivationGoal::startBuilder()
createDirs(chrootTmpDir);
chmod(chrootTmpDir, 01777);
- /* 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. */
+ /* 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. */
createDirs(chrootRootDir + "/etc");
writeFile(chrootRootDir + "/etc/passwd",
(format(
- "nixbld:x:%1%:65534: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