Module: wine Branch: master Commit: a006b060800c7d41c7509cd7ae3ad72b06b966b2 URL: http://source.winehq.org/git/wine.git/?a=commit;h=a006b060800c7d41c7509cd7ae...
Author: Rob Shearman rob@codeweavers.com Date: Tue Oct 16 09:50:28 2007 +0100
ntdll: Fix the return code from RtlSetDaclSecurityDescriptor when daclpresent is FALSE.
---
dlls/advapi32/tests/security.c | 1 - dlls/ntdll/sec.c | 5 +++-- 2 files changed, 3 insertions(+), 3 deletions(-)
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 @@ 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); diff --git a/dlls/ntdll/sec.c b/dlls/ntdll/sec.c index e4f6ddc..89d23df 100644 --- a/dlls/ntdll/sec.c +++ b/dlls/ntdll/sec.c @@ -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;