mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-23 14:36:16 +02:00
Show the build user's group in /etc/group in chroots.
* src/libstore/build.cc (nix::DerivationGoal::startBuilder): Create /etc/group showing the build user's group.
This commit is contained in:
parent
c752c9f41a
commit
05e15049a5
1 changed files with 6 additions and 0 deletions
|
@ -1578,6 +1578,12 @@ void DerivationGoal::startBuilder()
|
||||||
% (buildUser.enabled() ? buildUser.getUID() : getuid())
|
% (buildUser.enabled() ? buildUser.getUID() : getuid())
|
||||||
% (buildUser.enabled() ? buildUser.getGID() : getgid())).str());
|
% (buildUser.enabled() ? buildUser.getGID() : getgid())).str());
|
||||||
|
|
||||||
|
/* Declare the build user's group so that programs get a consistent
|
||||||
|
view of the system (e.g., "id -gn"). */
|
||||||
|
writeFile(chrootRootDir + "/etc/group",
|
||||||
|
(format("nixbld:!:%1%:\n")
|
||||||
|
% (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
|
||||||
separately so that newly-created pseudo-terminals show
|
separately so that newly-created pseudo-terminals show
|
||||||
|
|
Loading…
Reference in a new issue