summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2011-03-06 15:56:06 +0100
committerMatthias Dieter Wallnöfer <mdw@samba.org>2011-03-10 11:12:05 +0100
commite52c900b63bf61daf64e5495241a257a40998a06 (patch)
tree6daf9d80b4a596878e8c95f1844f6b452d82347f /source4
parent4e6b8e0a181b2fa78fd72e7e2724ad5acd81672b (diff)
downloadsamba-e52c900b63bf61daf64e5495241a257a40998a06.tar.gz
samba-e52c900b63bf61daf64e5495241a257a40998a06.tar.bz2
samba-e52c900b63bf61daf64e5495241a257a40998a06.zip
s4:partition LDB module - move the "data" check a bit higher
It can be performed a bit earlier.
Diffstat (limited to 'source4')
-rw-r--r--source4/dsdb/samdb/ldb_modules/partition.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/partition.c b/source4/dsdb/samdb/ldb_modules/partition.c
index 57b804321f..1760fd7510 100644
--- a/source4/dsdb/samdb/ldb_modules/partition.c
+++ b/source4/dsdb/samdb/ldb_modules/partition.c
@@ -500,6 +500,11 @@ static int partition_search(struct ldb_module *module, struct ldb_request *req)
return ldb_oom(ldb_module_get_ctx(module));
}
+ /* if we aren't initialised yet go further */
+ if (!data || !data->partitions) {
+ return ldb_next_request(module, req);
+ }
+
/* Locate the options */
domain_scope = (search_options
&& (search_options->search_options & LDB_SEARCH_OPTION_DOMAIN_SCOPE))
@@ -514,10 +519,6 @@ static int partition_search(struct ldb_module *module, struct ldb_request *req)
& ~LDB_SEARCH_OPTION_PHANTOM_ROOT;
}
- if (!data || !data->partitions) {
- return ldb_next_request(module, req);
- }
-
ac = partition_init_ctx(module, req);
if (!ac) {
return ldb_operr(ldb_module_get_ctx(module));