From: Gary Lockyer Date: Thu, 4 Jul 2019 04:44:21 +0000 (+1200) Subject: ldb: Add new internal helper function ldb_options_get() X-Git-Tag: ldb-2.0.5~5 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=32f2e390e473f01c693d3140d30e20850e87b4c0;p=thirdparty%2Fsamba.git ldb: Add new internal helper function ldb_options_get() This is needed for modules to access the ldb->options array, as this in in ldb_private.h Signed-off-by: Gary Lockyer Reviewed-by: Andrew Bartlett --- diff --git a/lib/ldb/common/ldb_options.c b/lib/ldb/common/ldb_options.c index 0aa80f75159..ee8c7283ada 100644 --- a/lib/ldb/common/ldb_options.c +++ b/lib/ldb/common/ldb_options.c @@ -100,3 +100,8 @@ const char **ldb_options_copy(TALLOC_CTX *ctx, const char *options[]) } return copy; } + +const char **ldb_options_get(struct ldb_context *ldb) +{ + return ldb->options; +} diff --git a/lib/ldb/include/ldb_module.h b/lib/ldb/include/ldb_module.h index 7f8b57dfeec..ab3d25c5c6e 100644 --- a/lib/ldb/include/ldb_module.h +++ b/lib/ldb/include/ldb_module.h @@ -582,4 +582,11 @@ int ldb_unpack_get_format(const struct ldb_val *data, */ void ldb_handle_use_global_event_context(struct ldb_handle *handle); +/** + * Get the options passed to ldb_connect. + * + * This allows the options to be inspected by elements in the module stack + * + */ +const char **ldb_options_get(struct ldb_context *ldb); #endif