mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-01-11 00:31:56 -06:00
ipa-client-automount: call save_domain() for each change
Call sssdconfig.save_domain(domain) after each configuration change during ipa-client-automount --uninstall. Previously, sssdconfig.save_domain(domain) was called only outside of the domain detection loop which changed the domain configuration. This introduced issues as this method's behavior is only consistent when configuration items are removed in a certain order: https://pagure.io/SSSD/sssd/issue/4149 Plus, it is more correct to save the configuration from within the loop if ever we support multiple domains. Fixes: https://pagure.io/freeipa/issue/8190 Signed-off-by: François Cami <fcami@redhat.com> Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
This commit is contained in:
parent
902821e8aa
commit
e1b6e3ba9b
@ -355,9 +355,10 @@ def uninstall(fstore, statestore):
|
|||||||
continue
|
continue
|
||||||
if provider == "ipa":
|
if provider == "ipa":
|
||||||
domain.remove_option('ipa_automount_location')
|
domain.remove_option('ipa_automount_location')
|
||||||
|
sssdconfig.save_domain(domain)
|
||||||
domain.remove_provider('autofs')
|
domain.remove_provider('autofs')
|
||||||
|
sssdconfig.save_domain(domain)
|
||||||
break
|
break
|
||||||
sssdconfig.save_domain(domain)
|
|
||||||
sssdconfig.write(paths.SSSD_CONF)
|
sssdconfig.write(paths.SSSD_CONF)
|
||||||
sssd = services.service('sssd', api)
|
sssd = services.service('sssd', api)
|
||||||
sssd.restart()
|
sssd.restart()
|
||||||
|
Loading…
Reference in New Issue
Block a user