mirror of
https://github.com/openai/codex.git
synced 2026-11-21 22:50:37 +00:00
Honor the configured Windows sandbox level for managed networking (#37875)
## Why Managed networking implicitly selected the elevated Windows sandbox backend, even when the sandbox was configured to use a restricted token. ## What changed - Select the Windows sandbox backend solely from `WindowsSandboxLevel`. - Reject managed networking with a restricted-token sandbox before spawning a process, since managed networking requires the elevated backend. - Cover the rejection through sandbox preparation, unified exec, and Windows sandbox session tests. GitOrigin-RevId: 308858652d7b629af623d22896dafde3a23d3758
This commit is contained in:
@@ -248,10 +248,8 @@ pub(crate) async fn prepare_exec_request(
|
||||
let windows_sandbox = if sandbox == SandboxType::WindowsRestrictedToken {
|
||||
request.arg0 = params.arg0.clone();
|
||||
let proxy_enforced = params.enforce_managed_network;
|
||||
let use_elevated = windows_sandbox_uses_elevated_backend(
|
||||
sandbox_context.windows_sandbox_level,
|
||||
proxy_enforced,
|
||||
);
|
||||
let use_elevated =
|
||||
windows_sandbox_uses_elevated_backend(sandbox_context.windows_sandbox_level);
|
||||
let filesystem_overrides = if use_elevated {
|
||||
resolve_windows_elevated_filesystem_overrides(
|
||||
sandbox,
|
||||
|
||||
Reference in New Issue
Block a user