forked from lix-project/lix
Give root a valid home directory
Some programs barf if the current user has a non-writable home directory, e.g. http://hydra.nixos.org/build/44818144.
This commit is contained in:
parent
5278bb7c16
commit
ec7d498b72
|
@ -2010,9 +2010,9 @@ void DerivationGoal::startBuilder()
|
|||
Samba-in-QEMU. */
|
||||
createDirs(chrootRootDir + "/etc");
|
||||
|
||||
writeFile(chrootRootDir + "/etc/passwd",
|
||||
"root:x:0:0:Nix build user:/:/noshell\n"
|
||||
"nobody:x:65534:65534:Nobody:/:/noshell\n");
|
||||
writeFile(chrootRootDir + "/etc/passwd", fmt(
|
||||
"root:x:0:0:Nix build user:%s:/noshell\n"
|
||||
"nobody:x:65534:65534:Nobody:/:/noshell\n", "/tmp"));
|
||||
|
||||
/* Declare the build user's group so that programs get a consistent
|
||||
view of the system (e.g., "id -gn"). */
|
||||
|
|
Loading…
Reference in a new issue