{"record":{"id":"2484b352fb167b5d","repo":"openai/codex","slug":"setentriesinaclw-failed-code2","errorCode":null,"errorMessage":"SetEntriesInAclW failed: {code2}","messagePattern":"SetEntriesInAclW failed: (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"codex-rs/windows-sandbox-rs/src/acl.rs","lineNumber":455,"sourceCode":"            if code3 == ERROR_SUCCESS {\n                added = true;\n                if !p_new_dacl.is_null() {\n                    LocalFree(p_new_dacl as HLOCAL);\n                }\n            } else {\n                if !p_new_dacl.is_null() {\n                    LocalFree(p_new_dacl as HLOCAL);\n                }\n                if !p_sd.is_null() {\n                    LocalFree(p_sd as HLOCAL);\n                }\n                return Err(anyhow!(\"SetNamedSecurityInfoW failed: {code3}\"));\n            }\n        } else {\n            if !p_sd.is_null() {\n                LocalFree(p_sd as HLOCAL);\n            }\n            return Err(anyhow!(\"SetEntriesInAclW failed: {code2}\"));\n        }\n    }\n    if !p_sd.is_null() {\n        LocalFree(p_sd as HLOCAL);\n    }\n    Ok(added)\n}\n\n/// Ensure all provided SIDs have an allow ACE with the requested mask on the path.\n/// Returns true if any ACE was added.\n///\n/// # Safety\n/// Caller must pass valid SID pointers and an existing path; free the returned security descriptor with `LocalFree`.\npub unsafe fn ensure_allow_mask_aces_with_inheritance(\n    path: &Path,\n    sids: &[*mut c_void],\n    allow_mask: u32,\n    inheritance: u32,","sourceCodeStart":437,"sourceCodeEnd":473,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/windows-sandbox-rs/src/acl.rs#L437-L473","documentation":"Error \"SetEntriesInAclW failed: {code2}\" thrown in openai/codex.","triggerScenarios":"Thrown at codex-rs/windows-sandbox-rs/src/acl.rs:455 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"339751715c64496cb86246bfb3935f40e309dd3d","analyzedAt":"2026-08-25T05:35:09.876Z","schemaVersion":2},"datasetVersion":"2026-08-25T06:17:31.827Z"}