829c705f9c
- More cleanup of fixfiles sed patch - Upgrade to latest from NSA * Merged patch for open_init_pty from Manoj Srivastava.
36 lines
1.7 KiB
Diff
36 lines
1.7 KiB
Diff
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/scripts/fixfiles policycoreutils-1.21.9/scripts/fixfiles
|
|
--- nsapolicycoreutils/scripts/fixfiles 2005-01-31 09:49:15.000000000 -0500
|
|
+++ policycoreutils-1.21.9/scripts/fixfiles 2005-02-01 14:06:56.000000000 -0500
|
|
@@ -60,12 +60,26 @@
|
|
if [ -f ${PREFC} -a -x /usr/bin/diff ]; then
|
|
TEMPFILE=`mktemp ${FC}.XXXXXXXXXX`
|
|
test -z "$TEMPFILE" && exit
|
|
- /usr/bin/diff $PREFC $FC | egrep '^[<>]'|cut -c3-| grep ^/ | \
|
|
- sed -e 's,\\.*,*,g' -e 's,(.*,*,g' -e 's,\[.*,*,g' -e 's,\..*,*,g' \
|
|
- -e 's,[[:blank:]].*,,g' -e 's,\?.*,*,g' | sort -u | \
|
|
- while read pattern ; do if ! echo "$pattern" | grep -q -f ${TEMPFILE} 2>/dev/null ; then echo "$pattern"; case "$pattern" in *"*") echo "$pattern" |sed 's,\*$,,g'>> ${TEMPFILE};; esac; fi; done | \
|
|
+ /usr/bin/diff $PREFC $FC | grep '^[<>]'|cut -c3-| grep ^/ | \
|
|
+ sed -r -e 's|\(([/[:alnum:]]+)\)\?|{\1,}|g' \
|
|
+ -e 's|([/[:alnum:]])\?|{\1,}|g' \
|
|
+ -e 's|\?.*|*|g' \
|
|
+ -e 's|\(.*|*|g' \
|
|
+ -e 's|\[.*|*|g' \
|
|
+ -e 's|\.\*|*|g' \
|
|
+ -e 's|\.\+|*|g' \
|
|
+ sort -u | \
|
|
+ while read pattern ; \
|
|
+ do if ! echo "$pattern" | grep -q -f ${TEMPFILE} 2>/dev/null; then \
|
|
+ echo "$pattern"; \
|
|
+ case "$pattern" in *"*") \
|
|
+ echo "$pattern" | sed 's,\*$,,g' >> ${TEMPFILE};;
|
|
+ esac; \
|
|
+ fi; \
|
|
+ done | \
|
|
+ grep -v -e ^/root -e ^/home -e ^/tmp -e ^/var/tmp | \
|
|
while read pattern ; do find $pattern -maxdepth 0 -print; done 2> /dev/null | \
|
|
- ${RESTORECON} $2 -v -f -R -
|
|
+ ${RESTORECON} -R $2 -v -f -
|
|
rm -f ${TEMPFILE}
|
|
fi
|
|
}
|