{"record":{"id":"e11166553676270d","repo":"openai/codex","slug":"getsecurityinfo-failed-for","errorCode":null,"errorMessage":"GetSecurityInfo failed for {}: {}","messagePattern":"GetSecurityInfo failed for (.+?): (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"codex-rs/windows-sandbox-rs/src/acl.rs","lineNumber":99,"sourceCode":"    );\n    if h == INVALID_HANDLE_VALUE {\n        return Err(anyhow!(\"CreateFileW failed for {}\", path.display()));\n    }\n    let mut p_sd: *mut c_void = std::ptr::null_mut();\n    let mut p_dacl: *mut ACL = std::ptr::null_mut();\n    let code = GetSecurityInfo(\n        h,\n        1, // SE_FILE_OBJECT\n        DACL_SECURITY_INFORMATION,\n        std::ptr::null_mut(),\n        std::ptr::null_mut(),\n        &mut p_dacl,\n        std::ptr::null_mut(),\n        &mut p_sd,\n    );\n    CloseHandle(h);\n    if code != ERROR_SUCCESS {\n        return Err(anyhow!(\n            \"GetSecurityInfo failed for {}: {}\",\n            path.display(),\n            code\n        ));\n    }\n    Ok((p_dacl, p_sd))\n}\n\n/// Fast mask-based check: does an ACE for provided SIDs grant the desired mask? Skips inherit-only.\n/// When `require_all_bits` is true, all bits in `desired_mask` must be present; otherwise any bit suffices.\npub unsafe fn dacl_mask_allows(\n    p_dacl: *mut ACL,\n    psids: &[*mut c_void],\n    desired_mask: u32,\n    require_all_bits: bool,\n) -> bool {\n    dacl_mask_allows_with_scope(\n        p_dacl,","sourceCodeStart":81,"sourceCodeEnd":117,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/windows-sandbox-rs/src/acl.rs#L81-L117","documentation":"Fires in fetch_dacl_handle when GetSecurityInfo returns a code other than ERROR_SUCCESS after the file handle was opened, meaning the DACL/security descriptor could not be extracted from the opened handle.","triggerScenarios":"Thrown at codex-rs/windows-sandbox-rs/src/acl.rs:99 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the returned code for the exact Win32 failure","Ensure the handle was opened with READ_CONTROL so security info query is permitted","Retry after fixing privilege issues; the code already closes the handle to avoid leaks"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"339751715c64496cb86246bfb3935f40e309dd3d","analyzedAt":"2026-08-25T05:35:09.876Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}