]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs_admin: clean up string quoting
authorDarrick J. Wong <djwong@kernel.org>
Wed, 24 Feb 2021 00:09:28 +0000 (19:09 -0500)
committerEric Sandeen <sandeen@sandeen.net>
Wed, 24 Feb 2021 00:09:28 +0000 (19:09 -0500)
Clean up the string quoting in this script so that we don't trip over
users feeding us arguments like "/dev/sd ha ha ha lol".

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Reviewed-by: Allison Henderson <allison.henderson@oracle.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
db/xfs_admin.sh

index bd325da2f7764c1633a58e7ef7862b29db8c5e92..71a9aa98f66243794b69715590afecd99600c5dd 100755 (executable)
@@ -43,7 +43,7 @@ case $# in
 
                if [ -n "$DB_OPTS" ]
                then
-                       eval xfs_db -x -p xfs_admin $DB_OPTS $1
+                       eval xfs_db -x -p xfs_admin $DB_OPTS "$1"
                        status=$?
                fi
                if [ -n "$REPAIR_OPTS" ]
@@ -53,7 +53,7 @@ case $# in
                        # running xfs_admin.
                        # Ideally, we need to improve the output behaviour
                        # of repair for this purpose (say a "quiet" mode).
-                       eval xfs_repair $REPAIR_OPTS $1 2> /dev/null
+                       eval xfs_repair $REPAIR_OPTS "$1" 2> /dev/null
                        status=`expr $? + $status`
                        if [ $status -ne 0 ]
                        then