diff --git a/policycoreutils-rhat.patch b/policycoreutils-rhat.patch index 7d0f127..c0be572 100644 --- a/policycoreutils-rhat.patch +++ b/policycoreutils-rhat.patch @@ -509902,7 +509902,7 @@ index 0000000..e2befdb + packages=["policycoreutils"], +) diff --git a/policycoreutils/semanage/semanage b/policycoreutils/semanage/semanage -index 6e33c85..2ccddd7 100644 +index 6e33c85..faaed5b 100644 --- a/policycoreutils/semanage/semanage +++ b/policycoreutils/semanage/semanage @@ -1,5 +1,7 @@ @@ -509914,7 +509914,7 @@ index 6e33c85..2ccddd7 100644 # see file 'COPYING' for use and warranty information # # semanage is a tool for managing SELinux configuration files -@@ -19,564 +21,792 @@ +@@ -19,564 +21,795 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA # 02111-1307 USA # @@ -510258,7 +510258,7 @@ index 6e33c85..2ccddd7 100644 + label. This is used with fcontext. Requires source and target + path arguments. The context labeling for the target subtree is + made equivalent to that defined for the source.''')) -+ fcontextParser.add_argument('-f', '--ftype', default="", choices=["--","-d","-c","-b","-s","-l","-p"], help=_(ftype_help)) ++ fcontextParser.add_argument('-f', '--ftype', default="", choices=["all files","--","-d","-c","-b","-s","-l","-p"], help=_(ftype_help)) + parser_add_seuser(fcontextParser, "fcontext") + parser_add_type(fcontextParser, "fcontext") + parser_add_range(fcontextParser, "fcontext") @@ -510630,6 +510630,9 @@ index 6e33c85..2ccddd7 100644 + trans.start() + + for l in sys.stdin.readlines(): ++ if len(l.strip()) == 0: ++ continue ++ + try: + commandParser = createCommandParser() + args = commandParser.parse_args(mkargv(l)) @@ -514081,7 +514084,7 @@ index b25d3b2..0dc3b9b 100755 sys.exit(0) + diff --git a/policycoreutils/sepolicy/sepolicy/__init__.py b/policycoreutils/sepolicy/sepolicy/__init__.py -index 5e7415c..5cebe57 100644 +index 5e7415c..7734ba0 100644 --- a/policycoreutils/sepolicy/sepolicy/__init__.py +++ b/policycoreutils/sepolicy/sepolicy/__init__.py @@ -1,12 +1,15 @@ @@ -514514,7 +514517,7 @@ index 5e7415c..5cebe57 100644 roles = map(lambda x: x['name'], info(ROLE)) roles.remove("object_r") roles.sort() -@@ -104,115 +437,256 @@ def get_all_users(): +@@ -104,115 +437,259 @@ def get_all_users(): if users: return users users = map(lambda x: x['name'], info(USER)) @@ -514755,7 +514758,10 @@ index 5e7415c..5cebe57 100644 + for b in i: + if not isinstance(b,tuple): + continue -+ enabled = selinux.security_get_boolean_active(b[0]) ++ try: ++ enabled = selinux.security_get_boolean_active(b[0]) ++ except OSError: ++ enabled = b[1] + if b[0].startswith(short_name) or b[0].startswith(domainname): + if (b[0], enabled) not in domainbools and (b[0], not enabled) not in domainbools: + domainbools.append((b[0], enabled)) @@ -514843,7 +514849,7 @@ index 5e7415c..5cebe57 100644 def boolean_category(boolean): booleans_dict = gen_bool_dict() -@@ -233,18 +707,18 @@ def get_os_version(): +@@ -233,18 +710,18 @@ def get_os_version(): os_version = "" pkg_name = "selinux-policy" try: @@ -515162,10 +515168,10 @@ index 26f8390..ba959ae 100644 return out diff --git a/policycoreutils/sepolicy/sepolicy/gui.py b/policycoreutils/sepolicy/sepolicy/gui.py new file mode 100644 -index 0000000..af4278f +index 0000000..112596d --- /dev/null +++ b/policycoreutils/sepolicy/sepolicy/gui.py -@@ -0,0 +1,2353 @@ +@@ -0,0 +1,2351 @@ +#!/usr/bin/python -Es +# +# Copyright (C) 2013 Red Hat @@ -515257,7 +515263,6 @@ index 0000000..af4278f + self.applications_button_selection = self.builder.get_object("applications_selection_button") + self.revert_button = self.builder.get_object("Revert_button") + self.application = None -+ self.add_path_dialog = self.builder.get_object("Add_path_dialog") + self.busy_cursor = gtk.gdk.Cursor(gtk.gdk.WATCH) + self.ready_cursor = gtk.gdk.Cursor(gtk.gdk.LEFT_PTR) + self.current_popup = None @@ -515314,8 +515319,7 @@ index 0000000..af4278f + # System Items ************************************** + + # Browse Items ************************************** -+ self.browse_popup_window = self.builder.get_object("Add_path_dialog") -+ self.file_config_window = self.builder.get_object("file_configurations") ++ self.file_dialog = self.builder.get_object("add_path_dialog") + self.select_button_browse = self.builder.get_object("select_button_browse") + self.cancel_button_browse = self.builder.get_object("cancel_button_browse") + # Browse Items ************************************** @@ -517318,11 +517322,11 @@ index 0000000..af4278f + self.set_enforce_text(button.get_active()) + + def on_browse_select(self, *args): -+ filename = self.add_path_dialog.get_filename() ++ filename = self.file_dialog.get_filename() + if filename == None: + return + self.clear_entry = False -+ self.add_path_dialog.hide() ++ self.file_dialog.hide() + self.files_path_entry.set_text(filename) + + def recursive_path(self, *args): @@ -517365,13 +517369,13 @@ index 0000000..af4278f + renderer = self.booleans_column_1.get_cell_renderers() + + def browse_for_files(self, *args): -+ self.add_path_dialog.show() ++ self.file_dialog.show() + + def close_browse_popup(self, *args): -+ self.browse_popup_window.hide() ++ self.file_dialog.hide() + + def close_config_window(self, *args): -+ self.file_config_window.hide() ++ self.file_dialog.hide() + + def change_system_policy(self, *args): + self.dbus.change_policy_type(self.system_policy_type_combobox.get_active_text()) @@ -517381,27 +517385,27 @@ index 0000000..af4278f + self.dbus.change_default_policy(button.get_label().lower()) + + def import_config_show(self, *args): -+ self.file_config_window.set_action(gtk.FILE_CHOOSER_ACTION_OPEN) -+ self.file_config_window.set_title("Import Configuration") -+ self.file_config_window.show() ++ self.file_dialog.set_action(gtk.FILE_CHOOSER_ACTION_OPEN) ++ self.file_dialog.set_title("Import Configuration") ++ self.file_dialog.show() + self.import_export = 'Import' + + def export_config_show(self, *args): -+ self.file_config_window.set_action(gtk.FILE_CHOOSER_ACTION_SAVE) -+ self.file_config_window.set_title("Export Configuration") -+ self.file_config_window.show() ++ self.file_dialog.set_action(gtk.FILE_CHOOSER_ACTION_SAVE) ++ self.file_dialog.set_title("Export Configuration") ++ self.file_dialog.show() + self.import_export = 'Export' + + def import_or_export(self, button, *args): -+ self.file_config_window.show() ++ self.file_dialog.show() + if self.import_export == 'Import': + self.import_config() + elif self.import_export == 'Export': + self.export_config() + + def export_config(self, *args): -+ self.file_config_window.hide() -+ filename = self.file_config_window.get_filename() ++ self.file_dialog.hide() ++ filename = self.file_dialog.get_filename() + if filename == None: + return + if os.path.exists(filename): @@ -517415,11 +517419,11 @@ index 0000000..af4278f + #self.exportwindow.set_action + + def import_config(self, *args): -+ self.file_config_window.hide() -+ filename = self.file_config_window.get_filename() ++ self.file_dialog.hide() ++ filename = self.file_dialog.get_filename() + if filename == None: + return -+ self.add_path_dialog.hide() ++ self.file_dialog.hide() + fd = open(filename, "r") + buf = fd.read() + fd.close() @@ -518337,78 +518341,13 @@ index 0000000..07d5a98 + print e diff --git a/policycoreutils/sepolicy/sepolicy/sepolicy.glade b/policycoreutils/sepolicy/sepolicy/sepolicy.glade new file mode 100644 -index 0000000..9cae364 +index 0000000..da6318f --- /dev/null +++ b/policycoreutils/sepolicy/sepolicy/sepolicy.glade -@@ -0,0 +1,3964 @@ +@@ -0,0 +1,3814 @@ + + -+ -+ -+ -+ False -+ 5 -+ GtkFileChooserDialog -+ True -+ 320 -+ 260 -+ dialog -+ -+ -+ True -+ False -+ 2 -+ -+ -+ True -+ False -+ end -+ -+ -+ Select -+ True -+ True -+ True -+ -+ -+ -+ False -+ False -+ 0 -+ -+ -+ -+ -+ Cancel -+ True -+ True -+ True -+ -+ -+ -+ False -+ False -+ 1 -+ -+ -+ -+ -+ False -+ True -+ end -+ 0 -+ -+ -+ -+ -+ -+ -+ -+ -+ select_button_browse -+ cancel_button_browse -+ -+ ++ + + + @@ -518425,7 +518364,7 @@ index 0000000..9cae364 + + + -+ ++ + + + @@ -518530,8 +518469,6 @@ index 0000000..9cae364 + gtk-find + False + False -+ True -+ True + + + @@ -518672,6 +518609,7 @@ index 0000000..9cae364 + True + False + Display boolean information that can be used to modify the policy for the 'selected domain'. ++ 0.5 + True + False + Files_button @@ -518690,6 +518628,7 @@ index 0000000..9cae364 + True + False + Display file type information that can be used by the 'selected domain'. ++ 0.5 + False + Booleans_button + @@ -518707,6 +518646,7 @@ index 0000000..9cae364 + True + False + Display network ports to which the 'selected domain' can connect or listen to. ++ 0.5 + False + Booleans_button + @@ -518724,6 +518664,7 @@ index 0000000..9cae364 + True + False + Display applications that can transition into or out of the 'selected domain'. ++ 0.5 + False + Booleans_button + @@ -518739,6 +518680,7 @@ index 0000000..9cae364 + System + True + False ++ 0.5 + True + False + @@ -518795,10 +518737,7 @@ index 0000000..9cae364 + none + True + gtk-find -+ True + False -+ True -+ True + + + @@ -518820,6 +518759,7 @@ index 0000000..9cae364 + True + True + False ++ 0.5 + True + + @@ -518833,8 +518773,6 @@ index 0000000..9cae364 + + True + True -+ automatic -+ automatic + + + True @@ -518975,10 +518913,7 @@ index 0000000..9cae364 + none + True + gtk-find -+ True + False -+ True -+ True + + + @@ -518995,6 +518930,7 @@ index 0000000..9cae364 + True + True + False ++ 0.5 + True + + @@ -519010,6 +518946,7 @@ index 0000000..9cae364 + Show mislabeled files only + True + False ++ 0.5 + True + + @@ -519125,13 +519062,10 @@ index 0000000..9cae364 + + True + True -+ 0 + + + True + True -+ automatic -+ automatic + + + True @@ -519236,8 +519170,6 @@ index 0000000..9cae364 + + True + True -+ automatic -+ automatic + + + True @@ -519346,8 +519278,6 @@ index 0000000..9cae364 + + True + True -+ automatic -+ automatic + + + True @@ -519517,10 +519447,7 @@ index 0000000..9cae364 + none + True + gtk-find -+ True + False -+ True -+ True + + + @@ -519599,6 +519526,7 @@ index 0000000..9cae364 + True + True + False ++ 0.5 + True + + @@ -519612,13 +519540,10 @@ index 0000000..9cae364 + + True + True -+ 0 + + + True + True -+ automatic -+ automatic + + + True @@ -519700,8 +519625,6 @@ index 0000000..9cae364 + + True + True -+ automatic -+ automatic + + + True @@ -519835,10 +519758,7 @@ index 0000000..9cae364 + none + True + gtk-find -+ True + False -+ True -+ True + + + @@ -519862,8 +519782,6 @@ index 0000000..9cae364 + + True + True -+ automatic -+ automatic + + + True @@ -519949,8 +519867,6 @@ index 0000000..9cae364 + + True + True -+ automatic -+ automatic + + + True @@ -520024,8 +519940,6 @@ index 0000000..9cae364 + + True + True -+ automatic -+ automatic + + + True @@ -520177,6 +520091,7 @@ index 0000000..9cae364 + True + True + False ++ 0.5 + True + True + @@ -520194,6 +520109,7 @@ index 0000000..9cae364 + True + True + False ++ 0.5 + True + Enforcing_button_default + @@ -520210,6 +520126,7 @@ index 0000000..9cae364 + True + True + False ++ 0.5 + True + Enforcing_button_default + @@ -520283,6 +520200,7 @@ index 0000000..9cae364 + True + True + False ++ 0.5 + True + True + Permissive_button @@ -520300,6 +520218,7 @@ index 0000000..9cae364 + True + True + False ++ 0.5 + True + Enforcing_button + @@ -520646,6 +520565,16 @@ index 0000000..9cae364 + + + ++ ++ False ++ 5 ++ GtkFileChooserDialog ++ dialog ++ save ++ ++ ++ advanced_treemodel_filter ++ + + False + center-on-parent @@ -520669,10 +520598,7 @@ index 0000000..9cae364 + + True + gtk-find -+ True + False -+ True -+ True + + + @@ -520688,6 +520614,7 @@ index 0000000..9cae364 + True + True + False ++ 0.5 + True + True + Installed_advanced_button @@ -520705,6 +520632,7 @@ index 0000000..9cae364 + True + True + False ++ 0.5 + True + All_advanced_button + @@ -520726,8 +520654,6 @@ index 0000000..9cae364 + + True + True -+ automatic -+ automatic + + + True @@ -520790,9 +520716,6 @@ index 0000000..9cae364 + + Advanced_search_liststore + -+ -+ advanced_treemodel_filter -+ + + + @@ -520878,33 +520801,15 @@ index 0000000..9cae364 + + + -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ + + executable_files_treestore + + + executable_files_treemodelfilter + -+ ++ + -+ ++ + + + @@ -521263,73 +521168,21 @@ index 0000000..9cae364 + + + -+ -+ False -+ 5 -+ GtkFileChooserDialog -+ True -+ 320 -+ 260 -+ dialog -+ -+ -+ True -+ False -+ 2 -+ -+ -+ True -+ False -+ end -+ -+ -+ Select -+ True -+ True -+ True -+ -+ -+ -+ False -+ False -+ 0 -+ -+ -+ -+ -+ Cancel -+ True -+ True -+ True -+ -+ -+ -+ False -+ False -+ 1 -+ -+ -+ -+ -+ False -+ True -+ end -+ 0 -+ -+ -+ -+ -+ -+ -+ -+ -+ select_button_config -+ cancel_button_config -+ -+ -+ ++ + -+ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + + @@ -521339,6 +521192,12 @@ index 0000000..9cae364 + + + ++ ++ ++ ++ ++ ++ + + + @@ -521370,8 +521229,8 @@ index 0000000..9cae364 + + True + False -+ True + 0.050000000223517416 ++ True + + + @@ -521402,8 +521261,6 @@ index 0000000..9cae364 + + True + True -+ automatic -+ automatic + + + True @@ -521690,6 +521547,7 @@ index 0000000..9cae364 + True + True + False ++ 0.5 + True + + @@ -521763,8 +521621,6 @@ index 0000000..9cae364 + True + False + False -+ True -+ True + + + @@ -521887,8 +521743,6 @@ index 0000000..9cae364 + True + False + False -+ True -+ True + + + 1 @@ -522046,6 +521900,7 @@ index 0000000..9cae364 + True + True + False ++ 0.5 + True + True + udp_button @@ -522062,6 +521917,7 @@ index 0000000..9cae364 + True + True + False ++ 0.5 + True + tcp_button + @@ -522163,8 +522019,6 @@ index 0000000..9cae364 + + True + True -+ automatic -+ automatic + + + 380 diff --git a/policycoreutils.spec b/policycoreutils.spec index f9b7bad..a9e93f4 100644 --- a/policycoreutils.spec +++ b/policycoreutils.spec @@ -7,7 +7,7 @@ Summary: SELinux policy core utilities Name: policycoreutils Version: 2.1.14 -Release: 72%{?dist} +Release: 74%{?dist} License: GPLv2 Group: System Environment/Base # Based on git repository with tag 20101221 @@ -62,8 +62,8 @@ mkdir -p %{buildroot}%{_sbindir} mkdir -p %{buildroot}%{_mandir}/man1 mkdir -p %{buildroot}%{_mandir}/man5 mkdir -p %{buildroot}%{_mandir}/man8 -%{__mkdir} -p %{buildroot}/%{_usr}/share/doc/%{name}-%{version}/ -cp COPYING %{buildroot}/%{_usr}/share/doc/%{name}-%{version}/ +%{__mkdir} -p %{buildroot}/%{_usr}/share/doc/%{name}/ +cp COPYING %{buildroot}/%{_usr}/share/doc/%{name}/ make LSPP_PRIV=y DESTDIR="%{buildroot}" SBINDIR="%{buildroot}%{_sbindir}" LIBDIR="%{buildroot}%{_libdir}" SEMODULE_PATH="/usr/sbin" install @@ -301,7 +301,7 @@ fi %{_mandir}/man1/secon.1* %{_mandir}/ru/man1/secon.1* %{_mandir}/man8/genhomedircon.8* -%doc %{_usr}/share/doc/%{name}-%{version} +%doc %{_usr}/share/doc/%{name} %package restorecond Summary: SELinux restorecond utilities @@ -334,6 +334,12 @@ The policycoreutils-restorecond package contains the restorecond service. %systemd_postun_with_restart restorecond.service %changelog +* Wed Aug 7 2013 Dan Walsh - 2.1.14-74 +- If policy is not installed get_bools should not crash + +* Wed Aug 7 2013 Dan Walsh - 2.1.14-73 +- Fix doc versioning + * Tue Aug 6 2013 Dan Walsh - 2.1.14-72 - Update sepolicy gui code, cleanups and add file transition tab - Fix semanage argparse problems