--- policycoreutils-1.11/scripts/fixfiles.rhat 2004-05-05 09:36:40.000000000 -0400 +++ policycoreutils-1.11/scripts/fixfiles 2004-05-07 10:41:27.721773064 -0400 @@ -21,20 +21,22 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA FC=/etc/security/selinux/file_contexts +LOGFILE=`mktemp /tmp/fixfiles.XXXXXXXXXX` || exit 1 +echo "logging to $LOGFILE" SETFILES=/usr/sbin/setfiles -FILESYSTEMS=`mount | awk '/(ext[23]| xfs).*rw/{print $3}';` +FILESYSTEMS=`mount | grep -v "context=" | grep -v bind | awk '/(ext[23]| xfs).*rw/{print $3}';` checkLabels () { -${SETFILES} -v -n ${FC} ${FILESYSTEMS} +${SETFILES} -v -n ${FC} ${FILESYSTEMS} 2>&1 | tee $LOGFILE } restoreLabels () { -${SETFILES} -v ${FC} ${FILESYSTEMS} +${SETFILES} -v ${FC} ${FILESYSTEMS} 2>&1 | tee $LOGFILE } relabel() { echo "Cleaning out /tmp" rm -rf /tmp/.??* /tmp/* -${SETFILES} ${FC} ${FILESYSTEMS} +${SETFILES} ${FC} ${FILESYSTEMS} 2>&1 | tee $LOGFILE } # See how we were called.