mirror of
https://github.com/NixOS/nix
synced 2025-06-24 18:01:16 +02:00
fix throwing output paths out of sandbox paths
It seems obvious that erasing any output paths from pathsInChroot needs to happen after getPathsInSandbox(), not before. Signed-off-by: Samuli Thomasson <samuli.thomasson@pm.me>
This commit is contained in:
parent
371fcf91c3
commit
0f6cb33763
1 changed files with 7 additions and 7 deletions
|
@ -368,6 +368,13 @@ struct ChrootLinuxDerivationBuilder : LinuxDerivationBuilder
|
|||
if (buildUser && chown(chrootStoreDir.c_str(), 0, buildUser->getGID()) == -1)
|
||||
throw SysError("cannot change ownership of '%1%'", chrootStoreDir);
|
||||
|
||||
pathsInChroot = getPathsInSandbox();
|
||||
|
||||
for (auto & i : inputPaths) {
|
||||
auto p = store.printStorePath(i);
|
||||
pathsInChroot.insert_or_assign(p, store.toRealPath(p));
|
||||
}
|
||||
|
||||
/* If we're repairing, checking or rebuilding part of a
|
||||
multiple-outputs derivation, it's possible that we're
|
||||
rebuilding a path that is in settings.sandbox-paths
|
||||
|
@ -391,13 +398,6 @@ struct ChrootLinuxDerivationBuilder : LinuxDerivationBuilder
|
|||
chownToBuilder(*cgroup + "/cgroup.threads");
|
||||
// chownToBuilder(*cgroup + "/cgroup.subtree_control");
|
||||
}
|
||||
|
||||
pathsInChroot = getPathsInSandbox();
|
||||
|
||||
for (auto & i : inputPaths) {
|
||||
auto p = store.printStorePath(i);
|
||||
pathsInChroot.insert_or_assign(p, store.toRealPath(p));
|
||||
}
|
||||
}
|
||||
|
||||
Strings getPreBuildHookArgs() override
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue