diff --git a/policycoreutils-rhat.patch b/policycoreutils-rhat.patch new file mode 100644 index 0000000..8463638 --- /dev/null +++ b/policycoreutils-rhat.patch @@ -0,0 +1,42 @@ +--- policycoreutils-1.15.2/scripts/fixfiles.cron.rhat 2004-07-16 14:52:18.000000000 -0400 ++++ policycoreutils-1.15.2/scripts/fixfiles.cron 2004-07-19 12:05:45.932576737 -0400 +@@ -16,7 +16,14 @@ + OUTFILE=`mktemp ${INVALIDFILE}.XXXXXXXXXX` || exit 1 + /sbin/fixfiles -l /dev/null -o $OUTFILE $CRONTYPE + if [ -s $OUTFILE ]; then +- mail ${MAILTO} -s "Invalid File Contexts" < $OUTFILE ++ size=`wc -l $OUTFILE | cut -d' ' -f1` ++ if [ $size -lt 100 ]; then ++ mail ${MAILTO} -s "Invalid File Contexts" < $OUTFILE ++ rm -f $OUTFILE ++ else ++ mail ${MAILTO} -s "Invalid File Contexts listed in $OUTFILE" < /dev/null ++ fi ++ else ++ rm -f $OUTFILE + fi +- rm -f $OUTFILE + fi +--- policycoreutils-1.15.2/scripts/genhomedircon.rhat 2004-07-16 14:52:18.000000000 -0400 ++++ policycoreutils-1.15.2/scripts/genhomedircon 2004-07-19 11:59:05.074753900 -0400 +@@ -25,7 +25,6 @@ + import commands, sys, os, pwd, string + + EXCLUDE_LOGINS=["/sbin/nologin", "/bin/false"] +-STARTING_UID=100 + + def getPrefixes(): + ulist = pwd.getpwall() +@@ -92,6 +91,12 @@ + print len(sys.argv) + usage("Incorrect parameters") + ++ rc=commands.getstatusoutput("grep -h '^UID_MIN' /etc/login.defs | sed -e 's/^UID_MIN[^0-9]*//'") ++ if rc[0] == 0: ++ STARTING_UID=rc[1] ++ else: ++ STARTING_UID=500 ++ + FILECONTEXTDIR=sys.argv[1] + prefixes = getPrefixes() + diff --git a/policycoreutils.spec b/policycoreutils.spec index 52e667a..3b451d5 100644 --- a/policycoreutils.spec +++ b/policycoreutils.spec @@ -1,10 +1,11 @@ Summary: SELinux policy core utilities. Name: policycoreutils Version: 1.15.2 -Release: 1 +Release: 2 License: GPL Group: System Environment/Base Source: http://www.nsa.gov/selinux/archives/policycoreutils-%{version}.tgz +Patch: policycoreutils-rhat.patch Prefix: %{_prefix} BuildRequires: libselinux-devel pam-devel @@ -30,6 +31,7 @@ context. %prep %setup -q +%patch -p1 -b .rhat %build make all @@ -73,6 +75,10 @@ rm -rf ${RPM_BUILD_ROOT} %changelog +* Mon Jul 19 2004 Dan Walsh 1.15.2-2 +- Only mail files less than 100 lines from fixfiles.cron +- Add Russell's fix for genhomedircon + * Fri Jul 16 2004 Dan Walsh 1.15.2-1 - Latest from NSA