Commit e38d5695 authored by Paul Vriens's avatar Paul Vriens Committed by Alexandre Julliard

advapi32/tests: Fix some test failures on NT4.

parent a4d4c07c
...@@ -1728,6 +1728,8 @@ static void test_LookupAccountName(void) ...@@ -1728,6 +1728,8 @@ static void test_LookupAccountName(void)
sid_use = 0xcafebabe; sid_use = 0xcafebabe;
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
ret = LookupAccountNameA(NULL, NULL, NULL, &sid_size, NULL, &domain_size, &sid_use); ret = LookupAccountNameA(NULL, NULL, NULL, &sid_size, NULL, &domain_size, &sid_use);
if (!ret && GetLastError() != ERROR_NONE_MAPPED)
{
ok(!ret, "Expected 0, got %d\n", ret); ok(!ret, "Expected 0, got %d\n", ret);
ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER,
"Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError()); "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n", GetLastError());
...@@ -1748,6 +1750,12 @@ static void test_LookupAccountName(void) ...@@ -1748,6 +1750,12 @@ static void test_LookupAccountName(void)
account, domain); account, domain);
ok(sid_use == SidTypeDomain, "Expected SidTypeDomain (%d), got %d\n", SidTypeDomain, sid_use); ok(sid_use == SidTypeDomain, "Expected SidTypeDomain (%d), got %d\n", SidTypeDomain, sid_use);
HeapFree(GetProcessHeap(), 0, psid);
HeapFree(GetProcessHeap(), 0, domain);
}
else
win_skip("NULL account name doesn't work on NT4\n");
/* try an invalid account name */ /* try an invalid account name */
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
sid_size = 0; sid_size = 0;
...@@ -1770,9 +1778,6 @@ static void test_LookupAccountName(void) ...@@ -1770,9 +1778,6 @@ static void test_LookupAccountName(void)
"Expected RPC_S_SERVER_UNAVAILABLE or RPC_S_INVALID_NET_ADDR, got %d\n", GetLastError()); "Expected RPC_S_SERVER_UNAVAILABLE or RPC_S_INVALID_NET_ADDR, got %d\n", GetLastError());
ok(sid_size == 0, "Expected 0, got %d\n", sid_size); ok(sid_size == 0, "Expected 0, got %d\n", sid_size);
ok(domain_size == 0, "Expected 0, got %d\n", domain_size); ok(domain_size == 0, "Expected 0, got %d\n", domain_size);
HeapFree(GetProcessHeap(), 0, psid);
HeapFree(GetProcessHeap(), 0, domain);
} }
static void test_security_descriptor(void) static void test_security_descriptor(void)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment