summaryrefslogtreecommitdiff
path: root/source4/cldap_server
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>2010-04-12 15:02:10 +0200
committerMatthias Dieter Wallnöfer <mdw@samba.org>2010-04-13 09:32:33 +0200
commit0dffa9caec8925a081e951579dd696810fc9e857 (patch)
tree85c4372b09a401c574f16fac0dc19e35ba6dc76a /source4/cldap_server
parent719a46913bed65932ebe696f441bd88ebd54819c (diff)
downloadsamba-0dffa9caec8925a081e951579dd696810fc9e857.tar.gz
samba-0dffa9caec8925a081e951579dd696810fc9e857.tar.bz2
samba-0dffa9caec8925a081e951579dd696810fc9e857.zip
s4:use "samdb_forest_name" for the forest DNS domainname lookup
Diffstat (limited to 'source4/cldap_server')
-rw-r--r--source4/cldap_server/netlogon.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source4/cldap_server/netlogon.c b/source4/cldap_server/netlogon.c
index e6a4ab373c..292327496c 100644
--- a/source4/cldap_server/netlogon.c
+++ b/source4/cldap_server/netlogon.c
@@ -62,6 +62,7 @@ NTSTATUS fill_netlogon_samlogon_response(struct ldb_context *sam_ctx,
const char *pdc_name;
struct GUID domain_uuid;
const char *dns_domain;
+ const char *forest_domain;
const char *pdc_dns_name;
const char *flatname;
const char *server_site;
@@ -241,6 +242,7 @@ NTSTATUS fill_netlogon_samlogon_response(struct ldb_context *sam_ctx,
pdc_name = talloc_asprintf(mem_ctx, "\\\\%s", lp_netbios_name(lp_ctx));
domain_uuid = samdb_result_guid(dom_res->msgs[0], "objectGUID");
dns_domain = lp_dnsdomain(lp_ctx);
+ forest_domain = samdb_forest_name(sam_ctx, mem_ctx);
pdc_dns_name = talloc_asprintf(mem_ctx, "%s.%s",
strlower_talloc(mem_ctx,
lp_netbios_name(lp_ctx)),
@@ -268,7 +270,7 @@ NTSTATUS fill_netlogon_samlogon_response(struct ldb_context *sam_ctx,
}
netlogon->data.nt5_ex.server_type = server_type;
netlogon->data.nt5_ex.domain_uuid = domain_uuid;
- netlogon->data.nt5_ex.forest = dns_domain;
+ netlogon->data.nt5_ex.forest = forest_domain;
netlogon->data.nt5_ex.dns_domain = dns_domain;
netlogon->data.nt5_ex.pdc_dns_name = pdc_dns_name;
netlogon->data.nt5_ex.domain = flatname;
@@ -301,7 +303,7 @@ NTSTATUS fill_netlogon_samlogon_response(struct ldb_context *sam_ctx,
netlogon->data.nt5.user_name = user;
netlogon->data.nt5.domain_name = flatname;
netlogon->data.nt5.domain_uuid = domain_uuid;
- netlogon->data.nt5.forest = dns_domain;
+ netlogon->data.nt5.forest = forest_domain;
netlogon->data.nt5.dns_domain = dns_domain;
netlogon->data.nt5.pdc_dns_name = pdc_dns_name;
netlogon->data.nt5.pdc_ip = pdc_ip;