e32cfd1 ipa client uninstall: clean the state store when restoring hostname

1 file Authored by frenaud 5 years ago, Committed by cheimes 5 years ago,
    ipa client uninstall: clean the state store when restoring hostname
    
    When ipa client was installed with the --hostname= option, it stores
    [network]
    hostname = (current hostname)
    in /var/lib/ipa-client/sysrestore/sysrestore.state and changes the hostname
    from (current hostname) to the value provided in --hostname.
    
    During uninstall, the previous hostname is restored but the entry does
    not get removed from sysrestore.state. As the uninstaller checks if all
    entries from sysrestore.state have been restored, it warns that some
    state has not been restored.
    
    The fix calls statestore.restore_state() instead of statestore.get_state()
    as this method also clears the entry.
    
    https://pagure.io/freeipa/issue/7620
    
    Reviewed-By: Rob Crittenden <rcritten@redhat.com>
    
        
file modified
+1 -1