mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
authselect: harden uninstallation of ipa client
When ipa client is uninstalled, the content of sysrestore.state is read to restore the previous authselect profile and features. The code should properly handle the case where sysrestore.state contains the header for the authselect section, but the key=value for profile and features are missing. Fixes https://pagure.io/freeipa/issue/7657 Reviewed-By: Rob Crittenden <rcritten@redhat.com>
This commit is contained in:
parent
7729bb73b4
commit
d0173c9548
@ -162,8 +162,10 @@ class RedHatAuthSelect(RedHatAuthToolBase):
|
||||
profile = 'sssd'
|
||||
features = ''
|
||||
else:
|
||||
profile = statestore.restore_state('authselect', 'profile')
|
||||
features = statestore.restore_state('authselect', 'features_list')
|
||||
profile = \
|
||||
statestore.restore_state('authselect', 'profile') or 'sssd'
|
||||
features = \
|
||||
statestore.restore_state('authselect', 'features_list') or ''
|
||||
statestore.delete_state('authselect', 'mkhomedir')
|
||||
|
||||
cmd = [paths.AUTHSELECT, "select", profile, features, "--force"]
|
||||
|
Loading…
Reference in New Issue
Block a user