Fix semanage fcontext -E to extract the equivalance customizations.

This commit is contained in:
Dan Walsh 2012-04-30 15:05:24 -04:00
parent e6f13dc63b
commit 01c8a3601e
2 changed files with 16 additions and 2 deletions

View File

@ -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

View File

@ -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 <dwalsh@redhat.com> - 2.1.11-9
- Fix semanage fcontext -E to extract the equivalance customizations.
* Tue Apr 26 2012 Dan Walsh <dwalsh@redhat.com> - 2.1.11-8
- Add mgrepl patch to have sepolgen search for -systemd rpm packages