mirror of
https://github.com/openai/codex.git
synced 2026-09-15 12:08:01 +00:00
Merge 191b530dc1 into sapling-pr-archive-bolinfest
This commit is contained in:
@@ -130,10 +130,7 @@ async fn run_command_under_sandbox(
|
||||
let sandbox_policy_cwd = cwd.clone();
|
||||
|
||||
let stdio_policy = StdioPolicy::Inherit;
|
||||
let mut env = create_env(&config.shell_environment_policy, None);
|
||||
if let Some(network) = config.network.as_ref() {
|
||||
network.apply_to_env(&mut env);
|
||||
}
|
||||
let env = create_env(&config.shell_environment_policy, None);
|
||||
|
||||
// Special-case Windows sandbox: execute and exit the process to emulate inherited stdio.
|
||||
if let SandboxType::Windows = sandbox_type {
|
||||
@@ -225,7 +222,7 @@ async fn run_command_under_sandbox(
|
||||
config.sandbox_policy.get(),
|
||||
sandbox_policy_cwd.as_path(),
|
||||
stdio_policy,
|
||||
None,
|
||||
config.network,
|
||||
env,
|
||||
)
|
||||
.await?
|
||||
@@ -245,7 +242,7 @@ async fn run_command_under_sandbox(
|
||||
sandbox_policy_cwd.as_path(),
|
||||
use_bwrap_sandbox,
|
||||
stdio_policy,
|
||||
None,
|
||||
config.network,
|
||||
env,
|
||||
)
|
||||
.await?
|
||||
|
||||
@@ -147,7 +147,7 @@ pub(crate) async fn execute_user_shell_command(
|
||||
&turn_context.shell_environment_policy,
|
||||
Some(session.conversation_id),
|
||||
),
|
||||
network: turn_context.config.network.clone(),
|
||||
network: turn_context.network.clone(),
|
||||
// TODO(zhao-oai): Now that we have ExecExpiration::Cancellation, we
|
||||
// should use that instead of an "arbitrarily large" timeout here.
|
||||
expiration: USER_SHELL_TIMEOUT_MS.into(),
|
||||
|
||||
@@ -192,7 +192,7 @@ impl ToolHandler for UnifiedExecHandler {
|
||||
yield_time_ms,
|
||||
max_output_tokens,
|
||||
workdir,
|
||||
network: context.turn.config.network.clone(),
|
||||
network: context.turn.network.clone(),
|
||||
tty,
|
||||
sandbox_permissions,
|
||||
justification,
|
||||
|
||||
Reference in New Issue
Block a user