summaryrefslogtreecommitdiffstats
path: root/ipaserver/plugins/ldap2.py
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2012-02-23 17:25:53 -0500
committerMartin Kosek <mkosek@redhat.com>2012-02-24 16:53:24 +0100
commitb241e828a9b47a6c706a3ac8378fd6e57b8202fb (patch)
tree3a4cb913043d3af6a580e2ad08cc133b21eabe83 /ipaserver/plugins/ldap2.py
parent1c898e388b4777e0dfd0dd7577bbb4971e308605 (diff)
downloadfreeipa-b241e828a9b47a6c706a3ac8378fd6e57b8202fb.tar.gz
freeipa-b241e828a9b47a6c706a3ac8378fd6e57b8202fb.tar.xz
freeipa-b241e828a9b47a6c706a3ac8378fd6e57b8202fb.zip
Catch public exceptions when creating the LDAP context in WSGI.
Made specifically for the case where S4U2Proxy delegation fails. https://fedorahosted.org/freeipa/ticket/2414
Diffstat (limited to 'ipaserver/plugins/ldap2.py')
-rw-r--r--ipaserver/plugins/ldap2.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/ipaserver/plugins/ldap2.py b/ipaserver/plugins/ldap2.py
index 0a76670d9..ffe2fba8a 100644
--- a/ipaserver/plugins/ldap2.py
+++ b/ipaserver/plugins/ldap2.py
@@ -241,6 +241,9 @@ def _handle_errors(e, **kw):
except _ldap.SUCCESS:
pass
except _ldap.LDAPError, e:
+ if 'NOT_ALLOWED_TO_DELEGATE' in info:
+ raise errors.ACIError(info="KDC returned NOT_ALLOWED_TO_DELEGATE")
+ root_logger.info('Unhandled LDAPError: %s' % str(e))
raise errors.DatabaseError(desc=desc, info=info)