rpms/policycoreutils/devel policycoreutils-gui.patch, 1.41, 1.42 policycoreutils.spec, 1.463, 1.464
Daniel J Walsh (dwalsh)
fedora-extras-commits at redhat.com
Wed Oct 17 01:34:18 UTC 2007
Author: dwalsh
Update of /cvs/extras/rpms/policycoreutils/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv11898
Modified Files:
policycoreutils-gui.patch policycoreutils.spec
Log Message:
* Mon Oct 15 2007 Dan Walsh <dwalsh at redhat.com> 2.0.31-4
- Add booleans page
policycoreutils-gui.patch:
Index: policycoreutils-gui.patch
===================================================================
RCS file: /cvs/extras/rpms/policycoreutils/devel/policycoreutils-gui.patch,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -r1.41 -r1.42
--- policycoreutils-gui.patch 16 Oct 2007 23:47:15 -0000 1.41
+++ policycoreutils-gui.patch 17 Oct 2007 01:33:45 -0000 1.42
@@ -937,8 +937,8 @@
+
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/polgen.glade policycoreutils-2.0.31/gui/polgen.glade
--- nsapolicycoreutils/gui/polgen.glade 1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.31/gui/polgen.glade 2007-10-16 19:23:01.000000000 -0400
-@@ -0,0 +1,2583 @@
++++ policycoreutils-2.0.31/gui/polgen.glade 2007-10-16 21:32:19.000000000 -0400
+@@ -0,0 +1,3012 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
+
@@ -2873,7 +2873,6 @@
+ <property name="fill">False</property>
+ </packing>
+ </child>
-+
+ </widget>
+ <packing>
+ <property name="padding">0</property>
@@ -3244,6 +3243,257 @@
+ </child>
+
+ <child>
++ <widget class="GnomeDruidPageStandard" id="booleans_page">
++ <property name="visible">True</property>
++ <property name="title" translatable="yes">Select booleans that the application uses</property>
++
++ <child internal-child="vbox">
++ <widget class="GtkVBox" id="druid-vbox19">
++ <property name="border_width">16</property>
++ <property name="visible">True</property>
++ <property name="homogeneous">False</property>
++ <property name="spacing">6</property>
++
++ <child>
++ <widget class="GtkFrame" id="frame3">
++ <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="alignment3">
++ <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="GtkHBox" id="hbox1">
++ <property name="visible">True</property>
++ <property name="homogeneous">False</property>
++ <property name="spacing">0</property>
++
++ <child>
++ <widget class="GtkVBox" id="vbox3">
++ <property name="visible">True</property>
++ <property name="homogeneous">False</property>
++ <property name="spacing">0</property>
++
++ <child>
++ <widget class="GtkButton" id="button2">
++ <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>
++ <signal name="clicked" handler="on_add_boolean_clicked" last_modification_time="Wed, 17 Oct 2007 00:02:27 GMT"/>
++
++ <child>
++ <widget class="GtkAlignment" id="alignment6">
++ <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="hbox4">
++ <property name="visible">True</property>
++ <property name="homogeneous">False</property>
++ <property name="spacing">2</property>
++
++ <child>
++ <widget class="GtkImage" id="image3">
++ <property name="visible">True</property>
++ <property name="stock">gtk-add</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="label17">
++ <property name="visible">True</property>
++ <property name="label">Add Boolean</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="GtkButton" id="button4">
++ <property name="visible">True</property>
++ <property name="can_focus">True</property>
++ <property name="label">gtk-delete</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_delete_boolean_clicked" last_modification_time="Wed, 17 Oct 2007 00:02:39 GMT"/>
++ <accelerator key="Delete" modifiers="0" signal="clicked"/>
++ </widget>
++ <packing>
++ <property name="padding">0</property>
++ <property name="expand">False</property>
++ <property name="fill">False</property>
++ </packing>
++ </child>
++ </widget>
++ <packing>
++ <property name="padding">4</property>
++ <property name="expand">False</property>
++ <property name="fill">True</property>
++ </packing>
++ </child>
++
++ <child>
++ <widget class="GtkScrolledWindow" id="scrolledwindow1">
++ <property name="visible">True</property>
++ <property name="can_focus">True</property>
++ <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
++ <property name="vscrollbar_policy">GTK_POLICY_NEVER</property>
++ <property name="shadow_type">GTK_SHADOW_IN</property>
++ <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
++
++ <child>
++ <widget class="GtkViewport" id="viewport1">
++ <property name="visible">True</property>
++ <property name="shadow_type">GTK_SHADOW_IN</property>
++
++ <child>
++ <widget class="GtkVBox" id="vbox2">
++ <property name="visible">True</property>
++ <property name="homogeneous">False</property>
++ <property name="spacing">0</property>
++
++ <child>
++ <widget class="GtkScrolledWindow" id="scrolledwindow2">
++ <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_IN</property>
++ <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
++
++ <child>
++ <widget class="GtkTreeView" id="boolean_treeview">
++ <property name="visible">True</property>
++ <property name="tooltip" translatable="yes">Add/Remove booleans used for this confined application/user</property>
++ <property name="can_focus">True</property>
++ <property name="headers_visible">True</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>
++ <packing>
++ <property name="padding">0</property>
++ <property name="expand">True</property>
++ <property name="fill">True</property>
++ </packing>
++ </child>
++ </widget>
++ </child>
++ </widget>
++ </child>
++ </widget>
++ <packing>
++ <property name="padding">0</property>
++ <property name="expand">True</property>
++ <property name="fill">True</property>
++ </packing>
++ </child>
++ </widget>
++ </child>
++ </widget>
++ </child>
++ </widget>
++ <packing>
++ <property name="padding">0</property>
++ <property name="expand">True</property>
++ <property name="fill">True</property>
++ </packing>
++ </child>
++ </widget>
++ </child>
++ </widget>
++ <packing>
++ <property name="tab_expand">False</property>
++ <property name="tab_fill">True</property>
++ </packing>
++ </child>
++
++ <child>
++ <widget class="GtkLabel" id="label44">
++ <property name="visible">True</property>
++ <property name="label" translatable="yes"></property>
++ <property name="use_underline">False</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="type">tab</property>
++ </packing>
++ </child>
++
++ <child>
+ <widget class="GnomeDruidPageStandard" id="gen_policy_page">
+ <property name="visible">True</property>
+ <property name="title" translatable="yes">Select directory to generate policy in</property>
@@ -3337,7 +3587,7 @@
+ </child>
+
+ <child>
-+ <widget class="GtkLabel" id="label44">
++ <widget class="GtkLabel" id="label46">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes"></property>
+ <property name="use_underline">False</property>
@@ -3380,7 +3630,7 @@
+ </child>
+
+ <child>
-+ <widget class="GtkLabel" id="label46">
++ <widget class="GtkLabel" id="label45">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes"></property>
+ <property name="use_underline">False</property>
@@ -3423,7 +3673,7 @@
+ </child>
+
+ <child>
-+ <widget class="GtkLabel" id="label45">
++ <widget class="GtkLabel" id="label47">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes"></property>
+ <property name="use_underline">False</property>
@@ -3521,12 +3771,191 @@
+ </child>
+</widget>
+
++<widget class="GtkDialog" id="boolean_dialog">
++ <property name="title" translatable="yes">Add Booleans Dialog</property>
++ <property name="type">GTK_WINDOW_TOPLEVEL</property>
++ <property name="window_position">GTK_WIN_POS_MOUSE</property>
++ <property name="modal">False</property>
++ <property name="default_width">400</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>
++ <property name="has_separator">True</property>
++
++ <child internal-child="vbox">
++ <widget class="GtkVBox" id="dialog-vbox2">
++ <property name="visible">True</property>
++ <property name="homogeneous">False</property>
++ <property name="spacing">0</property>
++
++ <child internal-child="action_area">
++ <widget class="GtkHButtonBox" id="dialog-action_area2">
++ <property name="visible">True</property>
++ <property name="layout_style">GTK_BUTTONBOX_END</property>
++
++ <child>
++ <widget class="GtkButton" id="cancelbutton1">
++ <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="okbutton1">
++ <property name="visible">True</property>
++ <property name="can_default">True</property>
++ <property name="can_focus">True</property>
++ <property name="label">gtk-add</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>
++
++ <child>
++ <widget class="GtkTable" id="table6">
++ <property name="visible">True</property>
++ <property name="n_rows">2</property>
++ <property name="n_columns">2</property>
++ <property name="homogeneous">False</property>
++ <property name="row_spacing">0</property>
++ <property name="column_spacing">0</property>
++
++ <child>
++ <widget class="GtkLabel" id="label48">
++ <property name="visible">True</property>
++ <property name="label" translatable="yes">Boolean Name</property>
++ <property name="use_underline">False</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="left_attach">0</property>
++ <property name="right_attach">1</property>
++ <property name="top_attach">0</property>
++ <property name="bottom_attach">1</property>
++ <property name="x_options">fill</property>
++ <property name="y_options"></property>
++ </packing>
++ </child>
++
++ <child>
++ <widget class="GtkLabel" id="label49">
++ <property name="visible">True</property>
++ <property name="label" translatable="yes">Description</property>
++ <property name="use_underline">False</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="left_attach">0</property>
++ <property name="right_attach">1</property>
++ <property name="top_attach">1</property>
++ <property name="bottom_attach">2</property>
++ <property name="x_options">fill</property>
++ <property name="y_options"></property>
++ </packing>
++ </child>
++
++ <child>
++ <widget class="GtkEntry" id="boolean_name_entry">
++ <property name="visible">True</property>
++ <property name="can_focus">True</property>
++ <property name="editable">True</property>
++ <property name="visibility">True</property>
++ <property name="max_length">0</property>
++ <property name="text" translatable="yes"></property>
++ <property name="has_frame">True</property>
++ <property name="invisible_char">â¢</property>
++ <property name="activates_default">False</property>
++ </widget>
++ <packing>
++ <property name="left_attach">1</property>
++ <property name="right_attach">2</property>
++ <property name="top_attach">0</property>
++ <property name="bottom_attach">1</property>
++ <property name="y_options"></property>
++ </packing>
++ </child>
++
++ <child>
++ <widget class="GtkEntry" id="boolean_description_entry">
++ <property name="visible">True</property>
++ <property name="can_focus">True</property>
++ <property name="editable">True</property>
++ <property name="visibility">True</property>
++ <property name="max_length">0</property>
++ <property name="text" translatable="yes"></property>
++ <property name="has_frame">True</property>
++ <property name="invisible_char">â¢</property>
++ <property name="activates_default">False</property>
++ </widget>
++ <packing>
++ <property name="left_attach">1</property>
++ <property name="right_attach">2</property>
++ <property name="top_attach">1</property>
++ <property name="bottom_attach">2</property>
++ <property name="y_options"></property>
++ </packing>
++ </child>
++ </widget>
++ <packing>
++ <property name="padding">0</property>
++ <property name="expand">True</property>
++ <property name="fill">True</property>
++ </packing>
++ </child>
++ </widget>
++ </child>
++</widget>
++
+</glade-interface>
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/polgengui.py policycoreutils-2.0.31/gui/polgengui.py
--- nsapolicycoreutils/gui/polgengui.py 1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.31/gui/polgengui.py 2007-10-16 19:43:06.000000000 -0400
-@@ -0,0 +1,551 @@
-+#!/usr/bin/python
++++ policycoreutils-2.0.31/gui/polgengui.py 2007-10-16 21:32:31.000000000 -0400
+@@ -0,0 +1,590 @@
++#!/usr/bin/python -E
+#
+# system-config-selinux.py - GUI for SELinux Config tool in system-config-selinux
+#
@@ -3638,9 +4067,10 @@
+ OUT_NET_PAGE = 8
+ COMMON_APPS_PAGE = 9
+ FILES_PAGE = 10
-+ GEN_POLICY_PAGE = 11
-+ GEN_USER_POLICY_PAGE = 12
-+ FINISH_PAGE = 13
++ BOOLEAN_PAGE = 11
++ GEN_POLICY_PAGE = 12
++ GEN_USER_POLICY_PAGE = 13
++ FINISH_PAGE = 14
+
+ def __init__(self):
+ self.xml = xml
@@ -3648,9 +4078,11 @@
+ self.all_modules=get_all_modules()
+ self.name=""
+ xml.signal_connect("on_delete_clicked", self.delete)
++ xml.signal_connect("on_delete_boolean_clicked", self.delete_boolean)
+ xml.signal_connect("on_exec_select_clicked", self.exec_select)
+ xml.signal_connect("on_init_script_select_clicked", self.init_script_select)
+ xml.signal_connect("on_add_clicked", self.add)
++ xml.signal_connect("on_add_boolean_clicked", self.add_boolean)
+ xml.signal_connect("on_add_dir_clicked", self.add_dir)
+ xml.signal_connect("on_about_clicked", self.on_about_clicked)
+ xml.get_widget ("cancel_button").connect("clicked",self.quit)
@@ -3659,14 +4091,18 @@
+ self.back_button = xml.get_widget ("back_button")
+ self.back_button.connect("clicked",self.back)
+
++ self.boolean_dialog = xml.get_widget ("boolean_dialog")
++ self.boolean_name_entry = xml.get_widget ("boolean_name_entry")
++ self.boolean_description_entry = xml.get_widget ("boolean_description_entry")
++
+ self.notebook = xml.get_widget ("notebook1")
+ self.pages={}
+ for i in polgen.USERS:
-+ self.pages[i] = [ self.START_PAGE, self.SELECT_TYPE_PAGE, self.APP_PAGE, self.TRANSITION_PAGE, self.ROLE_PAGE, self.IN_NET_PAGE, self.OUT_NET_PAGE, self.GEN_USER_POLICY_PAGE, self.FINISH_PAGE]
-+ self.pages[polgen.RUSER] = [ self.START_PAGE, self.SELECT_TYPE_PAGE, self.APP_PAGE, self.ADMIN_PAGE, self.IN_NET_PAGE, self.OUT_NET_PAGE, self.GEN_USER_POLICY_PAGE, self.FINISH_PAGE]
++ self.pages[i] = [ self.START_PAGE, self.SELECT_TYPE_PAGE, self.APP_PAGE, self.TRANSITION_PAGE, self.ROLE_PAGE, self.IN_NET_PAGE, self.OUT_NET_PAGE, self.BOOLEAN_PAGE, self.GEN_USER_POLICY_PAGE, self.FINISH_PAGE]
++ self.pages[polgen.RUSER] = [ self.START_PAGE, self.SELECT_TYPE_PAGE, self.APP_PAGE, self.ADMIN_PAGE, self.IN_NET_PAGE, self.OUT_NET_PAGE, self.BOOLEAN_PAGE, self.GEN_USER_POLICY_PAGE, self.FINISH_PAGE]
+ for i in polgen.APPLICATIONS:
-+ self.pages[i] = [ self.START_PAGE, self.SELECT_TYPE_PAGE, self.APP_PAGE, self.IN_NET_PAGE, self.OUT_NET_PAGE, self.COMMON_APPS_PAGE, self.FILES_PAGE,self.GEN_POLICY_PAGE, self.FINISH_PAGE ]
-+ self.pages[polgen.USER] = [ self.START_PAGE, self.SELECT_TYPE_PAGE, self.APP_PAGE, self.USER_TRANSITION_PAGE, self.IN_NET_PAGE, self.OUT_NET_PAGE, self.COMMON_APPS_PAGE, self.FILES_PAGE,self.GEN_POLICY_PAGE, self.FINISH_PAGE ]
++ self.pages[i] = [ self.START_PAGE, self.SELECT_TYPE_PAGE, self.APP_PAGE, self.IN_NET_PAGE, self.OUT_NET_PAGE, self.COMMON_APPS_PAGE, self.FILES_PAGE, self.BOOLEAN_PAGE, self.GEN_POLICY_PAGE, self.FINISH_PAGE ]
++ self.pages[polgen.USER] = [ self.START_PAGE, self.SELECT_TYPE_PAGE, self.APP_PAGE, self.USER_TRANSITION_PAGE, self.IN_NET_PAGE, self.OUT_NET_PAGE, self.COMMON_APPS_PAGE, self.FILES_PAGE, self.BOOLEAN_PAGE, self.GEN_POLICY_PAGE, self.FINISH_PAGE ]
+
+ self.current_page = 0
+ self.back_button.set_sensitive(0)
@@ -3701,6 +4137,15 @@
+ for b in self.network_buttons.keys():
+ b.connect("clicked",self.network_all_clicked)
+
++ self.boolean_treeview = self.xml.get_widget("boolean_treeview")
++ self.boolean_store = gtk.ListStore(gobject.TYPE_STRING,gobject.TYPE_STRING)
++ self.boolean_treeview.set_model(self.boolean_store)
++ self.boolean_store.set_sort_column_id(0, gtk.SORT_ASCENDING)
++ col = gtk.TreeViewColumn(_("Name"), gtk.CellRendererText(), text = 0)
++ self.boolean_treeview.append_column(col)
++ col = gtk.TreeViewColumn(_("Description"), gtk.CellRendererText(), text = 1)
++ self.boolean_treeview.append_column(col)
++
+ self.role_treeview = self.xml.get_widget("role_treeview")
+ self.role_store = gtk.ListStore(gobject.TYPE_STRING)
+ self.role_treeview.set_model(self.role_store)
@@ -3860,6 +4305,12 @@
+ my_policy.set_in_udp(self.in_udp_all_checkbutton.get_active(), self.in_udp_reserved_checkbutton.get_active(), self.in_udp_unreserved_checkbutton.get_active(), self.in_udp_entry.get_text())
+ my_policy.set_out_tcp(self.out_tcp_all_checkbutton.get_active(), self.out_tcp_entry.get_text())
+ my_policy.set_out_udp(self.out_udp_all_checkbutton.get_active(), self.out_udp_entry.get_text())
++
++ iter= self.boolean_store.get_iter_first()
++ while(iter):
++ my_policy.add_boolean(self.boolean_store.get_value(iter, 0), self.boolean_store.get_value(iter, 1))
++ iter= self.boolean_store.iter_next(iter)
++
+ if self.get_type() in polgen.APPLICATIONS:
+ my_policy.set_program(self.exec_entry.get_text())
+ my_policy.set_use_syslog(self.syslog_checkbutton.get_active() == 1)
@@ -3910,6 +4361,23 @@
+ store.remove(iter)
+ self.view.get_selection().select_path ((0,))
+
++ def delete_boolean(self, args):
++ store, iter = self.boolean_treeview.get_selection().get_selected()
++ if iter != None:
++ store.remove(iter)
++ self.boolean_treeview.get_selection().select_path ((0,))
++
++ def add_boolean(self,type):
++ self.boolean_name_entry.set_text("")
++ self.boolean_description_entry.set_text("")
++ rc = self.boolean_dialog.run()
++ self.boolean_dialog.hide()
++ if rc == gtk.RESPONSE_CANCEL:
++ return
++ iter = self.boolean_store.append()
++ self.boolean_store.set_value(iter, 0, self.boolean_name_entry.get_text())
++ self.boolean_store.set_value(iter, 1, self.boolean_description_entry.get_text())
++
+ def __add(self,type):
+ rc = self.file_dialog.run()
+ self.file_dialog.hide()
@@ -4079,8 +4547,8 @@
+ app.stand_alone()
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/polgen.py policycoreutils-2.0.31/gui/polgen.py
--- nsapolicycoreutils/gui/polgen.py 1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.31/gui/polgen.py 2007-10-16 19:23:12.000000000 -0400
-@@ -0,0 +1,818 @@
++++ policycoreutils-2.0.31/gui/polgen.py 2007-10-16 21:32:25.000000000 -0400
+@@ -0,0 +1,839 @@
+# Copyright (C) 2007 Red Hat
+# see file 'COPYING' for use and warranty information
+#
@@ -4105,6 +4573,7 @@
+import os, sys, stat
+import re
+from templates import executable
++from templates import boolean
+from templates import etc_rw
+from templates import var_spool
+from templates import var_lib
@@ -4243,6 +4712,7 @@
+ self.use_audit = False
+ self.use_terminal = False
+ self.use_mail = False
++ self.booleans = {}
+ self.files = {}
+ self.dirs = {}
+ self.found_tcp_ports=[]
@@ -4448,6 +4918,9 @@
+ self.DEFAULT_DIRS["rw"][1].append(file)
+ return self.DEFAULT_DIRS["rw"]
+
++ def add_boolean(self, name, description):
++ self.booleans[name] = description
++
+ def add_file(self, file):
+ self.files[file] = self.__find_path(file)
+
@@ -4586,6 +5059,19 @@
+ else:
+ return ""
+
++ def generate_booleans(self):
++ newte = ""
++ for b in self.booleans:
++ tmp = re.sub("BOOLEAN", b, boolean.te_boolean)
++ newte += re.sub("DESCRIPTION", self.booleans[b], tmp)
++ return newte
++
++ def generate_boolean_rules(self):
++ newte = ""
++ for b in self.booleans:
++ newte += re.sub("BOOLEAN", b, boolean.te_rules)
++ return newte
++
+ def generate_cgi_te(self):
+ return re.sub("TEMPLATETYPE", self.name, executable.te_cgi_types)
+
@@ -4683,7 +5169,9 @@
+
+ newte += self.generate_network_types()
+ newte += self.generate_tmp_types()
++ newte += self.generate_booleans()
+ newte += self.generate_default_rules()
++ newte += self.generate_boolean_rules()
+
+ for d in self.DEFAULT_DIRS:
+ if len(self.DEFAULT_DIRS[d][1]) > 0:
@@ -4884,6 +5372,7 @@
+ mypolicy = policy("mytuser", TUSER)
+ mypolicy.set_transition_domains(["sudo"])
+ mypolicy.set_admin_roles(["mydbadm"])
++ mypolicy.add_boolean("allow_mytuser_setuid", "Allow mytuser users to run setuid applications")
+ print mypolicy.generate("/var/tmp")
+
+ mypolicy = policy("myxuser", XUSER)
@@ -9349,6 +9838,50 @@
+
+ app = childWindow()
+ app.stand_alone()
+diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/boolean.py policycoreutils-2.0.31/gui/templates/boolean.py
+--- nsapolicycoreutils/gui/templates/boolean.py 1969-12-31 19:00:00.000000000 -0500
++++ policycoreutils-2.0.31/gui/templates/boolean.py 2007-10-16 21:30:53.000000000 -0400
+@@ -0,0 +1,40 @@
++# Copyright (C) 2007 Red Hat
++# see file 'COPYING' for use and warranty information
++#
++# policygentool is a tool for the initial generation of SELinux policy
++#
++# 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
++# along with this program; if not, write to the Free Software
++# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++# 02111-1307 USA
++#
++#
++########################### boolean Template File ###########################
++
++te_boolean="""
++## <desc>
++## <p>
++## DESCRIPTION
++## </p>
++## </desc>
++gen_tunable(BOOLEAN,false)
++"""
++
++te_rules="""
++tunable_policy(`BOOLEAN',`
++#TRUE
++',`
++#FALSE
++')
++"""
++
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/etc_rw.py policycoreutils-2.0.31/gui/templates/etc_rw.py
--- nsapolicycoreutils/gui/templates/etc_rw.py 1969-12-31 19:00:00.000000000 -0500
+++ policycoreutils-2.0.31/gui/templates/etc_rw.py 2007-10-16 19:23:37.000000000 -0400
@@ -10091,7 +10624,7 @@
+"""
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/script.py policycoreutils-2.0.31/gui/templates/script.py
--- nsapolicycoreutils/gui/templates/script.py 1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.31/gui/templates/script.py 2007-10-16 19:24:22.000000000 -0400
++++ policycoreutils-2.0.31/gui/templates/script.py 2007-10-16 21:31:31.000000000 -0400
@@ -0,0 +1,91 @@
+# Copyright (C) 2007 Red Hat
+# see file 'COPYING' for use and warranty information
@@ -10136,7 +10669,7 @@
+if [ $# -eq 1 ]; then
+ if [ "$1" = "--update" ] ; then
+ time=`ls -l --time-style="+%x %X" TEMPLATETYPE.te | awk '{ printf "%s %s", $6, $7 }'`
-+ rules=`ausearch --start $time -m avc --raw | grep TEMPLATETYPE`
++ rules=`ausearch --start $time -m avc --raw -se TEMPLATETYPE`
+ if [ x"$rules" != "x" ] ; then
+ echo "Found avc's to update policy with"
+ echo -e "$rules" | audit2allow -R
Index: policycoreutils.spec
===================================================================
RCS file: /cvs/extras/rpms/policycoreutils/devel/policycoreutils.spec,v
retrieving revision 1.463
retrieving revision 1.464
diff -u -r1.463 -r1.464
--- policycoreutils.spec 16 Oct 2007 23:47:15 -0000 1.463
+++ policycoreutils.spec 17 Oct 2007 01:33:45 -0000 1.464
@@ -6,7 +6,7 @@
Summary: SELinux policy core utilities
Name: policycoreutils
Version: 2.0.31
-Release: 3%{?dist}
+Release: 4%{?dist}
License: GPLv2+
Group: System Environment/Base
Source: http://www.nsa.gov/selinux/archives/policycoreutils-%{version}.tgz
@@ -205,6 +205,9 @@
fi
%changelog
+* Mon Oct 15 2007 Dan Walsh <dwalsh at redhat.com> 2.0.31-4
+- Add booleans page
+
* Mon Oct 15 2007 Dan Walsh <dwalsh at redhat.com> 2.0.31-3
- Lots of updates to gui
More information about the fedora-extras-commits
mailing list