From c60a48948a75a6d300e31c2a2629daa4a48cbeb1 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 13 Jul 2011 12:25:09 +1000 Subject: ldb: don't return special DNs on non-base searches to look at a special DN, give the full DN Pair-Programmed-With: Andrew Bartlett --- lib/ldb/common/ldb_match.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/ldb/common') diff --git a/lib/ldb/common/ldb_match.c b/lib/ldb/common/ldb_match.c index a42cf9449d..c23e80478a 100644 --- a/lib/ldb/common/ldb_match.c +++ b/lib/ldb/common/ldb_match.c @@ -463,6 +463,11 @@ static int ldb_match_message(struct ldb_context *ldb, *matched = false; + if (scope != LDB_SCOPE_BASE && ldb_dn_is_special(msg->dn)) { + /* don't match special records except on base searches */ + return LDB_SUCCESS; + } + switch (tree->operation) { case LDB_OP_AND: for (i=0;iu.list.num_elements;i++) { -- cgit