summaryrefslogtreecommitdiff
path: root/source4/cldap_server
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-11-23 10:09:51 +0100
committerStefan Metzmacher <metze@samba.org>2012-01-04 18:33:06 +0100
commit6b3404ad95998351127a5d1b181a2825827c7bd5 (patch)
tree71021f9bce7bb612177e7ea717ee5e6b19a41357 /source4/cldap_server
parentb9d208bdaa9da2a5ae534481865efc881b851b01 (diff)
downloadsamba-6b3404ad95998351127a5d1b181a2825827c7bd5.tar.gz
samba-6b3404ad95998351127a5d1b181a2825827c7bd5.tar.bz2
samba-6b3404ad95998351127a5d1b181a2825827c7bd5.zip
s4:cldap_server/netlogon.c: it is wrong to specify "\\" in front of the 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 <mdw@samba.org>. metze
Diffstat (limited to 'source4/cldap_server')
-rw-r--r--source4/cldap_server/netlogon.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source4/cldap_server/netlogon.c b/source4/cldap_server/netlogon.c
index 9d9f45e8bb..4777fcca9c 100644
--- a/source4/cldap_server/netlogon.c
+++ b/source4/cldap_server/netlogon.c
@@ -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);