diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2010-03-11T10·52+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2010-03-11T10·52+0000 |
commit | 070057c1b9335ef2c5ff0fe12adb76e214f945ba (patch) | |
tree | 97c35e93bc77a4a1b3f0787d9c837490f8328673 /src/libstore | |
parent | 03afc34805c0dbd5f354b823cb8391fed99c6539 (diff) | |
parent | c752c9f41aa88ff2129cdc0863fe74f76328835c (diff) |
* Sync with the trunk.
Diffstat (limited to 'src/libstore')
-rw-r--r-- | src/libstore/build.cc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc index f4478a4db2f0..d0d051f0812e 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 |