summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2011-08-22 17:43:37 +1000
committerAndrew Tridgell <tridge@samba.org>2011-08-25 07:39:39 +1000
commit68100e5a21adab26dee367b0742a76b485edc16e (patch)
tree61d6c1a4e9f2f1c7af593aeb7cdb7afe8b226684
parent717706cb9691d435071c9883b3da649fcada2ea6 (diff)
downloadsamba-68100e5a21adab26dee367b0742a76b485edc16e.tar.gz
samba-68100e5a21adab26dee367b0742a76b485edc16e.tar.bz2
samba-68100e5a21adab26dee367b0742a76b485edc16e.zip
s4-join: setup DNS forest name on join context
-rw-r--r--source4/scripting/python/samba/join.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/source4/scripting/python/samba/join.py b/source4/scripting/python/samba/join.py
index 00f2c54211..b423678448 100644
--- a/source4/scripting/python/samba/join.py
+++ b/source4/scripting/python/samba/join.py
@@ -100,22 +100,22 @@ class dc_join(object):
else:
ctx.topology_dn = None
- ctx.dnsdomain = ldb.Dn(ctx.samdb, ctx.base_dn).canonical_str().split('/')[0]
+ ctx.dnsdomain = ctx.samdb.domain_dns_name()
+ ctx.dnsforest = ctx.samdb.forest_dns_name()
+ ctx.dnshostname = ctx.samdb.host_dns_name()
ctx.realm = ctx.dnsdomain
lp.set("realm", ctx.realm)
print("realm is %s" % ctx.realm)
- ctx.dnshostname = "%s.%s" % (ctx.myname.lower(), ctx.dnsdomain)
-
ctx.acct_dn = "CN=%s,OU=Domain Controllers,%s" % (ctx.myname, ctx.base_dn)
ctx.tmp_samdb = None
ctx.SPNs = [ "HOST/%s" % ctx.myname,
"HOST/%s" % ctx.dnshostname,
- "GC/%s/%s" % (ctx.dnshostname, ctx.dnsdomain) ]
+ "GC/%s/%s" % (ctx.dnshostname, ctx.dnsforest) ]
# these elements are optional
ctx.never_reveal_sid = None