1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-29 13:41:00 +01:00

Fix path access control

This commit is contained in:
Eelco Dolstra 2022-02-28 14:21:56 +01:00
parent 08fc769d2c
commit bacf83e953
6 changed files with 66 additions and 51 deletions

View file

@ -44,7 +44,16 @@ struct InputAccessor
PathFilter & filter = defaultPathFilter);
};
ref<InputAccessor> makeFSInputAccessor(
struct FSInputAccessor : InputAccessor
{
virtual void checkAllowed(PathView absPath) = 0;
virtual void allowPath(Path path) = 0;
virtual bool hasAccessControl() = 0;
};
ref<FSInputAccessor> makeFSInputAccessor(
const Path & root,
std::optional<PathSet> && allowedPaths = {});