-
Notifications
You must be signed in to change notification settings - Fork 7.2k
Elevated sandbox NUX #8789
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
Elevated sandbox NUX #8789
Changes from all commits
d264321
4276c6e
e5a52ab
e484710
0def6e5
994033a
20906ff
46ab959
234b0df
c9516e9
c55e041
9291dfe
73e018b
4111eae
000b90d
b7fb220
5483198
a2e9a3e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| use crate::protocol::SandboxPolicy; | ||
| use std::collections::HashMap; | ||
| use std::path::Path; | ||
|
|
||
| /// Kill switch for the elevated sandbox NUX on Windows. | ||
| /// | ||
| /// When false, revert to the previous sandbox NUX, which only | ||
| /// prompts users to enable the legacy sandbox feature. | ||
| pub const ELEVATED_SANDBOX_NUX_ENABLED: bool = true; | ||
|
|
||
| #[cfg(target_os = "windows")] | ||
| pub fn sandbox_setup_is_complete(codex_home: &Path) -> bool { | ||
| codex_windows_sandbox::sandbox_setup_is_complete(codex_home) | ||
| } | ||
|
|
||
| #[cfg(not(target_os = "windows"))] | ||
| pub fn sandbox_setup_is_complete(_codex_home: &Path) -> bool { | ||
| false | ||
|
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. Should this return
Collaborator
Author
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. yeah I'll update this in a future PR. For now there is no leakage |
||
| } | ||
|
|
||
| #[cfg(target_os = "windows")] | ||
| pub fn run_elevated_setup( | ||
| policy: &SandboxPolicy, | ||
| policy_cwd: &Path, | ||
| command_cwd: &Path, | ||
| env_map: &HashMap<String, String>, | ||
| codex_home: &Path, | ||
| ) -> anyhow::Result<()> { | ||
| codex_windows_sandbox::run_elevated_setup( | ||
| policy, | ||
| policy_cwd, | ||
| command_cwd, | ||
| env_map, | ||
| codex_home, | ||
| None, | ||
| None, | ||
| ) | ||
| } | ||
|
|
||
| #[cfg(not(target_os = "windows"))] | ||
| pub fn run_elevated_setup( | ||
| _policy: &SandboxPolicy, | ||
| _policy_cwd: &Path, | ||
| _command_cwd: &Path, | ||
| _env_map: &HashMap<String, String>, | ||
| _codex_home: &Path, | ||
| ) -> anyhow::Result<()> { | ||
| anyhow::bail!("elevated Windows sandbox setup is only supported on Windows") | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.