mirror of
https://github.com/topjohnwu/selinux.git
synced 2024-12-01 07:20:27 +00:00
policycoreutils: gui: remove lockdown wizard
Future systems will not support html in a pygtk window as webkit is going away. I decided to add the full set of gui tools and then remove the one I don't want to support just in case someone wants to resurrect this at some point. Signed-off-by: Eric Paris <eparis@redhat.com> Acked-by: Dan Walsh <dwalsh@redhat.com>
This commit is contained in:
parent
c5cf981869
commit
c48b7fe336
@ -13,13 +13,12 @@ mappingsPage.py \
|
||||
modulesPage.py \
|
||||
polgen.glade \
|
||||
portsPage.py \
|
||||
lockdown.glade \
|
||||
semanagePage.py \
|
||||
statusPage.py \
|
||||
system-config-selinux.glade \
|
||||
usersPage.py
|
||||
|
||||
all: $(TARGETS) system-config-selinux.py polgengui.py templates lockdown.py polgen.py
|
||||
all: $(TARGETS) system-config-selinux.py polgengui.py templates polgen.py
|
||||
|
||||
install: all
|
||||
-mkdir -p $(SHAREDIR)/templates
|
||||
@ -28,7 +27,6 @@ install: all
|
||||
install -m 755 polgengui.py $(SHAREDIR)
|
||||
install -m 755 polgen.py $(SHAREDIR)
|
||||
(cd $(BINDIR); ln -fs ../share/system-config-selinux/polgen.py sepolgen)
|
||||
install -m 755 lockdown.py $(SHAREDIR)
|
||||
install -m 644 $(TARGETS) $(SHAREDIR)
|
||||
install -m 644 templates/*.py $(SHAREDIR)/templates/
|
||||
|
||||
|
@ -80,7 +80,6 @@ BOOLEAN = 3
|
||||
class booleansPage:
|
||||
def __init__(self, xml, doDebug=None):
|
||||
self.xml = xml
|
||||
xml.signal_connect("on_lockdown_clicked", self.on_lockdown_clicked)
|
||||
self.window = self.xml.get_widget("mainWindow").get_root_window()
|
||||
self.local = False
|
||||
self.types=[]
|
||||
@ -227,12 +226,6 @@ class booleansPage:
|
||||
self.load(self.filter)
|
||||
self.ready()
|
||||
|
||||
def on_lockdown_clicked(self, button):
|
||||
try:
|
||||
os.spawnl(os.P_NOWAIT, "/usr/share/system-config-selinux/lockdown.py")
|
||||
except ValueError, e:
|
||||
self.error(e.args[0])
|
||||
|
||||
def on_local_clicked(self, button):
|
||||
self.local = not self.local
|
||||
self.revertButton.set_sensitive(self.local)
|
||||
|
@ -1,771 +0,0 @@
|
||||
<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
|
||||
<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
|
||||
|
||||
<glade-interface>
|
||||
<requires lib="gnome"/>
|
||||
<requires lib="bonobo"/>
|
||||
|
||||
<widget class="GtkAboutDialog" id="aboutWindow">
|
||||
<property name="border_width">5</property>
|
||||
<property name="destroy_with_parent">False</property>
|
||||
<property name="name" translatable="yes">system-config-selinux</property>
|
||||
<property name="copyright" translatable="yes">Copyright (c)2006 Red Hat, Inc.
|
||||
Copyright (c) 2006 Dan Walsh <dwalsh@redhat.com></property>
|
||||
<property name="wrap_license">False</property>
|
||||
<property name="authors">Daniel Walsh <dwalsh@redhat.com>
|
||||
</property>
|
||||
<property name="translator_credits" translatable="yes" comments="TRANSLATORS: Replace this string with your names, one name per line.">translator-credits</property>
|
||||
<property name="logo">system-config-selinux.png</property>
|
||||
</widget>
|
||||
|
||||
<widget class="GnomeApp" id="mainWindow">
|
||||
<property name="width_request">800</property>
|
||||
<property name="height_request">400</property>
|
||||
<property name="title" translatable="yes">SELinux Boolean Lockdown</property>
|
||||
<property name="type">GTK_WINDOW_TOPLEVEL</property>
|
||||
<property name="window_position">GTK_WIN_POS_NONE</property>
|
||||
<property name="modal">False</property>
|
||||
<property name="resizable">True</property>
|
||||
<property name="destroy_with_parent">False</property>
|
||||
<property name="icon">system-config-selinux.png</property>
|
||||
<property name="decorated">True</property>
|
||||
<property name="skip_taskbar_hint">False</property>
|
||||
<property name="skip_pager_hint">False</property>
|
||||
<property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
|
||||
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
|
||||
<property name="focus_on_map">True</property>
|
||||
<property name="urgency_hint">False</property>
|
||||
<property name="enable_layout_config">True</property>
|
||||
|
||||
<child internal-child="dock">
|
||||
<widget class="BonoboDock" id="bonobodock2">
|
||||
<property name="visible">True</property>
|
||||
<property name="allow_floating">True</property>
|
||||
|
||||
<child>
|
||||
<widget class="BonoboDockItem" id="bonobodockitem3">
|
||||
<property name="visible">True</property>
|
||||
<property name="shadow_type">GTK_SHADOW_NONE</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkMenuBar" id="menubar1">
|
||||
<property name="visible">True</property>
|
||||
<property name="pack_direction">GTK_PACK_DIRECTION_LTR</property>
|
||||
<property name="child_pack_direction">GTK_PACK_DIRECTION_LTR</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkMenuItem" id="file1">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock_item">GNOMEUIINFO_MENU_FILE_TREE</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkMenu" id="file1_menu">
|
||||
|
||||
<child>
|
||||
<widget class="GtkImageMenuItem" id="forward_menu_item">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">_Forward</property>
|
||||
<property name="use_underline">True</property>
|
||||
<signal name="activate" handler="on_forward_clicked" last_modification_time="Thu, 24 Apr 2008 10:18:41 GMT"/>
|
||||
<accelerator key="f" modifiers="GDK_CONTROL_MASK" signal="activate"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image46">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-media-next</property>
|
||||
<property name="icon_size">1</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkImageMenuItem" id="previous_menu_item">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">_Previous</property>
|
||||
<property name="use_underline">True</property>
|
||||
<signal name="activate" handler="on_previous_clicked" last_modification_time="Thu, 24 Apr 2008 10:18:41 GMT"/>
|
||||
<accelerator key="p" modifiers="GDK_CONTROL_MASK" signal="activate"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image47">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-media-previous</property>
|
||||
<property name="icon_size">1</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkSeparatorMenuItem" id="separator1">
|
||||
<property name="visible">True</property>
|
||||
</widget>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkImageMenuItem" id="save_as2">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Save As</property>
|
||||
<property name="use_underline">True</property>
|
||||
<signal name="activate" handler="on_save_clicked" last_modification_time="Thu, 03 Jul 2008 13:30:05 GMT"/>
|
||||
<accelerator key="s" modifiers="GDK_CONTROL_MASK" signal="activate"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image48">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-save-as</property>
|
||||
<property name="icon_size">1</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkImageMenuItem" id="apply1">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Apply</property>
|
||||
<property name="use_underline">True</property>
|
||||
<signal name="activate" handler="on_apply_clicked" last_modification_time="Thu, 03 Jul 2008 13:25:23 GMT"/>
|
||||
<accelerator key="a" modifiers="GDK_CONTROL_MASK" signal="activate"/>
|
||||
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image49">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-apply</property>
|
||||
<property name="icon_size">1</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkImageMenuItem" id="cancel">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock_item">GNOMEUIINFO_MENU_EXIT_ITEM</property>
|
||||
<signal name="activate" handler="on_cancel_clicked" last_modification_time="Thu, 24 Apr 2008 10:18:41 GMT"/>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkMenuItem" id="help1">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock_item">GNOMEUIINFO_MENU_HELP_TREE</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkMenu" id="help1_menu">
|
||||
|
||||
<child>
|
||||
<widget class="GtkImageMenuItem" id="about">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock_item">GNOMEUIINFO_MENU_ABOUT_ITEM</property>
|
||||
<signal name="activate" handler="on_about_activate" last_modification_time="Fri, 06 Oct 2006 13:58:02 GMT"/>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="placement">BONOBO_DOCK_TOP</property>
|
||||
<property name="band">0</property>
|
||||
<property name="position">0</property>
|
||||
<property name="offset">0</property>
|
||||
<property name="behavior">BONOBO_DOCK_ITEM_BEH_EXCLUSIVE|BONOBO_DOCK_ITEM_BEH_NEVER_VERTICAL|BONOBO_DOCK_ITEM_BEH_LOCKED</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkHPaned" id="hpaned1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="position">0</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkFrame" id="frame1">
|
||||
<property name="border_width">5</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="label_xalign">0</property>
|
||||
<property name="label_yalign">0.5</property>
|
||||
<property name="shadow_type">GTK_SHADOW_NONE</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkAlignment" id="alignment1">
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xscale">1</property>
|
||||
<property name="yscale">1</property>
|
||||
<property name="top_padding">0</property>
|
||||
<property name="bottom_padding">0</property>
|
||||
<property name="left_padding">12</property>
|
||||
<property name="right_padding">0</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkScrolledWindow" id="scrolledwindow21">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="hscrollbar_policy">GTK_POLICY_ALWAYS</property>
|
||||
<property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
|
||||
<property name="shadow_type">GTK_SHADOW_NONE</property>
|
||||
<property name="window_placement">GTK_CORNER_TOP_LEFT</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkTreeView" id="booleanView">
|
||||
<property name="width_request">300</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="tooltip" translatable="yes">Select Management Object</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="headers_visible">False</property>
|
||||
<property name="rules_hint">False</property>
|
||||
<property name="reorderable">False</property>
|
||||
<property name="enable_search">True</property>
|
||||
<property name="fixed_height_mode">False</property>
|
||||
<property name="hover_selection">False</property>
|
||||
<property name="hover_expand">False</property>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label45">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes"><b>Select:</b></property>
|
||||
<property name="use_underline">False</property>
|
||||
<property name="use_markup">True</property>
|
||||
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||
<property name="wrap">False</property>
|
||||
<property name="selectable">False</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||
<property name="width_chars">-1</property>
|
||||
<property name="single_line_mode">False</property>
|
||||
<property name="angle">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="type">label_item</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="shrink">False</property>
|
||||
<property name="resize">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkVBox" id="vbox1">
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="spacing">0</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkVBox" id="radio_vbox">
|
||||
<property name="visible">True</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="spacing">0</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkScrolledWindow" id="html_scrolledwindow">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="hscrollbar_policy">GTK_POLICY_ALWAYS</property>
|
||||
<property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
|
||||
<property name="shadow_type">GTK_SHADOW_NONE</property>
|
||||
<property name="window_placement">GTK_CORNER_TOP_LEFT</property>
|
||||
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkHButtonBox" id="savebox">
|
||||
<property name="visible">True</property>
|
||||
<property name="layout_style">GTK_BUTTONBOX_END</property>
|
||||
<property name="spacing">0</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkButton" id="button4">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_default">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label">gtk-apply</property>
|
||||
<property name="use_stock">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
<signal name="clicked" handler="on_apply_clicked" last_modification_time="Thu, 03 Jul 2008 12:39:08 GMT"/>
|
||||
</widget>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkButton" id="savebutton">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_default">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label">gtk-save-as</property>
|
||||
<property name="use_stock">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
<signal name="clicked" handler="on_save_clicked" last_modification_time="Thu, 03 Jul 2008 12:38:54 GMT"/>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="pack_type">GTK_PACK_END</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkHBox" id="radiobox">
|
||||
<property name="homogeneous">True</property>
|
||||
<property name="spacing">0</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkRadioButton" id="enable_radiobutton">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
<property name="active">False</property>
|
||||
<property name="inconsistent">False</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkAlignment" id="alignment2">
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xscale">0</property>
|
||||
<property name="yscale">0</property>
|
||||
<property name="top_padding">0</property>
|
||||
<property name="bottom_padding">0</property>
|
||||
<property name="left_padding">0</property>
|
||||
<property name="right_padding">0</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkHBox" id="hbox15">
|
||||
<property name="visible">True</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="spacing">2</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkImage" id="image20">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-yes</property>
|
||||
<property name="icon_size">4</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="button1">
|
||||
<property name="label" translatable="yes">Enable</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="use_markup">False</property>
|
||||
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||
<property name="wrap">False</property>
|
||||
<property name="selectable">False</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||
<property name="width_chars">-1</property>
|
||||
<property name="single_line_mode">False</property>
|
||||
<property name="angle">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkRadioButton" id="disable_radiobutton">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
<property name="active">False</property>
|
||||
<property name="inconsistent">False</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
<property name="group">enable_radiobutton</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkAlignment" id="alignment3">
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xscale">0</property>
|
||||
<property name="yscale">0</property>
|
||||
<property name="top_padding">0</property>
|
||||
<property name="bottom_padding">0</property>
|
||||
<property name="left_padding">0</property>
|
||||
<property name="right_padding">0</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkHBox" id="hbox16">
|
||||
<property name="visible">True</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="spacing">2</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkImage" id="image21">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-no</property>
|
||||
<property name="icon_size">4</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label60">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Disable</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="use_markup">False</property>
|
||||
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||
<property name="wrap">False</property>
|
||||
<property name="selectable">False</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||
<property name="width_chars">-1</property>
|
||||
<property name="single_line_mode">False</property>
|
||||
<property name="angle">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkRadioButton" id="default_radiobutton">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
<property name="active">False</property>
|
||||
<property name="inconsistent">False</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
<property name="group">enable_radiobutton</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkAlignment" id="alignment4">
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xscale">0</property>
|
||||
<property name="yscale">0</property>
|
||||
<property name="top_padding">0</property>
|
||||
<property name="bottom_padding">0</property>
|
||||
<property name="left_padding">0</property>
|
||||
<property name="right_padding">0</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkHBox" id="hbox17">
|
||||
<property name="visible">True</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="spacing">2</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkImage" id="image22">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-undo</property>
|
||||
<property name="icon_size">4</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label61">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Default</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="use_markup">False</property>
|
||||
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||
<property name="wrap">False</property>
|
||||
<property name="selectable">False</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||
<property name="width_chars">-1</property>
|
||||
<property name="single_line_mode">False</property>
|
||||
<property name="angle">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">11</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkHButtonBox" id="hbuttonbox4">
|
||||
<property name="visible">True</property>
|
||||
<property name="layout_style">GTK_BUTTONBOX_END</property>
|
||||
<property name="spacing">0</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkButton" id="cancelButton">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_default">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label">gtk-quit</property>
|
||||
<property name="use_stock">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
<signal name="clicked" handler="on_cancel_clicked" last_modification_time="Thu, 24 Apr 2008 10:14:10 GMT"/>
|
||||
</widget>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkButton" id="previousButton">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_default">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label">gtk-media-previous</property>
|
||||
<property name="use_stock">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
<signal name="clicked" handler="on_previous_clicked" last_modification_time="Thu, 24 Apr 2008 10:14:23 GMT"/>
|
||||
</widget>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkButton" id="forwardButton">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_default">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label">gtk-media-forward</property>
|
||||
<property name="use_stock">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
<signal name="clicked" handler="on_forward_clicked" last_modification_time="Thu, 24 Apr 2008 10:14:38 GMT"/>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="shrink">True</property>
|
||||
<property name="resize">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child internal-child="appbar">
|
||||
<widget class="GnomeAppBar" id="appbar2">
|
||||
<property name="visible">True</property>
|
||||
<property name="has_progress">True</property>
|
||||
<property name="has_status">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
|
||||
<widget class="GtkFileChooserDialog" id="filechooserdialog">
|
||||
<property name="border_width">5</property>
|
||||
<property name="tooltip" translatable="yes">Select file name to save boolean settings.</property>
|
||||
<property name="action">GTK_FILE_CHOOSER_ACTION_SAVE</property>
|
||||
<property name="local_only">True</property>
|
||||
<property name="select_multiple">False</property>
|
||||
<property name="show_hidden">False</property>
|
||||
<property name="do_overwrite_confirmation">False</property>
|
||||
<property name="title" translatable="yes">Save Boolean Configuration File</property>
|
||||
<property name="type">GTK_WINDOW_TOPLEVEL</property>
|
||||
<property name="window_position">GTK_WIN_POS_MOUSE</property>
|
||||
<property name="modal">False</property>
|
||||
<property name="resizable">True</property>
|
||||
<property name="destroy_with_parent">False</property>
|
||||
<property name="decorated">True</property>
|
||||
<property name="skip_taskbar_hint">False</property>
|
||||
<property name="skip_pager_hint">False</property>
|
||||
<property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
|
||||
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
|
||||
<property name="focus_on_map">True</property>
|
||||
<property name="urgency_hint">False</property>
|
||||
|
||||
<child internal-child="vbox">
|
||||
<widget class="GtkVBox" id="dialog-vbox1">
|
||||
<property name="visible">True</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="spacing">2</property>
|
||||
|
||||
<child internal-child="action_area">
|
||||
<widget class="GtkHButtonBox" id="dialog-action_area1">
|
||||
<property name="visible">True</property>
|
||||
<property name="layout_style">GTK_BUTTONBOX_END</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkButton" id="button7">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_default">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label">gtk-cancel</property>
|
||||
<property name="use_stock">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
<property name="response_id">-6</property>
|
||||
</widget>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkButton" id="button8">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_default">True</property>
|
||||
<property name="has_default">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label">gtk-save</property>
|
||||
<property name="use_stock">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="focus_on_click">True</property>
|
||||
<property name="response_id">-5</property>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="pack_type">GTK_PACK_END</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
|
||||
</glade-interface>
|
@ -1,375 +0,0 @@
|
||||
#!/usr/bin/python
|
||||
#
|
||||
# lockdown.py - GUI for Booleans page in system-config-securitylevel
|
||||
#
|
||||
# Dan Walsh <dwalsh@redhat.com>
|
||||
#
|
||||
# Copyright 2008 Red Hat, Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
#
|
||||
import signal
|
||||
import string
|
||||
import gtk
|
||||
import gtk.glade
|
||||
import os
|
||||
import gobject
|
||||
import gnome
|
||||
import sys
|
||||
import selinux
|
||||
import seobject
|
||||
import webkit
|
||||
import commands
|
||||
import tempfile
|
||||
|
||||
from html_util import *
|
||||
|
||||
gnome.program_init("SELinux Boolean Lockdown Tool", "5")
|
||||
|
||||
INSTALLPATH='/usr/share/system-config-selinux'
|
||||
sys.path.append(INSTALLPATH)
|
||||
|
||||
##
|
||||
## I18N
|
||||
##
|
||||
PROGNAME="policycoreutils"
|
||||
|
||||
import gettext
|
||||
gettext.bindtextdomain(PROGNAME, "/usr/share/locale")
|
||||
gettext.textdomain(PROGNAME)
|
||||
try:
|
||||
gettext.install(PROGNAME,
|
||||
localedir="/usr/share/locale",
|
||||
unicode=False,
|
||||
codeset = 'utf-8')
|
||||
except IOError:
|
||||
import __builtin__
|
||||
__builtin__.__dict__['_'] = unicode
|
||||
|
||||
from glob import fnmatch
|
||||
|
||||
STATUS=(_("Disable"), _("Enable"), _("Default"))
|
||||
DISABLE = 0
|
||||
ENABLE = 1
|
||||
DEFAULT = 2
|
||||
|
||||
def idle_func():
|
||||
while gtk.events_pending():
|
||||
gtk.main_iteration()
|
||||
|
||||
def td_fmt(val):
|
||||
return '<td>%s</td>' % val
|
||||
|
||||
tr_fmt = '<tr>%s</tr>\n'
|
||||
|
||||
p_fmt = '<p>%s\n'
|
||||
|
||||
##
|
||||
## Pull in the Glade file
|
||||
##
|
||||
if os.access("system-config-selinux.glade", os.F_OK):
|
||||
xml = gtk.glade.XML ("lockdown.glade", domain=PROGNAME)
|
||||
else:
|
||||
xml = gtk.glade.XML ("/usr/share/system-config-selinux/lockdown.glade", domain=PROGNAME)
|
||||
BOOLEAN = 0
|
||||
class booleanWindow:
|
||||
def __init__(self):
|
||||
self.tabs=[]
|
||||
self.xml = xml
|
||||
xml.signal_connect("on_cancel_clicked", self.cancel)
|
||||
xml.signal_connect("on_forward_clicked", self.forward)
|
||||
xml.signal_connect("on_previous_clicked", self.previous)
|
||||
xml.signal_connect("on_save_clicked", self.save)
|
||||
xml.signal_connect("on_apply_clicked", self.apply)
|
||||
self.xml = xml
|
||||
self.mainWindow = self.xml.get_widget("mainWindow")
|
||||
self.forwardbutton = self.xml.get_widget("forwardButton")
|
||||
self.window = self.xml.get_widget("mainWindow").get_root_window()
|
||||
self.busy_cursor = gtk.gdk.Cursor(gtk.gdk.WATCH)
|
||||
self.ready_cursor = gtk.gdk.Cursor(gtk.gdk.LEFT_PTR)
|
||||
self.radiobox = self.xml.get_widget("radiobox")
|
||||
self.savebox = self.xml.get_widget("savebox")
|
||||
self.file_dialog = self.xml.get_widget("filechooserdialog")
|
||||
self.vbox = self.xml.get_widget("vbox")
|
||||
self.enable_radiobutton = self.xml.get_widget("enable_radiobutton")
|
||||
self.enable_radiobutton.connect("toggled", self.toggled)
|
||||
self.disable_radiobutton = self.xml.get_widget("disable_radiobutton")
|
||||
self.disable_radiobutton.connect("toggled", self.toggled)
|
||||
self.default_radiobutton = self.xml.get_widget("default_radiobutton")
|
||||
self.default_radiobutton.connect("toggled", self.toggled)
|
||||
self.html_scrolledwindow = self.xml.get_widget("html_scrolledwindow")
|
||||
self.view = xml.get_widget("booleanView")
|
||||
self.view.get_selection().connect("changed", self.itemSelected)
|
||||
|
||||
self.store = gtk.TreeStore(gobject.TYPE_STRING)
|
||||
self.view.set_model(self.store)
|
||||
|
||||
col = gtk.TreeViewColumn("Boolean", gtk.CellRendererText(), text=BOOLEAN)
|
||||
col.set_sort_column_id(BOOLEAN)
|
||||
col.set_resizable(True)
|
||||
self.view.append_column(col)
|
||||
|
||||
self.html_view = self.create_htmlview(self.html_scrolledwindow)
|
||||
self.load()
|
||||
self.view.get_selection().select_path ((0,))
|
||||
|
||||
def create_htmlview(self, container):
|
||||
view = webkit.WebView()
|
||||
container.add(view)
|
||||
return (view)
|
||||
|
||||
def wait(self):
|
||||
self.window.set_cursor(self.busy_cursor)
|
||||
idle_func()
|
||||
|
||||
def ready(self):
|
||||
self.window.set_cursor(self.ready_cursor)
|
||||
idle_func()
|
||||
|
||||
def load(self):
|
||||
self.store.clear()
|
||||
self.booleans = seobject.booleanRecords()
|
||||
booleansList = self.booleans.get_all(0)
|
||||
self.booldict = {}
|
||||
for name in booleansList:
|
||||
cat = self.booleans.get_category(name)
|
||||
if cat not in self.booldict:
|
||||
self.booldict[cat] = {}
|
||||
|
||||
rec = booleansList[name]
|
||||
self.booldict[cat][name]= [rec[2], self.booleans.get_desc(name)]
|
||||
|
||||
cats = self.booldict.keys()
|
||||
cats.sort()
|
||||
|
||||
citer = self.store.append(None)
|
||||
self.store.set_value(citer, BOOLEAN, "Begin")
|
||||
for cat in cats:
|
||||
citer = self.store.append(None)
|
||||
self.store.set_value(citer, BOOLEAN, cat)
|
||||
bools = self.booldict[cat].keys()
|
||||
for bool in bools:
|
||||
biter = self.store.append(citer)
|
||||
self.store.set_value(biter, BOOLEAN, bool)
|
||||
biter = self.store.append(citer)
|
||||
self.store.set_value(biter, BOOLEAN, "Finish")
|
||||
citer = self.store.append(None)
|
||||
self.store.set_value(citer, BOOLEAN, "Finish")
|
||||
|
||||
def on_about_activate(self, args):
|
||||
dlg = xml.get_widget ("aboutWindow")
|
||||
dlg.run ()
|
||||
dlg.hide ()
|
||||
|
||||
def cancel(self, args):
|
||||
gtk.main_quit()
|
||||
|
||||
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 __out(self):
|
||||
out = ''
|
||||
for c in self.booldict.keys():
|
||||
for b in self.booldict[c]:
|
||||
out += "%s=%s\n" % (b, self.booldict[c][b][0])
|
||||
return out
|
||||
|
||||
def save(self, args):
|
||||
self.file_dialog.set_action(gtk.FILE_CHOOSER_ACTION_SAVE)
|
||||
rc = self.file_dialog.run()
|
||||
self.file_dialog.hide()
|
||||
if rc == gtk.RESPONSE_OK:
|
||||
try:
|
||||
fd = open(self.file_dialog.get_filename(), "w")
|
||||
fd.write(self.__out())
|
||||
fd.close()
|
||||
|
||||
except IOError, e:
|
||||
self.error(e)
|
||||
|
||||
def apply(self, args):
|
||||
fd = tempfile.NamedTemporaryFile(dir = "/var/lib/selinux")
|
||||
fd.write(self.__out())
|
||||
fd.flush()
|
||||
self.wait()
|
||||
rc, err = commands.getstatusoutput("semanage boolean -m -F %s" % fd.name)
|
||||
self.ready()
|
||||
fd.close()
|
||||
if rc != 0:
|
||||
self.error(err)
|
||||
|
||||
def forward(self, args):
|
||||
selection = self.view.get_selection()
|
||||
store, iter = selection.get_selected()
|
||||
if self.store.iter_has_child(iter):
|
||||
store, rows = selection.get_selected_rows()
|
||||
self.view.expand_to_path(rows[0])
|
||||
niter = self.store.iter_nth_child(iter, 0)
|
||||
else:
|
||||
niter = store.iter_next(iter)
|
||||
|
||||
if niter == None:
|
||||
piter = self.store.iter_parent(iter)
|
||||
if piter == None:
|
||||
return
|
||||
niter = store.iter_next(piter)
|
||||
|
||||
if niter != None:
|
||||
selection.select_iter(niter)
|
||||
store, rows = selection.get_selected_rows()
|
||||
self.view.scroll_to_cell(rows[0])
|
||||
else:
|
||||
print "Finish"
|
||||
|
||||
def toggled(self, button):
|
||||
if button.get_active() == False:
|
||||
return
|
||||
if self.cat == None:
|
||||
return
|
||||
if self.disable_radiobutton == button:
|
||||
self.booldict[self.cat][self.name][0] = DISABLE
|
||||
if self.enable_radiobutton == button:
|
||||
self.booldict[self.cat][self.name][0] = ENABLE
|
||||
if self.default_radiobutton == button:
|
||||
self.booldict[self.cat][self.name][0] = DEFAULT
|
||||
|
||||
def previous(self, args):
|
||||
selection = self.view.get_selection()
|
||||
store, iter = selection.get_selected()
|
||||
store, rows = selection.get_selected_rows()
|
||||
row = rows[0]
|
||||
if len(row) == 1 or self.store.iter_has_child(iter):
|
||||
if row[0] == 0:
|
||||
return
|
||||
nrow = row[0] - 1
|
||||
iter = self.store.get_iter((nrow,))
|
||||
if self.store.iter_has_child(iter):
|
||||
self.view.expand_to_path((nrow,))
|
||||
n = store.iter_n_children(iter) -1
|
||||
piter = store.iter_nth_child(iter, n)
|
||||
else:
|
||||
piter = iter
|
||||
else:
|
||||
if row[1] == 0:
|
||||
piter = self.store.iter_parent(iter)
|
||||
else:
|
||||
r0 = row[0]
|
||||
r1 = row[1] - 1
|
||||
piter = self.store.get_iter((r0,r1))
|
||||
if piter != None:
|
||||
selection.select_iter(piter)
|
||||
store, rows = selection.get_selected_rows()
|
||||
self.view.scroll_to_cell(rows[0])
|
||||
else:
|
||||
print "Finish"
|
||||
|
||||
def html_cat(self, cat):
|
||||
html = ""
|
||||
row = td_fmt(_("<b>Boolean</b>")) + td_fmt(_("<b>Description</b>")) + td_fmt(_("<b>Status</b>"))
|
||||
html += tr_fmt % row
|
||||
|
||||
for b in self.booldict[cat]:
|
||||
row = td_fmt(b) + td_fmt(self.booleans.get_desc(b)) + td_fmt(STATUS[self.booldict[cat][b][0]])
|
||||
html += tr_fmt % row
|
||||
return html
|
||||
|
||||
def html_table(self, title, body):
|
||||
html = self.html_head(title)
|
||||
html += '<table width="100%" cellspacing="1" cellpadding="2">\n'
|
||||
html += body
|
||||
html += '</table>'
|
||||
return html
|
||||
|
||||
def html_head(self, val):
|
||||
# Wrap entire alert in one table
|
||||
# 1st table: primary Information
|
||||
|
||||
html = '<b>%s</b>\n\n\n' % val
|
||||
return html
|
||||
|
||||
def html_all(self):
|
||||
html = ""
|
||||
cats = self.booldict.keys()
|
||||
cats.sort()
|
||||
for cat in cats:
|
||||
html += self.html_table((_("Category: %s <br>") % cat), self.html_cat(cat))
|
||||
return html
|
||||
|
||||
def itemSelected(self, selection):
|
||||
store, iter = selection.get_selected()
|
||||
if iter == None:
|
||||
return
|
||||
|
||||
piter = self.store.iter_parent(iter)
|
||||
if piter != None:
|
||||
self.cat = store.get_value(piter, BOOLEAN)
|
||||
else:
|
||||
self.cat = None
|
||||
|
||||
self.name = store.get_value(iter, BOOLEAN)
|
||||
|
||||
html = ''
|
||||
|
||||
self.radiobox.hide()
|
||||
self.savebox.hide()
|
||||
|
||||
if self.name == _("Begin"):
|
||||
html += self.html_head(_("Welcome to the SELinux Lockdown Tool.<br> <br>This tool can be used to lockdown SELinux booleans.The tool will generate a configuration file which can be used to lockdown this system or other SELinux systems.<br>"))
|
||||
html += self.html_all()
|
||||
else:
|
||||
if self.name == _("Finish"):
|
||||
if self.cat != None:
|
||||
html += self.html_head(_("Category %s booleans completed <br><br>") % self.cat)
|
||||
html += self.html_table(_("Current settings:<br><br>"), self.html_cat(self.cat))
|
||||
else:
|
||||
html += self.html_head(_("Finish: <br><br>"))
|
||||
html += self.html_all()
|
||||
self.savebox.show()
|
||||
else:
|
||||
if self.store.iter_has_child(iter):
|
||||
html += self.html_table(_("Category: %s<br><br>Current Settings<br><br>") % self.name, self.html_cat(self.name))
|
||||
else:
|
||||
self.radiobox.show()
|
||||
html += self.html_table(_("Boolean: %s<br><br>") % self.name, tr_fmt % td_fmt(self.booleans.get_desc(self.name)))
|
||||
if self.booldict[self.cat][self.name][0] == ENABLE:
|
||||
self.enable_radiobutton.set_active(True)
|
||||
if self.booldict[self.cat][self.name][0] == DISABLE:
|
||||
self.disable_radiobutton.set_active(True)
|
||||
if self.booldict[self.cat][self.name][0] == DEFAULT:
|
||||
self.default_radiobutton.set_active(True)
|
||||
html_doc= html_document(html)
|
||||
|
||||
self.html_view.load_html_string(html, "")
|
||||
|
||||
def stand_alone(self):
|
||||
desktopName = _("Lockdown SELinux Booleans")
|
||||
|
||||
self.mainWindow.connect("destroy", self.cancel)
|
||||
|
||||
self.mainWindow.show_all()
|
||||
self.radiobox.hide()
|
||||
self.savebox.hide()
|
||||
gtk.main()
|
||||
|
||||
if __name__ == "__main__":
|
||||
signal.signal (signal.SIGINT, signal.SIG_DFL)
|
||||
|
||||
app = booleanWindow()
|
||||
app.stand_alone()
|
@ -1229,7 +1229,6 @@ named pipe
|
||||
<widget class="GtkHPaned" id="hpaned1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="position">0</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkFrame" id="frame1">
|
||||
@ -1626,24 +1625,6 @@ Enforcing
|
||||
<property name="homogeneous">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkToolButton" id="toolbutton36">
|
||||
<property name="visible">True</property>
|
||||
<property name="tooltip" translatable="yes">Run booleans lockdown wizard</property>
|
||||
<property name="label" translatable="yes">Lockdown...</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="stock_id">gtk-print-error</property>
|
||||
<property name="visible_horizontal">True</property>
|
||||
<property name="visible_vertical">True</property>
|
||||
<property name="is_important">False</property>
|
||||
<signal name="clicked" handler="on_lockdown_clicked" last_modification_time="Thu, 03 Jul 2008 16:51:17 GMT"/>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
|
Loading…
Reference in New Issue
Block a user