summaryrefslogtreecommitdiff
path: root/source4/torture/ldap
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-11-16 10:48:51 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:28:17 -0500
commit5d7b85184da5eb94ec93761e6984815666d46bb0 (patch)
tree9c33e8cd21a23ec6d3121ee27d061599a35459f3 /source4/torture/ldap
parentb471ed1a0cec6f978f5aa183e925766faca13f59 (diff)
downloadsamba-5d7b85184da5eb94ec93761e6984815666d46bb0.tar.gz
samba-5d7b85184da5eb94ec93761e6984815666d46bb0.tar.bz2
samba-5d7b85184da5eb94ec93761e6984815666d46bb0.zip
r19737: - add some more CLDAP rootdse tests
- don't ignore CLDAP rootdse errors anymore metze (This used to be commit 712577d9e284445e9257b691aefb719511d6a57c)
Diffstat (limited to 'source4/torture/ldap')
-rw-r--r--source4/torture/ldap/cldap.c35
1 files changed, 26 insertions, 9 deletions
diff --git a/source4/torture/ldap/cldap.c b/source4/torture/ldap/cldap.c
index 321feb639f..05f9787191 100644
--- a/source4/torture/ldap/cldap.c
+++ b/source4/torture/ldap/cldap.c
@@ -210,7 +210,9 @@ static BOOL test_cldap_generic(TALLOC_CTX *mem_ctx, const char *dest)
NTSTATUS status;
struct cldap_search search;
BOOL ret = True;
- const char *attrs[] = { "currentTime", "highestCommittedUSN", NULL };
+ const char *attrs1[] = { "currentTime", "highestCommittedUSN", NULL };
+ const char *attrs2[] = { "currentTime", "highestCommittedUSN", "netlogon", NULL };
+ const char *attrs3[] = { "netlogon", NULL };
ZERO_STRUCT(search);
search.in.dest_address = dest;
@@ -231,22 +233,39 @@ static BOOL test_cldap_generic(TALLOC_CTX *mem_ctx, const char *dest)
printf("fetching currentTime and USN\n");
search.in.filter = "(objectclass=*)";
- search.in.attributes = attrs;
+ search.in.attributes = attrs1;
status = cldap_search(cldap, mem_ctx, &search);
CHECK_STATUS(status, NT_STATUS_OK);
if (DEBUGLVL(3)) cldap_dump_results(&search);
+ printf("Testing currentTime, USN and netlogon\n");
+ search.in.filter = "(objectclass=*)";
+ search.in.attributes = attrs2;
+
+ status = cldap_search(cldap, mem_ctx, &search);
+ CHECK_STATUS(status, NT_STATUS_OK);
+
+ if (DEBUGLVL(3)) cldap_dump_results(&search);
+
+ printf("Testing objectClass=* and netlogon\n");
+ search.in.filter = "(objectclass2=*)";
+ search.in.attributes = attrs2;
+
+ status = cldap_search(cldap, mem_ctx, &search);
+ CHECK_STATUS(status, NT_STATUS_OK);
+
+ if (DEBUGLVL(3)) cldap_dump_results(&search);
+
printf("Testing a false expression\n");
search.in.filter = "(&(objectclass=*)(highestCommittedUSN=2))";
- search.in.attributes = attrs;
+ search.in.attributes = attrs1;
status = cldap_search(cldap, mem_ctx, &search);
CHECK_STATUS(status, NT_STATUS_OK);
-
- if (DEBUGLVL(3)) cldap_dump_results(&search);
-
+
+ if (DEBUGLVL(3)) cldap_dump_results(&search);
done:
return ret;
@@ -261,9 +280,7 @@ BOOL torture_cldap(struct torture_context *torture)
mem_ctx = talloc_init("torture_cldap");
ret &= test_cldap_netlogon(mem_ctx, host);
-
- /* at the moment don't consider this failing to be a failure */
- test_cldap_generic(mem_ctx, host);
+ ret &= test_cldap_generic(mem_ctx, host);
talloc_free(mem_ctx);