Skip to content

Commit

Permalink
fixed output derivations: fix incorrect responses for getpwuid
Browse files Browse the repository at this point in the history
Passing nscd socket into the build environment causes unexpected behavior in programs that make getpwuid and other related calls.

relevant threads:
- NixOS#4991
- https://discourse.nixos.org/t/haunted-nix-build-breaks-isolation/13869
  • Loading branch information
illustris committed Jul 13, 2021
1 parent 9cf991f commit 7bc17a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libstore/build/local-derivation-goal.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1754,7 +1754,7 @@ void LocalDerivationGoal::runChild()
/* N.B. it is realistic that these paths might not exist. It
happens when testing Nix building fixed-output derivations
within a pure derivation. */
for (auto & path : { "/etc/resolv.conf", "/etc/services", "/etc/hosts", "/var/run/nscd/socket" })
for (auto & path : { "/etc/resolv.conf", "/etc/services", "/etc/hosts" })
if (pathExists(path))
ss.push_back(path);
}
Expand Down

0 comments on commit 7bc17a9

Please sign in to comment.