[policycoreutils] Need to provide a value to semanage boolean -m

Daniel J Walsh dwalsh at fedoraproject.org
Tue Mar 5 16:20:11 UTC 2013


commit b4e4f79ed552f419ff1ef2c200d640692626b4dc
Author: Dan Walsh <dwalsh at redhat.com>
Date:   Tue Mar 5 11:20:07 2013 -0500

    Need to provide a value to semanage boolean -m

 policycoreutils-rhat.patch |   32 ++++++++++++++++++++++++++++++--
 policycoreutils.spec       |    5 ++++-
 2 files changed, 34 insertions(+), 3 deletions(-)
---
diff --git a/policycoreutils-rhat.patch b/policycoreutils-rhat.patch
index 4e6683b..7866404 100644
--- a/policycoreutils-rhat.patch
+++ b/policycoreutils-rhat.patch
@@ -1921,7 +1921,7 @@ index 0000000..e2befdb
 +      packages=["policycoreutils"],
 +)
 diff --git a/policycoreutils/semanage/semanage b/policycoreutils/semanage/semanage
-index 6e33c85..49e4709 100644
+index 6e33c85..89b8b24 100644
 --- a/policycoreutils/semanage/semanage
 +++ b/policycoreutils/semanage/semanage
 @@ -20,6 +20,7 @@
@@ -1941,8 +1941,26 @@ index 6e33c85..49e4709 100644
                         codeset = 'utf-8')
  except IOError:
         import __builtin__
+@@ -60,7 +61,7 @@ semanage interface -{a|d|m|l|D|E} [-Nntr] interface_spec
+ semanage module -{a|d|m} [--enable|--disable] [-N] module
+ semanage node -{a|d|m|l|D|E} [-Nntr] [ -p protocol ] [-M netmask] addr
+ semanage fcontext -{a|d|m|l|D|E} [-Nefnrst] file_spec
+-semanage boolean -{d|m} [--on|--off|-1|-0] [-N] -F boolean | boolean_file
++semanage boolean -{d|m} {--on|--off|-1|-0} [-N] -F boolean | boolean_file
+ semanage permissive -{d|a|l} [-Nn] type
+ semanage dontaudit [ on | off ] [-N]
+ 
+@@ -444,6 +445,8 @@ Object-specific Options (see above):
+ 
+ 		if modify:
+ 			if object == "boolean":
++                                if not value:
++                                       raise ValueError(_("Value Required [ --on | --off ]"))
+ 				OBJECT.modify(target, value, use_file)
+ 				return
+ 
 diff --git a/policycoreutils/semanage/seobject.py b/policycoreutils/semanage/seobject.py
-index 85bc37f..02b1acd 100644
+index 85bc37f..f703aed 100644
 --- a/policycoreutils/semanage/seobject.py
 +++ b/policycoreutils/semanage/seobject.py
 @@ -32,11 +32,10 @@ from IPy import IP
@@ -2012,6 +2030,16 @@ index 85bc37f..02b1acd 100644
  
  		(rc, fcontext) = semanage_fcontext_create(self.sh)
  		if rc < 0:
+@@ -2026,6 +2031,9 @@ class booleanRecords(semanageRecords):
+ 			self.modify_local = False
+ 
+ 	def __mod(self, name, value):
++		if not value:
++			raise ValueError(_("Value Required for %s") % name)
++                                       
+                 name = selinux.selinux_boolean_sub(name)
+ 
+                 (rc, k) = semanage_bool_key_create(self.sh, name)
 diff --git a/policycoreutils/semodule/Makefile b/policycoreutils/semodule/Makefile
 index 4c5243a..036c418 100644
 --- a/policycoreutils/semodule/Makefile
diff --git a/policycoreutils.spec b/policycoreutils.spec
index d22ab55..ada0e37 100644
--- a/policycoreutils.spec
+++ b/policycoreutils.spec
@@ -7,7 +7,7 @@
 Summary: SELinux policy core utilities
 Name:	 policycoreutils
 Version: 2.1.14
-Release: 17%{?dist}
+Release: 18%{?dist}
 License: GPLv2
 Group:	 System Environment/Base
 # Based on git repository with tag 20101221
@@ -310,6 +310,9 @@ The policycoreutils-restorecond package contains the restorecond service.
 %{_bindir}/systemctl try-restart restorecond.service >/dev/null 2>&1 || :
 
 %changelog
+* Tue Mar 5 2013 Dan Walsh <dwalsh at redhat.com> - 2.1.14-18
+- Need to provide a value to semanage boolean -m
+
 * Mon Mar 4 2013 Dan Walsh <dwalsh at redhat.com> - 2.1.14-17
 - Fix cut and paste errors for sepolicy network command
 


More information about the scm-commits mailing list