Commit 411ccfb9 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

advapi32: Also initialize DnsDomainName and DnsForestName in LsaQueryInformationPolicy.

parent eb077e9f
......@@ -799,7 +799,19 @@ NTSTATUS WINAPI LsaQueryInformationPolicy(
TRACE("setting Name to %s\n", debugstr_w(xdi->info.Name.Buffer));
}
/* FIXME: also set DnsDomainName and DnsForestName */
dwSize = MAX_COMPUTERNAME_LENGTH + 1;
if (GetComputerNameExW(ComputerNameDnsDomain, xdi->dns_domain_name, &dwSize))
{
xdi->info.DnsDomainName.Buffer = xdi->dns_domain_name;
xdi->info.DnsDomainName.Length = dwSize * sizeof(WCHAR);
xdi->info.DnsDomainName.MaximumLength = (dwSize + 1) * sizeof(WCHAR);
TRACE("setting DnsDomainName to %s\n", debugstr_w(xdi->info.DnsDomainName.Buffer));
xdi->info.DnsForestName.Buffer = xdi->dns_domain_name;
xdi->info.DnsForestName.Length = dwSize * sizeof(WCHAR);
xdi->info.DnsForestName.MaximumLength = (dwSize + 1) * sizeof(WCHAR);
TRACE("setting DnsForestName to %s\n", debugstr_w(xdi->info.DnsForestName.Buffer));
}
dwSize = sizeof(xdi->domain_sid);
if (ADVAPI_GetComputerSid(&computer_sid.sid) && GetWindowsAccountDomainSid(&computer_sid.sid, &xdi->domain_sid.sid, &dwSize))
......
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