advapi32: EqualSid should set last error to ERROR_SUCCESS.

This commit is contained in:
Rob Shearman 2009-11-15 16:37:35 +00:00 committed by Alexandre Julliard
parent 3498a88179
commit 1f3a14e767
2 changed files with 3 additions and 4 deletions

View File

@ -1055,7 +1055,9 @@ IsValidSid( PSID pSid )
BOOL WINAPI BOOL WINAPI
EqualSid( PSID pSid1, PSID pSid2 ) EqualSid( PSID pSid1, PSID pSid2 )
{ {
return RtlEqualSid( pSid1, pSid2 ); BOOL ret = RtlEqualSid( pSid1, pSid2 );
SetLastError(ERROR_SUCCESS);
return ret;
} }
/****************************************************************************** /******************************************************************************

View File

@ -3296,7 +3296,6 @@ static void test_EqualSid(void)
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
ret = EqualSid(sid1, sid2); ret = EqualSid(sid1, sid2);
ok(!ret, "World and domain admins sids shouldn't have been equal\n"); ok(!ret, "World and domain admins sids shouldn't have been equal\n");
todo_wine
ok(GetLastError() == ERROR_SUCCESS, ok(GetLastError() == ERROR_SUCCESS,
"EqualSid should have set last error to ERROR_SUCCESS instead of %d\n", "EqualSid should have set last error to ERROR_SUCCESS instead of %d\n",
GetLastError()); GetLastError());
@ -3315,7 +3314,6 @@ static void test_EqualSid(void)
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
ret = EqualSid(sid1, sid2); ret = EqualSid(sid1, sid2);
ok(ret, "Same sids should have been equal\n"); ok(ret, "Same sids should have been equal\n");
todo_wine
ok(GetLastError() == ERROR_SUCCESS, ok(GetLastError() == ERROR_SUCCESS,
"EqualSid should have set last error to ERROR_SUCCESS instead of %d\n", "EqualSid should have set last error to ERROR_SUCCESS instead of %d\n",
GetLastError()); GetLastError());
@ -3324,7 +3322,6 @@ static void test_EqualSid(void)
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
ret = EqualSid(sid1, sid2); ret = EqualSid(sid1, sid2);
ok(!ret, "EqualSid with invalid sid should have returned FALSE\n"); ok(!ret, "EqualSid with invalid sid should have returned FALSE\n");
todo_wine
ok(GetLastError() == ERROR_SUCCESS, ok(GetLastError() == ERROR_SUCCESS,
"EqualSid should have set last error to ERROR_SUCCESS instead of %d\n", "EqualSid should have set last error to ERROR_SUCCESS instead of %d\n",
GetLastError()); GetLastError());