feat(core) SandboxPolicy::Custom

This commit is contained in:
Dylan Hurd
2026-02-22 09:47:32 -08:00
parent e7b6f38b58
commit 3d619f32b7
16 changed files with 408 additions and 80 deletions

View File

@@ -140,6 +140,13 @@ pub fn main() -> Result<()> {
SandboxPolicy::WorkspaceWrite { .. } => {
create_workspace_write_token_with_caps_from(base, &cap_psids)
}
SandboxPolicy::Custom { writable_roots, .. } => {
if writable_roots.is_empty() {
create_readonly_token_with_caps_from(base, &cap_psids)
} else {
create_workspace_write_token_with_caps_from(base, &cap_psids)
}
}
SandboxPolicy::DangerFullAccess | SandboxPolicy::ExternalSandbox { .. } => {
unreachable!()
}