mirror of
https://github.com/NixOS/nix
synced 2025-06-28 17:51:15 +02:00
* Sync with the trunk.
This commit is contained in:
commit
070057c1b9
4 changed files with 9 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue