All of lore.kernel.org
 help / color / mirror / Atom feed
* Fix to stop traversing nfs file systems in fixfiles
@ 2005-09-29 13:35 Daniel J Walsh
  0 siblings, 0 replies; only message in thread
From: Daniel J Walsh @ 2005-09-29 13:35 UTC (permalink / raw)
  To: Stephen Smalley, SELinux

[-- Attachment #1: Type: text/plain, Size: 61 bytes --]

Did not know about the -prune qualifier on find.

Dan

-- 



[-- Attachment #2: policycoreutils-rhat.patch --]
[-- Type: text/x-patch, Size: 1328 bytes --]

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
 	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} ${PREFCTEMPFILE}
 fi

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-09-29 13:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-29 13:35 Fix to stop traversing nfs file systems in fixfiles Daniel J Walsh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.