* Thu Apr 15 2010 Dan Walsh <dwalsh@redhat.com> 2.0.82-7

- Fix crash when args are empty
Resolves: #582542
- Fix semange to exit on bad options
- Fix semanage dontaudit man page section
Resolves: #582533
This commit is contained in:
Daniel J Walsh 2010-04-16 13:32:29 +00:00
parent cb03303e2a
commit 3036511cda
2 changed files with 41 additions and 18 deletions

View File

@ -2862,7 +2862,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.23 --exclude=gui --exclude=po
+)
diff --exclude-from=exclude --exclude=sepolgen-1.0.23 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/semanage/semanage policycoreutils-2.0.82/semanage/semanage
--- nsapolicycoreutils/semanage/semanage 2009-11-18 17:06:03.000000000 -0500
+++ policycoreutils-2.0.82/semanage/semanage 2010-04-14 08:59:57.000000000 -0400
+++ policycoreutils-2.0.82/semanage/semanage 2010-04-15 11:14:01.000000000 -0400
@@ -20,6 +20,7 @@
# 02111-1307 USA
#
@ -2966,7 +2966,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.23 --exclude=gui --exclude=po
serange = ""
port = ""
proto = ""
@@ -184,10 +203,14 @@
@@ -184,11 +203,17 @@
modify = False
delete = False
deleteall = False
@ -2979,9 +2979,12 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.23 --exclude=gui --exclude=po
store = ""
+ equal=""
+ if len(argv) == 0:
+ return
object = argv[0]
option_dict=get_options()
@@ -197,10 +220,14 @@
if object not in option_dict.keys():
@@ -197,10 +222,14 @@
args = argv[1:]
gopts, cmds = getopt.getopt(args,
@ -2997,7 +3000,12 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.23 --exclude=gui --exclude=po
'ftype=',
'file',
'help',
@@ -228,26 +255,42 @@
@@ -225,29 +254,47 @@
for o, a in gopts:
if o not in option_dict[object]:
sys.stderr.write(_("%s not valid for %s objects\n") % ( o, object) );
+
+ return
for o,a in gopts:
if o == "-a" or o == "--add":
@ -3047,7 +3055,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.23 --exclude=gui --exclude=po
if o == "-n" or o == "--noheading":
heading = False
@@ -256,8 +299,7 @@
@@ -256,8 +303,7 @@
locallist = True
if o == "-m"or o == "--modify":
@ -3057,7 +3065,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.23 --exclude=gui --exclude=po
modify = True
if o == "-S" or o == '--store':
@@ -292,8 +334,10 @@
@@ -292,8 +338,10 @@
if o == "--on" or o == "-1":
value = "on"
@ -3068,7 +3076,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.23 --exclude=gui --exclude=po
if object == "login":
OBJECT = seobject.loginRecords(store)
@@ -315,6 +359,11 @@
@@ -315,6 +363,11 @@
if object == "boolean":
OBJECT = seobject.booleanRecords(store)
@ -3080,7 +3088,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.23 --exclude=gui --exclude=po
if object == "permissive":
OBJECT = seobject.permissiveRecords(store)
@@ -330,8 +379,13 @@
@@ -330,65 +383,97 @@
OBJECT.deleteall()
return
@ -3095,7 +3103,15 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.23 --exclude=gui --exclude=po
target = cmds[0]
@@ -344,51 +398,79 @@
-
if object == "dontaudit":
- OBJECT = seobject.dontauditClass(store)
- OBJECT.toggle(target)
- return
+ OBJECT = seobject.dontauditClass(store)
+ OBJECT.toggle(target)
+ return
if add:
if object == "login":
OBJECT.add(target, seuser, serange)
@ -3182,7 +3198,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.23 --exclude=gui --exclude=po
if delete:
if object == "port":
OBJECT.delete(target, proto)
@@ -401,15 +483,14 @@
@@ -401,15 +486,14 @@
else:
OBJECT.delete(target)
@ -3200,7 +3216,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.23 --exclude=gui --exclude=po
input = None
store = ""
@@ -417,7 +498,7 @@
@@ -417,7 +501,7 @@
usage(_("Requires 2 or more arguments"))
gopts, cmds = getopt.getopt(sys.argv[1:],
@ -3209,7 +3225,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.23 --exclude=gui --exclude=po
['add',
'delete',
'deleteall',
@@ -431,6 +512,7 @@
@@ -431,6 +515,7 @@
'localist',
'off',
'on',
@ -3217,7 +3233,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.23 --exclude=gui --exclude=po
'proto=',
'seuser=',
'store=',
@@ -438,6 +520,7 @@
@@ -438,6 +523,7 @@
'level=',
'roles=',
'type=',
@ -3225,7 +3241,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.23 --exclude=gui --exclude=po
'prefix='
])
for o, a in gopts:
@@ -445,6 +528,16 @@
@@ -445,6 +531,16 @@
store = a
if o == "-i" or o == '--input':
input = a
@ -3242,7 +3258,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.23 --exclude=gui --exclude=po
if input != None:
if input == "-":
@@ -467,3 +560,5 @@
@@ -467,3 +563,5 @@
errorExit(_("Invalid value %s") % error.args[0])
except IOError, error:
errorExit(error.args[1])
@ -3250,7 +3266,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.23 --exclude=gui --exclude=po
+ errorExit(error.args[1])
diff --exclude-from=exclude --exclude=sepolgen-1.0.23 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/semanage/semanage.8 policycoreutils-2.0.82/semanage/semanage.8
--- nsapolicycoreutils/semanage/semanage.8 2009-11-18 17:06:03.000000000 -0500
+++ policycoreutils-2.0.82/semanage/semanage.8 2010-03-24 16:12:21.000000000 -0400
+++ policycoreutils-2.0.82/semanage/semanage.8 2010-04-15 11:15:29.000000000 -0400
@@ -1,27 +1,58 @@
-.TH "semanage" "8" "2005111103" "" ""
+.TH "semanage" "8" "20100223" "" ""
@ -3317,7 +3333,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.23 --exclude=gui --exclude=po
+Disable/Enable dontaudit rules in policy
.br
-.B semanage dontaudit [ on | off ]
+.B semanage dontaudit [\-S store] \-{l|n|D} [ on | off ]
+.B semanage dontaudit [\-S store] [ on | off ]
.P
.SH "DESCRIPTION"

View File

@ -7,7 +7,7 @@
Summary: SELinux policy core utilities
Name: policycoreutils
Version: 2.0.82
Release: 6%{?dist}
Release: 7%{?dist}
License: GPLv2+
Group: System Environment/Base
Source: http://www.nsa.gov/selinux/archives/policycoreutils-%{version}.tgz
@ -305,6 +305,13 @@ fi
exit 0
%changelog
* Thu Apr 15 2010 Dan Walsh <dwalsh@redhat.com> 2.0.82-7
- Fix crash when args are empty
Resolves: #582542
- Fix semange to exit on bad options
- Fix semanage dontaudit man page section
Resolves: #582533
* Wed Apr 14 2010 Dan Walsh <dwalsh@redhat.com> 2.0.82-6
- Remove debug line from semanage
- Update po