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

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