{"record":{"id":"75a8441b3b16a2f8","repo":"openai/codex","slug":"setentriesinaclw-failed-res","errorCode":null,"errorMessage":"SetEntriesInAclW failed: {res}","messagePattern":"SetEntriesInAclW failed: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"codex-rs/windows-sandbox-rs/src/token.rs","lineNumber":83,"sourceCode":"            grfInheritance: 0,\n            Trustee: TRUSTEE_W {\n                pMultipleTrustee: std::ptr::null_mut(),\n                MultipleTrusteeOperation: 0,\n                TrusteeForm: TRUSTEE_IS_SID,\n                TrusteeType: TRUSTEE_IS_UNKNOWN,\n                ptstrName: *sid as *mut u16,\n            },\n        })\n        .collect();\n    let mut p_new_dacl: *mut ACL = std::ptr::null_mut();\n    let res = SetEntriesInAclW(\n        entries.len() as u32,\n        entries.as_ptr(),\n        std::ptr::null_mut(),\n        &mut p_new_dacl,\n    );\n    if res != ERROR_SUCCESS {\n        return Err(anyhow!(\"SetEntriesInAclW failed: {res}\"));\n    }\n    let mut info = TokenDefaultDaclInfo {\n        default_dacl: p_new_dacl,\n    };\n    let ok = SetTokenInformation(\n        h_token,\n        TokenDefaultDacl,\n        &mut info as *mut _ as *mut c_void,\n        std::mem::size_of::<TokenDefaultDaclInfo>() as u32,\n    );\n    if ok == 0 {\n        let err = GetLastError();\n        if !p_new_dacl.is_null() {\n            LocalFree(p_new_dacl as HLOCAL);\n        }\n        return Err(anyhow!(\n            \"SetTokenInformation(TokenDefaultDacl) failed: {err}\",\n        ));","sourceCodeStart":65,"sourceCodeEnd":101,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/windows-sandbox-rs/src/token.rs#L65-L101","documentation":"Error \"SetEntriesInAclW failed: {res}\" thrown in openai/codex.","triggerScenarios":"Thrown at codex-rs/windows-sandbox-rs/src/token.rs:83 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"}