From 1f3a14e7676c298f5c2de648da7af01a3bb8966e Mon Sep 17 00:00:00 2001 From: Rob Shearman Date: Sun, 15 Nov 2009 16:37:35 +0000 Subject: [PATCH] advapi32: EqualSid should set last error to ERROR_SUCCESS. --- dlls/advapi32/security.c | 4 +++- dlls/advapi32/tests/security.c | 3 --- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/dlls/advapi32/security.c b/dlls/advapi32/security.c index 7dd39a4a75d..3e79a614291 100644 --- a/dlls/advapi32/security.c +++ b/dlls/advapi32/security.c @@ -1055,7 +1055,9 @@ IsValidSid( PSID pSid ) BOOL WINAPI EqualSid( PSID pSid1, PSID pSid2 ) { - return RtlEqualSid( pSid1, pSid2 ); + BOOL ret = RtlEqualSid( pSid1, pSid2 ); + SetLastError(ERROR_SUCCESS); + return ret; } /****************************************************************************** diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c index df4b2e1f918..2986ef5773b 100644 --- a/dlls/advapi32/tests/security.c +++ b/dlls/advapi32/tests/security.c @@ -3296,7 +3296,6 @@ static void test_EqualSid(void) SetLastError(0xdeadbeef); ret = EqualSid(sid1, sid2); ok(!ret, "World and domain admins sids shouldn't have been equal\n"); - todo_wine ok(GetLastError() == ERROR_SUCCESS, "EqualSid should have set last error to ERROR_SUCCESS instead of %d\n", GetLastError()); @@ -3315,7 +3314,6 @@ static void test_EqualSid(void) SetLastError(0xdeadbeef); ret = EqualSid(sid1, sid2); ok(ret, "Same sids should have been equal\n"); - todo_wine ok(GetLastError() == ERROR_SUCCESS, "EqualSid should have set last error to ERROR_SUCCESS instead of %d\n", GetLastError()); @@ -3324,7 +3322,6 @@ static void test_EqualSid(void) SetLastError(0xdeadbeef); ret = EqualSid(sid1, sid2); ok(!ret, "EqualSid with invalid sid should have returned FALSE\n"); - todo_wine ok(GetLastError() == ERROR_SUCCESS, "EqualSid should have set last error to ERROR_SUCCESS instead of %d\n", GetLastError());