mirror of
https://github.com/openai/codex.git
synced 2026-11-20 22:40:37 +00:00
## Why Desktop uninstall cleanup needs an installation owner even when the user has not signed in or configured the Windows sandbox. Recording ownership only during provisioning leaves those installations unregistered. ## What changed - Add an authenticated installation registration request and attempt it during Windows desktop stdio initialization, with a five-second timeout before the initialization response. - Persist ownership independently of provisioning, preserve existing desktop ownership, and prevent another user or home from replacing the registered owner. - Validate write authority and retain directory handles and guards to protect the registered home against junction conversion through privileged cleanup. - Preserve existing CLI homes during desktop uninstall while removing their `CodexSandboxUsers` ACL entries. Report ACL revocation errors and avoid propagating unchanged ACLs. - Grant the owner `WRITE_DAC` on `.sandbox-bin` and allow elevated-helper fallback when older permissions need repair or the service cannot establish an uninstall watcher. ## Testing Add tests for installation registration without sandbox settings and for preserving a child's null DACL when revoking an absent SID from its parent. GitOrigin-RevId: fb48923e9d76758d1bf5b50c7305aa60f91629db
60 lines
1.4 KiB
TOML
60 lines
1.4 KiB
TOML
[package]
|
|
name = "codex-windows-sandbox-service"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
|
|
[lib]
|
|
name = "codex_windows_sandbox_service"
|
|
path = "src/lib.rs"
|
|
doctest = false
|
|
|
|
[[bin]]
|
|
name = "codex-windows-sandbox-service"
|
|
path = "src/main.rs"
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[dependencies]
|
|
anyhow = { workspace = true }
|
|
codex-cloud-config = { workspace = true }
|
|
codex-config = { workspace = true }
|
|
codex-core = { workspace = true }
|
|
codex-windows-sandbox = { workspace = true }
|
|
tokio = { workspace = true, features = ["macros", "rt", "sync", "time"] }
|
|
toml = { workspace = true }
|
|
|
|
[dev-dependencies]
|
|
pretty_assertions = { workspace = true }
|
|
|
|
[target.'cfg(windows)'.dependencies.windows]
|
|
version = "0.58"
|
|
features = [
|
|
"ApplicationModel",
|
|
"Win32_System_WinRT",
|
|
]
|
|
|
|
[target.'cfg(windows)'.dependencies.windows-sys]
|
|
version = "0.52"
|
|
features = [
|
|
"Win32_Foundation",
|
|
"Win32_NetworkManagement_NetManagement",
|
|
"Win32_Security",
|
|
"Win32_Security_Authorization",
|
|
"Win32_Storage_FileSystem",
|
|
"Win32_Storage_Packaging_Appx",
|
|
"Win32_System_Com",
|
|
"Win32_System_Environment",
|
|
"Win32_System_EventLog",
|
|
"Win32_System_IO",
|
|
"Win32_System_Memory",
|
|
"Win32_System_Pipes",
|
|
"Win32_System_Registry",
|
|
"Win32_System_RemoteDesktop",
|
|
"Win32_System_Services",
|
|
"Win32_System_SystemServices",
|
|
"Win32_System_Threading",
|
|
"Win32_UI_Shell",
|
|
]
|