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

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