libnet: Fix Coverity ID 1634803 Dereference after null check
[samba4-gss.git] / source3 / script / tests / test_net_dom_join_fail_dc.sh
blob436749248aa16f9f36490f89dca18939d12c85ac
1 #!/bin/sh
3 if [ $# -lt 4 ]; then
4 cat <<EOF
5 Usage: test_net_dom_join_fail_dc.sh USERNAME PASSWORD DOMAIN PREFIX
6 EOF
7 exit 1
8 fi
10 DC_USERNAME="$1"
11 DC_PASSWORD="$2"
12 DOMAIN="$3"
13 PREFIX="$4"
14 shift 4
15 ADDARGS="$*"
17 incdir=$(dirname $0)/../../../testprogs/blackbox
18 . $incdir/subunit.sh
19 mkdir -p $PREFIX/private
20 testit_expect_failure "net_dom_join_fail_dc" $VALGRIND $BINDIR/net dom join domain=$DOMAIN account=$USERNAME password=$PASSWORD --option=netbiosname=netrpcjointest --option=domainlogons=yes --option=privatedir=$PREFIX/private $ADDARGS || failed=$(expr $failed + 1)
22 testok $0 $failed