diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2004-10-18 11:43:26 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:00:00 -0500 |
commit | 656c04da48a3885d14ff4939d5225b8aa037f0d5 (patch) | |
tree | 8e84a4cce7c4f92c5300cc903545dc0eea98a632 /source4/script/tests | |
parent | 43a80e1d83dad9450014b2a7e0ad5a5e495f69ce (diff) | |
download | samba-656c04da48a3885d14ff4939d5225b8aa037f0d5.tar.gz samba-656c04da48a3885d14ff4939d5225b8aa037f0d5.tar.bz2 samba-656c04da48a3885d14ff4939d5225b8aa037f0d5.zip |
r3032: Somewhat stricter syntax for binding strings:
[] is now mandatory
: after the hostname is no longer allowed
examples of allowed binding strings:
ncacn_np:myhost[samr]
ncacn_ip_tcp:10.0.0.1[1045]
ncacn_ip_tcp:2001:7b8:37b:1:210:dcff:fecb:a9e3[1024,sign,seal]
ncacn_np:myhost
ncacn_ip_tcp:192.168.4.2
308FB580-1EB2-11CA-923B-08002B1075A7@ncacn_ip_tcp:192.168.4.2
308FB580-1EB2-11CA-923B-08002B1075A7@ncacn_ip_tcp:192.168.4.2[,print]
Note that the last two lines are not recognized by smbtorture as a binding
string yet. dcerpc_parse_binding() does accept them though.
(This used to be commit c15862e778507287bddef7967383d4b5d22eaee9)
Diffstat (limited to 'source4/script/tests')
-rwxr-xr-x | source4/script/tests/test_binding_string.sh | 40 | ||||
-rwxr-xr-x | source4/script/tests/test_echo.sh | 4 |
2 files changed, 42 insertions, 2 deletions
diff --git a/source4/script/tests/test_binding_string.sh b/source4/script/tests/test_binding_string.sh new file mode 100755 index 0000000000..5a5e190672 --- /dev/null +++ b/source4/script/tests/test_binding_string.sh @@ -0,0 +1,40 @@ +#!/bin/sh + +if [ $# -lt 4 ]; then +cat <<EOF +Usage: test_binding_string.sh SERVER USERNAME PASSWORD DOMAIN +EOF +exit 1; +fi + +server="$1" +username="$2" +password="$3" +domain="$4" +shift 4 + +testit() { + cmdline="$*" + if ! $cmdline > test.$$ 2>&1; then + cat test.$$; + rm -f test.$$; + echo "TEST FAILED - $cmdline"; + exit 1; + fi + rm -f test.$$; +} + +for I in "ncacn_np:$server" \ + "ncacn_ip_tcp:$server" \ + "ncacn_np:$server[rpcecho]" \ + "ncacn_np:$server[/pipe/rpcecho]" \ + "ncacn_np:$server[/pipe/rpcecho,sign,seal]" \ + "ncacn_np:$server[,sign]" \ + "ncacn_ip_tcp:$server[,sign]" \ + "308FB580-1EB2-11CA-923B-08002B1075A7@ncacn_np:$server" \ + "308FB580-1EB2-11CA-923B-08002B1075A7@ncacn_ip_tcp:$server" +do + testit bin/smbtorture "$I" -U"$username"%"$password" -W $domain RPC-ECHO "$*" +done + +echo "ALL OK"; diff --git a/source4/script/tests/test_echo.sh b/source4/script/tests/test_echo.sh index 724f4cff5e..3aebb11b6b 100755 --- a/source4/script/tests/test_echo.sh +++ b/source4/script/tests/test_echo.sh @@ -35,13 +35,13 @@ for transport in ncacn_np ncacn_ip_tcp; do "--option=ntlmssp_client:ntlm2=no --option=ntlmssp_client:keyexchange=no" \ ; do echo Testing $transport with $bindoptions and $ntlmoptions - testit bin/smbtorture $transport:"$server":$bindoptions $ntlmoptions -U"$username"%"$password" -W $domain RPC-ECHO "$*" + testit bin/smbtorture $transport:"$server[$bindoptions]" $ntlmoptions -U"$username"%"$password" -W $domain RPC-ECHO "$*" done done done # separately test the print option - its v slow echo Testing print option -testit bin/smbtorture ncacn_np:"$server":print -U"$username"%"$password" -W $domain RPC-ECHO "$*" +testit bin/smbtorture ncacn_np:"$server[print]" -U"$username"%"$password" -W $domain RPC-ECHO "$*" echo "ALL OK"; |