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:
parent
08fc769d2c
commit
bacf83e953
6 changed files with 66 additions and 51 deletions
|
|
@ -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 = {});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue