[policycoreutils] Fix dpi handling in sandbox Make sure semanage fcontext -l -C prints if only local equiv have change
Daniel J Walsh
dwalsh at fedoraproject.org
Tue Nov 29 20:59:00 UTC 2011
commit 6b9bc0eb8fea09c53b1219c381ffa8db7d231e3b
Author: Dan Walsh <dwalsh at redhat.com>
Date: Tue Nov 29 15:58:56 2011 -0500
Fix dpi handling in sandbox
Make sure semanage fcontext -l -C prints if only local equiv have changed
policycoreutils-rhat.patch | 36 ++++++++++++++++++++++++++++++------
policycoreutils.spec | 1 +
2 files changed, 31 insertions(+), 6 deletions(-)
---
diff --git a/policycoreutils-rhat.patch b/policycoreutils-rhat.patch
index 3e9bd63..5c2038c 100644
--- a/policycoreutils-rhat.patch
+++ b/policycoreutils-rhat.patch
@@ -614,7 +614,7 @@ index 48d7baa..2c0cfdd 100644
errorExit(error.args[0])
except KeyError, error:
diff --git a/policycoreutils/semanage/seobject.py b/policycoreutils/semanage/seobject.py
-index a7008fc..aae1b59 100644
+index a7008fc..9445b76 100644
--- a/policycoreutils/semanage/seobject.py
+++ b/policycoreutils/semanage/seobject.py
@@ -30,11 +30,10 @@ from IPy import IP
@@ -784,12 +784,36 @@ index a7008fc..aae1b59 100644
(rc, fcontext) = semanage_fcontext_create(self.sh)
if rc < 0:
-@@ -1825,9 +1850,17 @@ class fcontextRecords(semanageRecords):
- print "%-50s %-18s %s:%s:%s " % (k[0], k[1], fcon_dict[k][0], fcon_dict[k][1],fcon_dict[k][2])
- else:
- print "%-50s %-18s <<None>>" % (k[0], k[1])
+@@ -1811,23 +1836,28 @@ class fcontextRecords(semanageRecords):
+ def list(self, heading = 1, locallist = 0 ):
+ fcon_dict = self.get_all(locallist)
+ keys = fcon_dict.keys()
+- if len(keys) == 0:
+- return
+- keys.sort()
+-
+- if heading:
+- print "%-50s %-18s %s\n" % (_("SELinux fcontext"), _("type"), _("Context"))
+- for k in keys:
+- if fcon_dict[k]:
+- if is_mls_enabled:
+- print "%-50s %-18s %s:%s:%s:%s " % (k[0], k[1], fcon_dict[k][0], fcon_dict[k][1], fcon_dict[k][2], translate(fcon_dict[k][3],False))
++ if len(keys) != 0:
++ keys.sort()
++ if heading:
++ print "%-50s %-18s %s\n" % (_("SELinux fcontext"), _("type"), _("Context"))
++ for k in keys:
++ if fcon_dict[k]:
++ if is_mls_enabled:
++ print "%-50s %-18s %s:%s:%s:%s " % (k[0], k[1], fcon_dict[k][0], fcon_dict[k][1], fcon_dict[k][2], translate(fcon_dict[k][3],False))
++ else:
++ print "%-50s %-18s %s:%s:%s " % (k[0], k[1], fcon_dict[k][0], fcon_dict[k][1],fcon_dict[k][2])
+ else:
+- print "%-50s %-18s %s:%s:%s " % (k[0], k[1], fcon_dict[k][0], fcon_dict[k][1],fcon_dict[k][2])
+- else:
+- print "%-50s %-18s <<None>>" % (k[0], k[1])
- if len(self.equiv.keys()) > 0:
-+
++ print "%-50s %-18s <<None>>" % (k[0], k[1])
+
+ if len(self.equiv_dist):
+ if not locallist:
diff --git a/policycoreutils.spec b/policycoreutils.spec
index e17e2f6..117d52a 100644
--- a/policycoreutils.spec
+++ b/policycoreutils.spec
@@ -354,6 +354,7 @@ fi
%changelog
* Tue Nov 29 2011 Dan Walsh <dwalsh at redhat.com> - 2.1.8-7
- Fix dpi handling in sandbox
+- Make sure semanage fcontext -l -C prints if only local equiv have changed
* Wed Nov 16 2011 Dan Walsh <dwalsh at redhat.com> - 2.1.8-6
- Add listing of distribution equivalence class from semanage fcontext -l
More information about the scm-commits
mailing list