Blame SOURCES/0025-gui-Fix-remove-module-in-system-config-selinux.patch

709a1f
From f6c67c02f25d3a8971dcc5667121236fab85dd65 Mon Sep 17 00:00:00 2001
709a1f
From: Petr Lautrbach <plautrba@redhat.com>
709a1f
Date: Thu, 29 Aug 2019 08:58:20 +0200
709a1f
Subject: [PATCH] gui: Fix remove module in system-config-selinux
709a1f
709a1f
When a user tried to remove a policy module with priority other than 400 via
709a1f
GUI, it failed with a message:
709a1f
709a1f
libsemanage.semanage_direct_remove_key: Unable to remove module somemodule at priority 400. (No such file or directory).
709a1f
709a1f
This is fixed by calling "semodule -x PRIORITY -r NAME" instead of
709a1f
"semodule -r NAME".
709a1f
709a1f
From Jono Hein <fredwacko40@hotmail.com>
709a1f
Signed-off-by: Petr Lautrbach <plautrba@redhat.com>
709a1f
---
709a1f
 gui/modulesPage.py | 3 ++-
709a1f
 1 file changed, 2 insertions(+), 1 deletion(-)
709a1f
709a1f
diff --git a/gui/modulesPage.py b/gui/modulesPage.py
709a1f
index 26ac5404..35a0129b 100644
709a1f
--- a/gui/modulesPage.py
709a1f
+++ b/gui/modulesPage.py
709a1f
@@ -125,9 +125,10 @@ class modulesPage(semanagePage):
709a1f
     def delete(self):
709a1f
         store, iter = self.view.get_selection().get_selected()
709a1f
         module = store.get_value(iter, 0)
709a1f
+        priority = store.get_value(iter, 1)
709a1f
         try:
709a1f
             self.wait()
709a1f
-            status, output = getstatusoutput("semodule -r %s" % module)
709a1f
+            status, output = getstatusoutput("semodule -X %s -r %s" % (priority, module))
709a1f
             self.ready()
709a1f
             if status != 0:
709a1f
                 self.error(output)
709a1f
-- 
709a1f
2.21.0
709a1f