From: Daniel J Walsh <dwalsh@redhat.com>
To: SE Linux <selinux@tycho.nsa.gov>
Subject: This patch removes OUTPUT from fixfiles which was never used and was broken
Date: Tue, 03 Nov 2009 10:37:13 -0500 [thread overview]
Message-ID: <4AF04E29.4020101@redhat.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 47 bytes --]
Patches come from
Moray.Henderson@ict.om.org
[-- Attachment #2: policoreutils-fixfiles.patch --]
[-- Type: text/plain, Size: 4018 bytes --]
diff --git a/policycoreutils/scripts/fixfiles b/policycoreutils/scripts/fixfiles
index e60ce31..ae519fc 100755
--- a/policycoreutils/scripts/fixfiles
+++ b/policycoreutils/scripts/fixfiles
@@ -27,7 +27,6 @@ fullFlag=0
FORCEFLAG=""
DIRS=""
RPMILES=""
-OUTFILES=""
LOGFILE=`tty`
if [ $? != 0 ]; then
LOGFILE="/dev/null"
@@ -122,7 +121,7 @@ if [ ! -z "$PREFC" ]; then
fi
if [ ! -z "$RPMFILES" ]; then
for i in `echo "$RPMFILES" | sed 's/,/ /g'`; do
- rpmlist $i | ${RESTORECON} ${OUTFILES} ${FORCEFLAG} $* -R -i -f - 2>&1 >> $LOGFILE
+ rpmlist $i | ${RESTORECON} ${FORCEFLAG} $* -R -i -f - 2>&1 >> $LOGFILE
done
exit $?
fi
@@ -130,14 +129,15 @@ if [ ! -z "$FILEPATH" ]; then
if [ -x /usr/bin/find ]; then
/usr/bin/find "$FILEPATH" \
! \( -fstype ext2 -o -fstype ext3 -o -fstype ext4 -o -fstype ext4dev -o -fstype gfs2 -o -fstype jfs -o -fstype xfs -o -fstype btrfs \) -prune -o -print0 | \
- ${RESTORECON} ${OUTFILES} ${FORCEFLAG} $* -0 -f - 2>&1 >> $LOGFILE
+ ${RESTORECON} ${FORCEFLAG} $* -0 -f - 2>&1 >> $LOGFILE
else
- ${RESTORECON} ${OUTFILES} ${FORCEFLAG} -R $* $FILEPATH 2>&1 >> $LOGFILE
+ ${RESTORECON} ${FORCEFLAG} -R $* $FILEPATH 2>&1 >> $LOGFILE
fi
return
fi
+[ -x /usr/sbin/genhomedircon ] && /usr/sbin/genhomedircon
LogReadOnly
-${SETFILES} -q ${OUTFILES} ${SYSLOGFLAG} ${FORCEFLAG} $* ${FC} ${FILESYSTEMSRW} 2>&1 >> $LOGFILE
+${SETFILES} -q ${SYSLOGFLAG} ${FORCEFLAG} $* ${FC} ${FILESYSTEMSRW} 2>&1 >> $LOGFILE
rm -rf /tmp/gconfd-* /tmp/pulse-* /tmp/orbit-*
find /tmp \( -context "*:file_t*" -o -context "*:unlabeled_t*" \) -exec chcon -t tmp_t {} \;
find /var/tmp \( -context "*:file_t*" -o -context "*:unlabeled_t*" \) -exec chcon -t tmp_t {} \;
@@ -193,10 +193,15 @@ case "$1" in
esac
}
usage() {
- echo $"Usage: $0 [-l logfile ] [-o outputfile ] { check | restore|[-F] relabel } [[dir] ... ] "
- echo or
- echo $"Usage: $0 -R rpmpackage[,rpmpackage...] -C PREVIOUS_FILECONTEXT [-l logfile ] [-o outputfile ] { check | restore }"
- echo $"Usage: $0 onboot"
+ echo $"""
+Usage: $0 [-F] [-l logfile ] { check | restore| [-f] relabel | verify } [[dir/file] ... ]
+or
+Usage: $0 [-F] -R rpmpackage[,rpmpackage...] [-l logfile ] { check | restore | verify }
+or
+Usage: $0 [-F] -C PREVIOUS_FILECONTEXT { check | restore | verify }
+or
+Usage: $0 onboot
+"""
}
if [ $# = 0 ]; then
@@ -205,7 +210,7 @@ if [ $# = 0 ]; then
fi
# See how we were called.
-while getopts "C:Ffo:R:l:" i; do
+while getopts "C:FfR:l:" i; do
case "$i" in
f)
fullFlag=1
@@ -213,9 +218,6 @@ while getopts "C:Ffo:R:l:" i; do
R)
RPMFILES=$OPTARG
;;
- o)
- OUTFILES=$OPTARG
- ;;
l)
LOGFILE=$OPTARG
;;
diff --git a/policycoreutils/scripts/fixfiles.8 b/policycoreutils/scripts/fixfiles.8
index 307ea4c..dfe8aa9 100644
--- a/policycoreutils/scripts/fixfiles.8
+++ b/policycoreutils/scripts/fixfiles.8
@@ -3,11 +3,18 @@
fixfiles \- fix file SELinux security contexts.
.SH "SYNOPSIS"
-.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 | verify } [[dir/file] ... ]
+.B fixfiles
+.I [-F] [-l logfile ] { check | restore|[-f] relabel | verify } [[dir/file] ... ]
-.B fixfiles onboot
+.B fixfiles
+.I [-F] [ -R rpmpackagename[,rpmpackagename...] ] [-l logfile ] { check | restore | verify }
+
+.B fixfiles
+.I [ -C PREVIOUS_FILECONTEXT ] [-l logfile ] { check | restore | verify }
+
+.B fixfiles
+.I onboot
.SH "DESCRIPTION"
This manual page describes the
@@ -31,10 +38,6 @@ will setup the machine to relabel on the next reboot.
.B -l logfile
Save the output to the specified logfile
.TP
-.B -o outputfile
-Save all files that have file_context that differs from the default, in outputfile.
-
-.TP
.B -F
Force reset of context to match file_context for customizable files
next reply other threads:[~2009-11-03 15:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-03 15:37 Daniel J Walsh [this message]
2009-11-27 18:03 ` This patch removes OUTPUT from fixfiles which was never used and was broken Joshua Brindle
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=4AF04E29.4020101@redhat.com \
--to=dwalsh@redhat.com \
--cc=selinux@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.