summaryrefslogtreecommitdiff
path: root/source4/selftest
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2015-12-21 10:04:48 +0100
committerStefan Metzmacher <metze@samba.org>2016-04-12 19:25:25 +0200
commit2b40fb850925477d82db39d188da84123b121bdf (patch)
tree24a04608f1ca37f296c9239b175339b91196399b /source4/selftest
parente71be8099af8347a487e63b2044d41e9c5dabfc8 (diff)
downloadsamba-2b40fb850925477d82db39d188da84123b121bdf.tar.gz
CVE-2016-2112: s4:selftest: run some ldap test against ad_dc_ntvfs, fl2008r2dc and fl2003dc
We want to test against all "ldap server require strong auth" combinations. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11644 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Günther Deschner <gd@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
Diffstat (limited to 'source4/selftest')
-rwxr-xr-xsource4/selftest/tests.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/source4/selftest/tests.py b/source4/selftest/tests.py
index b141202f44e..80f5ab9b227 100755
--- a/source4/selftest/tests.py
+++ b/source4/selftest/tests.py
@@ -74,6 +74,30 @@ if have_tls_support:
plantestsuite("samba4.ldb.ldaps with options %s(ad_dc_ntvfs)" % options, "ad_dc_ntvfs",
"%s/test_ldb.sh ldaps $SERVER_IP %s" % (bbdir, options))
+# test all "ldap server require strong auth" combinations
+for env in ["ad_dc_ntvfs", "fl2008r2dc", "fl2003dc"]:
+ options = '--simple-bind-dn="$USERNAME@$REALM" --password="$PASSWORD"'
+ plantestsuite("samba4.ldb.simple.ldap with SIMPLE-BIND %s(%s)" % (options, env),
+ env, "%s/test_ldb_simple.sh ldap $SERVER %s" % (bbdir, options))
+ if have_tls_support:
+ plantestsuite("samba4.ldb.simple.ldaps with SIMPLE-BIND %s(%s)" % (options, env),
+ env, "%s/test_ldb_simple.sh ldaps $SERVER %s" % (bbdir, options))
+
+ auth_options = [
+ '--option=clientldapsaslwrapping=plain',
+ '--sign',
+ '--encrypt',
+ ]
+
+ for auth_option in auth_options:
+ options = '-U"$USERNAME%$PASSWORD"' + ' ' + auth_option
+ plantestsuite("samba4.ldb.simple.ldap with SASL-BIND %s(%s)" % (options, env),
+ env, "%s/test_ldb_simple.sh ldap $SERVER %s" % (bbdir, options))
+ if have_tls_support:
+ options = '-U"$USERNAME%$PASSWORD"'
+ plantestsuite("samba4.ldb.simple.ldaps with SASL-BIND %s(%s)" % (options, env),
+ env, "%s/test_ldb_simple.sh ldaps $SERVER %s" % (bbdir, options))
+
for options in ['-U"$USERNAME%$PASSWORD"']:
plantestsuite("samba4.ldb.ldapi with options %s(ad_dc_ntvfs:local)" % options, "ad_dc_ntvfs:local",
"%s/test_ldb.sh ldapi $PREFIX_ABS/ad_dc_ntvfs/private/ldapi %s" % (bbdir, options))