s4-partition: fixed selection of partitions on exact match
authorAndrew Tridgell <tridge@samba.org>
Thu, 7 Jan 2010 22:00:15 +0000 (09:00 +1100)
committerAndrew Tridgell <tridge@samba.org>
Fri, 8 Jan 2010 02:03:06 +0000 (13:03 +1100)
When a search is on the root of a partition on the global catalog,
don't search partitions above that one.

source4/dsdb/samdb/ldb_modules/partition.c

index b879bc410610065f382c195df7b67055385b2843..59e7fab3936e4dbfdd5a469c2fc4d830b5e17253 100644 (file)
@@ -524,9 +524,7 @@ static int partition_search(struct ldb_module *module, struct ldb_request *req)
                         */
                        if (ldb_dn_compare(data->partitions[i]->ctrl->dn, req->op.search.base) == 0) {
                                match = true;
                         */
                        if (ldb_dn_compare(data->partitions[i]->ctrl->dn, req->op.search.base) == 0) {
                                match = true;
-                               if (req->op.search.scope == LDB_SCOPE_BASE) {
-                                       stop = true;
-                               }
+                               stop = true;
                        }
                        if (!match && 
                            (ldb_dn_compare_base(req->op.search.base, data->partitions[i]->ctrl->dn) == 0 &&
                        }
                        if (!match && 
                            (ldb_dn_compare_base(req->op.search.base, data->partitions[i]->ctrl->dn) == 0 &&