|
From: <ssm...@us...> - 2006-10-17 15:03:44
|
Revision: 2055
http://svn.sourceforge.net/selinux/?rev=2055&view=rev
Author: ssmalley
Date: 2006-10-17 08:03:32 -0700 (Tue, 17 Oct 2006)
Log Message:
-----------
From: Dan Walsh <dw...@re...>
Subject: New policycoreutils patch
Extract fixfiles diff from Fedora policycoreutils-rhat.patch. This
one changes fixfiles -R to use the new -i option for restorecon to
ignore non-existent files, removes the use of -R to restorecon (don't
perform recursive descent on entries returned by rpmlist), protects
$RPMFILES with quotes, and adds a verify command to apply restorecon
-n -o -.
Modified Paths:
--------------
trunk/policycoreutils/scripts/fixfiles
trunk/policycoreutils/scripts/fixfiles.8
Modified: trunk/policycoreutils/scripts/fixfiles
===================================================================
--- trunk/policycoreutils/scripts/fixfiles 2006-10-17 15:00:45 UTC (rev 2054)
+++ trunk/policycoreutils/scripts/fixfiles 2006-10-17 15:03:32 UTC (rev 2055)
@@ -117,8 +117,8 @@
exit $?
fi
if [ ! -z "$RPMFILES" ]; then
- for i in `echo $RPMFILES | sed 's/,/ /g'`; do
- rpmlist $i | ${RESTORECON} ${OUTFILES} ${FORCEFLAG} -R $* -f - 2>&1 >> $LOGFILE
+ for i in `echo "$RPMFILES" | sed 's/,/ /g'`; do
+ rpmlist $i | ${RESTORECON} ${OUTFILES} ${FORCEFLAG} $* -i -f - 2>&1 >> $LOGFILE
done
exit $?
fi
@@ -219,7 +219,7 @@
# check if they specified both DIRS and RPMFILES
#
-if [ ! -z $RPMFILES ]; then
+if [ ! -z "$RPMFILES" ]; then
if [ $OPTIND -le $# ]; then
usage
fi
@@ -236,6 +236,7 @@
case "$command" in
restore) restore -p ;;
check) restore -n -v ;;
+ verify) restore -n -o -;;
relabel) relabel;;
*)
usage
Modified: trunk/policycoreutils/scripts/fixfiles.8
===================================================================
--- trunk/policycoreutils/scripts/fixfiles.8 2006-10-17 15:00:45 UTC (rev 2054)
+++ trunk/policycoreutils/scripts/fixfiles.8 2006-10-17 15:03:32 UTC (rev 2055)
@@ -3,9 +3,9 @@
fixfiles \- fix file security contexts.
.SH "SYNOPSIS"
-.B fixfiles [-F] [ -R rpmpackagename[,rpmpackagename...] ] [ -C PREVIOUS_FILECONTEXT ] [-l logfile ] [-o outputfile ] { check | restore | [-F] relabel }"
+.B fixfiles [-F] [ -R rpmpackagename[,rpmpackagename...] ] [ -C PREVIOUS_FILECONTEXT ] [-l logfile ] [-o outputfile ] { check | restore | [-F] relabel | verify }"
-.B fixfiles [-F] [-l logfile ] [-o outputfile ] { check | restore|[-f] relabel } [[dir/file] ... ]
+.B fixfiles [-F] [-l logfile ] [-o outputfile ] { check | restore|[-f] relabel | verify } [[dir/file] ... ]
.SH "DESCRIPTION"
This manual page describes the
@@ -48,7 +48,7 @@
One of:
.TP
.B check
-show any incorrect file context labels but do not change them.
+print any incorrect file context labels, showing old and new context, but do not change them.
.TP
.B restore
change any incorrect file context labels.
@@ -56,6 +56,9 @@
.B relabel
Prompt for removal of contents of /tmp directory and then change any inccorect file context labels to match the install file_contexts file.
.TP
+.B verify
+List out files with incorrect file context labels, but do not change them.
+.TP
.B [[dir/file] ... ]
List of files or directories trees that you wish to check file context on.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|