summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2013-07-31 19:25:04 (GMT)
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2013-10-23 09:26:29 (GMT)
commit468557e3799b647c3b444ff7c7f8eac07fa55c18 (patch)
tree3fc2678025269b45578106207a928bdd1f54613b
parentfa65938b3b1e8efac5a01987fce44eae20a1079c (diff)
downloadpykolab-468557e3799b647c3b444ff7c7f8eac07fa55c18.tar.gz
Catch LDAP errors
-rw-r--r--saslauthd/__init__.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/saslauthd/__init__.py b/saslauthd/__init__.py
index 933b81d..6ef7eb2 100644
--- a/saslauthd/__init__.py
+++ b/saslauthd/__init__.py
@@ -194,7 +194,14 @@ class SASLAuthDaemon(object):
auth = Auth(domain=realm)
auth.connect()
- if auth.authenticate(login):
+ success = False
+
+ try:
+ success = auth.authenticate(login)
+ except:
+ success = False
+
+ if success:
# #1170: Catch broken pipe error (incomplete authentication request)
try:
clientsocket.send(struct.pack("!H2s", 2, "OK"))