summaryrefslogtreecommitdiff
path: root/source4/scripting
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-09-19 13:20:33 -0700
committerAndrew Tridgell <tridge@samba.org>2010-09-19 13:36:02 -0700
commit01371d968e09719e3034a919eddf3c90a48a71e4 (patch)
tree24fcaf0a75b20a7c07e76df6faf9d43334a7493d /source4/scripting
parent8beed3679d09e0c89a081ef6b32536cf57419521 (diff)
downloadsamba-01371d968e09719e3034a919eddf3c90a48a71e4.tar.gz
samba-01371d968e09719e3034a919eddf3c90a48a71e4.tar.bz2
samba-01371d968e09719e3034a919eddf3c90a48a71e4.zip
s4-rodc: override client site from cldap response
Diffstat (limited to 'source4/scripting')
-rw-r--r--source4/scripting/python/samba/join.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/source4/scripting/python/samba/join.py b/source4/scripting/python/samba/join.py
index 2cb1e3da0b..679dc5bf99 100644
--- a/source4/scripting/python/samba/join.py
+++ b/source4/scripting/python/samba/join.py
@@ -69,6 +69,8 @@ def join_rodc(server=None, creds=None, lp=None, site=None, netbios_name=None,
def find_dc(ctx, domain):
'''find a writeable DC for the given domain'''
ctx.cldap_ret = ctx.net.finddc(domain, nbt.NBT_SERVER_LDAP | nbt.NBT_SERVER_DS | nbt.NBT_SERVER_WRITABLE)
+ if ctx.cldap_ret.client_site is not None and ctx.cldap_ret.client_site != "":
+ ctx.site = ctx.cldap_ret.client_site
return ctx.cldap_ret.pdc_dns_name;