ipa/0001-Restore-selinux-states-if-they-exist-at-uninstall-ti.patch

29 lines
1.0 KiB
Diff
Raw Normal View History

From 499f1e3e996aadbd4f26a90db81a0b1b68b61c57 Mon Sep 17 00:00:00 2001
From: Alexander Bokovoy <abokovoy@redhat.com>
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 <abokovoy@redhat.com>
---
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}
--
2.41.0