diff --git a/policycoreutils-rhat.patch b/policycoreutils-rhat.patch index fed3db7..ee6a84d 100644 --- a/policycoreutils-rhat.patch +++ b/policycoreutils-rhat.patch @@ -1,5 +1,5 @@ --- policycoreutils-1.14.1/scripts/Makefile.rhat 2004-06-30 12:03:27.000000000 -0400 -+++ policycoreutils-1.14.1/scripts/Makefile 2004-06-30 13:14:42.776075168 -0400 ++++ policycoreutils-1.14.1/scripts/Makefile 2004-06-30 13:14:42.000000000 -0400 @@ -12,6 +12,7 @@ -mkdir -p $(BINDIR) install -m 755 $(TARGETS) $(BINDIR) @@ -8,26 +8,33 @@ -mkdir -p $(MANDIR)/man8 install -m 644 fixfiles.8.gz $(MANDIR)/man8/ ---- policycoreutils-1.14.1/scripts/fixfiles.cron.rhat 2004-06-30 13:12:42.062426432 -0400 -+++ policycoreutils-1.14.1/scripts/fixfiles.cron 2004-06-30 13:28:28.507544904 -0400 -@@ -0,0 +1,15 @@ +--- policycoreutils-1.14.1/scripts/fixfiles.cron.rhat 2004-06-30 13:12:42.000000000 -0400 ++++ policycoreutils-1.14.1/scripts/fixfiles.cron 2004-07-06 11:35:18.896372632 -0400 +@@ -0,0 +1,22 @@ +#!/bin/sh + +CRONTYPE="check" +INVALIDFILE=/var/tmp/badcontext +CRONMAILTO="root" + ++if [ ! -e /etc/selinux/config ]; then ++ exit 1 ++fi ++ +. /etc/selinux/config + -+renice +19 -p $$ >/dev/null 2>&1 -+OUTFILE=`mktemp ${INVALIDFILE}.XXXXXXXXXX` || exit 1 -+/sbin/fixfiles -o $OUTFILE $CRONTYPE -+mv -f $OUTFILE $INVALIDFILE -+if [ -s $INVALIDFILE ]; then -+ mail ${MAILTO} -s "Invalid File Contexts" < $INVALIDFILE ++/usr/bin/selinuxenabled ++if [ $? -eq 0 ]; then ++ renice +19 -p $$ >/dev/null 2>&1 ++ OUTFILE=`mktemp ${INVALIDFILE}.XXXXXXXXXX` || exit 1 ++ /sbin/fixfiles -o $OUTFILE $CRONTYPE ++ mv -f $OUTFILE $INVALIDFILE ++ if [ -s $INVALIDFILE ]; then ++ mail ${MAILTO} -s "Invalid File Contexts" < $INVALIDFILE ++ fi +fi ---- policycoreutils-1.14.1/scripts/fixfiles.rhat 2004-06-30 13:10:21.630775288 -0400 -+++ policycoreutils-1.14.1/scripts/fixfiles 2004-06-30 13:11:46.932807408 -0400 +--- policycoreutils-1.14.1/scripts/fixfiles.rhat 2004-06-30 13:10:21.000000000 -0400 ++++ policycoreutils-1.14.1/scripts/fixfiles 2004-06-30 13:11:46.000000000 -0400 @@ -19,25 +19,37 @@ # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software diff --git a/policycoreutils.spec b/policycoreutils.spec index 298486b..93c8a69 100644 --- a/policycoreutils.spec +++ b/policycoreutils.spec @@ -1,7 +1,7 @@ Summary: SELinux policy core utilities. Name: policycoreutils Version: 1.14.1 -Release: 1 +Release: 2 License: GPL Group: System Environment/Base Source: http://www.nsa.gov/selinux/archives/policycoreutils-%{version}.tgz @@ -75,6 +75,9 @@ rm -rf ${RPM_BUILD_ROOT} %changelog +* Tue Jul 6 2004 Dan Walsh 1.14.1-2 +- Fix fixfiles.cron to not run on non SELinux boxes + * Wed Jun 30 2004 Dan Walsh 1.14.1-1 - Update from NSA - Add cron capability to fixfiles