-
Notifications
You must be signed in to change notification settings - Fork 11.2k
fix: fix old system bubblewrap compatibility without falling back to vendored bwrap #15693
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 18 commits
3855146
e048d63
dcc22b4
2502f96
89bff52
a17aa0e
c04464b
cfa5fd7
614c559
b09e9ad
a40b50e
29950a7
70df627
3e14bf6
e869060
4c19b46
b184bef
e03f62b
151a09e
1605672
72a0d34
d0354b2
0cfa954
f194692
62336e0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,6 +5,7 @@ use crate::spawn::spawn_child_async; | |
| use codex_network_proxy::NetworkProxy; | ||
| use codex_protocol::permissions::FileSystemSandboxPolicy; | ||
| use codex_protocol::permissions::NetworkSandboxPolicy; | ||
| use codex_sandboxing::landlock::CODEX_LINUX_SANDBOX_ARG0; | ||
| use codex_sandboxing::landlock::allow_network_for_proxy; | ||
| use codex_sandboxing::landlock::create_linux_sandbox_command_args_for_policies; | ||
| use std::collections::HashMap; | ||
|
|
@@ -48,11 +49,24 @@ where | |
| use_legacy_landlock, | ||
| allow_network_for_proxy(/*enforce_managed_network*/ false), | ||
| ); | ||
| let arg0 = Some("codex-linux-sandbox"); | ||
| let codex_linux_sandbox_exe = codex_linux_sandbox_exe.as_ref(); | ||
| // Preserve the helper alias when we already have it; otherwise force argv0 | ||
| // so arg0 dispatch still reaches the Linux sandbox path. | ||
| let arg0 = if codex_linux_sandbox_exe | ||
|
viyatb-oai marked this conversation as resolved.
|
||
| .file_name() | ||
| .and_then(|name| name.to_str()) | ||
| == Some(CODEX_LINUX_SANDBOX_ARG0) | ||
| { | ||
| // Old bubblewrap builds without `--argv0` need a real helper path whose | ||
| // basename still dispatches to the Linux sandbox entrypoint. | ||
| codex_linux_sandbox_exe.to_string_lossy().into_owned() | ||
| } else { | ||
| CODEX_LINUX_SANDBOX_ARG0.to_string() | ||
| }; | ||
| spawn_child_async(SpawnChildRequest { | ||
| program: codex_linux_sandbox_exe.as_ref().to_path_buf(), | ||
| program: codex_linux_sandbox_exe.to_path_buf(), | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Outside the scope of this PR, but I would like to change |
||
| args, | ||
| arg0, | ||
| arg0: Some(&arg0), | ||
| cwd: command_cwd, | ||
| network_sandbox_policy, | ||
| network, | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.