diff options
author | Martin Kosek <mkosek@redhat.com> | 2013-03-14 14:33:56 +0100 |
---|---|---|
committer | Martin Kosek <mkosek@redhat.com> | 2013-03-21 16:19:03 +0100 |
commit | 07755e815e09ef722fc1fdb6715fd538aa2d08d4 (patch) | |
tree | 3e6e04e911add2c2b073d99b6448a7936a9c8b67 | |
parent | dda3cd1b1c94c764d774110789dff8899ff873c8 (diff) | |
download | freeipa.git-07755e815e09ef722fc1fdb6715fd538aa2d08d4.tar.gz freeipa.git-07755e815e09ef722fc1fdb6715fd538aa2d08d4.tar.xz freeipa.git-07755e815e09ef722fc1fdb6715fd538aa2d08d4.zip |
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
-rwxr-xr-x | ipa-client/ipa-install/ipa-client-install | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ipa-client/ipa-install/ipa-client-install b/ipa-client/ipa-install/ipa-client-install index db3d37e4..f3c3f8f2 100755 --- a/ipa-client/ipa-install/ipa-client-install +++ b/ipa-client/ipa-install/ipa-client-install @@ -1974,6 +1974,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") @@ -2087,6 +2090,10 @@ def install(options, env, fstore, statestore): 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: root_logger.error("Could not remove %s.ipabkp", krb_name) |