summaryrefslogtreecommitdiffstats
path: root/source3/script/tests/test_net_machine_account.sh
blob: ad1d0998c18f6353a2efa4b0c97a67b96e5f5f26 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/sh
# Reproducer for https://bugzilla.samba.org/show_bug.cgi?id=14908

if [ $# -lt 2 ]; then
	echo "Usage: $0 NET CONFFILE SERVER_IP"
	exit 1
fi

NET="$1"
shift
CONFFILE="$1"
shift
SERVER_IP="$1"
shift

incdir=$(dirname $0)/../../../testprogs/blackbox
. $incdir/subunit.sh

failed=0

net_ads_user() {
	_out=$(UID_WRAPPER_INITIAL_RUID=0 UID_WRAPPER_INITIAL_EUID=0 \
		${VALGRIND} "${NET}" rpc user \
		--configfile="${CONFFILE}" -S "${SERVER_IP}" -P)
	_ret=$?

	echo "${_out}"

	return ${_ret}
}

testit "net_ads_user" net_ads_user || failed=$((failed + 1))

testok $0 $failed