gui: Fix remove module in system-config-selinux
When a user tried to remove a policy module with priority other than 400 via GUI, it failed with a message: libsemanage.semanage_direct_remove_key: Unable to remove module somemodule at priority 400. (No such file or directory). This is fixed by calling "semodule -x PRIORITY -r NAME" instead of "semodule -r NAME". From Jono Hein <fredwacko40@hotmail.com> Signed-off-by: Petr Lautrbach <plautrba@redhat.com>
This commit is contained in:
parent
f4e741a144
commit
5dfa95c686
1 changed files with 2 additions and 1 deletions
|
@ -125,9 +125,10 @@ class modulesPage(semanagePage):
|
||||||
def delete(self):
|
def delete(self):
|
||||||
store, iter = self.view.get_selection().get_selected()
|
store, iter = self.view.get_selection().get_selected()
|
||||||
module = store.get_value(iter, 0)
|
module = store.get_value(iter, 0)
|
||||||
|
priority = store.get_value(iter, 1)
|
||||||
try:
|
try:
|
||||||
self.wait()
|
self.wait()
|
||||||
status, output = getstatusoutput("semodule -r %s" % module)
|
status, output = getstatusoutput("semodule -X %s -r %s" % (priority, module))
|
||||||
self.ready()
|
self.ready()
|
||||||
if status != 0:
|
if status != 0:
|
||||||
self.error(output)
|
self.error(output)
|
||||||
|
|
Loading…
Reference in a new issue