From 6aa3c3b6284967bd7d4d27afd9f82d3f7f679428 Mon Sep 17 00:00:00 2001 From: Alexander Bokovoy Date: Tue, 12 Sep 2023 17:07:52 +0300 Subject: [PATCH] Restore selinux states if they exist at uninstall time Related: https://pagure.io/freeipa/issue/9434 Signed-off-by: Alexander Bokovoy Reviewed-By: Florence Blanc-Renaud --- ipaclient/install/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ipaclient/install/client.py b/ipaclient/install/client.py index 1aaa4ed60..01a5f2339 100644 --- a/ipaclient/install/client.py +++ b/ipaclient/install/client.py @@ -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}