From 656c04da48a3885d14ff4939d5225b8aa037f0d5 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 18 Oct 2004 11:43:26 +0000 Subject: 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) --- source4/script/tests/test_binding_string.sh | 40 +++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100755 source4/script/tests/test_binding_string.sh (limited to 'source4/script/tests/test_binding_string.sh') 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 < 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"; -- cgit