]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s4:client: Fix shellcheck errors in test_smbclient.sh
authorAndreas Schneider <asn@samba.org>
Fri, 10 Jun 2022 11:05:37 +0000 (13:05 +0200)
committerPavel Filipensky <pfilipensky@samba.org>
Mon, 22 Aug 2022 14:20:36 +0000 (14:20 +0000)
source4/client/tests/test_smbclient.sh:31:99: error: Double quote array
expansions to avoid re-splitting elements. [SC2068]

source4/client/tests/test_smbclient.sh:41:116: error: Double quote array
expansions to avoid re-splitting elements. [SC2068]

source4/client/tests/test_smbclient.sh:43:94: error: Double quote array
expansions to avoid re-splitting elements. [SC2068]

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
source4/client/tests/test_smbclient.sh

index 1d87f90e60120a0fb846921eb72e4544d1773f01..121de173063037d502de64ab6dd6f50e1cef3ed9 100755 (executable)
@@ -28,7 +28,7 @@ runcmd()
        shift
        shift
        echo "test: $name"
-       $VALGRIND $smbclient $CONFIGURATION //$SERVER/tmp -c "$cmd" -W "$DOMAIN" -U"$USERNAME%$PASSWORD" $@
+       $VALGRIND $smbclient $CONFIGURATION //$SERVER/tmp -c "$cmd" -W "$DOMAIN" -U"$USERNAME%$PASSWORD" "$@"
        status=$?
        if [ x$status = x0 ]; then
                echo "success: $name"
@@ -38,9 +38,9 @@ runcmd()
        return $status
 }
 
-testit "share and server list" $VALGRIND $smbclient -L $SERVER $CONFIGURATION -W "$DOMAIN" -U"$USERNAME%$PASSWORD" $@ || failed=$(expr $failed + 1)
+testit "share and server list" $VALGRIND $smbclient -L $SERVER $CONFIGURATION -W "$DOMAIN" -U"$USERNAME%$PASSWORD" "$@" || failed=$(expr $failed + 1)
 
-testit "share and server list anonymously" $VALGRIND $smbclient -N -L $SERVER $CONFIGURATION $@ || failed=$(expr $failed + 1)
+testit "share and server list anonymously" $VALGRIND $smbclient -N -L $SERVER $CONFIGURATION "$@" || failed=$(expr $failed + 1)
 
 # Use the smbclient binary as our test file
 cat $smbclient >$PREFIX/tmpfile