summaryrefslogtreecommitdiffstats
path: root/ipalib
diff options
context:
space:
mode:
authorAlexander Bokovoy <abokovoy@redhat.com>2015-05-28 11:49:58 +0000
committerTomas Babej <tbabej@redhat.com>2015-07-08 01:56:52 +0200
commit47e1de760413e5354f704fc808d960490d80338c (patch)
tree393570e45109bd5b40d8a3746402398b8a3d1570 /ipalib
parent03c2d76186534081400846f4141fbbef8e41ae83 (diff)
downloadfreeipa-47e1de760413e5354f704fc808d960490d80338c.tar.gz
freeipa-47e1de760413e5354f704fc808d960490d80338c.tar.xz
freeipa-47e1de760413e5354f704fc808d960490d80338c.zip
trusts: pass AD DC hostname if specified explicitly
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1222047 Reviewed-By: Tomas Babej <tbabej@redhat.com>
Diffstat (limited to 'ipalib')
-rw-r--r--ipalib/plugins/trust.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/ipalib/plugins/trust.py b/ipalib/plugins/trust.py
index 5b884ca89..13ac52ddd 100644
--- a/ipalib/plugins/trust.py
+++ b/ipalib/plugins/trust.py
@@ -1302,9 +1302,10 @@ def fetch_domains_from_trust(self, trustinstance, trust_entry, **options):
sp.insert(0, trustinstance.remote_domain.info['name'])
creds = u"{name}%{password}".format(name="\\".join(sp),
password=password)
+ server = options.get('realm_server', None)
domains = ipaserver.dcerpc.fetch_domains(self.api,
trustinstance.local_flatname,
- trust_name, creds=creds)
+ trust_name, creds=creds, server=server)
result = []
if not domains:
return result
@@ -1342,6 +1343,12 @@ class trust_fetch_domains(LDAPRetrieve):
__doc__ = _('Refresh list of the domains associated with the trust')
has_output = output.standard_list_of_entries
+ takes_options = LDAPRetrieve.takes_options + (
+ Str('realm_server?',
+ cli_name='server',
+ label=_('Domain controller for the Active Directory domain (optional)'),
+ ),
+ )
def execute(self, *keys, **options):
if not _bindings_installed: