* Thu Aug 7 2008 Dan Walsh <dwalsh@redhat.com> 2.0.54-3
- Fixes for multiple transactions
This commit is contained in:
parent
875701c42a
commit
c7da14e85c
@ -17,7 +17,7 @@ diff -b -B --exclude-from=exclude --exclude=sepolgen-1.0.13 --exclude=gui --excl
|
|||||||
/etc/mtab
|
/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
|
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
|
--- 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 @@
|
@@ -20,7 +20,7 @@
|
||||||
# 02111-1307 USA
|
# 02111-1307 USA
|
||||||
#
|
#
|
||||||
@ -58,7 +58,7 @@ diff -b -B --exclude-from=exclude --exclude=sepolgen-1.0.13 --exclude=gui --excl
|
|||||||
|
|
||||||
def errorExit(error):
|
def errorExit(error):
|
||||||
sys.stderr.write("%s: " % sys.argv[0])
|
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' ]
|
valid_option["permissive"] += [ '-a', '--add', '-d', '--delete', '-l', '--list', '-h', '--help', '-n', '--noheading', '-D', '--deleteall' ]
|
||||||
return valid_option
|
return valid_option
|
||||||
|
|
||||||
@ -75,18 +75,29 @@ diff -b -B --exclude-from=exclude --exclude=sepolgen-1.0.13 --exclude=gui --excl
|
|||||||
+ ret = []
|
+ ret = []
|
||||||
+ i = 0
|
+ i = 0
|
||||||
+ while i < len(l):
|
+ 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) ]
|
+ quote = [ l[i].strip(dquote) ]
|
||||||
+ i = i + 1
|
+ i = i + 1
|
||||||
|
+
|
||||||
+ while i < len(l) and dquote not in l[i]:
|
+ while i < len(l) and dquote not in l[i]:
|
||||||
+ quote.append(l[i])
|
+ quote.append(l[i])
|
||||||
+ i = i + 1
|
+ i = i + 1
|
||||||
+
|
|
||||||
+ quote.append(l[i].strip(dquote))
|
+ quote.append(l[i].strip(dquote))
|
||||||
+ ret.append(" ".join(quote))
|
+ ret.append(" ".join(quote))
|
||||||
+ i = i + 1
|
+ i = i + 1
|
||||||
+ continue
|
+ 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) ]
|
+ quote = [ l[i].strip(squote) ]
|
||||||
+ i = i + 1
|
+ i = i + 1
|
||||||
+ while i < len(l) and squote not in l[i]:
|
+ 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 = ""
|
serange = ""
|
||||||
port = ""
|
port = ""
|
||||||
proto = ""
|
proto = ""
|
||||||
@@ -146,24 +178,23 @@
|
@@ -146,24 +189,23 @@
|
||||||
locallist = False
|
locallist = False
|
||||||
use_file = False
|
use_file = False
|
||||||
store = ""
|
store = ""
|
||||||
@ -136,7 +147,7 @@ diff -b -B --exclude-from=exclude --exclude=sepolgen-1.0.13 --exclude=gui --excl
|
|||||||
'list',
|
'list',
|
||||||
'modify',
|
'modify',
|
||||||
'noheading',
|
'noheading',
|
||||||
@@ -187,16 +218,16 @@
|
@@ -187,16 +229,16 @@
|
||||||
for o,a in gopts:
|
for o,a in gopts:
|
||||||
if o == "-a" or o == "--add":
|
if o == "-a" or o == "--add":
|
||||||
if modify or delete:
|
if modify or delete:
|
||||||
@ -156,7 +167,7 @@ diff -b -B --exclude-from=exclude --exclude=sepolgen-1.0.13 --exclude=gui --excl
|
|||||||
deleteall = True
|
deleteall = True
|
||||||
if o == "-f" or o == "--ftype":
|
if o == "-f" or o == "--ftype":
|
||||||
ftype=a
|
ftype=a
|
||||||
@@ -205,7 +236,7 @@
|
@@ -205,7 +247,7 @@
|
||||||
use_file = True
|
use_file = True
|
||||||
|
|
||||||
if o == "-h" or o == "--help":
|
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":
|
if o == "-n" or o == "--noheading":
|
||||||
heading = False
|
heading = False
|
||||||
@@ -215,7 +246,7 @@
|
@@ -215,7 +257,7 @@
|
||||||
|
|
||||||
if o == "-m"or o == "--modify":
|
if o == "-m"or o == "--modify":
|
||||||
if delete or add:
|
if delete or add:
|
||||||
@ -174,7 +185,7 @@ diff -b -B --exclude-from=exclude --exclude=sepolgen-1.0.13 --exclude=gui --excl
|
|||||||
modify = True
|
modify = True
|
||||||
|
|
||||||
if o == "-S" or o == '--store':
|
if o == "-S" or o == '--store':
|
||||||
@@ -223,7 +254,7 @@
|
@@ -223,7 +265,7 @@
|
||||||
|
|
||||||
if o == "-r" or o == '--range':
|
if o == "-r" or o == '--range':
|
||||||
if is_mls_enabled == 0:
|
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
|
serange = a
|
||||||
|
|
||||||
if o == "-l" or o == "--list":
|
if o == "-l" or o == "--list":
|
||||||
@@ -231,7 +262,7 @@
|
@@ -231,7 +273,7 @@
|
||||||
|
|
||||||
if o == "-L" or o == '--level':
|
if o == "-L" or o == '--level':
|
||||||
if is_mls_enabled == 0:
|
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
|
selevel = a
|
||||||
|
|
||||||
if o == "-p" or o == '--proto':
|
if o == "-p" or o == '--proto':
|
||||||
@@ -286,14 +317,14 @@
|
@@ -286,14 +328,14 @@
|
||||||
OBJECT.list(heading, locallist, use_file)
|
OBJECT.list(heading, locallist, use_file)
|
||||||
else:
|
else:
|
||||||
OBJECT.list(heading, locallist)
|
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]
|
target = cmds[0]
|
||||||
|
|
||||||
@@ -305,10 +336,7 @@
|
@@ -305,10 +347,7 @@
|
||||||
OBJECT.add(target, setrans)
|
OBJECT.add(target, setrans)
|
||||||
|
|
||||||
if object == "user":
|
if object == "user":
|
||||||
@ -222,7 +233,7 @@ diff -b -B --exclude-from=exclude --exclude=sepolgen-1.0.13 --exclude=gui --excl
|
|||||||
|
|
||||||
if object == "port":
|
if object == "port":
|
||||||
OBJECT.add(target, proto, serange, setype)
|
OBJECT.add(target, proto, serange, setype)
|
||||||
@@ -321,7 +349,7 @@
|
@@ -321,7 +360,7 @@
|
||||||
if object == "permissive":
|
if object == "permissive":
|
||||||
OBJECT.add(target)
|
OBJECT.add(target)
|
||||||
|
|
||||||
@ -231,7 +242,7 @@ diff -b -B --exclude-from=exclude --exclude=sepolgen-1.0.13 --exclude=gui --excl
|
|||||||
|
|
||||||
if modify:
|
if modify:
|
||||||
if object == "boolean":
|
if object == "boolean":
|
||||||
@@ -346,7 +374,7 @@
|
@@ -346,7 +385,7 @@
|
||||||
if object == "fcontext":
|
if object == "fcontext":
|
||||||
OBJECT.modify(target, setype, ftype, serange, seuser)
|
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 delete:
|
||||||
if object == "port":
|
if object == "port":
|
||||||
@@ -358,16 +386,69 @@
|
@@ -358,16 +397,69 @@
|
||||||
else:
|
else:
|
||||||
OBJECT.delete(target)
|
OBJECT.delete(target)
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
Summary: SELinux policy core utilities
|
Summary: SELinux policy core utilities
|
||||||
Name: policycoreutils
|
Name: policycoreutils
|
||||||
Version: 2.0.54
|
Version: 2.0.54
|
||||||
Release: 2%{?dist}
|
Release: 3%{?dist}
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
Group: System Environment/Base
|
Group: System Environment/Base
|
||||||
Source: http://www.nsa.gov/selinux/archives/policycoreutils-%{version}.tgz
|
Source: http://www.nsa.gov/selinux/archives/policycoreutils-%{version}.tgz
|
||||||
@ -192,6 +192,9 @@ if [ "$1" -ge "1" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
%changelog
|
%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
|
* Wed Aug 6 2008 Dan Walsh <dwalsh@redhat.com> 2.0.54-2
|
||||||
- Allow multiple transactions in one semanage command
|
- Allow multiple transactions in one semanage command
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user