From 9faa3173193ddcb95905993d960cc10d4366524e Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Wed, 17 Nov 2021 16:34:07 +0100 Subject: [PATCH] selftest: Add reproducer for bug 14908 Bug: https://bugzilla.samba.org/show_bug.cgi?id=14908 Signed-off-by: Volker Lendecke Reviewed-by: Ralph Boehme --- .../knownfail.d/clustered_machine_account | 1 + .../script/tests/test_net_machine_account.sh | 22 +++++++++++++++++++ source3/selftest/tests.py | 9 ++++++++ 3 files changed, 32 insertions(+) create mode 100644 selftest/knownfail.d/clustered_machine_account create mode 100755 source3/script/tests/test_net_machine_account.sh diff --git a/selftest/knownfail.d/clustered_machine_account b/selftest/knownfail.d/clustered_machine_account new file mode 100644 index 00000000000..16abc62a51c --- /dev/null +++ b/selftest/knownfail.d/clustered_machine_account @@ -0,0 +1 @@ +^samba3.net_machine_account.net_ads_user\(clusteredmember\) \ No newline at end of file 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 00000000000..69844443bf6 --- /dev/null +++ b/source3/script/tests/test_net_machine_account.sh @@ -0,0 +1,22 @@ +#!/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 + +export UID_WRAPPER_ROOT=1 + +incdir=`dirname $0`/../../../testprogs/blackbox +. $incdir/subunit.sh + +failed=0 + +testit "net_ads_user" $VALGRIND $NET rpc user --configfile="$CONFFILE" -S "$SERVER_IP" -P || failed=`expr $failed + 1` + +testok $0 $failed diff --git a/source3/selftest/tests.py b/source3/selftest/tests.py index bb47851bbc6..f4319959353 100755 --- a/source3/selftest/tests.py +++ b/source3/selftest/tests.py @@ -1311,6 +1311,15 @@ plantestsuite( "", "-b $PREFIX/clusteredmember/unclists/tmp.txt -N 5 -o 10"]) +plantestsuite( + "samba3.net_machine_account", + "clusteredmember", + [os.path.join(samba3srcdir, + "script/tests/test_net_machine_account.sh"), + "bin/net", + "$SERVERCONFFILE", + "$SERVER_IP"]) + plantestsuite( "samba3.net_lookup_ldap", "ad_dc:local",