diff options
author | Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> | 2013-07-31 20:25:04 +0100 |
---|---|---|
committer | Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> | 2013-07-31 20:25:04 +0100 |
commit | c632938b0ce07d8d7e15585424573ae4a8f10d9f (patch) | |
tree | d6d77bc482b14fec6bd958485ae3543edb9fe82b /saslauthd/__init__.py | |
parent | 264e5351ef719d78c6b487483748283801db53ce (diff) | |
download | pykolab-c632938b0ce07d8d7e15585424573ae4a8f10d9f.tar.gz |
Catch LDAP errors
Diffstat (limited to 'saslauthd/__init__.py')
-rw-r--r-- | saslauthd/__init__.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/saslauthd/__init__.py b/saslauthd/__init__.py index f04a232..4eaba67 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")) |