Skip to content

Commit

Permalink
s4:cldap_server/netlogon.c: it is wrong to specify "\\" in front of t…
Browse files Browse the repository at this point in the history
…he hostname

For LOGON_SAM_LOGON_RESPONSE_EX and LOGON_SAM_LOGON_USER_UNKNOWN_EX,
pdc name is not in unc path form.

[MS-ADTS] 7.3.1.* uses UnicodeLogonServer, which seems to be in unc form,
while NetbiosComputerName is not in unc form.

Bases on a patch from Matthias Dieter Wallnöfer <[email protected]>.

metze
  • Loading branch information
metze-samba committed Jan 4, 2012
1 parent b9d208b commit 6b3404a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions source4/cldap_server/netlogon.c
Original file line number Diff line number Diff line change
Expand Up @@ -250,9 +250,13 @@ NTSTATUS fill_netlogon_samlogon_response(struct ldb_context *sam_ctx,
server_type |= DS_SERVER_WRITABLE;
}

pdc_name = talloc_asprintf(mem_ctx, "\\\\%s",
if (version & (NETLOGON_NT_VERSION_5EX|NETLOGON_NT_VERSION_5EX_WITH_IP)) {
pdc_name = lpcfg_netbios_name(lp_ctx);
} else {
pdc_name = talloc_asprintf(mem_ctx, "\\\\%s",
lpcfg_netbios_name(lp_ctx));
NT_STATUS_HAVE_NO_MEMORY(pdc_name);
NT_STATUS_HAVE_NO_MEMORY(pdc_name);
}
domain_uuid = samdb_result_guid(dom_res->msgs[0], "objectGUID");
dns_domain = lpcfg_dnsdomain(lp_ctx);
forest_domain = samdb_forest_name(sam_ctx, mem_ctx);
Expand Down

0 comments on commit 6b3404a

Please sign in to comment.