summaryrefslogtreecommitdiff
path: root/source3/torture
diff options
context:
space:
mode:
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;
}