grant read ACL to exe directory first so we can call the command runner (#8275)

when granting read access to the sandbox user, grant the
codex/command-runner exe directory first so commands can run before the
entire read ACL process is finished.
This commit is contained in:
iceweasel-oai
2025-12-18 11:52:32 -08:00
committed by GitHub
parent 2e5d52cb14
commit ad41182ee8

View File

@@ -195,6 +195,11 @@ fn canonical_existing(paths: &[PathBuf]) -> Vec<PathBuf> {
pub(crate) fn gather_read_roots(command_cwd: &Path, policy: &SandboxPolicy) -> Vec<PathBuf> {
let mut roots: Vec<PathBuf> = Vec::new();
if let Ok(exe) = std::env::current_exe() {
if let Some(dir) = exe.parent() {
roots.push(dir.to_path_buf());
}
}
for p in [
PathBuf::from(r"C:\Windows"),
PathBuf::from(r"C:\Program Files"),