From: Daniel J Walsh <dwalsh@redhat.com>
To: Stephen Smalley <sds@tycho.nsa.gov>, SELinux <SELinux@tycho.nsa.gov>
Subject: Fix to stop traversing nfs file systems in fixfiles
Date: Thu, 29 Sep 2005 09:35:12 -0400 [thread overview]
Message-ID: <433BED90.50205@redhat.com> (raw)
[-- 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
reply other threads:[~2005-09-29 13:35 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=433BED90.50205@redhat.com \
--to=dwalsh@redhat.com \
--cc=SELinux@tycho.nsa.gov \
--cc=sds@tycho.nsa.gov \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.