* Thu Aug 7 2008 Dan Walsh <dwalsh@redhat.com> 2.0.54-3

- Fixes for multiple transactions
This commit is contained in:
Daniel J Walsh 2008-08-07 12:21:01 +00:00
parent 875701c42a
commit c7da14e85c
2 changed files with 31 additions and 17 deletions

View File

@ -17,7 +17,7 @@ diff -b -B --exclude-from=exclude --exclude=sepolgen-1.0.13 --exclude=gui --excl
/etc/mtab
diff -b -B --exclude-from=exclude --exclude=sepolgen-1.0.13 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/semanage/semanage policycoreutils-2.0.54/semanage/semanage
--- nsapolicycoreutils/semanage/semanage 2008-08-05 09:58:26.000000000 -0400
+++ policycoreutils-2.0.54/semanage/semanage 2008-08-06 18:05:28.000000000 -0400
+++ policycoreutils-2.0.54/semanage/semanage 2008-08-07 08:18:35.000000000 -0400
@@ -20,7 +20,7 @@
# 02111-1307 USA
#
@ -58,7 +58,7 @@ diff -b -B --exclude-from=exclude --exclude=sepolgen-1.0.13 --exclude=gui --excl
def errorExit(error):
sys.stderr.write("%s: " % sys.argv[0])
@@ -120,12 +122,42 @@
@@ -120,12 +122,53 @@
valid_option["permissive"] += [ '-a', '--add', '-d', '--delete', '-l', '--list', '-h', '--help', '-n', '--noheading', '-D', '--deleteall' ]
return valid_option
@ -75,18 +75,29 @@ diff -b -B --exclude-from=exclude --exclude=sepolgen-1.0.13 --exclude=gui --excl
+ ret = []
+ i = 0
+ while i < len(l):
+ if dquote in l[i]:
+ cnt = len(re.findall(dquote, l[i]))
+ if cnt > 1:
+ ret.append(l[i].strip(dquote))
+ i = i + 1
+ continue
+ if cnt == 1:
+ quote = [ l[i].strip(dquote) ]
+ i = i + 1
+
+ while i < len(l) and dquote not in l[i]:
+ quote.append(l[i])
+ i = i + 1
+
+ quote.append(l[i].strip(dquote))
+ ret.append(" ".join(quote))
+ i = i + 1
+ continue
+ if squote in l[i]:
+
+ cnt = len(re.findall(squote, l[i]))
+ if cnt > 1:
+ ret.append(l[i].strip(squote))
+ i = i + 1
+ continue
+ if cnt == 1:
+ quote = [ l[i].strip(squote) ]
+ i = i + 1
+ while i < len(l) and squote not in l[i]:
@ -107,7 +118,7 @@ diff -b -B --exclude-from=exclude --exclude=sepolgen-1.0.13 --exclude=gui --excl
serange = ""
port = ""
proto = ""
@@ -146,24 +178,23 @@
@@ -146,24 +189,23 @@
locallist = False
use_file = False
store = ""
@ -136,7 +147,7 @@ diff -b -B --exclude-from=exclude --exclude=sepolgen-1.0.13 --exclude=gui --excl
'list',
'modify',
'noheading',
@@ -187,16 +218,16 @@
@@ -187,16 +229,16 @@
for o,a in gopts:
if o == "-a" or o == "--add":
if modify or delete:
@ -156,7 +167,7 @@ diff -b -B --exclude-from=exclude --exclude=sepolgen-1.0.13 --exclude=gui --excl
deleteall = True
if o == "-f" or o == "--ftype":
ftype=a
@@ -205,7 +236,7 @@
@@ -205,7 +247,7 @@
use_file = True
if o == "-h" or o == "--help":
@ -165,7 +176,7 @@ diff -b -B --exclude-from=exclude --exclude=sepolgen-1.0.13 --exclude=gui --excl
if o == "-n" or o == "--noheading":
heading = False
@@ -215,7 +246,7 @@
@@ -215,7 +257,7 @@
if o == "-m"or o == "--modify":
if delete or add:
@ -174,7 +185,7 @@ diff -b -B --exclude-from=exclude --exclude=sepolgen-1.0.13 --exclude=gui --excl
modify = True
if o == "-S" or o == '--store':
@@ -223,7 +254,7 @@
@@ -223,7 +265,7 @@
if o == "-r" or o == '--range':
if is_mls_enabled == 0:
@ -183,7 +194,7 @@ diff -b -B --exclude-from=exclude --exclude=sepolgen-1.0.13 --exclude=gui --excl
serange = a
if o == "-l" or o == "--list":
@@ -231,7 +262,7 @@
@@ -231,7 +273,7 @@
if o == "-L" or o == '--level':
if is_mls_enabled == 0:
@ -192,7 +203,7 @@ diff -b -B --exclude-from=exclude --exclude=sepolgen-1.0.13 --exclude=gui --excl
selevel = a
if o == "-p" or o == '--proto':
@@ -286,14 +317,14 @@
@@ -286,14 +328,14 @@
OBJECT.list(heading, locallist, use_file)
else:
OBJECT.list(heading, locallist)
@ -210,7 +221,7 @@ diff -b -B --exclude-from=exclude --exclude=sepolgen-1.0.13 --exclude=gui --excl
target = cmds[0]
@@ -305,10 +336,7 @@
@@ -305,10 +347,7 @@
OBJECT.add(target, setrans)
if object == "user":
@ -222,7 +233,7 @@ diff -b -B --exclude-from=exclude --exclude=sepolgen-1.0.13 --exclude=gui --excl
if object == "port":
OBJECT.add(target, proto, serange, setype)
@@ -321,7 +349,7 @@
@@ -321,7 +360,7 @@
if object == "permissive":
OBJECT.add(target)
@ -231,7 +242,7 @@ diff -b -B --exclude-from=exclude --exclude=sepolgen-1.0.13 --exclude=gui --excl
if modify:
if object == "boolean":
@@ -346,7 +374,7 @@
@@ -346,7 +385,7 @@
if object == "fcontext":
OBJECT.modify(target, setype, ftype, serange, seuser)
@ -240,7 +251,7 @@ diff -b -B --exclude-from=exclude --exclude=sepolgen-1.0.13 --exclude=gui --excl
if delete:
if object == "port":
@@ -358,16 +386,69 @@
@@ -358,16 +397,69 @@
else:
OBJECT.delete(target)

View File

@ -6,7 +6,7 @@
Summary: SELinux policy core utilities
Name: policycoreutils
Version: 2.0.54
Release: 2%{?dist}
Release: 3%{?dist}
License: GPLv2+
Group: System Environment/Base
Source: http://www.nsa.gov/selinux/archives/policycoreutils-%{version}.tgz
@ -192,6 +192,9 @@ if [ "$1" -ge "1" ]; then
fi
%changelog
* Thu Aug 7 2008 Dan Walsh <dwalsh@redhat.com> 2.0.54-3
- Fixes for multiple transactions
* Wed Aug 6 2008 Dan Walsh <dwalsh@redhat.com> 2.0.54-2
- Allow multiple transactions in one semanage command