mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Don't continue if a kerberos credentials cache is not available
forked-model detection was incorrect. Both of these return an error instead of raising one
This commit is contained in:
parent
b7506a5ea6
commit
d9194cdd09
@ -141,8 +141,8 @@ class ModXMLRPCRequestHandler(object):
|
||||
if req.subprocess_env.get("KRB5CCNAME") is not None:
|
||||
opts['krbccache'] = req.subprocess_env.get("KRB5CCNAME")
|
||||
else:
|
||||
sys.stderr.write("IPA: did not receive a Kerberos credentials cache. Expect problems")
|
||||
sys.stderr.flush()
|
||||
response = dumps(Fault(5, "Did not receive Kerberos credentials."))
|
||||
return response
|
||||
|
||||
if pythonopts.get("IPADebug"):
|
||||
opts['ipadebug'] = pythonopts.get("IPADebug")
|
||||
@ -277,17 +277,17 @@ class ModXMLRPCRequestHandler(object):
|
||||
def handle_request(self,req):
|
||||
"""Handle a single XML-RPC request"""
|
||||
|
||||
# The LDAP connection pool is not thread-safe. Avoid problems and
|
||||
# force the forked model for now.
|
||||
if not apache.mpm_query(apache.AP_MPMQ_IS_FORKED):
|
||||
raise Fault(3, "Apache must use the forked model")
|
||||
|
||||
# XMLRPC uses POST only. Reject anything else
|
||||
if req.method != 'POST':
|
||||
req.allow_methods(['POST'],1)
|
||||
raise apache.SERVER_RETURN, apache.HTTP_METHOD_NOT_ALLOWED
|
||||
|
||||
response = self._marshaled_dispatch(req.read(), req)
|
||||
# The LDAP connection pool is not thread-safe. Avoid problems and
|
||||
# force the forked model for now.
|
||||
if apache.mpm_query(apache.AP_MPMQ_IS_THREADED):
|
||||
response = dumps(Fault(3, "Apache must use the forked model"))
|
||||
else:
|
||||
response = self._marshaled_dispatch(req.read(), req)
|
||||
|
||||
req.content_type = "text/xml"
|
||||
req.set_content_length(len(response))
|
||||
|
Loading…
Reference in New Issue
Block a user