* Thu Mar 12 2009 Dan Walsh <dwalsh@redhat.com> 2.0.62-5
- Fix semanage transations
This commit is contained in:
parent
15a087f5e4
commit
28777e87d2
@ -30,3 +30,58 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.16 --exclude=gui --exclude=po
|
||||
done
|
||||
exit $?
|
||||
fi
|
||||
diff --exclude-from=exclude --exclude=sepolgen-1.0.16 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/semanage/semanage policycoreutils-2.0.62/semanage/semanage
|
||||
--- nsapolicycoreutils/semanage/semanage 2009-02-18 16:44:47.000000000 -0500
|
||||
+++ policycoreutils-2.0.62/semanage/semanage 2009-03-12 09:22:45.000000000 -0400
|
||||
@@ -464,10 +464,10 @@
|
||||
else:
|
||||
fd = open(input, 'r')
|
||||
trans = seobject.semanageRecords(store)
|
||||
- trans.begin()
|
||||
+ trans.start()
|
||||
for l in fd.readlines():
|
||||
process_args(mkargv(l))
|
||||
- trans.commit()
|
||||
+ trans.finish()
|
||||
else:
|
||||
process_args(sys.argv[1:])
|
||||
|
||||
diff --exclude-from=exclude --exclude=sepolgen-1.0.16 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/semanage/seobject.py policycoreutils-2.0.62/semanage/seobject.py
|
||||
--- nsapolicycoreutils/semanage/seobject.py 2008-11-14 17:10:15.000000000 -0500
|
||||
+++ policycoreutils-2.0.62/semanage/seobject.py 2009-03-12 09:25:27.000000000 -0400
|
||||
@@ -281,15 +281,20 @@
|
||||
global handle
|
||||
|
||||
if handle != None:
|
||||
- self.transaction = True
|
||||
self.sh = handle
|
||||
else:
|
||||
self.sh=get_handle(store)
|
||||
- self.transaction = False
|
||||
+ self.transaction = False
|
||||
|
||||
def deleteall(self):
|
||||
raise ValueError(_("Not yet implemented"))
|
||||
|
||||
+ def start(self):
|
||||
+ if self.transaction:
|
||||
+ raise ValueError(_("Semanage transaction already in progress"))
|
||||
+ self.begin()
|
||||
+ self.transaction = True
|
||||
+
|
||||
def begin(self):
|
||||
if self.transaction:
|
||||
return
|
||||
@@ -303,6 +308,12 @@
|
||||
if rc < 0:
|
||||
raise ValueError(_("Could not commit semanage transaction"))
|
||||
|
||||
+ def finish(self):
|
||||
+ if not self.transaction:
|
||||
+ raise ValueError(_("Semanage transaction not in progress"))
|
||||
+ self.transaction = False
|
||||
+ self.commit()
|
||||
+
|
||||
class permissiveRecords(semanageRecords):
|
||||
def __init__(self, store):
|
||||
semanageRecords.__init__(self, store)
|
||||
|
@ -6,7 +6,7 @@
|
||||
Summary: SELinux policy core utilities
|
||||
Name: policycoreutils
|
||||
Version: 2.0.62
|
||||
Release: 4%{?dist}
|
||||
Release: 5%{?dist}
|
||||
License: GPLv2+
|
||||
Group: System Environment/Base
|
||||
Source: http://www.nsa.gov/selinux/archives/policycoreutils-%{version}.tgz
|
||||
@ -221,6 +221,9 @@ else
|
||||
fi
|
||||
|
||||
%changelog
|
||||
* Thu Mar 12 2009 Dan Walsh <dwalsh@redhat.com> 2.0.62-5
|
||||
- Fix semanage transations
|
||||
|
||||
* Sat Mar 7 2009 Dan Walsh <dwalsh@redhat.com> 2.0.62-4
|
||||
- Update polgengui templates to match current upstream policy
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user