[policycoreutils/f14/master] - Fix handling of getopt errors in semanage - Raise proper exceptions - Do not allow modules names t

Daniel J Walsh dwalsh at fedoraproject.org
Mon Jan 10 19:38:54 UTC 2011


commit f3401ef5cf2bc8e71af6953d025526ba659af1df
Author: Dan Walsh <dwalsh at redhat.com>
Date:   Mon Jan 10 14:38:43 2011 -0500

    - Fix handling of getopt errors in semanage
    - Raise proper exceptions
    - Do not allow modules names to contain spaces

 policycoreutils-f15.patch |  152 ++++++++++++++++++++++++++++++++++++++++++++-
 policycoreutils-gui.patch |   89 ++++++++++++++------------
 policycoreutils.spec      |    7 ++-
 3 files changed, 202 insertions(+), 46 deletions(-)
---
diff --git a/policycoreutils-f15.patch b/policycoreutils-f15.patch
index 594cea9..015cdf8 100644
--- a/policycoreutils-f15.patch
+++ b/policycoreutils-f15.patch
@@ -1,6 +1,152 @@
-diff -up policycoreutils-2.0.83/setsebool/setsebool.c.root policycoreutils-2.0.83/setsebool/setsebool.c
---- policycoreutils-2.0.83/setsebool/setsebool.c.root	2011-01-06 16:45:56.000000000 -0500
-+++ policycoreutils-2.0.83/setsebool/setsebool.c	2011-01-06 16:46:01.000000000 -0500
+diff -up policycoreutils-2.0.83/semanage/semanage.f15 policycoreutils-2.0.83/semanage/semanage
+--- policycoreutils-2.0.83/semanage/semanage.f15	2011-01-06 17:27:24.000000000 -0500
++++ policycoreutils-2.0.83/semanage/semanage	2011-01-06 17:27:24.000000000 -0500
+@@ -221,36 +221,40 @@ Object-specific Options (see above):
+ 			
+ 		args = argv[1:]
+ 
+-		gopts, cmds = getopt.getopt(args,
+-					    '01adEe:f:i:lhmnp:s:FCDR:L:r:t:P:S:M:',
+-					    ['add',
+-					     'delete',
+-					     'deleteall',
+-					     'equal=',
+-					     'enable',
+-					     'extract',
+-					     'disable',
+-					     'ftype=',
+-					     'file',
+-					     'help',
+-                                             'input=',
+-					     'list', 
+-					     'modify',
+-					     'noheading',
+-					     'localist',
+-                                             'off', 
+-                                             'on', 
+-					     'proto=',
+-					     'seuser=',
+-					     'store=',
+-					     'range=',
+-					     'locallist=',
+-					     'level=',
+-					     'roles=',
+-					     'type=',
+-					     'prefix=',
+-                                             'mask='
+-					     ])
++                try:
++                       gopts, cmds = getopt.getopt(args,
++                                                   '01adEe:f:i:lhmnp:s:FCDR:L:r:t:P:S:M:',
++                                                   ['add',
++                                                    'delete',
++                                                    'deleteall',
++                                                    'equal=',
++                                                    'enable',
++                                                    'extract',
++                                                    'disable',
++                                                    'ftype=',
++                                                    'file',
++                                                    'help',
++                                                    'input=',
++                                                    'list', 
++                                                    'modify',
++                                                    'noheading',
++                                                    'localist',
++                                                    'off', 
++                                                    'on', 
++                                                    'proto=',
++                                                    'seuser=',
++                                                    'store=',
++                                                    'range=',
++                                                    'locallist=',
++                                                    'level=',
++                                                    'roles=',
++                                                    'type=',
++                                                    'prefix=',
++                                                    'mask='
++                                                    ])
++                except getopt.error, error:
++                       usage(_("Options Error %s ") % error.msg)
++
+ 		for o, a in gopts:
+ 			if o not in option_dict[object]:
+ 				sys.stderr.write(_("%s not valid for %s objects\n") % ( o, object) );
+@@ -500,32 +504,36 @@ Object-specific Options (see above):
+                if len(sys.argv) < 3:
+                       usage(_("Requires 2 or more arguments"))
+                 
+-               gopts, cmds = getopt.getopt(sys.argv[1:],
+-                                           '01adf:i:lhmno:p:s:FCDR:L:r:t:T:P:S:',
+-                                           ['add',
+-                                            'delete',
+-                                            'deleteall',
+-                                            'ftype=',
+-                                            'file',
+-                                            'help',
+-                                            'input=',
+-                                            'list', 
+-                                            'modify',
+-                                            'noheading',
+-                                            'localist',
+-                                            'off', 
+-                                            'on', 
+-                                            'output=',
+-                                            'proto=',
+-                                            'seuser=',
+-                                            'store=',
+-                                            'range=',
+-                                            'level=',
+-                                            'roles=',
+-                                            'type=',
+-                                            'trans=',
+-                                            'prefix='
+-                                            ])
++               try:
++                      gopts, cmds = getopt.getopt(sys.argv[1:],
++                                                  '01adf:i:lhmno:p:s:FCDR:L:r:t:T:P:S:',
++                                                  ['add',
++                                                   'delete',
++                                                   'deleteall',
++                                                   'ftype=',
++                                                   'file',
++                                                   'help',
++                                                   'input=',
++                                                   'list', 
++                                                   'modify',
++                                                   'noheading',
++                                                   'localist',
++                                                   'off', 
++                                                   'on', 
++                                                   'output=',
++                                                   'proto=',
++                                                   'seuser=',
++                                                   'store=',
++                                                   'range=',
++                                                   'level=',
++                                                   'roles=',
++                                                   'type=',
++                                                   'trans=',
++                                                   'prefix='
++                                                   ])
++               except getopt.error, error:
++                      usage(_("Options Error %s ") % error.msg)
++
+                for o, a in gopts:
+                       if o == "-S" or o == '--store':
+                              store = a
+@@ -555,8 +563,6 @@ Object-specific Options (see above):
+                else:
+                       process_args(sys.argv[1:])
+ 			
+-	except getopt.error, error:
+-		usage(_("Options Error %s ") % error.msg)
+ 	except ValueError, error:
+ 		errorExit(error.args[0])
+ 	except KeyError, error:
+diff -up policycoreutils-2.0.83/setsebool/setsebool.c.f15 policycoreutils-2.0.83/setsebool/setsebool.c
+--- policycoreutils-2.0.83/setsebool/setsebool.c.f15	2010-06-16 08:04:13.000000000 -0400
++++ policycoreutils-2.0.83/setsebool/setsebool.c	2011-01-06 17:27:24.000000000 -0500
 @@ -82,8 +82,13 @@ static int selinux_set_boolean_list(size
  		if (errno == ENOENT)
  			fprintf(stderr, "Could not change active booleans: "
diff --git a/policycoreutils-gui.patch b/policycoreutils-gui.patch
index 497dc74..e34b245 100644
--- a/policycoreutils-gui.patch
+++ b/policycoreutils-gui.patch
@@ -1,6 +1,6 @@
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/booleansPage.py policycoreutils-2.0.85/gui/booleansPage.py
 --- nsapolicycoreutils/gui/booleansPage.py	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.85/gui/booleansPage.py	2010-12-21 16:16:39.000000000 -0500
++++ policycoreutils-2.0.85/gui/booleansPage.py	2011-01-06 16:45:14.000000000 -0500
 @@ -0,0 +1,247 @@
 +#
 +# booleansPage.py - GUI for Booleans page in system-config-securitylevel
@@ -251,7 +251,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/booleansPage.py poli
 +        
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/domainsPage.py policycoreutils-2.0.85/gui/domainsPage.py
 --- nsapolicycoreutils/gui/domainsPage.py	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.85/gui/domainsPage.py	2010-12-21 16:16:39.000000000 -0500
++++ policycoreutils-2.0.85/gui/domainsPage.py	2011-01-06 16:45:14.000000000 -0500
 @@ -0,0 +1,154 @@
 +## domainsPage.py - show selinux domains
 +## Copyright (C) 2009 Red Hat, Inc.
@@ -409,7 +409,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/domainsPage.py polic
 +            self.error(e.args[0])
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/fcontextPage.py policycoreutils-2.0.85/gui/fcontextPage.py
 --- nsapolicycoreutils/gui/fcontextPage.py	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.85/gui/fcontextPage.py	2010-12-21 16:16:39.000000000 -0500
++++ policycoreutils-2.0.85/gui/fcontextPage.py	2011-01-06 16:45:14.000000000 -0500
 @@ -0,0 +1,223 @@
 +## fcontextPage.py - show selinux mappings
 +## Copyright (C) 2006 Red Hat, Inc.
@@ -636,7 +636,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/fcontextPage.py poli
 +        self.store.set_value(iter, TYPE_COL, "%s:%s" % (type, mls))
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/html_util.py policycoreutils-2.0.85/gui/html_util.py
 --- nsapolicycoreutils/gui/html_util.py	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.85/gui/html_util.py	2010-12-21 16:16:39.000000000 -0500
++++ policycoreutils-2.0.85/gui/html_util.py	2011-01-06 16:45:14.000000000 -0500
 @@ -0,0 +1,164 @@
 +# Authors: John Dennis <jdennis at redhat.com>
 +#
@@ -804,7 +804,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/html_util.py policyc
 +
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/lockdown.glade policycoreutils-2.0.85/gui/lockdown.glade
 --- nsapolicycoreutils/gui/lockdown.glade	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.85/gui/lockdown.glade	2010-12-21 16:16:39.000000000 -0500
++++ policycoreutils-2.0.85/gui/lockdown.glade	2011-01-06 16:45:14.000000000 -0500
 @@ -0,0 +1,771 @@
 +<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
 +<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
@@ -1579,7 +1579,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/lockdown.glade polic
 +</glade-interface>
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/lockdown.gladep policycoreutils-2.0.85/gui/lockdown.gladep
 --- nsapolicycoreutils/gui/lockdown.gladep	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.85/gui/lockdown.gladep	2010-12-21 16:16:39.000000000 -0500
++++ policycoreutils-2.0.85/gui/lockdown.gladep	2011-01-06 16:45:14.000000000 -0500
 @@ -0,0 +1,7 @@
 +<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
 +<!DOCTYPE glade-project SYSTEM "http://glade.gnome.org/glade-project-2.0.dtd">
@@ -1590,7 +1590,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/lockdown.gladep poli
 +</glade-project>
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/lockdown.py policycoreutils-2.0.85/gui/lockdown.py
 --- nsapolicycoreutils/gui/lockdown.py	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.85/gui/lockdown.py	2010-12-21 16:16:39.000000000 -0500
++++ policycoreutils-2.0.85/gui/lockdown.py	2011-01-06 16:45:14.000000000 -0500
 @@ -0,0 +1,382 @@
 +#!/usr/bin/python -Es
 +#
@@ -1976,7 +1976,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/lockdown.py policyco
 +    app.stand_alone()
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/loginsPage.py policycoreutils-2.0.85/gui/loginsPage.py
 --- nsapolicycoreutils/gui/loginsPage.py	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.85/gui/loginsPage.py	2011-01-04 17:02:41.000000000 -0500
++++ policycoreutils-2.0.85/gui/loginsPage.py	2011-01-06 16:45:14.000000000 -0500
 @@ -0,0 +1,185 @@
 +## loginsPage.py - show selinux mappings
 +## Copyright (C) 2006 Red Hat, Inc.
@@ -2165,7 +2165,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/loginsPage.py policy
 +
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/Makefile policycoreutils-2.0.85/gui/Makefile
 --- nsapolicycoreutils/gui/Makefile	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.85/gui/Makefile	2010-12-21 16:16:39.000000000 -0500
++++ policycoreutils-2.0.85/gui/Makefile	2011-01-06 16:45:14.000000000 -0500
 @@ -0,0 +1,40 @@
 +# Installation directories.
 +PREFIX ?= ${DESTDIR}/usr
@@ -2209,7 +2209,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/Makefile policycoreu
 +relabel:
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/mappingsPage.py policycoreutils-2.0.85/gui/mappingsPage.py
 --- nsapolicycoreutils/gui/mappingsPage.py	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.85/gui/mappingsPage.py	2010-12-21 16:16:39.000000000 -0500
++++ policycoreutils-2.0.85/gui/mappingsPage.py	2011-01-06 16:45:14.000000000 -0500
 @@ -0,0 +1,56 @@
 +## mappingsPage.py - show selinux mappings
 +## Copyright (C) 2006 Red Hat, Inc.
@@ -2269,7 +2269,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/mappingsPage.py poli
 +
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/modulesPage.py policycoreutils-2.0.85/gui/modulesPage.py
 --- nsapolicycoreutils/gui/modulesPage.py	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.85/gui/modulesPage.py	2010-12-21 16:16:39.000000000 -0500
++++ policycoreutils-2.0.85/gui/modulesPage.py	2011-01-06 16:45:14.000000000 -0500
 @@ -0,0 +1,190 @@
 +## modulesPage.py - show selinux mappings
 +## Copyright (C) 2006-2009 Red Hat, Inc.
@@ -2463,7 +2463,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/modulesPage.py polic
 +            self.error(e.args[0])
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/polgen.glade policycoreutils-2.0.85/gui/polgen.glade
 --- nsapolicycoreutils/gui/polgen.glade	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.85/gui/polgen.glade	2010-12-21 16:16:39.000000000 -0500
++++ policycoreutils-2.0.85/gui/polgen.glade	2011-01-06 16:45:14.000000000 -0500
 @@ -0,0 +1,3305 @@
 +<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
 +<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
@@ -5772,7 +5772,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/polgen.glade policyc
 +</glade-interface>
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/polgen.gladep policycoreutils-2.0.85/gui/polgen.gladep
 --- nsapolicycoreutils/gui/polgen.gladep	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.85/gui/polgen.gladep	2010-12-21 16:16:39.000000000 -0500
++++ policycoreutils-2.0.85/gui/polgen.gladep	2011-01-06 16:45:14.000000000 -0500
 @@ -0,0 +1,7 @@
 +<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
 +<!DOCTYPE glade-project SYSTEM "http://glade.gnome.org/glade-project-2.0.dtd">
@@ -5783,8 +5783,8 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/polgen.gladep policy
 +</glade-project>
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/polgengui.py policycoreutils-2.0.85/gui/polgengui.py
 --- nsapolicycoreutils/gui/polgengui.py	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.85/gui/polgengui.py	2011-01-04 17:02:52.000000000 -0500
-@@ -0,0 +1,657 @@
++++ policycoreutils-2.0.85/gui/polgengui.py	2011-01-10 14:24:00.000000000 -0500
+@@ -0,0 +1,662 @@
 +#!/usr/bin/python -Es
 +#
 +# polgengui.py - GUI for SELinux Config tool in system-config-selinux
@@ -6295,7 +6295,8 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/polgengui.py policyc
 +        self.druid = self.xml.get_widget("druid")
 +        self.type = 0
 +        self.name_entry = self.xml.get_widget("name_entry")
-+        self.name_entry.connect("focus_out_event",self.on_name_entry_changed)
++        self.name_entry.connect("insert_text",self.on_name_entry_changed)
++        self.name_entry.connect("focus_out_event",self.on_focus_out_event)
 +        self.exec_entry = self.xml.get_widget("exec_entry")
 +        self.exec_button = self.xml.get_widget("exec_button")
 +        self.init_script_entry = self.xml.get_widget("init_script_entry")
@@ -6344,7 +6345,11 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/polgengui.py policyc
 +            return
 +        self.output_entry.set_text(self.file_dialog.get_filename())
 +        
-+    def on_name_entry_changed(self, entry, third):
++    def on_name_entry_changed(self, entry, text, size, position):
++        if text.find(" ") >= 0:
++            entry.emit_stop_by_name("insert_text")
++            
++    def on_focus_out_event(self, entry, third):
 +        name = entry.get_text()
 +        if self.name != name:
 +            if name in self.all_types:
@@ -6444,7 +6449,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/polgengui.py policyc
 +    app.stand_alone()
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/polgen.py policycoreutils-2.0.85/gui/polgen.py
 --- nsapolicycoreutils/gui/polgen.py	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.85/gui/polgen.py	2010-12-21 16:16:39.000000000 -0500
++++ policycoreutils-2.0.85/gui/polgen.py	2011-01-06 16:45:14.000000000 -0500
 @@ -0,0 +1,1311 @@
 +#!/usr/bin/python -Es
 +#
@@ -7759,7 +7764,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/polgen.py policycore
 +        usage(e)
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/portsPage.py policycoreutils-2.0.85/gui/portsPage.py
 --- nsapolicycoreutils/gui/portsPage.py	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.85/gui/portsPage.py	2010-12-21 16:16:39.000000000 -0500
++++ policycoreutils-2.0.85/gui/portsPage.py	2011-01-06 16:45:14.000000000 -0500
 @@ -0,0 +1,259 @@
 +## portsPage.py - show selinux mappings
 +## Copyright (C) 2006 Red Hat, Inc.
@@ -8022,7 +8027,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/portsPage.py policyc
 +        
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/selinux.tbl policycoreutils-2.0.85/gui/selinux.tbl
 --- nsapolicycoreutils/gui/selinux.tbl	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.85/gui/selinux.tbl	2010-12-21 16:16:39.000000000 -0500
++++ policycoreutils-2.0.85/gui/selinux.tbl	2011-01-06 16:45:14.000000000 -0500
 @@ -0,0 +1,234 @@
 +acct_disable_trans _("SELinux Service Protection") _("Disable SELinux protection for acct daemon")
 +allow_daemons_dump_core _("Admin") _("Allow all daemons to write corefiles to /")
@@ -8260,7 +8265,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/selinux.tbl policyco
 +
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/semanagePage.py policycoreutils-2.0.85/gui/semanagePage.py
 --- nsapolicycoreutils/gui/semanagePage.py	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.85/gui/semanagePage.py	2010-12-21 16:16:40.000000000 -0500
++++ policycoreutils-2.0.85/gui/semanagePage.py	2011-01-06 16:45:14.000000000 -0500
 @@ -0,0 +1,168 @@
 +## semanagePage.py - show selinux mappings
 +## Copyright (C) 2006 Red Hat, Inc.
@@ -8432,7 +8437,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/semanagePage.py poli
 +        
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/statusPage.py policycoreutils-2.0.85/gui/statusPage.py
 --- nsapolicycoreutils/gui/statusPage.py	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.85/gui/statusPage.py	2010-12-21 16:16:40.000000000 -0500
++++ policycoreutils-2.0.85/gui/statusPage.py	2011-01-06 16:45:14.000000000 -0500
 @@ -0,0 +1,190 @@
 +# statusPage.py - show selinux status
 +## Copyright (C) 2006-2009 Red Hat, Inc.
@@ -8626,7 +8631,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/statusPage.py policy
 +
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/system-config-selinux.glade policycoreutils-2.0.85/gui/system-config-selinux.glade
 --- nsapolicycoreutils/gui/system-config-selinux.glade	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.85/gui/system-config-selinux.glade	2010-12-21 16:16:40.000000000 -0500
++++ policycoreutils-2.0.85/gui/system-config-selinux.glade	2011-01-06 16:45:14.000000000 -0500
 @@ -0,0 +1,3024 @@
 +<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
 +<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
@@ -11654,7 +11659,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/system-config-selinu
 +</glade-interface>
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/system-config-selinux.gladep policycoreutils-2.0.85/gui/system-config-selinux.gladep
 --- nsapolicycoreutils/gui/system-config-selinux.gladep	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.85/gui/system-config-selinux.gladep	2010-12-21 16:16:40.000000000 -0500
++++ policycoreutils-2.0.85/gui/system-config-selinux.gladep	2011-01-06 16:45:14.000000000 -0500
 @@ -0,0 +1,7 @@
 +<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
 +<!DOCTYPE glade-project SYSTEM "http://glade.gnome.org/glade-project-2.0.dtd">
@@ -11665,7 +11670,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/system-config-selinu
 +</glade-project>
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/system-config-selinux.py policycoreutils-2.0.85/gui/system-config-selinux.py
 --- nsapolicycoreutils/gui/system-config-selinux.py	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.85/gui/system-config-selinux.py	2010-12-21 16:16:40.000000000 -0500
++++ policycoreutils-2.0.85/gui/system-config-selinux.py	2011-01-06 16:45:14.000000000 -0500
 @@ -0,0 +1,187 @@
 +#!/usr/bin/python -Es
 +#
@@ -11856,7 +11861,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/system-config-selinu
 +    app.stand_alone()
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/boolean.py policycoreutils-2.0.85/gui/templates/boolean.py
 --- nsapolicycoreutils/gui/templates/boolean.py	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.85/gui/templates/boolean.py	2010-12-21 16:16:40.000000000 -0500
++++ policycoreutils-2.0.85/gui/templates/boolean.py	2011-01-06 16:45:14.000000000 -0500
 @@ -0,0 +1,40 @@
 +# Copyright (C) 2007 Red Hat 
 +# see file 'COPYING' for use and warranty information
@@ -11900,7 +11905,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/boolean.py
 +
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/etc_rw.py policycoreutils-2.0.85/gui/templates/etc_rw.py
 --- nsapolicycoreutils/gui/templates/etc_rw.py	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.85/gui/templates/etc_rw.py	2010-12-21 16:16:40.000000000 -0500
++++ policycoreutils-2.0.85/gui/templates/etc_rw.py	2011-01-06 16:45:14.000000000 -0500
 @@ -0,0 +1,113 @@
 +# Copyright (C) 2007 Red Hat 
 +# see file 'COPYING' for use and warranty information
@@ -12017,7 +12022,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/etc_rw.py
 +"""
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/executable.py policycoreutils-2.0.85/gui/templates/executable.py
 --- nsapolicycoreutils/gui/templates/executable.py	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.85/gui/templates/executable.py	2010-12-21 16:16:40.000000000 -0500
++++ policycoreutils-2.0.85/gui/templates/executable.py	2011-01-06 16:45:14.000000000 -0500
 @@ -0,0 +1,393 @@
 +# Copyright (C) 2007-2009 Red Hat 
 +# see file 'COPYING' for use and warranty information
@@ -12414,7 +12419,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/executable
 +"""
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/__init__.py policycoreutils-2.0.85/gui/templates/__init__.py
 --- nsapolicycoreutils/gui/templates/__init__.py	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.85/gui/templates/__init__.py	2010-12-21 16:16:40.000000000 -0500
++++ policycoreutils-2.0.85/gui/templates/__init__.py	2011-01-06 16:45:14.000000000 -0500
 @@ -0,0 +1,18 @@
 +#
 +# Copyright (C) 2007 Red Hat, Inc.
@@ -12436,7 +12441,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/__init__.p
 +
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/network.py policycoreutils-2.0.85/gui/templates/network.py
 --- nsapolicycoreutils/gui/templates/network.py	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.85/gui/templates/network.py	2010-12-21 16:16:40.000000000 -0500
++++ policycoreutils-2.0.85/gui/templates/network.py	2011-01-06 16:45:14.000000000 -0500
 @@ -0,0 +1,80 @@
 +te_port_types="""
 +type TEMPLATETYPE_port_t;
@@ -12520,7 +12525,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/network.py
 +
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/polgen.py policycoreutils-2.0.85/gui/templates/polgen.py
 --- nsapolicycoreutils/gui/templates/polgen.py	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.85/gui/templates/polgen.py	2010-12-21 16:16:40.000000000 -0500
++++ policycoreutils-2.0.85/gui/templates/polgen.py	2011-01-06 16:45:14.000000000 -0500
 @@ -0,0 +1,1303 @@
 +#!/usr/bin/python -Es
 +#
@@ -13827,7 +13832,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/polgen.py
 +        usage(e)
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/rw.py policycoreutils-2.0.85/gui/templates/rw.py
 --- nsapolicycoreutils/gui/templates/rw.py	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.85/gui/templates/rw.py	2010-12-21 16:16:40.000000000 -0500
++++ policycoreutils-2.0.85/gui/templates/rw.py	2011-01-06 16:45:14.000000000 -0500
 @@ -0,0 +1,131 @@
 +# Copyright (C) 2007 Red Hat 
 +# see file 'COPYING' for use and warranty information
@@ -13962,7 +13967,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/rw.py poli
 +"""
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/script.py policycoreutils-2.0.85/gui/templates/script.py
 --- nsapolicycoreutils/gui/templates/script.py	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.85/gui/templates/script.py	2010-12-21 16:16:40.000000000 -0500
++++ policycoreutils-2.0.85/gui/templates/script.py	2011-01-06 16:45:14.000000000 -0500
 @@ -0,0 +1,126 @@
 +# Copyright (C) 2007 Red Hat 
 +# see file 'COPYING' for use and warranty information
@@ -14092,7 +14097,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/script.py
 +"""
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/semodule.py policycoreutils-2.0.85/gui/templates/semodule.py
 --- nsapolicycoreutils/gui/templates/semodule.py	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.85/gui/templates/semodule.py	2010-12-21 16:16:40.000000000 -0500
++++ policycoreutils-2.0.85/gui/templates/semodule.py	2011-01-06 16:45:14.000000000 -0500
 @@ -0,0 +1,41 @@
 +# Copyright (C) 2007 Red Hat 
 +# see file 'COPYING' for use and warranty information
@@ -14137,7 +14142,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/semodule.p
 +
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/tmp.py policycoreutils-2.0.85/gui/templates/tmp.py
 --- nsapolicycoreutils/gui/templates/tmp.py	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.85/gui/templates/tmp.py	2010-12-21 16:16:40.000000000 -0500
++++ policycoreutils-2.0.85/gui/templates/tmp.py	2011-01-06 16:45:14.000000000 -0500
 @@ -0,0 +1,102 @@
 +# Copyright (C) 2007 Red Hat 
 +# see file 'COPYING' for use and warranty information
@@ -14243,7 +14248,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/tmp.py pol
 +"""
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/user.py policycoreutils-2.0.85/gui/templates/user.py
 --- nsapolicycoreutils/gui/templates/user.py	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.85/gui/templates/user.py	2010-12-21 16:16:40.000000000 -0500
++++ policycoreutils-2.0.85/gui/templates/user.py	2011-01-06 16:45:14.000000000 -0500
 @@ -0,0 +1,205 @@
 +# Copyright (C) 2007 Red Hat 
 +# see file 'COPYING' for use and warranty information
@@ -14452,7 +14457,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/user.py po
 +"""
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/var_cache.py policycoreutils-2.0.85/gui/templates/var_cache.py
 --- nsapolicycoreutils/gui/templates/var_cache.py	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.85/gui/templates/var_cache.py	2010-12-21 16:16:40.000000000 -0500
++++ policycoreutils-2.0.85/gui/templates/var_cache.py	2011-01-06 16:45:14.000000000 -0500
 @@ -0,0 +1,133 @@
 +# Copyright (C) 2010 Red Hat 
 +# see file 'COPYING' for use and warranty information
@@ -14589,7 +14594,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/var_cache.
 +"""
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/var_lib.py policycoreutils-2.0.85/gui/templates/var_lib.py
 --- nsapolicycoreutils/gui/templates/var_lib.py	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.85/gui/templates/var_lib.py	2010-12-21 16:16:40.000000000 -0500
++++ policycoreutils-2.0.85/gui/templates/var_lib.py	2011-01-06 16:45:14.000000000 -0500
 @@ -0,0 +1,161 @@
 +# Copyright (C) 2007 Red Hat 
 +# see file 'COPYING' for use and warranty information
@@ -14754,7 +14759,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/var_lib.py
 +"""
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/var_log.py policycoreutils-2.0.85/gui/templates/var_log.py
 --- nsapolicycoreutils/gui/templates/var_log.py	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.85/gui/templates/var_log.py	2010-12-21 16:16:40.000000000 -0500
++++ policycoreutils-2.0.85/gui/templates/var_log.py	2011-01-06 16:45:14.000000000 -0500
 @@ -0,0 +1,116 @@
 +# Copyright (C) 2007,2010 Red Hat 
 +# see file 'COPYING' for use and warranty information
@@ -14874,7 +14879,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/var_log.py
 +
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/var_run.py policycoreutils-2.0.85/gui/templates/var_run.py
 --- nsapolicycoreutils/gui/templates/var_run.py	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.85/gui/templates/var_run.py	2010-12-21 16:16:40.000000000 -0500
++++ policycoreutils-2.0.85/gui/templates/var_run.py	2011-01-06 16:45:14.000000000 -0500
 @@ -0,0 +1,101 @@
 +# Copyright (C) 2007,2010 Red Hat 
 +# see file 'COPYING' for use and warranty information
@@ -14979,7 +14984,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/var_run.py
 +"""
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/var_spool.py policycoreutils-2.0.85/gui/templates/var_spool.py
 --- nsapolicycoreutils/gui/templates/var_spool.py	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.85/gui/templates/var_spool.py	2010-12-21 16:16:40.000000000 -0500
++++ policycoreutils-2.0.85/gui/templates/var_spool.py	2011-01-06 16:45:14.000000000 -0500
 @@ -0,0 +1,133 @@
 +# Copyright (C) 2007 Red Hat 
 +# see file 'COPYING' for use and warranty information
@@ -15116,7 +15121,7 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/templates/var_spool.
 +"""
 diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/usersPage.py policycoreutils-2.0.85/gui/usersPage.py
 --- nsapolicycoreutils/gui/usersPage.py	1969-12-31 19:00:00.000000000 -0500
-+++ policycoreutils-2.0.85/gui/usersPage.py	2010-12-21 16:16:40.000000000 -0500
++++ policycoreutils-2.0.85/gui/usersPage.py	2011-01-06 16:45:14.000000000 -0500
 @@ -0,0 +1,150 @@
 +## usersPage.py - show selinux mappings
 +## Copyright (C) 2006,2007,2008 Red Hat, Inc.
diff --git a/policycoreutils.spec b/policycoreutils.spec
index f5b123c..2308089 100644
--- a/policycoreutils.spec
+++ b/policycoreutils.spec
@@ -7,7 +7,7 @@
 Summary: SELinux policy core utilities
 Name:	 policycoreutils
 Version: 2.0.83
-Release: 33.7%{?dist}
+Release: 33.8%{?dist}
 License: GPLv2
 Group:	 System Environment/Base
 Source:  http://www.nsa.gov/selinux/archives/policycoreutils-%{version}.tgz
@@ -317,6 +317,11 @@ fi
 exit 0
 
 %changelog
+* Mon Jan 10 2011 Dan Walsh <dwalsh at redhat.com> 2.0.83-33.8
+- Fix handling of getopt errors in semanage
+- Raise proper exceptions
+- Do not allow modules names to contain spaces
+
 * Thu Jan 6 2011 Dan Walsh <dwalsh at redhat.com> 2.0.83-33.7
 - Warn on errors to run setsebool as root
 


More information about the scm-commits mailing list