* This patch removes OUTPUT from fixfiles which was never used and was broken
@ 2009-11-03 15:37 Daniel J Walsh
2009-11-27 18:03 ` Joshua Brindle
0 siblings, 1 reply; 2+ messages in thread
From: Daniel J Walsh @ 2009-11-03 15:37 UTC (permalink / raw)
To: SE Linux
[-- 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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: This patch removes OUTPUT from fixfiles which was never used and was broken
2009-11-03 15:37 This patch removes OUTPUT from fixfiles which was never used and was broken Daniel J Walsh
@ 2009-11-27 18:03 ` Joshua Brindle
0 siblings, 0 replies; 2+ messages in thread
From: Joshua Brindle @ 2009-11-27 18:03 UTC (permalink / raw)
To: Daniel J Walsh; +Cc: SE Linux
Daniel J Walsh wrote:
> Patches come from
>
> Moray.Henderson@ict.om.org
Merged in policycoreutils 2.0.78
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-11-27 18:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-03 15:37 This patch removes OUTPUT from fixfiles which was never used and was broken Daniel J Walsh
2009-11-27 18:03 ` Joshua Brindle
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.