mirror of
https://github.com/reactos/wine.git
synced 2024-11-29 22:50:43 +00:00
advapi32: LookupAccountNameW() - NULL account name handled.
This commit is contained in:
parent
a37512ee63
commit
0e6626958f
@ -2532,6 +2532,11 @@ BOOL WINAPI LookupAccountNameW( LPCWSTR lpSystemName, LPCWSTR lpAccountName, PSI
|
||||
FIXME("%s %s %p %p %p %p %p - stub\n", debugstr_w(lpSystemName), debugstr_w(lpAccountName),
|
||||
Sid, cbSid, ReferencedDomainName, cchReferencedDomainName, peUse);
|
||||
|
||||
if (!lpAccountName || !strcmpW(lpAccountName, Blank))
|
||||
{
|
||||
lpAccountName = BUILTIN;
|
||||
}
|
||||
|
||||
for (i = 0; i < (sizeof(ACCOUNT_SIDS) / sizeof(ACCOUNT_SIDS[0])); i++)
|
||||
{
|
||||
if (!strcmpW(lpAccountName, ACCOUNT_SIDS[i].account))
|
||||
|
@ -1632,14 +1632,11 @@ static void test_LookupAccountName(void)
|
||||
ret = LookupAccountNameA(NULL, NULL, psid, &sid_size, domain, &domain_size, &sid_use);
|
||||
get_sid_info(psid, &account, &sid_dom);
|
||||
ok(ret, "Failed to lookup account name\n");
|
||||
todo_wine
|
||||
{
|
||||
/* Using a fixed string will not work on different locales */
|
||||
ok(!lstrcmp(account, domain),
|
||||
"Got %s for account and %s for domain, these should be the same\n",
|
||||
account, domain);
|
||||
ok(sid_use == SidTypeDomain, "Expected SidTypeDomain (%d), got %d\n", SidTypeDomain, sid_use);
|
||||
}
|
||||
/* Using a fixed string will not work on different locales */
|
||||
ok(!lstrcmp(account, domain),
|
||||
"Got %s for account and %s for domain, these should be the same\n",
|
||||
account, domain);
|
||||
ok(sid_use == SidTypeDomain, "Expected SidTypeDomain (%d), got %d\n", SidTypeDomain, sid_use);
|
||||
|
||||
/* try an invalid account name */
|
||||
SetLastError(0xdeadbeef);
|
||||
|
Loading…
Reference in New Issue
Block a user