Merge pull request #2975 from matthewbauer/fix-nsswitch-issue
Don’t use entire /etc/nsswitch.conf file
This commit is contained in:
commit
2f853b20df
|
@ -2734,7 +2734,13 @@ void DerivationGoal::runChild()
|
||||||
on. */
|
on. */
|
||||||
if (fixedOutput) {
|
if (fixedOutput) {
|
||||||
ss.push_back("/etc/resolv.conf");
|
ss.push_back("/etc/resolv.conf");
|
||||||
ss.push_back("/etc/nsswitch.conf");
|
|
||||||
|
// Only use nss functions to resolve hosts and
|
||||||
|
// services. Don’t use it for anything else that may
|
||||||
|
// be configured for this system. This limits the
|
||||||
|
// potential impurities introduced in fixed outputs.
|
||||||
|
writeFile(chrootRootDir + "/etc/nsswitch.conf", "hosts: files dns\nservices: files\n");
|
||||||
|
|
||||||
ss.push_back("/etc/services");
|
ss.push_back("/etc/services");
|
||||||
ss.push_back("/etc/hosts");
|
ss.push_back("/etc/hosts");
|
||||||
if (pathExists("/var/run/nscd/socket"))
|
if (pathExists("/var/run/nscd/socket"))
|
||||||
|
|
Loading…
Reference in a new issue