diff --git a/source3/script/tests/test_smbclient_s3.sh b/source3/script/tests/test_smbclient_s3.sh index 0bae1d78fac..5df8a7cb550 100755 --- a/source3/script/tests/test_smbclient_s3.sh +++ b/source3/script/tests/test_smbclient_s3.sh @@ -331,7 +331,7 @@ test_msdfs_link() tmpfile=$PREFIX/smbclient.in.$$ prompt=" msdfs-target " - cmd='$SMBCLIENT "$@" -U$USERNAME%$PASSWORD //$SERVER/msdfs-share -I $SERVER_IP $ADDARGS -m nt1 -c dir 2>&1' + cmd='$SMBCLIENT "$@" -U$USERNAME%$PASSWORD //$SERVER/msdfs-share -I $SERVER_IP $ADDARGS -m $PROTOCOL -c dir 2>&1' out=`eval $cmd` ret=$? @@ -694,7 +694,9 @@ EOF test_bad_names() { # First with SMB1 - cmd='CLI_FORCE_INTERACTIVE=yes $SMBCLIENT "$@" -U$USERNAME%$PASSWORD //$SERVER/badname-tmp -I $SERVER_IP $ADDARGS -mNT1 -c ls 2>&1' + +if [ $PROTOCOL = "NT1" ]; then + cmd='CLI_FORCE_INTERACTIVE=yes $SMBCLIENT "$@" -U$USERNAME%$PASSWORD //$SERVER/badname-tmp -I $SERVER_IP $ADDARGS -m$PROTOCOL -c ls 2>&1' eval echo "$cmd" out=`eval $cmd` ret=$? @@ -752,9 +754,12 @@ test_bad_names() echo "failed listing \\badname-tmp - grep (5) failed with $ret" return 1 fi +fi + +if [ $PROTOCOL = "SMB3" ]; then # Now check again with -mSMB3 - cmd='CLI_FORCE_INTERACTIVE=yes $SMBCLIENT "$@" -U$USERNAME%$PASSWORD //$SERVER/badname-tmp -I $SERVER_IP $ADDARGS -mSMB3 -c ls 2>&1' + cmd='CLI_FORCE_INTERACTIVE=yes $SMBCLIENT "$@" -U$USERNAME%$PASSWORD //$SERVER/badname-tmp -I $SERVER_IP $ADDARGS -m$PROTOCOL -c ls 2>&1' eval echo "$cmd" out=`eval $cmd` ret=$? @@ -812,6 +817,7 @@ test_bad_names() echo "failed listing \\badname-tmp - SMB3 grep (5) failed with $ret" return 1 fi +fi } # Test accessing an share with a name that must be mangled - with acl_xattrs. @@ -862,8 +868,9 @@ del smbclient del scopy_file quit EOF +if [ $PROTOCOL = "SMB3" ]; then # First SMB3 - cmd='CLI_FORCE_INTERACTIVE=yes $SMBCLIENT "$@" -U$USERNAME%$PASSWORD //$SERVER/tmp -I $SERVER_IP $ADDARGS -mSMB3 < $tmpfile 2>&1' + cmd='CLI_FORCE_INTERACTIVE=yes $SMBCLIENT "$@" -U$USERNAME%$PASSWORD //$SERVER/tmp -I $SERVER_IP $ADDARGS -m$PROTOOCL < $tmpfile 2>&1' eval echo "$cmd" out=`eval $cmd` ret=$? @@ -883,12 +890,13 @@ EOF echo "failed md5sum (1)" return 1 fi - +fi # # Now do again using SMB1 # to force client-side fallback. # +if [ $PROTOCOL = "NT1" ]; then cat > $tmpfile <