From 37729936dd6fe9c3396cbb8a682a4674af8b5537 Mon Sep 17 00:00:00 2001 From: Gabe Date: Fri, 5 Jun 2015 11:27:46 -0600 Subject: Clear SSSD caches when uninstalling the client https://fedorahosted.org/freeipa/ticket/5049 Reviewed-By: Jakub Hrozek --- ipa-client/ipa-install/ipa-client-install | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'ipa-client/ipa-install/ipa-client-install') diff --git a/ipa-client/ipa-install/ipa-client-install b/ipa-client/ipa-install/ipa-client-install index c46a7a8a6..8bc3fbe9a 100755 --- a/ipa-client/ipa-install/ipa-client-install +++ b/ipa-client/ipa-install/ipa-client-install @@ -628,6 +628,19 @@ def uninstall(options, env): "Failed to remove krb5/LDAP configuration: %s", str(e)) return CLIENT_INSTALL_ERROR + # Clean up the SSSD cache before SSSD service is stopped or restarted + remove_file(paths.SSSD_MC_GROUP) + remove_file(paths.SSSD_MC_PASSWD) + + ipa_domain = domain.get_option('ipa_domain') + sssd_domain_ldb = "cache_" + ipa_domain + ".ldb" + sssd_ldb_file = os.path.join(paths.SSSD_DB, sssd_domain_ldb) + remove_file(sssd_ldb_file) + + sssd_domain_ccache = "ccache_" + ipa_domain.upper() + sssd_ccache_file = os.path.join(paths.SSSD_DB, sssd_domain_ccache) + remove_file(sssd_domain_ccache) + # Next if-elif-elif construction deals with sssd.conf file. # Old pre-IPA domains are preserved due merging the old sssd.conf # during the installation of ipa-client but any new domains are -- cgit