mirror of
https://github.com/NixOS/nix
synced 2025-07-05 16:31:47 +02:00
In pure eval mode, restrict rootFS to just the Nix store
Note that in pure mode, we don't need to use the union FS even when using a chroot store, since the user shouldn't have access to the physical /nix/store.
This commit is contained in:
parent
4206d95996
commit
8dc2b2715b
2 changed files with 19 additions and 8 deletions
|
@ -63,6 +63,12 @@ struct MountedSourceAccessor : SourceAccessor
|
|||
path.pop();
|
||||
}
|
||||
}
|
||||
|
||||
std::optional<std::filesystem::path> getPhysicalPath(const CanonPath & path) override
|
||||
{
|
||||
auto [accessor, subpath] = resolve(path);
|
||||
return accessor->getPhysicalPath(subpath);
|
||||
}
|
||||
};
|
||||
|
||||
ref<SourceAccessor> makeMountedSourceAccessor(std::map<CanonPath, ref<SourceAccessor>> mounts)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue