From 01c8a3601eb759e2cba16ca7a9a333da22362c98 Mon Sep 17 00:00:00 2001 From: Dan Walsh Date: Mon, 30 Apr 2012 15:05:24 -0400 Subject: [PATCH] Fix semanage fcontext -E to extract the equivalance customizations. --- policycoreutils-rhat.patch | 13 ++++++++++++- policycoreutils.spec | 5 ++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/policycoreutils-rhat.patch b/policycoreutils-rhat.patch index fecdb03..74d190d 100644 --- a/policycoreutils-rhat.patch +++ b/policycoreutils-rhat.patch @@ -245946,7 +245946,7 @@ index c5e18d9..9e086d1 100644 .I \-R, \-\-role SELinux Roles. You must enclose multiple roles within quotes, separate by spaces. Or specify \-R multiple times. diff --git a/policycoreutils/semanage/seobject.py b/policycoreutils/semanage/seobject.py -index 9745102..12cd0fe 100644 +index 9745102..28cf30e 100644 --- a/policycoreutils/semanage/seobject.py +++ b/policycoreutils/semanage/seobject.py @@ -30,11 +30,10 @@ from IPy import IP @@ -246016,6 +246016,17 @@ index 9745102..12cd0fe 100644 (rc, fcontext) = semanage_fcontext_create(self.sh) if rc < 0: +@@ -1920,6 +1925,10 @@ class fcontextRecords(semanageRecords): + for k in keys: + if fcon_dict[k]: + l.append("-a -f '%s' -t %s '%s'" % (k[1], fcon_dict[k][2], k[0])) ++ ++ if len(self.equiv): ++ for target in self.equiv.keys(): ++ l.append("-a -e %s %s" % (target, self.equiv[target])) + return l + + def list(self, heading = 1, locallist = 0 ): diff --git a/policycoreutils/setfiles/restore.c b/policycoreutils/setfiles/restore.c index 9a7d315..1b59e2f 100644 --- a/policycoreutils/setfiles/restore.c diff --git a/policycoreutils.spec b/policycoreutils.spec index d25babe..66f70da 100644 --- a/policycoreutils.spec +++ b/policycoreutils.spec @@ -7,7 +7,7 @@ Summary: SELinux policy core utilities Name: policycoreutils Version: 2.1.11 -Release: 8%{?dist} +Release: 9%{?dist} License: GPLv2 Group: System Environment/Base # Based on git repository with tag 20101221 @@ -340,6 +340,9 @@ fi %{_bindir}/systemctl try-restart restorecond.service >/dev/null 2>&1 || : %changelog +* Mon Apr 30 2012 Dan Walsh - 2.1.11-9 +- Fix semanage fcontext -E to extract the equivalance customizations. + * Tue Apr 26 2012 Dan Walsh - 2.1.11-8 - Add mgrepl patch to have sepolgen search for -systemd rpm packages