e1b6e3b ipa-client-automount: call save_domain() for each change

1 file Authored by François Cami 4 years ago, Committed by abbra 4 years ago,
    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>