rpcserver: fix exception handling for FAST armor failure

Signed-off-by: Alexander Bokovoy <abokovoy@redhat.com>
This commit is contained in:
Alexander Bokovoy committed 2020-10-30 19:06:11 +02:00
1 parent 9a41966a25
commit 563d0a0729
2 files changed
+2 -3

No files matched your search

+1 -1
View File
@@ -249,7 +249,7 @@ class KrbPrincipalWrongFAST(PrivateError):
"""
Raised when it is not possible to use our FAST armor for kinit
"""
format = '%(principal) cannot use Anonymous PKINIT as a FAST armor'
format = '%(principal)s cannot use Anonymous PKINIT as a FAST armor'
##############################################################################
# Public errors:
+1 -2
View File
@@ -1103,8 +1103,7 @@ class login_password(Backend, KerberosSession):
message=unicode(e))
elif ('kinit: Error constructing AP-REQ armor: '
'Matching credential not found') in str(e):
raise KrbPrincipalWrongFAST(principal=principal,
message=unicode(e))
raise KrbPrincipalWrongFAST(principal=principal)
raise InvalidSessionPassword(principal=principal,
message=unicode(e))