Use IPAdmin rather than raw python-ldap in ipa-client-install

Part of the work for: https://fedorahosted.org/freeipa/ticket/3487
This commit is contained in:
Petr Viktorin
2013-01-31 07:46:33 -05:00
committed by Martin Kosek
parent 91a63cce62
commit a0242334fe
2 changed files with 34 additions and 37 deletions

View File

@@ -1658,7 +1658,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, ldap_uri=None, no_schema=False,
decode_attrs=True):
decode_attrs=True, sasl_nocanon=False):
self.conn = None
log_mgr.get_logger(self, True)
if debug and debug.lower() == "on":
@@ -1682,6 +1682,9 @@ class IPAdmin(LDAPClient):
no_schema=no_schema,
decode_attrs=decode_attrs)
if sasl_nocanon:
self.conn.set_option(ldap.OPT_X_SASL_NOCANON, ldap.OPT_ON)
if start_tls:
self.conn.start_tls_s()