From 8daa83a594a2e98f39d764422bfbdbc62c9efd44 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 19:20:00 +0200 Subject: Adding upstream version 2:4.20.0+dfsg. Signed-off-by: Daniel Baumann --- source3/script/tests/test_smbclient_basic.sh | 47 ++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100755 source3/script/tests/test_smbclient_basic.sh (limited to 'source3/script/tests/test_smbclient_basic.sh') diff --git a/source3/script/tests/test_smbclient_basic.sh b/source3/script/tests/test_smbclient_basic.sh new file mode 100755 index 0000000..6e2a17c --- /dev/null +++ b/source3/script/tests/test_smbclient_basic.sh @@ -0,0 +1,47 @@ +#!/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 + exit 1 +fi + +SERVER="$1" +SERVER_IP="$2" +USERNAME="$3" +PASSWORD="$4" +smbclient="$5" +CONFIGURATION="$6" +shift 6 +ADDARGS="$@" + +incdir=$(dirname $0)/../../../testprogs/blackbox +. $incdir/subunit.sh +. $incdir/common_test_fns.inc + +# TEST using \ as the separator (default) +test_smbclient "smbclient as $DOMAIN\\$USERNAME" 'ls' "//$SERVER/tmp" -U$DOMAIN\\$USERNAME%$PASSWORD $ADDARGS || failed=$(expr $failed + 1) +# TEST using / as the separator (default) +test_smbclient "smbclient as $DOMAIN/$USERNAME" 'ls' "//$SERVER/tmp" -U$DOMAIN/$USERNAME%$PASSWORD $ADDARGS || failed=$(expr $failed + 1) + +# TEST using 'winbind separator = +' +test_smbclient "smbclient as $DOMAIN+$USERNAME" 'ls' "//$SERVER/tmp" -U$DOMAIN+$USERNAME%$PASSWORD $ADDARGS --option=winbindseparator=+ || failed=$(expr $failed + 1) + +# TEST using 'winbind separator = +' set in a config file +smbclient_config="$PREFIX/tmpsmbconf" +cat >$smbclient_config <