summaryrefslogtreecommitdiffstats
path: root/ipaserver/rpcserver.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/rpcserver.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/rpcserver.py')
-rw-r--r--ipaserver/rpcserver.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/ipaserver/rpcserver.py b/ipaserver/rpcserver.py
index 91e525a31..205dc7655 100644
--- a/ipaserver/rpcserver.py
+++ b/ipaserver/rpcserver.py
@@ -317,9 +317,15 @@ class xmlserver(WSGIExecutioner):
'''
self.debug('WSGI xmlserver.__call__:')
- self.create_context(ccache=environ.get('KRB5CCNAME'))
try:
+ self.create_context(ccache=environ.get('KRB5CCNAME'))
response = super(xmlserver, self).__call__(environ, start_response)
+ except PublicError, e:
+ status = '200 OK'
+ response = status
+ headers = [('Content-Type', 'text/plain')]
+ start_response(status, headers)
+ return self.marshal(None, e)
finally:
destroy_context()
return response