diff options
Diffstat (limited to 'source3/script/tests/test_net_machine_account.sh')
-rwxr-xr-x | source3/script/tests/test_net_machine_account.sh | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/source3/script/tests/test_net_machine_account.sh b/source3/script/tests/test_net_machine_account.sh new file mode 100755 index 0000000..ad1d099 --- /dev/null +++ b/source3/script/tests/test_net_machine_account.sh @@ -0,0 +1,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 |