summaryrefslogtreecommitdiffstats
path: root/pykolab
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-11-10 01:56:45 +0000
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-11-10 01:56:45 +0000
commit7983e3534d386d6603cec441340151f94c765a86 (patch)
treec9521b93b94df3477ce1c2d4d47b4d69f08d4503 /pykolab
parentd504bd581755811490b11e6b3a41b79b084d7561 (diff)
downloadpykolab-7983e3534d386d6603cec441340151f94c765a86.tar.gz
Bind the new connection before operating against it
Diffstat (limited to 'pykolab')
-rw-r--r--pykolab/auth/ldap/__init__.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/pykolab/auth/ldap/__init__.py b/pykolab/auth/ldap/__init__.py
index d9c6709..4275d51 100644
--- a/pykolab/auth/ldap/__init__.py
+++ b/pykolab/auth/ldap/__init__.py
@@ -1992,6 +1992,11 @@ class LDAP(pykolab.base.Base):
callback=self._synchronize_callback
)
+ bind_dn = self.config_get('bind_dn')
+ bind_pw = self.config_get('bind_pw')
+
+ ldap_sync_conn.simple_bind_s(bind_dn, bind_pw)
+
msgid = ldap_sync_conn.syncrepl_search(
base_dn,
scope,
@@ -2082,6 +2087,12 @@ class LDAP(pykolab.base.Base):
if SUPPORTED_LDAP_CONTROLS[control_num]['oid'] in \
supported_controls:
+ log.debug(_("Found support for %s") % (
+ SUPPORTED_LDAP_CONTROLS[control_num]['desc'],
+ ),
+ level=8
+ )
+
self.ldap.supported_controls.append(
SUPPORTED_LDAP_CONTROLS[control_num]['func']
)