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>
Reviewed-By: Francisco Trivino <ftrivino@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com>
This commit is contained in:
Alexander Bokovoy authored and Florence Blanc-Renaud committed 2023-09-14 13:08:29 +02:00
1 parent d62be1da45
commit 2220f72321
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}