mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-26 00:41:25 -06:00
Handle ldap.UNWILLING_TO_PERFORM more gracefully
This commit is contained in:
parent
f7358533d0
commit
99b84bfd01
@ -152,3 +152,8 @@ CONNECTION_GSSAPI_CREDENTIALS = gen_error_code(
|
||||
CONNECTION_CATEGORY,
|
||||
0x0003,
|
||||
"GSSAPI Authorization error")
|
||||
|
||||
CONNECTION_UNWILLING = gen_error_code(
|
||||
CONNECTION_CATEGORY,
|
||||
0x0004,
|
||||
"Account inactivated. Server is unwilling to perform.")
|
||||
|
@ -77,7 +77,10 @@ class IPAConnPool:
|
||||
conn = ipaserver.ipaldap.IPAdmin(host,port,None,None,None,debug)
|
||||
|
||||
# This will bind the connection
|
||||
conn.set_krbccache(krbccache, cprinc.name)
|
||||
try:
|
||||
conn.set_krbccache(krbccache, cprinc.name)
|
||||
except ldap.UNWILLING_TO_PERFORM, e:
|
||||
raise ipaerror.gen_exception(ipaerror.CONNECTION_UNWILLING)
|
||||
|
||||
return conn
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user