mirror of
https://github.com/NixOS/nix.git
synced 2025-11-09 03:56:01 +01:00
Rename one overload to allowPathLegacy
Makes it easier to tell when it is isued.
This commit is contained in:
parent
339338e166
commit
8ef70ef522
3 changed files with 8 additions and 5 deletions
|
|
@ -334,7 +334,7 @@ EvalState::EvalState(
|
|||
|
||||
EvalState::~EvalState() {}
|
||||
|
||||
void EvalState::allowPath(const Path & path)
|
||||
void EvalState::allowPathLegacy(const Path & path)
|
||||
{
|
||||
if (auto rootFS2 = rootFS.dynamic_pointer_cast<AllowListSourceAccessor>())
|
||||
rootFS2->allowPrefix(CanonPath(path));
|
||||
|
|
@ -3177,7 +3177,7 @@ std::optional<SourcePath> EvalState::resolveLookupPathPath(const LookupPath::Pat
|
|||
|
||||
/* Allow access to paths in the search path. */
|
||||
if (initAccessControl) {
|
||||
allowPath(path.path.abs());
|
||||
allowPathLegacy(path.path.abs());
|
||||
if (store->isInStore(path.path.abs())) {
|
||||
try {
|
||||
allowClosure(store->toStorePath(path.path.abs()).first);
|
||||
|
|
|
|||
|
|
@ -488,8 +488,11 @@ public:
|
|||
|
||||
/**
|
||||
* Allow access to a path.
|
||||
*
|
||||
* Only for restrict eval: pure eval just whitelist store paths,
|
||||
* never arbitrary paths.
|
||||
*/
|
||||
void allowPath(const Path & path);
|
||||
void allowPathLegacy(const Path & path);
|
||||
|
||||
/**
|
||||
* Allow access to a store path. Note that this gets remapped to
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue