summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2013-09-16 10:23:07 -0700
committerStefan Metzmacher <metze@samba.org>2013-09-16 19:36:18 +0200
commita5e4c4520af9f7a99aac4117d1225c85b891554d (patch)
tree2e99c1a62bc42bdee127b6efe8e20eeefeb1eb0e
parent347b2c65a4b8c219cfdae3306fdc3d793980cbed (diff)
downloadsamba-a5e4c4520af9f7a99aac4117d1225c85b891554d.tar.gz
samba-a5e4c4520af9f7a99aac4117d1225c85b891554d.tar.bz2
samba-a5e4c4520af9f7a99aac4117d1225c85b891554d.zip
samba-tool domain join subdomain: Set "reveal_internals:0" control so we can see the ncName
The issue here is that we create the ncName remotely with DsAddEntry, and then replicate it back. However, at this point the naming context pointed at by the ncName does not exist! The issue is that the extended_dn_out module then hides the link, because it points to a missing object. The reveal_internals control forces this link to be returned, and so we can then find the GUID, to create the domain with the right GUID. Andrew Bartlett Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
-rw-r--r--python/samba/join.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/python/samba/join.py b/python/samba/join.py
index 7c14c2adb9..ff0fe3bdfb 100644
--- a/python/samba/join.py
+++ b/python/samba/join.py
@@ -747,7 +747,7 @@ class dc_join(object):
print("Finding domain GUID from ncName")
res = ctx.local_samdb.search(base=ctx.partition_dn, scope=ldb.SCOPE_BASE, attrs=['ncName'],
- controls=["extended_dn:1:1"])
+ controls=["extended_dn:1:1", "reveal_internals:0"])
domguid = str(misc.GUID(ldb.Dn(ctx.samdb, res[0]['ncName'][0]).get_extended_component('GUID')))
print("Got domain GUID %s" % domguid)