Restore selinux states if they exist at uninstall time

Related: https://pagure.io/freeipa/issue/9434

Signed-off-by: Alexander Bokovoy <abokovoy@redhat.com>
Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com>
This commit is contained in:
Alexander Bokovoy authored and Rob Crittenden committed 2023-09-12 14:32:00 -04:00
1 parent f123b01d81
commit 6aa3c3b628
1 file changed
+1 -1
+1 -1
View File
@@ -3624,7 +3624,7 @@ def uninstall(options):
"Failed to disable automatic startup of the SSSD daemon: %s",
e)
if was_sssd_installed and selinux_works:
if statestore.has_state('selinux'):
# Restore SELinux boolean states
boolean_states = {name: statestore.restore_state('selinux', name)
for name in constants.SELINUX_BOOLEAN_SSSD}