From 085936926a446a289b88dfafcfe425c5dfe615b1 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 24 Aug 2011 13:51:01 +1000 Subject: s4-libnet: fixed forest DNS name Pair-Programmed-With: Andrew Bartlett --- source4/libnet/libnet_become_dc.c | 2 +- source4/libnet/py_net.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'source4/libnet') diff --git a/source4/libnet/libnet_become_dc.c b/source4/libnet/libnet_become_dc.c index bfa637255c..34ca97c274 100644 --- a/source4/libnet/libnet_become_dc.c +++ b/source4/libnet/libnet_become_dc.c @@ -2935,7 +2935,7 @@ static void becomeDC_drsuapi_update_refs_send(struct libnet_BecomeDC_state *s, ntds_dns_name = talloc_asprintf(r, "%s._msdcs.%s", ntds_guid_str, - s->domain.dns_name); + s->forest.dns_name); if (composite_nomem(ntds_dns_name, c)) return; r->in.bind_handle = &drsuapi->bind_handle; diff --git a/source4/libnet/py_net.c b/source4/libnet/py_net.c index c4b684077c..cf2f066081 100644 --- a/source4/libnet/py_net.c +++ b/source4/libnet/py_net.c @@ -32,6 +32,7 @@ #include "librpc/rpc/pyrpc_util.h" #include "libcli/finddc.h" #include "libcli/resolve/resolve.h" +#include "dsdb/common/proto.h" void initnet(void); @@ -447,7 +448,7 @@ static PyObject *py_net_replicate_init(py_net_Object *self, PyObject *args, PyOb return NULL; } - s->forest.dns_name = lpcfg_dnsdomain(lp); + s->forest.dns_name = samdb_dn_to_dns_domain(s, ldb_get_root_basedn(samdb)); s->chunk.gensec_skey = &s->gensec_skey; s->chunk.partition = &s->partition; -- cgit