s4:partition LDB module - fix handling regarding special DNs on searches
authorMatthias Dieter Wallnöfer <mdw@samba.org>
Thu, 20 Oct 2011 20:00:15 +0000 (22:00 +0200)
committerMatthias Dieter Wallnöfer <mdw@samba.org>
Tue, 15 Nov 2011 21:43:06 +0000 (22:43 +0100)
Normally they should always be passed to the main backend unless
something different has been specified.

Reviewed-by: abartlet
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Tue Nov 15 22:43:06 CET 2011 on sn-devel-104

source4/dsdb/samdb/ldb_modules/partition.c

index 92918c798d98d760731461ff68bfb7f85ba04745..7bf109c7f68c8cb91358f57651763dc5f36c8cb2 100644 (file)
@@ -585,6 +585,11 @@ static int partition_search(struct ldb_module *module, struct ldb_request *req)
                return ldb_next_request(module, req);
        }
 
+       /* Special DNs without specified partition should go further */
+       if (ldb_dn_is_special(req->op.search.base)) {
+               return ldb_next_request(module, req);
+       }
+
        /* Locate the options */
        domain_scope = (search_options
                && (search_options->search_options & LDB_SEARCH_OPTION_DOMAIN_SCOPE))