diff options
author | Gary Lockyer <gary@catalyst.net.nz> | 2019-07-04 16:44:21 +1200 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2019-07-04 10:02:23 +0000 |
commit | 32f2e390e473f01c693d3140d30e20850e87b4c0 (patch) | |
tree | ebc84c5f00cc086a5d7ef13710f53a99e616c218 /lib/ldb | |
parent | f58324570655fd9bc08a1ba3923782fb27183917 (diff) | |
download | samba-32f2e390e473f01c693d3140d30e20850e87b4c0.tar.gz |
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 <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'lib/ldb')
-rw-r--r-- | lib/ldb/common/ldb_options.c | 5 | ||||
-rw-r--r-- | lib/ldb/include/ldb_module.h | 7 |
2 files changed, 12 insertions, 0 deletions
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 |