Skip to content
Snippets Groups Projects
Commit eb077e9f authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard
Browse files

advapi32: Return correct short domain name.


Also remove suffix and uppercase the returned name as Windows does.

Signed-off-by: default avatarDmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard's avatarAlexandre Julliard <julliard@winehq.org>
parent a3bcaca4
No related branches found
Tags wine-960818
No related merge requests found
......@@ -786,11 +786,16 @@ NTSTATUS WINAPI LsaQueryInformationPolicy(
if (!xdi) return STATUS_NO_MEMORY;
dwSize = MAX_COMPUTERNAME_LENGTH + 1;
if (GetComputerNameW(xdi->domain_name, &dwSize))
if (GetComputerNameExW(ComputerNamePhysicalDnsDomain, xdi->domain_name, &dwSize))
{
WCHAR *dot;
dot = strrchrW(xdi->domain_name, '.');
if (dot) *dot = 0;
struprW(xdi->domain_name);
xdi->info.Name.Buffer = xdi->domain_name;
xdi->info.Name.Length = dwSize * sizeof(WCHAR);
xdi->info.Name.MaximumLength = (dwSize + 1) * sizeof(WCHAR);
xdi->info.Name.Length = strlenW(xdi->domain_name) * sizeof(WCHAR);
xdi->info.Name.MaximumLength = xdi->info.Name.Length + sizeof(WCHAR);
TRACE("setting Name to %s\n", debugstr_w(xdi->info.Name.Buffer));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment