mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Handle DIR type CCACHEs in test_cmdline properly
Pass a whole krbV.CCache object to ldap2 connect() method so that it can properly detect both type and name of a CCAHE. Otherwise the test fails on systems with default DIR type CCACHE.
This commit is contained in:
parent
50a04e5ace
commit
0f646d7ac5
@ -31,7 +31,7 @@ from ipaserver.plugins.ldap2 import ldap2
|
||||
from ipapython import ipautil
|
||||
|
||||
# See if our LDAP server is up and we can talk to it over GSSAPI
|
||||
ccache = krbV.default_context().default_ccache().name
|
||||
ccache = krbV.default_context().default_ccache()
|
||||
|
||||
try:
|
||||
conn = ldap2(shared_instance=False, ldap_uri=api.env.ldap_uri, base_dn=api.env.basedn)
|
||||
|
@ -46,7 +46,7 @@ def use_keytab(principal, keytab):
|
||||
ccache.init(principal)
|
||||
ccache.init_creds_keytab(keytab=keytab, principal=principal)
|
||||
conn = ldap2(shared_instance=False, ldap_uri=api.env.ldap_uri, base_dn=api.env.basedn)
|
||||
conn.connect(ccache=ccache.name)
|
||||
conn.connect(ccache=ccache)
|
||||
conn.disconnect()
|
||||
except krbV.Krb5Error, e:
|
||||
raise StandardError('Unable to bind to LDAP. Error initializing principal %s in %s: %s' % (principal.name, keytab, str(e)))
|
||||
|
Loading…
Reference in New Issue
Block a user