ntdll: Fix the return code from RtlSetDaclSecurityDescriptor when daclpresent is FALSE.

This commit is contained in:
Rob Shearman 2007-10-16 09:50:28 +01:00 committed by Alexandre Julliard
parent d1a3e2ede5
commit a006b06080
2 changed files with 3 additions and 3 deletions

View File

@ -784,7 +784,6 @@ static void test_AccessCheck(void)
/* sd with no dacl present */
ret = SetSecurityDescriptorDacl(SecurityDescriptor, FALSE, NULL, FALSE);
todo_wine
ok(ret, "SetSecurityDescriptorDacl failed with error %d\n", GetLastError());
ret = AccessCheck(SecurityDescriptor, Token, KEY_READ, &Mapping,
PrivSet, &PrivSetLen, &Access, &AccessStatus);

View File

@ -626,8 +626,9 @@ NTSTATUS WINAPI RtlSetDaclSecurityDescriptor (
return STATUS_INVALID_SECURITY_DESCR;
if (!daclpresent)
{ lpsd->Control &= ~SE_DACL_PRESENT;
return TRUE;
{
lpsd->Control &= ~SE_DACL_PRESENT;
return STATUS_SUCCESS;
}
lpsd->Control |= SE_DACL_PRESENT;