mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Avoid removing sss from nssswitch.conf during client uninstall
This patch makes sure that sss is not removed from nsswitch.conf which causes probles with later uses of sssd. Makes sure that authconfig with --disablesssd option is not executed during ipa client uninstall. https://fedorahosted.org/freeipa/ticket/3577
This commit is contained in:
committed by
Rob Crittenden
parent
6e8d311dac
commit
40966cbe63
@@ -445,7 +445,10 @@ def uninstall(options, env):
|
||||
# disable only those configurations that we enabled during install
|
||||
for conf in ('ldap', 'krb5', 'sssd', 'sssdauth', 'mkhomedir'):
|
||||
cnf = statestore.restore_state('authconfig', conf)
|
||||
if cnf:
|
||||
# Do not disable sssd, as this can cause issues with its later
|
||||
# uses. Remove it from statestore however, so that it becomes
|
||||
# empty at the end of uninstall process.
|
||||
if cnf and conf != 'sssd':
|
||||
auth_config.disable(conf)
|
||||
else:
|
||||
# There was no authconfig status store
|
||||
@@ -454,10 +457,9 @@ def uninstall(options, env):
|
||||
auth_config.disable("ldap").\
|
||||
disable("krb5")
|
||||
if not(was_sssd_installed and was_sssd_configured):
|
||||
# assume there was sssd.conf before install and there were more than one domain in it
|
||||
# In such case restoring sssd.conf will require us to keep SSSD running
|
||||
auth_config.disable("sssd").\
|
||||
disable("sssdauth")
|
||||
# Only disable sssdauth. Disabling sssd would cause issues
|
||||
# with its later uses.
|
||||
auth_config.disable("sssdauth")
|
||||
auth_config.disable("mkhomedir")
|
||||
|
||||
auth_config.add_option("update")
|
||||
|
||||
Reference in New Issue
Block a user