summaryrefslogtreecommitdiffstats
path: root/ipa-client
diff options
context:
space:
mode:
authorGabe <redhatrises@gmail.com>2015-06-05 11:27:46 -0600
committerTomas Babej <tbabej@redhat.com>2015-06-30 12:59:19 +0200
commit37729936dd6fe9c3396cbb8a682a4674af8b5537 (patch)
tree13ba6950828e3c01857cbe5068b7c6e18df36a89 /ipa-client
parent90788a25d6d54b084541336a83946d37a73076ef (diff)
downloadfreeipa-37729936dd6fe9c3396cbb8a682a4674af8b5537.tar.gz
freeipa-37729936dd6fe9c3396cbb8a682a4674af8b5537.tar.xz
freeipa-37729936dd6fe9c3396cbb8a682a4674af8b5537.zip
Clear SSSD caches when uninstalling the client
https://fedorahosted.org/freeipa/ticket/5049 Reviewed-By: Jakub Hrozek <jhrozek@redhat.com>
Diffstat (limited to 'ipa-client')
-rwxr-xr-xipa-client/ipa-install/ipa-client-install13
1 files changed, 13 insertions, 0 deletions
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