-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 This patch looks good to me. acked. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk/I+wUACgkQrlYvE4MpobOBsgCfbCkBPyFcKqeFluahrNkjrj7d 0V4AoJ53tjV7Sw+hb7dEX4rx8vWxAyjo =VIrD -----END PGP SIGNATURE-----
>From 2b856efe80f96c7344c38ad55d0de4f5b9a213c6 Mon Sep 17 00:00:00 2001 From: Dan Walsh <dwalsh@xxxxxxxxxx> Date: Thu, 24 May 2012 05:51:41 -0400 Subject: [PATCH 68/90] Fix missing error function and change to not use = with setsebool --- policycoreutils/gui/booleansPage.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/policycoreutils/gui/booleansPage.py b/policycoreutils/gui/booleansPage.py index ea78676..4bcefd6 100644 --- a/policycoreutils/gui/booleansPage.py +++ b/policycoreutils/gui/booleansPage.py @@ -138,6 +138,15 @@ class booleansPage: self.filter="" self.load(self.filter) + def error(self, message): + dlg = gtk.MessageDialog(None, 0, gtk.MESSAGE_ERROR, + gtk.BUTTONS_CLOSE, + message) + dlg.set_position(gtk.WIN_POS_MOUSE) + dlg.show_all() + dlg.run() + dlg.destroy() + def __search(self, model, col, key, i): sort_col = self.store.get_sort_column_id()[0] if sort_col > 0: @@ -215,8 +224,10 @@ class booleansPage: key = self.store.get_value(iter, BOOLEAN) self.store.set_value(iter, ACTIVE , not val) self.wait() - setsebool="/usr/sbin/setsebool -P %s=%d" % (key, not val) - commands.getstatusoutput(setsebool) + setsebool="/usr/sbin/setsebool -P %s %d" % (key, not val) + rc,out = commands.getstatusoutput(setsebool) + if rc != 0: + self.error(out) self.load(self.filter) self.ready() -- 1.7.10.2