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:
Rob Crittenden 2007-11-09 14:55:41 -05:00
parent b7506a5ea6
commit d9194cdd09

View File

@ -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))