s4-join: fixed DNS hostname
authorAndrew Tridgell <tridge@samba.org>
Wed, 24 Aug 2011 03:52:09 +0000 (13:52 +1000)
committerAndrew Tridgell <tridge@samba.org>
Wed, 24 Aug 2011 21:39:39 +0000 (07:39 +1000)
we need the local hostname, not the remote name

source4/scripting/python/samba/join.py

index b42367844874c7f8d8163b391bb72007dcb33382..3d81a296f7c82b3bab878f5b8b05b3ed7451d862 100644 (file)
@@ -102,7 +102,7 @@ class dc_join(object):
 
         ctx.dnsdomain = ctx.samdb.domain_dns_name()
         ctx.dnsforest = ctx.samdb.forest_dns_name()
-        ctx.dnshostname = ctx.samdb.host_dns_name()
+        ctx.dnshostname = "%s.%s" % (ctx.myname, ctx.dnsdomain)
 
         ctx.realm = ctx.dnsdomain
         lp.set("realm", ctx.realm)