mirror of
https://github.com/NixOS/nix
synced 2025-06-29 19:03:16 +02:00
Fix $NIX_PATH access control initialisation
This commit is contained in:
parent
8be06c9aa1
commit
91e641af88
3 changed files with 22 additions and 22 deletions
|
@ -491,26 +491,10 @@ EvalState::EvalState(
|
|||
for (auto & i : evalSettings.nixPath.get()) addToSearchPath(i);
|
||||
}
|
||||
|
||||
if (rootFS->hasAccessControl()) {
|
||||
for (auto & i : searchPath) {
|
||||
if (auto path = resolveSearchPathElem(i)) {
|
||||
// FIXME
|
||||
#if 0
|
||||
if (store->isInStore(*path)) {
|
||||
try {
|
||||
StorePathSet closure;
|
||||
store->computeFSClosure(store->toStorePath(*path).first, closure);
|
||||
for (auto & p : closure)
|
||||
allowPath(p);
|
||||
} catch (InvalidPath &) {
|
||||
allowPath(*r);
|
||||
}
|
||||
} else
|
||||
allowPath(*r);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
/* Allow access to all paths in the search path. */
|
||||
if (rootFS->hasAccessControl())
|
||||
for (auto & i : searchPath)
|
||||
resolveSearchPathElem(i, true);
|
||||
|
||||
createBaseEnv();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue