From 32f2e390e473f01c693d3140d30e20850e87b4c0 Mon Sep 17 00:00:00 2001 From: Gary Lockyer Date: Thu, 4 Jul 2019 16:44:21 +1200 Subject: [PATCH] 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 --- lib/ldb/common/ldb_options.c | 5 +++++ lib/ldb/include/ldb_module.h | 7 +++++++ 2 files changed, 12 insertions(+) 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 -- 2.47.3