r4586: RPC-LSA now passes against w2k3
[samba.git] / source4 / script / tests / test_w2k3.sh
1 #!/bin/sh
2
3 # tests that should pass against a w2k3 DC, as administrator
4
5 # add tests to this list as they start passing, so we test
6 # that they stay passing
7 ncacn_np_tests="RPC-DSSETUP RPC-EPMAPPER RPC-SAMR RPC-WKSSVC RPC-SRVSVC RPC-EVENTLOG RPC-NETLOGON RPC-LSA"
8 ncacn_ip_tcp_tests="RPC-EPMAPPER RPC-SAMR RPC-LSA RPC-NETLOGON"
9
10 if [ $# -lt 4 ]; then
11 cat <<EOF
12 Usage: test_w2k3.sh SERVER USERNAME PASSWORD DOMAIN
13 EOF
14 exit 1;
15 fi
16
17 server="$1"
18 username="$2"
19 password="$3"
20 domain="$4"
21 shift 4
22
23 testit() {
24    trap "rm -f test.$$" EXIT
25    cmdline="$*"
26    if ! $cmdline > test.$$ 2>&1; then
27        cat test.$$;
28        rm -f test.$$;
29        echo "TEST FAILED - $cmdline";
30        exit 1;
31    fi
32    rm -f test.$$;
33 }
34
35 for transport in ncacn_ip_tcp ncacn_np; do
36  for bindoptions in connect sign seal validate bigendian; do
37      case $transport in
38          ncacn_np) tests=$ncacn_np_tests ;;
39          ncacn_ip_tcp) tests=$ncacn_ip_tcp_tests ;;
40      esac
41    for t in $tests; do
42     echo Testing $t on $transport with $bindoptions
43     testit bin/smbtorture $transport:"$server[$bindoptions]" -U"$username"%"$password" -W $domain $t "$*"
44    done
45  done
46 done
47
48 echo Testing RPC-DRSUAPI on ncacn_ip_tcp with seal
49 testit bin/smbtorture ncacn_ip_tcp:"$server[seal]" -U"$username"%"$password" -W $domain RPC-DRSUAPI "$*"
50 echo Testing RPC-DRSUAPI on ncacn_ip_tcp with seal,bigendian
51 testit bin/smbtorture ncacn_ip_tcp:"$server[seal,bigendian]" -U"$username"%"$password" -W $domain RPC-DRSUAPI "$*"
52
53 echo "ALL OK";