summaryrefslogtreecommitdiff
path: root/source3/torture
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2010-03-07 20:20:02 -0500
committerSimo Sorce <idra@samba.org>2010-03-09 15:23:48 -0500
commit9f53820de731ca1a7f06341958b43fcfccf82600 (patch)
treeeca2e2bbd33d7a2ac77e6e03d75417d63fdf12be /source3/torture
parent2ee3cca4ffd60d091ca5fe8035f90969f6b91cc4 (diff)
downloadsamba-9f53820de731ca1a7f06341958b43fcfccf82600.tar.gz
samba-9f53820de731ca1a7f06341958b43fcfccf82600.tar.bz2
samba-9f53820de731ca1a7f06341958b43fcfccf82600.zip
s3:tldap add own filter parsing
Also add torture test to check filter parsing.
Diffstat (limited to 'source3/torture')
-rw-r--r--source3/torture/torture.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/source3/torture/torture.c b/source3/torture/torture.c
index 1bb6ad0339..d45209714d 100644
--- a/source3/torture/torture.c
+++ b/source3/torture/torture.c
@@ -6283,6 +6283,7 @@ static bool run_tldap(int dummy)
struct tevent_context *ev;
struct tevent_req *req;
char *basedn;
+ const char *filter;
if (!resolve_name(host, &addr, 0, false)) {
d_printf("could not find host %s\n", host);
@@ -6336,6 +6337,19 @@ static bool run_tldap(int dummy)
TALLOC_FREE(req);
+ /* test search filters against rootDSE */
+ filter = "(&(|(name=samba)(nextRid<=10000000)(usnChanged>=10)(samba~=ambas)(!(name=s*m*a)))"
+ "(|(name:=samba)(name:dn:2.5.13.5:=samba)(:dn:2.5.13.5:=samba)(!(name=*samba))))";
+
+ rc = tldap_search(ld, "", TLDAP_SCOPE_BASE, filter,
+ NULL, 0, 0, NULL, 0, NULL, 0, 0, 0, 0,
+ talloc_tos(), NULL, NULL);
+ if (rc != TLDAP_SUCCESS) {
+ d_printf("tldap_search with complex filter failed: %s\n",
+ tldap_errstr(talloc_tos(), ld, rc));
+ return false;
+ }
+
TALLOC_FREE(ld);
return true;
}