mirror of
https://github.com/samba-team/samba.git
synced 2025-01-18 06:04:06 +03:00
testprogs/blackbox: add test_net_ads_search_server.sh
This reproduces a regression with 'net ads search -P --server server.of.trusted.domain' BUG: https://bugzilla.samba.org/show_bug.cgi?id=15323 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> (cherry picked from commit 3b585f9e8cc320841fab4cd5c3be53788d0a87ac)
This commit is contained in:
parent
d8fa74a176
commit
45a264bf5b
@ -0,0 +1 @@
|
||||
^samba4.blackbox.net_ads_search_server_P.trust
|
@ -666,6 +666,17 @@ plantestsuite("samba4.blackbox.client_etypes_strong(ad_dc:client)", "ad_dc:clien
|
||||
plantestsuite("samba4.blackbox.net_ads_dns(ad_member:local)", "ad_member:local", [os.path.join(bbdir, "test_net_ads_dns.sh"), '$DC_SERVER', '$DC_USERNAME', '$DC_PASSWORD', '$REALM', '$USERNAME', '$PASSWORD'])
|
||||
plantestsuite("samba4.blackbox.samba-tool_ntacl(ad_member:local)", "ad_member:local", [os.path.join(bbdir, "test_samba-tool_ntacl.sh"), '$PREFIX', '$DOMSID'])
|
||||
|
||||
env = "ad_member:local"
|
||||
plantestsuite("samba4.blackbox.net_ads_search_server_P.primary", env,
|
||||
[os.path.join(bbdir, "test_net_ads_search_server.sh"),
|
||||
'$DC_SERVER', '$REALM'])
|
||||
plantestsuite("samba4.blackbox.net_ads_search_server_P.trust_e_both", env,
|
||||
[os.path.join(bbdir, "test_net_ads_search_server.sh"),
|
||||
'$TRUST_E_BOTH_SERVER', '$TRUST_E_BOTH_REALM'])
|
||||
plantestsuite("samba4.blackbox.net_ads_search_server_P.trust_f_both", env,
|
||||
[os.path.join(bbdir, "test_net_ads_search_server.sh"),
|
||||
'$TRUST_F_BOTH_SERVER', '$TRUST_F_BOTH_REALM'])
|
||||
|
||||
if have_gnutls_fips_mode_support:
|
||||
plantestsuite("samba4.blackbox.weak_crypto.client", "ad_dc", [os.path.join(bbdir, "test_weak_crypto.sh"), '$SERVER', '$USERNAME', '$PASSWORD', '$REALM', '$DOMAIN', "$PREFIX/ad_dc"])
|
||||
plantestsuite("samba4.blackbox.test_weak_disable_ntlmssp_ldap", "ad_member:local", [os.path.join(bbdir, "test_weak_disable_ntlmssp_ldap.sh"),'$DC_USERNAME', '$DC_PASSWORD'])
|
||||
|
37
testprogs/blackbox/test_net_ads_search_server.sh
Executable file
37
testprogs/blackbox/test_net_ads_search_server.sh
Executable file
@ -0,0 +1,37 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ $# -lt 2 ]; then
|
||||
cat <<EOF
|
||||
Usage: $0 SERVER REALM
|
||||
EOF
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
SERVER=$1
|
||||
REALM=$2
|
||||
shift 2
|
||||
|
||||
failed=0
|
||||
. `dirname $0`/subunit.sh
|
||||
|
||||
samba_net="$BINDIR/net"
|
||||
|
||||
DN=$(echo "${REALM}" | tr '[:upper:]' '[:lower:]' | sed -e 's!^!DC=!' -e 's!\.!,DC=!g')
|
||||
testit_grep_count \
|
||||
"net_ads_search.ntlmssp" \
|
||||
"distinguishedName: ${DN}" \
|
||||
1 \
|
||||
$samba_net ads search --use-kerberos=off -P \
|
||||
--server "${SERVER}.${REALM}" \
|
||||
'(objectClass=domain)' distinguishedName || \
|
||||
failed=$((failed + 1))
|
||||
testit_grep_count \
|
||||
"net_ads_search.krb5" \
|
||||
"distinguishedName: ${DN}" \
|
||||
1 \
|
||||
$samba_net ads search --use-kerberos=required -P \
|
||||
--server "${SERVER}.${REALM}" \
|
||||
'(objectClass=domain)' distinguishedName || \
|
||||
failed=$((failed + 1))
|
||||
|
||||
exit $failed
|
Loading…
x
Reference in New Issue
Block a user