Fix thinko in r20547.
* src/libstore/build.cc (nix::DerivationGoal::startBuilder): Fix the GID of the build user in /etc/passwd.
This commit is contained in:
parent
2e8eaca573
commit
c752c9f41a
1 changed files with 4 additions and 4 deletions
|
@ -1568,15 +1568,15 @@ void DerivationGoal::startBuilder()
|
||||||
|
|
||||||
/* Create a /etc/passwd with entries for the build user and the
|
/* Create a /etc/passwd with entries for the build user and the
|
||||||
nobody account. The latter is kind of a hack to support
|
nobody account. The latter is kind of a hack to support
|
||||||
Samba-in-QEMU. For the sake of consistency with the setgroups(2)
|
Samba-in-QEMU. */
|
||||||
call below, the build user has no supplementary groups. */
|
|
||||||
createDirs(chrootRootDir + "/etc");
|
createDirs(chrootRootDir + "/etc");
|
||||||
|
|
||||||
writeFile(chrootRootDir + "/etc/passwd",
|
writeFile(chrootRootDir + "/etc/passwd",
|
||||||
(format(
|
(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")
|
"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
|
/* Bind-mount a user-configurable set of directories from the
|
||||||
host file system. The `/dev/pts' directory must be mounted
|
host file system. The `/dev/pts' directory must be mounted
|
||||||
|
|
Loading…
Reference in a new issue