From: Gary Lockyer Date: Thu, 4 Jul 2019 02:22:29 +0000 (+1200) Subject: s4 samdb: pass ldb options to ldb_module_connect_backend X-Git-Tag: ldb-2.0.5~4 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7d17dbd10eb203bd48183fd3527165f244bbf4c4;p=thirdparty%2Fsamba.git s4 samdb: pass ldb options to ldb_module_connect_backend Pass the ldb options into ldb_module_connect_backend, to ensure ldb options such as "batch mode" and "transaction index cache size" get passed through to the backend modules. Signed-off-by: Gary Lockyer Reviewed-by: Andrew Bartlett --- diff --git a/source4/dsdb/samdb/ldb_modules/partition_init.c b/source4/dsdb/samdb/ldb_modules/partition_init.c index 7d076932665..19033b4f48f 100644 --- a/source4/dsdb/samdb/ldb_modules/partition_init.c +++ b/source4/dsdb/samdb/ldb_modules/partition_init.c @@ -207,6 +207,7 @@ static int new_partition_from_dn(struct ldb_context *ldb, struct partition_priva struct ldb_module *backend_module; struct ldb_module *module_chain; const char **modules; + const char **options = NULL; int ret; (*partition) = talloc_zero(mem_ctx, struct dsdb_partition); @@ -257,7 +258,9 @@ static int new_partition_from_dn(struct ldb_context *ldb, struct partition_priva ctrl->version = DSDB_CONTROL_CURRENT_PARTITION_VERSION; ctrl->dn = talloc_steal(ctrl, dn); - ret = ldb_module_connect_backend(ldb, (*partition)->backend_url, NULL, &backend_module); + options = ldb_options_get(ldb); + ret = ldb_module_connect_backend( + ldb, (*partition)->backend_url, options, &backend_module); if (ret != LDB_SUCCESS) { return ret; }