From: Anoop C S Date: Fri, 24 Jul 2026 11:57:56 +0000 (+0530) Subject: vfs_ceph_new: Include proxy setting in mount cache cookie X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;p=thirdparty%2Fsamba.git vfs_ceph_new: Include proxy setting in mount cache cookie The mount cache cookie is derived from (conf_file/user_id/fsname) but does not include the proxy mode. When two shares differ only in their proxy setting, they produce the same cookie and share a single cached ceph_mount_info. Since libcephfs.so and libcephfs_proxy.so define struct ceph_mount_info with entirely different layouts, calling a function resolved from one library on a mount allocated by the other causes a segfault. Add config->proxy to the cookie so that mounts created by different libraries are never shared. BUG: https://bugzilla.samba.org/show_bug.cgi?id=16186 Signed-off-by: Anoop C S Reviewed-by: John Mulligan Reviewed-by: Guenther Deschner Autobuild-User(master): Anoop C S Autobuild-Date(master): Fri Jul 24 15:56:49 UTC 2026 on atb-devel-224 --- diff --git a/source3/modules/vfs_ceph_new.c b/source3/modules/vfs_ceph_new.c index a85363b48ba..b3a0cc9ded8 100644 --- a/source3/modules/vfs_ceph_new.c +++ b/source3/modules/vfs_ceph_new.c @@ -301,10 +301,11 @@ static bool cephmount_cache_remove(struct cephmount_cached *entry) static char *cephmount_get_cookie(TALLOC_CTX * mem_ctx, struct vfs_ceph_config *config) { - return talloc_asprintf(mem_ctx, "(%s/%s/%s)", + return talloc_asprintf(mem_ctx, "(%s/%s/%s/%d)", config->conf_file, config->user_id, - config->fsname); + config->fsname, + (int)config->proxy); } static int cephmount_update_conf(struct vfs_ceph_config *config,