ipaserver/dcerpc.py: if search of a closest GC failed, try to find any GC

https://fedorahosted.org/freeipa/ticket/4458

Reviewed-By: Sumit Bose <sbose@redhat.com>
This commit is contained in:
Alexander Bokovoy 2014-08-19 16:19:45 +03:00 committed by Martin Kosek
parent 7fc4f60c2f
commit 3a8eeefe03

View File

@ -589,7 +589,11 @@ class DomainValidator(object):
try: try:
result = netrc.finddc(domain=domain, flags=nbt.NBT_SERVER_LDAP | nbt.NBT_SERVER_GC | nbt.NBT_SERVER_CLOSEST) result = netrc.finddc(domain=domain, flags=nbt.NBT_SERVER_LDAP | nbt.NBT_SERVER_GC | nbt.NBT_SERVER_CLOSEST)
except RuntimeError, e: except RuntimeError, e:
finddc_error = e try:
# If search of closest GC failed, attempt to find any one
result = netrc.finddc(domain=domain, flags=nbt.NBT_SERVER_LDAP | nbt.NBT_SERVER_GC)
except RuntimeError, e:
finddc_error = e
if not self._domains: if not self._domains:
self._domains = self.get_trusted_domains() self._domains = self.get_trusted_domains()