diff options
author | Andrew Bartlett <abartlet@samba.org> | 2011-02-18 18:52:00 +1100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2011-02-22 14:50:14 +1100 |
commit | 1650da8a9964ba2ca3d389bdb39f65f7fa579ffc (patch) | |
tree | 19ac6a374eb2c79238d643edbeb3a86388d3050f /source3/script/tests/test_smbclient_auth.sh | |
parent | c43eb39098d1bc507f550971fab4bce61f0e5d1a (diff) | |
download | samba-1650da8a9964ba2ca3d389bdb39f65f7fa579ffc.tar.gz samba-1650da8a9964ba2ca3d389bdb39f65f7fa579ffc.tar.bz2 samba-1650da8a9964ba2ca3d389bdb39f65f7fa579ffc.zip |
Add tests for various s3 auth modes
Diffstat (limited to 'source3/script/tests/test_smbclient_auth.sh')
-rwxr-xr-x | source3/script/tests/test_smbclient_auth.sh | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/source3/script/tests/test_smbclient_auth.sh b/source3/script/tests/test_smbclient_auth.sh new file mode 100755 index 0000000000..dab914a61c --- /dev/null +++ b/source3/script/tests/test_smbclient_auth.sh @@ -0,0 +1,38 @@ +#!/bin/sh + +# this runs the file serving tests that are expected to pass with samba3 against shares with various options + +if [ $# -lt 5 ]; then +cat <<EOF +Usage: test_smbclient_s3.sh SERVER SERVER_IP USERNAME PASSWORD USERID LOCAL_PATH +EOF +exit 1; +fi + +SERVER="$1" +SERVER_IP="$2" +USERNAME="$3" +PASSWORD="$4" +USERID="$5" +SMBCLIENT="$VALGRIND ${SMBCLIENT:-$BINDIR/smbclient} $CONFIGURATION" +WBINFO="$VALGRIND ${WBINFO:-$BINDIR/wbinfo}" +shift 5 +ADDARGS="$*" + +test x"$TEST_FUNCTIONS_SH" != x"INCLUDED" && { +incdir=`dirname $0`/../../../testprogs/blackbox +. $incdir/subunit.sh +} + +failed=0 + +testit "smbclient //$SERVER/guestonly" $SMBCLIENT //$SERVER/guestonly $CONFIGURATION -U$USERNAME%$PASSWORD -I $SERVER_IP -N -p 139 -c quit|| failed=`expr $failed + 1` +testit "smbclient //$SERVER/guestonly as anon" $SMBCLIENT //$SERVER/guestonly $CONFIGURATION -U% -I $SERVER_IP -N -p 139 -c quit|| failed=`expr $failed + 1` +testit "smbclient //$SERVER/tmpguest" $SMBCLIENT //$SERVER/tmpguest $CONFIGURATION -U$USERNAME%$PASSWORD -I $SERVER_IP -N -p 139 -c quit|| failed=`expr $failed + 1` +testit "smbclient //$SERVER/tmpguest as anon" $SMBCLIENT //$SERVER/tmpguest $CONFIGURATION -U% -I $SERVER_IP -N -p 139 -c quit|| failed=`expr $failed + 1` +testit "smbclient //$SERVER/forceuser" $SMBCLIENT //$SERVER/forceuser $CONFIGURATION -U$USERNAME%$PASSWORD -I $SERVER_IP -N -p 139 -c quit|| failed=`expr $failed + 1` +testit "smbclient //$SERVER/forceuser as anon" $SMBCLIENT //$SERVER/forceuser $CONFIGURATION -U% -I $SERVER_IP -N -p 139 -c quit|| failed=`expr $failed + 1` +testit "smbclient //$SERVER/forcegroup" $SMBCLIENT //$SERVER/forcegroup $CONFIGURATION -U$USERNAME%$PASSWORD -I $SERVER_IP -N -p 139 -c quit|| failed=`expr $failed + 1` +testit "smbclient //$SERVER/forcegroup as anon" $SMBCLIENT //$SERVER/forcegroup $CONFIGURATION -U% -I $SERVER_IP -N -p 139 -c quit|| failed=`expr $failed + 1` + +testok $0 $failed |