daemon: Dereference symlinks for /etc/services & co.
Changes
1 files changed · +4 −1
| File | Status | Add | Del | Content |
|---|---|---|---|---|
| nix/libstore/build.cc | modified | +4 | −1 | View file |
nix/libstore/build.cc
View filediff --git a/nix/libstore/build.cc b/nix/libstore/build.cc
index 9bdf0a7..7dd630c 100644
--- a/nix/libstore/build.cc
+++ b/nix/libstore/build.cc
@@ -2805,7 +2805,10 @@ void DerivationGoal::startBuilder()
}
for (auto & file : files) {
if (pathExists(file)) {
- ctx.filesInChroot[file] = file;
+ /* On Guix System, /etc/services is a symlink; likewise,
+ on systemd-based system, /etc/resolv.conf is a symlink.
+ Dereference them. */
+ ctx.filesInChroot[file] = canonPath(file, true);
ctx.readOnlyFilesInChroot.insert(file);
}
}