summaryrefslogtreecommitdiffstats
path: root/ipapython
diff options
context:
space:
mode:
authorPetr Viktorin <pviktori@redhat.com>2013-01-31 07:46:33 -0500
committerMartin Kosek <mkosek@redhat.com>2013-03-13 12:36:33 +0100
commita0242334feb3da01430f517806768965dabe92c2 (patch)
tree1b29484970545a5e20b4396d1fb34464e11a9c0d /ipapython
parent91a63cce6203cb8d0cf956d9e30842db365500da (diff)
downloadfreeipa-a0242334feb3da01430f517806768965dabe92c2.tar.gz
freeipa-a0242334feb3da01430f517806768965dabe92c2.tar.xz
freeipa-a0242334feb3da01430f517806768965dabe92c2.zip
Use IPAdmin rather than raw python-ldap in ipa-client-install
Part of the work for: https://fedorahosted.org/freeipa/ticket/3487
Diffstat (limited to 'ipapython')
-rw-r--r--ipapython/ipaldap.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/ipapython/ipaldap.py b/ipapython/ipaldap.py
index 4f51d6a87..1403c9e80 100644
--- a/ipapython/ipaldap.py
+++ b/ipapython/ipaldap.py
@@ -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()