diff options
Diffstat (limited to 'source4/dsdb')
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/partition.c | 9 |
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)); |