mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2026-08-13 06:25:00 -05:00
Use temporary CCACHE in ipa-client-install
ipa-client-install failed if user had set his own KRB5CCNAME in his environment. Use a temporary CCACHE for the installer to avoid these kind of errors. https://fedorahosted.org/freeipa/ticket/3512
This commit is contained in:
@@ -1979,6 +1979,9 @@ def install(options, env, fstore, statestore):
|
||||
root_logger.error("Test kerberos configuration failed")
|
||||
return CLIENT_INSTALL_ERROR
|
||||
env['KRB5_CONFIG'] = krb_name
|
||||
(ccache_fd, ccache_name) = tempfile.mkstemp()
|
||||
os.close(ccache_fd)
|
||||
env['KRB5CCNAME'] = os.environ['KRB5CCNAME'] = ccache_name
|
||||
join_args = ["/usr/sbin/ipa-join", "-s", cli_server[0], "-b", str(realm_to_suffix(cli_realm))]
|
||||
if options.debug:
|
||||
join_args.append("-d")
|
||||
@@ -2113,6 +2116,10 @@ def install(options, env, fstore, statestore):
|
||||
os.remove(krb_name)
|
||||
except OSError:
|
||||
root_logger.error("Could not remove %s", krb_name)
|
||||
try:
|
||||
os.remove(ccache_name)
|
||||
except OSError:
|
||||
pass
|
||||
try:
|
||||
os.remove(krb_name + ".ipabkp")
|
||||
except OSError:
|
||||
|
||||
Reference in New Issue
Block a user