mirror of
https://github.com/samba-team/samba.git
synced 2025-01-26 10:04:02 +03:00
78e5bc76b6
Examples of binding strings are : ncalrpc:[EPMAPPER] ncacn_unix_stream:[/tmp/epmapper] N.B. The unix socket support in lib/socket/ appears to close and remove the socket it is listening on after the first client disconnects so until that has been fixed, it is only possible to do one ncalrpc: or ncacn_unix_stream: request per instance of smbd :-) Support for looking up NCALRPC names via the endpoint mapper will be added later. (This used to be commit 426f3e63cae3d306dcdc13ee4b655eed30057ff8)
42 lines
859 B
Bash
Executable File
42 lines
859 B
Bash
Executable File
#!/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]" \
|
|
"ncalrpc:" \
|
|
"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";
|