2 commits - pykolab/auth
Jeroen van Meeuwen
vanmeeuwen at kolabsys.com
Sat Nov 10 02:58:55 CET 2012
pykolab/auth/ldap/__init__.py | 11 +++++++++++
pykolab/auth/ldap/cache.py | 4 ++++
2 files changed, 15 insertions(+)
New commits:
commit 65f4b091251cbdcd351180fba96f9dc04c0ec9d3
Author: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen at kolabsys.com>
Date: Sat Nov 10 01:57:01 2012 +0000
Make sure the result_attribute dict key exists
diff --git a/pykolab/auth/ldap/cache.py b/pykolab/auth/ldap/cache.py
index 8bdeebe..503c3c5 100644
--- a/pykolab/auth/ldap/cache.py
+++ b/pykolab/auth/ldap/cache.py
@@ -107,6 +107,10 @@ def get_entry(domain, entry):
if _entry == None:
log.debug(_("Inserting cache entry %r") % (entry['id']), level=8)
+
+ if not entry.has_key(result_attribute):
+ entry[result_attribute] = ''
+
db.add(
Entry(
entry['id'],
commit 7983e3534d386d6603cec441340151f94c765a86
Author: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen at kolabsys.com>
Date: Sat Nov 10 01:56:45 2012 +0000
Bind the new connection before operating against it
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']
)
More information about the commits
mailing list