* Fri Apr 25 2014 Miroslav Grepl <mgreplh@redhat.com> - 2.2.5-13

- Fix previous Fix-STANDARD_FILE_CONTEXT patch to exclude if non_exec does not exist
This commit is contained in:
Miroslav Grepl 2014-04-25 11:13:57 +02:00
parent cc5a0e201f
commit 231d059f2a
2 changed files with 16 additions and 18 deletions

View File

@ -1,14 +1,3 @@
From 02891cb83799989f733d30c0386206afaba309a5 Mon Sep 17 00:00:00 2001
From: Miroslav Grepl <mgrepl@redhat.com>
Date: Mon, 14 Apr 2014 15:14:08 +0200
Subject: [PATCH] 0001-Fix STANDARD_FILE_CONTEXT section in man pages
Signed-off-by: Miroslav Grepl <mgrepl@redhat.com>
---
policycoreutils/sepolicy/sepolicy/__init__.py | 15 +++++++++++++++
policycoreutils/sepolicy/sepolicy/manpage.py | 7 +++++--
2 files changed, 20 insertions(+), 2 deletions(-)
diff --git a/policycoreutils/sepolicy/sepolicy/__init__.py b/policycoreutils/sepolicy/sepolicy/__init__.py
index f7f05cb..6b94239 100644
--- a/policycoreutils/sepolicy/sepolicy/__init__.py
@ -36,7 +25,7 @@ index f7f05cb..6b94239 100644
file_type_str["a"] = _("all files")
file_type_str["f"] = _("regular file")
diff --git a/policycoreutils/sepolicy/sepolicy/manpage.py b/policycoreutils/sepolicy/sepolicy/manpage.py
index 9af0794..c2d014d 100755
index 9af0794..8daca56 100755
--- a/policycoreutils/sepolicy/sepolicy/manpage.py
+++ b/policycoreutils/sepolicy/sepolicy/manpage.py
@@ -679,10 +679,13 @@ Default Defined Ports:""")
@ -53,7 +42,16 @@ index 9af0794..c2d014d 100755
if f in self.fcdict:
mpaths = mpaths + self.fcdict[f]["regex"]
if len(mpaths) == 0:
@@ -741,12 +744,12 @@ SELinux %(domainname)s policy is very flexible allowing users to setup their %(d
@@ -734,19 +737,20 @@ SELinux %(domainname)s policy is very flexible allowing users to setup their %(d
.PP
""" % {'domainname':self.domainname, 'equiv': e, 'alt': e.split('/')[-1] })
- self.fd.write(r"""
+ if flist_non_exec:
+ self.fd.write(r"""
.PP
.B STANDARD FILE CONTEXT
SELinux defines the file context types for the %(domainname)s, if you wanted to
store files with these types in a diffent paths, you need to execute the semanage command to sepecify alternate labeling and then use restorecon to put the labels on disk.
@ -64,10 +62,7 @@ index 9af0794..c2d014d 100755
Note: SELinux often uses regular expressions to specify labels that match multiple files.
-""" % {'domainname':self.domainname, "type":flist[0] })
+""" % {'domainname':self.domainname, "type":flist_non_exec[0] })
+""" % {'domainname':self.domainname, "type":flist_non_exec[-1] })
self.fd.write(r"""
.I The following file types are defined for %(domainname)s:
--
1.9.0

View File

@ -7,7 +7,7 @@
Summary: SELinux policy core utilities
Name: policycoreutils
Version: 2.2.5
Release: 12%{?dist}
Release: 13%{?dist}
License: GPLv2
Group: System Environment/Base
# Based on git repository with tag 20101221
@ -387,6 +387,9 @@ The policycoreutils-restorecond package contains the restorecond service.
%systemd_postun_with_restart restorecond.service
%changelog
* Fri Apr 25 2014 Miroslav Grepl <mgreplh@redhat.com> - 2.2.5-13
- Fix previous Fix-STANDARD_FILE_CONTEXT patch to exclude if non_exec does not exist
* Tue Apr 24 2014 Miroslav Grepl <mgreplh@redhat.com> - 2.2.5-12
- Add policycoreutils-rhat-revert.patch to revert the last two commits to make build working
- Add 0001-Fix-STANDARD_FILE_CONTEXT-section-in-man-pages patch