From: Anoop C S Date: Wed, 1 Jul 2026 15:20:12 +0000 (+0530) Subject: vfs_ceph_rgw: Implement SMB_VFS_OPEN_SHARE_ROOT X-Git-Tag: talloc-2.5.0~82 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fea58a45d16e15458fabdebf850698812fa7a16d;p=thirdparty%2Fsamba.git vfs_ceph_rgw: Implement SMB_VFS_OPEN_SHARE_ROOT Signed-off-by: Anoop C S Reviewed-by: Volker Lendecke Reviewed-by: Ralph Boehme Autobuild-User(master): Anoop C S Autobuild-Date(master): Wed Jul 22 15:49:49 UTC 2026 on atb-devel-224 --- diff --git a/source3/modules/vfs_ceph_rgw.c b/source3/modules/vfs_ceph_rgw.c index 2c88c77f028..d8d75e1754d 100644 --- a/source3/modules/vfs_ceph_rgw.c +++ b/source3/modules/vfs_ceph_rgw.c @@ -2280,6 +2280,37 @@ out: return ok; } +static int vfs_ceph_rgw_open_share_root(struct vfs_handle_struct *handle, + struct files_struct *root_fsp, + const char *connectpath) +{ + SMB_STRUCT_STAT st = {}; + struct vfs_ceph_rgw_config *config = NULL; + struct stat buf = {}; + int result; + + SMB_VFS_HANDLE_GET_DATA(handle, + config, + struct vfs_ceph_rgw_config, + return -1); + + DBG_DEBUG("[CEPH_RGW] open_share_root(%p, %s)\n", handle, connectpath); + + result = rgw_getattr(config->rgw_root_fs, + config->rgw_root_fh, + &buf, + RGW_GETATTR_FLAG_NONE); + if (result < 0) { + return status_code(result); + } + + init_stat_ex_from_stat(&st, &buf, false); + + result = vfs_set_share_root(root_fsp, connectpath, &st); + + return result; +} + static int vfs_ceph_rgw_connect(struct vfs_handle_struct *handle, const char *service, const char *user) @@ -2359,6 +2390,7 @@ static struct vfs_fn_pointers ceph_rgw_fns = { .connect_fn = vfs_ceph_rgw_connect, .disconnect_fn = vfs_ceph_rgw_disconnect, + .open_share_root_fn = vfs_ceph_rgw_open_share_root, .disk_free_fn = vfs_ceph_rgw_disk_free, .get_quota_fn = vfs_not_implemented_get_quota, .set_quota_fn = vfs_not_implemented_set_quota,