diff --git a/policycoreutils-rhat.patch b/policycoreutils-rhat.patch index 9883393..034a980 100644 --- a/policycoreutils-rhat.patch +++ b/policycoreutils-rhat.patch @@ -1,107 +1,27 @@ -diff --exclude-from=exclude -N -u -r nsapolicycoreutils/restorecon/restorecon.c policycoreutils-1.26/restorecon/restorecon.c ---- nsapolicycoreutils/restorecon/restorecon.c 2005-09-12 16:33:30.000000000 -0400 -+++ policycoreutils-1.26/restorecon/restorecon.c 2005-09-13 13:19:58.000000000 -0400 -@@ -259,7 +259,6 @@ - int main(int argc, char **argv) { - int i=0; - char *file_name=NULL; -- int errors=0; - int file=0; - int opt; - char buf[PATH_MAX]; -diff --exclude-from=exclude -N -u -r nsapolicycoreutils/scripts/chcat policycoreutils-1.26/scripts/chcat ---- nsapolicycoreutils/scripts/chcat 1969-12-31 19:00:00.000000000 -0500 -+++ policycoreutils-1.26/scripts/chcat 2005-09-15 15:47:46.000000000 -0400 -@@ -0,0 +1,13 @@ -+#!/bin/sh -+if [ $# -lt 2 ]; then -+ echo "Usage $0 Category File ..." -+ echo "Usage $0 -d File ..." -+ exit 1 -+fi -+if [ $1 == "-d" ]; then -+shift -+chcon -l "" $* -+else -+chcon -l $* -+fi -+ -diff --exclude-from=exclude -N -u -r nsapolicycoreutils/scripts/chcat.8 policycoreutils-1.26/scripts/chcat.8 ---- nsapolicycoreutils/scripts/chcat.8 1969-12-31 19:00:00.000000000 -0500 -+++ policycoreutils-1.26/scripts/chcat.8 2005-09-15 16:00:05.000000000 -0400 -@@ -0,0 +1,23 @@ -+.TH CHCAT "8" "September 2005" "chcat" "User Commands" -+.SH NAME -+chcat \- change file security category -+.SH SYNOPSIS -+.B chcat -+\fICATEGORY FILE\fR... -+.br -+.B chcat -+[\fI-d\fR] \fIFILE\fR... -+.br -+.PP -+Change/Remove the security CATEGORY for each FILE. -+.br -+This script wraps the chcon command. -+.TP -+\fB\-d\fR -+delete the category from each file. -+.SH "SEE ALSO" -+.TP -+chcon(1), selinux(8) -+.SH "FILES" -+/etc/mcs.conf -+ -diff --exclude-from=exclude -N -u -r nsapolicycoreutils/scripts/fixfiles policycoreutils-1.26/scripts/fixfiles ---- nsapolicycoreutils/scripts/fixfiles 2005-09-14 15:32:01.000000000 -0400 -+++ policycoreutils-1.26/scripts/fixfiles 2005-09-13 13:19:58.000000000 -0400 -@@ -61,7 +61,11 @@ - if [ -f ${PREFC} -a -x /usr/bin/diff ]; then +diff --exclude-from=exclude -N -u -r nsapolicycoreutils/scripts/fixfiles policycoreutils-1.27.2/scripts/fixfiles +--- nsapolicycoreutils/scripts/fixfiles 2005-09-20 21:21:07.000000000 -0400 ++++ policycoreutils-1.27.2/scripts/fixfiles 2005-09-28 10:41:52.000000000 -0400 +@@ -62,8 +62,8 @@ TEMPFILE=`mktemp ${FC}.XXXXXXXXXX` test -z "$TEMPFILE" && exit -- /usr/bin/diff $PREFC $FC | grep '^[<>]'|cut -c3-| grep ^/ | \ -+ PREFCTEMPFILE=`mktemp ${PREFC}.XXXXXXXXXX` -+ sed -r -e 's,:s0[[:space:]], ,g' $PREFC > ${PREFCTEMPFILE} -+ sed -r -e 's,:s0[[:space:]], ,g' $FC | \ -+ /usr/bin/diff -b ${PREFCTEMPFILE} - | \ -+ grep '^[<>]'|cut -c3-| grep ^/ | \ - egrep -v '(^/home|^/root|^/tmp|^/dev)' |\ - sed -r -e 's,[[:blank:]].*,,g' \ - -e 's|\(([/[:alnum:]]+)\)\?|{\1,}|g' \ -@@ -85,7 +89,7 @@ - while read pattern ; do find $pattern \( -fstype ext2 -o -fstype ext3 -o -fstype jfs -o -fstype xfs \) -print; done 2> /dev/null | \ + PREFCTEMPFILE=`mktemp ${PREFC}.XXXXXXXXXX` +- sed -r -e 's,:s0[[:space:]], ,g' $PREFC > ${PREFCTEMPFILE} +- sed -r -e 's,:s0[[:space:]], ,g' $FC | \ ++ sed -r -e 's,:s0, ,g' $PREFC > ${PREFCTEMPFILE} ++ sed -r -e 's,:s0, ,g' $FC | \ + /usr/bin/diff -b ${PREFCTEMPFILE} - | \ + grep '^[<>]'|cut -c3-| grep ^/ | \ egrep -v '(^/home|^/root|^/tmp|^/dev)' |\ +@@ -86,8 +86,10 @@ + esac; \ + fi; \ + done | \ +- while read pattern ; do find $pattern \( -fstype ext2 -o -fstype ext3 -o -fstype jfs -o -fstype xfs \) -print; done 2> /dev/null | \ +- egrep -v '(^/home|^/root|^/tmp|^/dev)' |\ ++ while read pattern ; do find $pattern \ ++ ! \( -fstype ext2 -o -fstype ext3 -o -fstype jfs -o -fstype xfs \) -prune -o \ ++ \( -wholename /home -o -wholename /root -o -wholename /tmp -wholename /dev \) -prune -o -print; \ ++ done 2> /dev/null | \ ${RESTORECON} $2 -v -f - -- rm -f ${TEMPFILE} -+ rm -f ${TEMPFILE} ${PREFCTEMPFILE} + rm -f ${TEMPFILE} ${PREFCTEMPFILE} fi - } - # -diff --exclude-from=exclude -N -u -r nsapolicycoreutils/setfiles/setfiles.8 policycoreutils-1.26/setfiles/setfiles.8 ---- nsapolicycoreutils/setfiles/setfiles.8 2005-09-12 16:33:30.000000000 -0400 -+++ policycoreutils-1.26/setfiles/setfiles.8 2005-09-13 13:19:58.000000000 -0400 -@@ -35,6 +35,9 @@ - .B \-q - suppress non-error output. - .TP -+.B \-r -+use an alternate root path -+.TP - .B \-e directory - directory to exclude (repeat option for more than one directory.) - .TP -diff --exclude-from=exclude -N -u -r nsapolicycoreutils/setfiles/setfiles.c policycoreutils-1.26/setfiles/setfiles.c ---- nsapolicycoreutils/setfiles/setfiles.c 2005-09-12 16:33:30.000000000 -0400 -+++ policycoreutils-1.26/setfiles/setfiles.c 2005-09-13 13:19:58.000000000 -0400 -@@ -198,8 +198,8 @@ - void usage(const char * const name) - { - fprintf(stderr, -- "usage: %s [-dnqvW] [-o filename] spec_file pathname...\n" -- "usage: %s [-c policyfile] spec_file\n" -+ "usage: %s [-dnqvW] [-o filename] [-r alt_root_path ] spec_file pathname...\n" -+ "usage: %s -c policyfile spec_file\n" - "usage: %s -s [-dnqvW] [-o filename ] spec_file\n", name, name, name); - exit(1); - } diff --git a/policycoreutils.spec b/policycoreutils.spec index e7843ed..3e31b9a 100644 --- a/policycoreutils.spec +++ b/policycoreutils.spec @@ -4,7 +4,7 @@ Summary: SELinux policy core utilities. Name: policycoreutils Version: 1.27.2 -Release: 1 +Release: 2 License: GPL Group: System Environment/Base Source: http://www.nsa.gov/selinux/archives/policycoreutils-%{version}.tgz @@ -86,6 +86,9 @@ rm -rf ${RPM_BUILD_ROOT} %config(noreplace) %{_sysconfdir}/sestatus.conf %changelog +* Wed Sep 28 2005 Dan Walsh 1.27.2-2 +- More fixes to stop find from following nfs paths + * Wed Sep 21 2005 Dan Walsh 1.27.2-1 - Update to match NSA * Merged run_init open_init_pty bug fix from Manoj Srivastava