advapi32: Fix a few tests that fail in win2k.
This commit is contained in:
parent
54a06642f4
commit
9dc979604c
|
@ -2254,10 +2254,9 @@ static void test_ConvertStringSecurityDescriptor(void)
|
||||||
SetLastError(0xdeadbeef);
|
SetLastError(0xdeadbeef);
|
||||||
ret = pConvertStringSecurityDescriptorToSecurityDescriptorA(
|
ret = pConvertStringSecurityDescriptorToSecurityDescriptorA(
|
||||||
"D:(D;;GA;;;Nonexistent account)", SDDL_REVISION_1, &pSD, NULL);
|
"D:(D;;GA;;;Nonexistent account)", SDDL_REVISION_1, &pSD, NULL);
|
||||||
todo_wine
|
ok(!ret, "Expected failure, got %d\n", ret);
|
||||||
ok(!ret && GetLastError() == ERROR_INVALID_ACL,
|
ok(GetLastError() == ERROR_INVALID_ACL || GetLastError() == ERROR_INVALID_SID,
|
||||||
"ConvertStringSecurityDescriptorToSecurityDescriptor should have failed with ERROR_INVALID_ACL instead of %d\n",
|
"Expected ERROR_INVALID_ACL or ERROR_INVALID_SID, got %d\n", GetLastError());
|
||||||
GetLastError());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void test_ConvertSecurityDescriptorToString()
|
static void test_ConvertSecurityDescriptorToString()
|
||||||
|
@ -2353,17 +2352,23 @@ static void test_ConvertSecurityDescriptorToString()
|
||||||
ok(pConvertSecurityDescriptorToStringSecurityDescriptorA(&desc, SDDL_REVISION_1, sec_info, &string, &len), "Conversion failed\n");
|
ok(pConvertSecurityDescriptorToStringSecurityDescriptorA(&desc, SDDL_REVISION_1, sec_info, &string, &len), "Conversion failed\n");
|
||||||
CHECK_RESULT_AND_FREE("O:SYG:S-1-5-21-93476-23408-4576D:S:");
|
CHECK_RESULT_AND_FREE("O:SYG:S-1-5-21-93476-23408-4576D:S:");
|
||||||
|
|
||||||
|
/* fails in win2k */
|
||||||
SetSecurityDescriptorDacl(&desc, TRUE, NULL, FALSE);
|
SetSecurityDescriptorDacl(&desc, TRUE, NULL, FALSE);
|
||||||
pAddAuditAccessAceEx(pacl, ACL_REVISION, VALID_INHERIT_FLAGS, KEY_READ|KEY_WRITE, psid2, TRUE, TRUE);
|
pAddAuditAccessAceEx(pacl, ACL_REVISION, VALID_INHERIT_FLAGS, KEY_READ|KEY_WRITE, psid2, TRUE, TRUE);
|
||||||
ok(pConvertSecurityDescriptorToStringSecurityDescriptorA(&desc, SDDL_REVISION_1, sec_info, &string, &len), "Conversion failed\n");
|
if (pConvertSecurityDescriptorToStringSecurityDescriptorA(&desc, SDDL_REVISION_1, sec_info, &string, &len))
|
||||||
|
{
|
||||||
CHECK_ONE_OF_AND_FREE("O:SYG:S-1-5-21-93476-23408-4576D:S:(AU;OICINPIOIDSAFA;CCDCLCSWRPRC;;;SU)", /* XP */
|
CHECK_ONE_OF_AND_FREE("O:SYG:S-1-5-21-93476-23408-4576D:S:(AU;OICINPIOIDSAFA;CCDCLCSWRPRC;;;SU)", /* XP */
|
||||||
"O:SYG:S-1-5-21-93476-23408-4576D:NO_ACCESS_CONTROLS:(AU;OICINPIOIDSAFA;CCDCLCSWRPRC;;;SU)" /* Vista */);
|
"O:SYG:S-1-5-21-93476-23408-4576D:NO_ACCESS_CONTROLS:(AU;OICINPIOIDSAFA;CCDCLCSWRPRC;;;SU)" /* Vista */);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* fails in win2k */
|
||||||
pAddAuditAccessAceEx(pacl, ACL_REVISION, NO_PROPAGATE_INHERIT_ACE, FILE_GENERIC_READ|FILE_GENERIC_WRITE, psid2, TRUE, FALSE);
|
pAddAuditAccessAceEx(pacl, ACL_REVISION, NO_PROPAGATE_INHERIT_ACE, FILE_GENERIC_READ|FILE_GENERIC_WRITE, psid2, TRUE, FALSE);
|
||||||
ok(pConvertSecurityDescriptorToStringSecurityDescriptorA(&desc, SDDL_REVISION_1, sec_info, &string, &len), "Conversion failed\n");
|
if (pConvertSecurityDescriptorToStringSecurityDescriptorA(&desc, SDDL_REVISION_1, sec_info, &string, &len))
|
||||||
|
{
|
||||||
CHECK_ONE_OF_AND_FREE("O:SYG:S-1-5-21-93476-23408-4576D:S:(AU;OICINPIOIDSAFA;CCDCLCSWRPRC;;;SU)(AU;NPSA;0x12019f;;;SU)", /* XP */
|
CHECK_ONE_OF_AND_FREE("O:SYG:S-1-5-21-93476-23408-4576D:S:(AU;OICINPIOIDSAFA;CCDCLCSWRPRC;;;SU)(AU;NPSA;0x12019f;;;SU)", /* XP */
|
||||||
"O:SYG:S-1-5-21-93476-23408-4576D:NO_ACCESS_CONTROLS:(AU;OICINPIOIDSAFA;CCDCLCSWRPRC;;;SU)(AU;NPSA;0x12019f;;;SU)" /* Vista */);
|
"O:SYG:S-1-5-21-93476-23408-4576D:NO_ACCESS_CONTROLS:(AU;OICINPIOIDSAFA;CCDCLCSWRPRC;;;SU)(AU;NPSA;0x12019f;;;SU)" /* Vista */);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void test_PrivateObjectSecurity(void)
|
static void test_PrivateObjectSecurity(void)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue