mirror of
https://github.com/openai/codex.git
synced 2026-11-05 20:10:33 +00:00
Add Windows metadata adapter target type
This commit is contained in:
@@ -95,7 +95,8 @@ pub struct ExecParams {
|
||||
pub arg0: Option<String>,
|
||||
}
|
||||
|
||||
/// Resolved filesystem overrides for the Windows sandbox backends.
|
||||
/// Layer: Windows adapter layer. Resolved filesystem overrides for the Windows
|
||||
/// sandbox backends.
|
||||
///
|
||||
/// The unelevated restricted-token backend only consumes extra deny-write
|
||||
/// carveouts on top of the legacy `WorkspaceWrite` allow set. The elevated
|
||||
@@ -111,6 +112,25 @@ pub(crate) struct WindowsSandboxFilesystemOverrides {
|
||||
pub(crate) additional_deny_write_paths: Vec<AbsolutePathBuf>,
|
||||
}
|
||||
|
||||
/// Layer: Windows adapter layer. This is the Windows projection of
|
||||
/// `WritableRoot::protected_metadata_names` from `FileSystemSandboxPolicy`.
|
||||
#[allow(dead_code)]
|
||||
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord)]
|
||||
pub(crate) struct WindowsProtectedMetadataTarget {
|
||||
pub(crate) path: AbsolutePathBuf,
|
||||
pub(crate) mode: WindowsProtectedMetadataMode,
|
||||
}
|
||||
|
||||
/// Layer: Windows adapter layer. The enforcement layer needs to know why a
|
||||
/// protected metadata path is absent instead of treating every missing path as
|
||||
/// an existing filesystem object.
|
||||
#[allow(dead_code)]
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
|
||||
pub(crate) enum WindowsProtectedMetadataMode {
|
||||
ExistingDeny,
|
||||
MissingCreationMonitor,
|
||||
}
|
||||
|
||||
fn windows_sandbox_uses_elevated_backend(
|
||||
sandbox_level: WindowsSandboxLevel,
|
||||
proxy_enforced: bool,
|
||||
|
||||
Reference in New Issue
Block a user