Clear SSSD caches when uninstalling the client

https://fedorahosted.org/freeipa/ticket/5049

Reviewed-By: Jakub Hrozek <jhrozek@redhat.com>
This commit is contained in:
Gabe
2015-06-05 11:27:46 -06:00
committed by Tomas Babej
parent 90788a25d6
commit 37729936dd
2 changed files with 14 additions and 0 deletions

View File

@@ -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

View File

@@ -292,6 +292,7 @@ class BasePathNamespace(object):
KRA_BACKUP_KEYS_P12 = "/var/lib/pki/pki-tomcat/alias/kra_backup_keys.p12"
KRACERT_P12 = "/root/kracert.p12"
SAMBA_DIR = "/var/lib/samba/"
SSSD_DB = "/var/lib/sss/db"
SSSD_MC_GROUP = "/var/lib/sss/mc/group"
SSSD_MC_PASSWD = "/var/lib/sss/mc/passwd"
SSSD_PUBCONF_KNOWN_HOSTS = "/var/lib/sss/pubconf/known_hosts"