Fix fixfiles handling of arguments
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
fixfiles restore /usr/bin/g*
goes nuts.
This patch fixes this.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
iD8DBQFHPb40rlYvE4MpobMRAqrJAKDO8b27pYWdCpBhQfPOes6L6u8/MwCgtYH8 94OG2eQJUWJhXD5Hkpus9yo=
=cnGp
-----END PGP SIGNATURE-----
scripts/fixfiles +13 -10
@@ -92,7 +92,7 @@ ! \( -fstype ext2 -o -fstype ext3 -o -fstype jfs -o -fstype xfs \) -prune -o \ \( -wholename /home -o -wholename /root -o -wholename /tmp -wholename /dev \) -prune -o -print; \ done 2> /dev/null | \ - ${RESTORECON} $2 -v -f - + ${RESTORECON} $2 -f - rm -f ${TEMPFILE} ${PREFCTEMPFILE} fi }
@@ -189,21 +189,27 @@ case "$i" in f) fullFlag=1 + shift 1 ;; R) RPMFILES=$OPTARG + shift 2 ;; o) OUTFILES=$OPTARG + shift 2 ;; l) LOGFILE=$OPTARG + shift 2 ;; C) PREFC=$OPTARG + shift 2 ;; F) FORCEFLAG="-F" + shift 1 ;; *) usage
@@ -211,10 +217,8 @@ esac done - # Check for the command -eval command=\$${OPTIND} -let OPTIND=$OPTIND+1 +command=$1 if [ -z $command ]; then usage fi
@@ -223,17 +227,16 @@ # check if they specified both DIRS and RPMFILES # +shift 1 if [ ! -z "$RPMFILES" ]; then - if [ $OPTIND -le $# ]; then + if [ $# -gt 0 ]; then + echo broken usage fi else - while [ $OPTIND -le $# ]; do - eval DIR=\$${OPTIND} - DIRS="$DIRS $DIR" - let OPTIND=$OPTIND+1 - done + DIRS=$* fi + # # Make sure they specified one of the three valid commands #
Quoted 9 lines · Daniel J Walsh
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1fixfiles restore
/usr/bin/g*goes nuts.
This patch fixes this.
Is the "echo broken" line supposed to be there?
Signature · 8 lines
Eamon Walsh <[email protected]> National Security Agency -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.