From: Anoop C S Date: Wed, 1 Jul 2026 10:24:07 +0000 (+0530) Subject: vfs_ceph_new: Implement SMB_VFS_OPEN_SHARE_ROOT X-Git-Tag: talloc-2.5.0~84 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=32a965e4efc8b6e543d9e4fae661a3ecc3a13d47;p=thirdparty%2Fsamba.git vfs_ceph_new: Implement SMB_VFS_OPEN_SHARE_ROOT Signed-off-by: Anoop C S Reviewed-by: Volker Lendecke Reviewed-by: Ralph Boehme --- diff --git a/source3/modules/vfs_ceph_new.c b/source3/modules/vfs_ceph_new.c index caee779d1a7..a85363b48ba 100644 --- a/source3/modules/vfs_ceph_new.c +++ b/source3/modules/vfs_ceph_new.c @@ -2314,6 +2314,38 @@ static void vfs_ceph_iput(const struct vfs_handle_struct *handle, } } +static int vfs_ceph_open_share_root(struct vfs_handle_struct *handle, + struct files_struct *root_fsp, + const char *connectpath) +{ + SMB_STRUCT_STAT st = {}; + struct vfs_ceph_iref iref = {}; + int result = -1; + + DBG_DEBUG("[CEPH] open_share_root: %s\n", connectpath); + + result = vfs_ceph_iget(handle, connectpath, 0, &iref); + if (result != 0) { + goto out; + } + + result = vfs_ceph_ll_getattr(handle, &iref, &st); + if (result != 0) { + goto out; + } + + result = vfs_set_share_root(root_fsp, connectpath, &st); + if (result != 0) { + result = -errno; + goto out; + } +out: + DBG_DEBUG("[CEPH] open_share_root: %s result=%d\n", + connectpath, result); + vfs_ceph_iput(handle, &iref); + return status_code(result); +} + #ifdef HAVE_CEPH_FSCRYPT /* Fscrypt */ /* @@ -4609,6 +4641,7 @@ static struct vfs_fn_pointers ceph_new_fns = { .connect_fn = vfs_ceph_connect, .disconnect_fn = vfs_ceph_disconnect, + .open_share_root_fn = vfs_ceph_open_share_root, .disk_free_fn = vfs_ceph_disk_free, .get_quota_fn = vfs_not_implemented_get_quota, .set_quota_fn = vfs_not_implemented_set_quota,