summaryrefslogtreecommitdiff
path: root/lib/ldb/common
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2011-07-13 12:25:09 +1000
committerAndrew Tridgell <tridge@samba.org>2011-07-13 12:51:05 +0200
commitc60a48948a75a6d300e31c2a2629daa4a48cbeb1 (patch)
treecc0fa96e3e8734da90c9c9935d6e7d3abd319926 /lib/ldb/common
parent58e89443e2e1722dec85ec426a63449b53b19ea3 (diff)
downloadsamba-c60a48948a75a6d300e31c2a2629daa4a48cbeb1.tar.gz
samba-c60a48948a75a6d300e31c2a2629daa4a48cbeb1.tar.bz2
samba-c60a48948a75a6d300e31c2a2629daa4a48cbeb1.zip
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 <abartlet@samba.org>
Diffstat (limited to 'lib/ldb/common')
-rw-r--r--lib/ldb/common/ldb_match.c5
1 files changed, 5 insertions, 0 deletions
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;i<tree->u.list.num_elements;i++) {