The branch, master has been updated
via 5f8125665cb mdssvc: make a copy of the elasticsearch:default_fields
from 8a05e17dfeb vfs_ceph_new: do explicit 'ceph_init' call
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 5f8125665cb2ccad12678f95d20cae09922b3767
Author: Ralph Boehme <[email protected]>
Date: Fri Nov 21 11:12:13 2025 +0100
mdssvc: make a copy of the elasticsearch:default_fields
lp_parm_const_string() returns a pointer to loadparm state that is not
stable
across loadparm reloads and hence may later point at random garbage.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15959
Signed-off-by: Ralph Boehme <[email protected]>
Reviewed-by: Volker Lendecke <[email protected]>
Autobuild-User(master): Volker Lendecke <[email protected]>
Autobuild-Date(master): Tue Dec 16 18:58:07 UTC 2025 on atb-devel-224
-----------------------------------------------------------------------
Summary of changes:
source3/rpc_server/mdssvc/mdssvc_es.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/rpc_server/mdssvc/mdssvc_es.c
b/source3/rpc_server/mdssvc/mdssvc_es.c
index eb19d5fdc4a..59f91271e59 100644
--- a/source3/rpc_server/mdssvc/mdssvc_es.c
+++ b/source3/rpc_server/mdssvc/mdssvc_es.c
@@ -108,10 +108,12 @@ static bool mdssvc_es_init(struct mdssvc_ctx *mdssvc_ctx)
}
TALLOC_FREE(default_path);
- mdssvc_es_ctx->default_fields =
lp_parm_const_string(GLOBAL_SECTION_SNUM,
- "elasticsearch",
- "default_fields",
- default_fields);
+ default_fields = lp_parm_const_string(GLOBAL_SECTION_SNUM,
+ "elasticsearch",
+ "default_fields",
+ default_fields);
+ mdssvc_es_ctx->default_fields = talloc_strdup(mdssvc_es_ctx,
+ default_fields);
if (mdssvc_es_ctx->default_fields == NULL) {
TALLOC_FREE(mdssvc_es_ctx);
return false;
--
Samba Shared Repository