1
0
Fork 0
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:
Eelco Dolstra 2022-05-17 21:39:28 +02:00
parent 8be06c9aa1
commit 91e641af88
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
3 changed files with 22 additions and 22 deletions

View file

@ -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();