From 29a02a3530214d2e72667e98c5ecc25ebf5fad48 Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Wed, 30 Jan 2013 07:51:46 -0500 Subject: Use IPAdmin rather than raw python-ldap in ipactl Add a new init argument, ldap_uri, to IPAdmin to make this possible. Part of the work for: https://fedorahosted.org/freeipa/ticket/2660 --- ipaserver/ipaldap.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'ipaserver') diff --git a/ipaserver/ipaldap.py b/ipaserver/ipaldap.py index f3739715d..1162cbabb 100644 --- a/ipaserver/ipaldap.py +++ b/ipaserver/ipaldap.py @@ -1558,7 +1558,7 @@ class IPAdmin(LDAPClient): def __init__(self, host='', port=389, cacert=None, debug=None, ldapi=False, realm=None, protocol=None, force_schema_updates=True, - start_tls=False): + start_tls=False, ldap_uri=None): self.conn = None log_mgr.get_logger(self, True) if debug and debug.lower() == "on": @@ -1573,7 +1573,8 @@ class IPAdmin(LDAPClient): self.realm = realm self.suffixes = {} - ldap_uri = self.__get_ldap_uri(protocol or self.__guess_protocol()) + if not ldap_uri: + ldap_uri = self.__get_ldap_uri(protocol or self.__guess_protocol()) LDAPClient.__init__(self, ldap_uri) -- cgit