1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-27 07:42:04 +03:00

s4:libnet/py_net.c: "py_net_finddc" - add an "address" parameter

This is useful for a new "samba-tool domain info" command.

Patch inspired by Matthieu Patou.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
Matthias Dieter Wallnöfer
2011-11-22 22:26:06 +01:00
committed by Stefan Metzmacher
parent dec1435a42
commit 179bf9b51c
4 changed files with 25 additions and 14 deletions

View File

@ -195,7 +195,7 @@ class dc_join(object):
def find_dc(ctx, domain):
'''find a writeable DC for the given domain'''
try:
ctx.cldap_ret = ctx.net.finddc(domain, nbt.NBT_SERVER_LDAP | nbt.NBT_SERVER_DS | nbt.NBT_SERVER_WRITABLE)
ctx.cldap_ret = ctx.net.finddc(domain=domain, flags=nbt.NBT_SERVER_LDAP | nbt.NBT_SERVER_DS | nbt.NBT_SERVER_WRITABLE)
except Exception:
raise Exception("Failed to find a writeable DC for domain '%s'" % domain)
if ctx.cldap_ret.client_site is not None and ctx.cldap_ret.client_site != "":