|
From: <ssm...@us...> - 2008-01-28 13:12:10
|
Revision: 2764
http://selinux.svn.sourceforge.net/selinux/?rev=2764&view=rev
Author: ssmalley
Date: 2008-01-28 05:12:08 -0800 (Mon, 28 Jan 2008)
Log Message:
-----------
Author: Dan Walsh
Email: dw...@re...
Subject: Fix audit2why and semanage boolean
Date: Fri, 25 Jan 11:12:17 -0500
Remove path argument from audit2why.init call.
Add support for --on, --off, -1, and -0 to semanage boolean.
Modified Paths:
--------------
trunk/policycoreutils/audit2allow/audit2allow
trunk/policycoreutils/semanage/semanage
Modified: trunk/policycoreutils/audit2allow/audit2allow
===================================================================
--- trunk/policycoreutils/audit2allow/audit2allow 2008-01-28 13:06:00 UTC (rev 2763)
+++ trunk/policycoreutils/audit2allow/audit2allow 2008-01-28 13:12:08 UTC (rev 2764)
@@ -221,7 +221,7 @@
import selinux
import selinux.audit2why as audit2why
import seobject
- audit2why.init("%s.%s" % (selinux.selinux_binary_policy_path(), selinux.security_policyvers()))
+ audit2why.init()
for i in self.__parser.avc_msgs:
rc, bools = audit2why.analyze(i.scontext.to_string(), i.tcontext.to_string(), i.tclass, i.accesses)
if rc >= 0:
Modified: trunk/policycoreutils/semanage/semanage
===================================================================
--- trunk/policycoreutils/semanage/semanage 2008-01-28 13:06:00 UTC (rev 2763)
+++ trunk/policycoreutils/semanage/semanage 2008-01-28 13:12:08 UTC (rev 2764)
@@ -111,7 +111,7 @@
valid_option["translation"] = []
valid_option["translation"] += valid_everyone + [ '-T', '--trans' ]
valid_option["boolean"] = []
- valid_option["boolean"] += valid_everyone
+ valid_option["boolean"] += valid_everyone + [ '--on', "--off", "-1", "-0" ]
return valid_option
#
@@ -131,7 +131,7 @@
seuser = ""
prefix = ""
heading=1
-
+ value=0
add = 0
modify = 0
delete = 0
@@ -150,7 +150,7 @@
args = sys.argv[2:]
gopts, cmds = getopt.getopt(args,
- 'adf:lhmnp:s:CDR:L:r:t:T:P:S:',
+ '01adf:lhmnp:s:CDR:L:r:t:T:P:S:',
['add',
'delete',
'deleteall',
@@ -160,6 +160,8 @@
'modify',
'noheading',
'localist',
+ 'off',
+ 'on',
'proto=',
'seuser=',
'store=',
@@ -238,6 +240,11 @@
if o == "-T" or o == "--trans":
setrans = a
+ if o == "--on" or o == "-1":
+ value = 1
+ if o == "-off" or o == "-0":
+ value = 0
+
if object == "login":
OBJECT = seobject.loginRecords(store)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|