summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-11-06 14:35:30 +1100
committerAndrew Tridgell <tridge@samba.org>2010-11-06 14:36:26 +1100
commit2d52eea0289e8c61282eba26b8dbb8036ca6a04b (patch)
treefa9793e885a367595764e06299697a4199c1f8f3
parenta162b1a2d865c90441789640104adcd982e2bb75 (diff)
downloadsamba-2d52eea0289e8c61282eba26b8dbb8036ca6a04b.tar.gz
samba-2d52eea0289e8c61282eba26b8dbb8036ca6a04b.tar.bz2
samba-2d52eea0289e8c61282eba26b8dbb8036ca6a04b.zip
s4-join: fixed SPNs, invocationId and dnshostname and python join
- we need the GN/ SPN for replication. - fixed the string form of the invocationId - lowercase the dnshostname Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
-rw-r--r--source4/scripting/python/samba/join.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/source4/scripting/python/samba/join.py b/source4/scripting/python/samba/join.py
index d57eb58fb5..7d3b6f2f0c 100644
--- a/source4/scripting/python/samba/join.py
+++ b/source4/scripting/python/samba/join.py
@@ -85,7 +85,7 @@ class dc_join:
ctx.dnsdomain = ldb.Dn(ctx.samdb, ctx.base_dn).canonical_str().split('/')[0]
ctx.realm = ctx.dnsdomain
- ctx.dnshostname = "%s.%s" % (ctx.myname, ctx.dnsdomain)
+ ctx.dnshostname = "%s.%s" % (ctx.myname.lower(), ctx.dnsdomain)
ctx.acct_dn = "CN=%s,OU=Domain Controllers,%s" % (ctx.myname, ctx.base_dn)
@@ -93,7 +93,8 @@ class dc_join:
ctx.tmp_samdb = None
ctx.SPNs = [ "HOST/%s" % ctx.myname,
- "HOST/%s" % ctx.dnshostname ]
+ "HOST/%s" % ctx.dnshostname,
+ "GC/%s/%s" % (ctx.dnshostname, ctx.dnsdomain) ]
# these elements are optional
ctx.never_reveal_sid = None
@@ -319,7 +320,7 @@ class dc_join:
rec["HasMasterNCs"] = [ ctx.base_dn, ctx.config_dn, ctx.schema_dn ]
rec["msDS-HasMasterNCs"] = [ ctx.base_dn, ctx.config_dn, ctx.schema_dn ]
rec["options"] = "1"
- rec["invocationId"] = str(uuid.uuid4())
+ rec["invocationId"] = ndr_pack(misc.GUID(str(uuid.uuid4())))
ctx.DsAddEntry(rec)
# find the GUID of our NTDS DN