state that problem is related to the keytab when authGSSServerInit fails

This commit is contained in:
Benjamin Dauvergne 2016-02-10 09:41:56 +01:00
parent ba8ee7abdc
commit 582a2eaa76
1 changed files with 4 additions and 2 deletions

View File

@ -64,8 +64,10 @@ class NegotiateView(View):
try:
result, context = kerberos.authGSSServerInit(service)
except kerberos.KrbError, e:
self.logger.warning(u'exception during authGSSServerInit: %s', e)
details = u'exception during authGSSServerInit: %s' % e
self.logger.warning(u'exception during authGSSServerInit: %s, certainly a '
u'keytab problem', e)
details = (u'exception during authGSSServerInit: %s, certainly a '
u'keytab problem' % e)
return TemplateResponse(request, self.error_template_name,
context={'details': details}, status=500)
# ensure context is finalized