diff options
author | Matthias Dieter Wallnöfer <mdw@samba.org> | 2011-10-22 12:44:02 +0200 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2012-03-26 02:30:53 +0200 |
commit | d86e701b7ca42f3d21d6c5b7b6a1827bd37f0ee6 (patch) | |
tree | 709974cd5d9c2d7ee933575bf22262d1e06a605b /source4/dsdb/tests | |
parent | d6fde2d4c24d7fb5e040ccb00476f689a4472eff (diff) | |
download | samba-d86e701b7ca42f3d21d6c5b7b6a1827bd37f0ee6.tar.gz samba-d86e701b7ca42f3d21d6c5b7b6a1827bd37f0ee6.tar.bz2 samba-d86e701b7ca42f3d21d6c5b7b6a1827bd37f0ee6.zip |
s4:ldap.py - re-introduce the "(dn=CN=ldaptestUSER3,CN=Users,DC=wallnoefer2,DC=local)" test
This syntax is not supported by Windows AD and should also be denied by
s4/LDB.
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Mon Mar 26 02:30:53 CEST 2012 on sn-devel-104
Diffstat (limited to 'source4/dsdb/tests')
-rwxr-xr-x | source4/dsdb/tests/python/ldap.py | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/source4/dsdb/tests/python/ldap.py b/source4/dsdb/tests/python/ldap.py index 0682939edf..5ca4c26dab 100755 --- a/source4/dsdb/tests/python/ldap.py +++ b/source4/dsdb/tests/python/ldap.py @@ -1928,20 +1928,13 @@ servicePrincipalName: host/ldaptest2computer29 res = ldb.search(expression="(&(&(cn=ldaptestuser3)(userAccountControl=547))(objectClass=user))") self.assertEquals(len(res), 0, "(&(&(cn=ldaptestuser3)(userAccountControl=547))(objectClass=user))") - # This is a Samba special, and does not exist in real AD - # print "Testing ldb.search for (dn=CN=ldaptestUSER3,CN=Users," + self.base_dn + ")" - # res = ldb.search("(dn=CN=ldaptestUSER3,CN=Users," + self.base_dn + ")") - # if (res.error != 0 || len(res) != 1) { - # print "Could not find (dn=CN=ldaptestUSER3,CN=Users," + self.base_dn + ")" - # self.assertEquals(len(res), 1) - # } - # self.assertEquals(res[0].dn, ("CN=ldaptestUSER3,CN=Users," + self.base_dn)) - # self.assertEquals(res[0].cn, "ldaptestUSER3") - # self.assertEquals(res[0].name, "ldaptestUSER3") + print "Testing ldb.search for (dn=CN=ldaptestUSER3,CN=Users," + self.base_dn + ") - should not work" + res = ldb.search(expression="(dn=CN=ldaptestUSER3,CN=Users," + self.base_dn + ")") + self.assertEquals(len(res), 0, "Could find (dn=CN=ldaptestUSER3,CN=Users," + self.base_dn + ")") print "Testing ldb.search for (distinguishedName=CN=ldaptestUSER3,CN=Users," + self.base_dn + ")" res = ldb.search(expression="(distinguishedName=CN=ldaptestUSER3,CN=Users," + self.base_dn + ")") - self.assertEquals(len(res), 1, "Could not find (dn=CN=ldaptestUSER3,CN=Users," + self.base_dn + ")") + self.assertEquals(len(res), 1, "Could not find (distinguishedName=CN=ldaptestUSER3,CN=Users," + self.base_dn + ")") self.assertEquals(str(res[0].dn), ("CN=ldaptestUSER3,CN=Users," + self.base_dn)) self.assertEquals(str(res[0]["cn"]), "ldaptestUSER3") self.assertEquals(str(res[0]["name"]), "ldaptestUSER3") |