Resolve local user name same as machine name to <user_name aka machine_name>\<user_name aka machine_name>

This commit is contained in:
Oldřich Jedlička 2019-12-17 01:44:07 +01:00 committed by bagajjal
parent 3b28c64936
commit 2736cb7b0c

View File

@ -237,7 +237,7 @@ get_passwd(const wchar_t * user_utf16, PSID sid)
}
/* If standard local user name, just use name without decoration */
if ((_wcsicmp(domain_name, computer_name) == 0))
if ((_wcsicmp(domain_name, computer_name) == 0) && (_wcsicmp(computer_name, user_name) != 0))
wcscpy_s(user_resolved, ARRAYSIZE(user_resolved), user_name);
/* put any other format in sam compatible format */