ntdll: Fix the return code from RtlSetDaclSecurityDescriptor when daclpresent is FALSE.
diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c
index 4c7b7bf..0fbd3f9 100644
--- a/dlls/advapi32/tests/security.c
+++ b/dlls/advapi32/tests/security.c
@@ -784,7 +784,6 @@
/* 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);
diff --git a/dlls/ntdll/sec.c b/dlls/ntdll/sec.c
index e4f6ddc..89d23dff 100644
--- a/dlls/ntdll/sec.c
+++ b/dlls/ntdll/sec.c
@@ -626,8 +626,9 @@
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;