The branch, master has been updated via 9898ca65e93 docs-xml: Fix a usage for case sensitive parameter via 2b1a687a6f8 vfs_ceph: Replace libceph with libcephfs in comments via e091febb0cc vfs_ceph: Fix the comment quoting module usage via 149734409a8 vfs_ceph: Fix a comment in cephwrap_fchmod() via 5572400a975 vfs_ceph: Add path based fallback mechanism for SMB_VFS_CHOWN from 4e585186f2b smbd: Get the symlink mode for posix through fdos_mode()
https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit 9898ca65e936c3f91578b1a24b91ea9243da4b1c Author: Anoop C S <anoo...@samba.org> Date: Mon Nov 13 12:28:19 2023 +0530 docs-xml: Fix a usage for case sensitive parameter Signed-off-by: Anoop C S <anoo...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> Autobuild-User(master): Jeremy Allison <j...@samba.org> Autobuild-Date(master): Wed Nov 15 18:52:16 UTC 2023 on atb-devel-224 commit 2b1a687a6f8c500bd66397f2ac7937c70855b268 Author: Anoop C S <anoo...@samba.org> Date: Mon Nov 13 12:47:17 2023 +0530 vfs_ceph: Replace libceph with libcephfs in comments Signed-off-by: Anoop C S <anoo...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> Reviewed-by: Jeremy Allison <j...@samba.org> commit e091febb0cccd9146d2e2b8ebf8841b3634809ed Author: Anoop C S <anoo...@samba.org> Date: Mon Nov 13 12:43:59 2023 +0530 vfs_ceph: Fix the comment quoting module usage Signed-off-by: Anoop C S <anoo...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> Reviewed-by: Jeremy Allison <j...@samba.org> commit 149734409a882b060a9c344ec2eb843c298343ce Author: Anoop C S <anoo...@samba.org> Date: Sat Nov 11 11:13:15 2023 +0530 vfs_ceph: Fix a comment in cephwrap_fchmod() Signed-off-by: Anoop C S <anoo...@samba.org> Reviewed-by: Volker Lendecke <v...@samba.org> Reviewed-by: Jeremy Allison <j...@samba.org> commit 5572400a975a07905f7cb0f3611590dfaf787311 Author: Anoop C S <anoo...@samba.org> Date: Sat Nov 11 11:07:28 2023 +0530 vfs_ceph: Add path based fallback mechanism for SMB_VFS_CHOWN Fallback mechanism was missing in cephwrap_fchown() for path based call. Signed-off-by: Anoop C S <anoo...@samba.org> Reviewed-by: Jeremy Allison <j...@samba.org> ----------------------------------------------------------------------- Summary of changes: docs-xml/manpages/smb.conf.5.xml | 2 +- source3/modules/vfs_ceph.c | 41 ++++++++++++++++++++++++++++------------ 2 files changed, 30 insertions(+), 13 deletions(-) Changeset truncated at 500 lines: diff --git a/docs-xml/manpages/smb.conf.5.xml b/docs-xml/manpages/smb.conf.5.xml index 4b33c0f59e8..e760ff6b431 100644 --- a/docs-xml/manpages/smb.conf.5.xml +++ b/docs-xml/manpages/smb.conf.5.xml @@ -664,7 +664,7 @@ chmod 1770 /usr/local/samba/lib/usershares passed names. The default setting of auto allows clients that support case sensitive filenames (Linux CIFSVFS and smbclient 3.0.5 and above currently) to tell the Samba server on a per-packet basis that they wish to access the file system in a case-sensitive manner (to support UNIX case sensitive semantics). No Windows or - DOS system supports case-sensitive filename so setting this option to auto is that same as setting it to no + DOS system supports case-sensitive filename so setting this option to auto is the same as setting it to no for them. Default <emphasis>auto</emphasis>. </para></listitem> </varlistentry> diff --git a/source3/modules/vfs_ceph.c b/source3/modules/vfs_ceph.c index 4bcefcf91e8..aa68b5573c8 100644 --- a/source3/modules/vfs_ceph.c +++ b/source3/modules/vfs_ceph.c @@ -21,13 +21,13 @@ */ /* - * This VFS only works with the libceph.so user-space client. It is not needed + * This VFS only works with the libcephfs.so user-space client. It is not needed * if you are using the kernel client or the FUSE client. * * Add the following smb.conf parameter to each share that will be hosted on * Ceph: * - * vfs objects = ceph [any others you need go here] + * vfs objects = [any others you need go here] ceph */ #include "includes.h" @@ -54,8 +54,8 @@ #define llu(_var) ((long long unsigned)_var) /* - * Note, libceph's return code model is to return -errno! So we have to convert - * to what Samba expects, with is set errno to -return and return -1 + * Note, libcephfs's return code model is to return -errno! So we have to + * convert to what Samba expects, with is set errno to -return and return -1 */ #define WRAP_RETURN(_res) \ errno = 0; \ @@ -353,7 +353,7 @@ static int cephwrap_get_quota(struct vfs_handle_struct *handle, unid_t id, SMB_DISK_QUOTA *qt) { - /* libceph: Ceph does not implement this */ + /* libcephfs: Ceph does not implement this */ #if 0 /* was ifdef HAVE_SYS_QUOTAS */ int ret; @@ -374,7 +374,7 @@ static int cephwrap_get_quota(struct vfs_handle_struct *handle, static int cephwrap_set_quota(struct vfs_handle_struct *handle, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *qt) { - /* libceph: Ceph does not implement this */ + /* libcephfs: Ceph does not implement this */ #if 0 /* was ifdef HAVE_SYS_QUOTAS */ int ret; @@ -719,7 +719,7 @@ static ssize_t cephwrap_sendfile(struct vfs_handle_struct *handle, int tofd, fil off_t offset, size_t n) { /* - * We cannot support sendfile because libceph is in user space. + * We cannot support sendfile because libcephfs is in user space. */ DBG_DEBUG("[CEPH] cephwrap_sendfile\n"); errno = ENOTSUP; @@ -733,7 +733,7 @@ static ssize_t cephwrap_recvfile(struct vfs_handle_struct *handle, size_t n) { /* - * We cannot support recvfile because libceph is in user space. + * We cannot support recvfile because libcephfs is in user space. */ DBG_DEBUG("[CEPH] cephwrap_recvfile\n"); errno=ENOTSUP; @@ -1028,7 +1028,7 @@ static int cephwrap_fchmod(struct vfs_handle_struct *handle, files_struct *fsp, DBG_DEBUG("[CEPH] fchmod(%p, %p, %d)\n", handle, fsp, mode); if (!fsp->fsp_flags.is_pathref) { /* - * We can use an io_fd to remove xattrs. + * We can use an io_fd to change permissions. */ result = ceph_fchmod(handle->data, fsp_get_io_fd(fsp), mode); } else { @@ -1048,7 +1048,24 @@ static int cephwrap_fchown(struct vfs_handle_struct *handle, files_struct *fsp, int result; DBG_DEBUG("[CEPH] fchown(%p, %p, %d, %d)\n", handle, fsp, uid, gid); - result = ceph_fchown(handle->data, fsp_get_io_fd(fsp), uid, gid); + if (!fsp->fsp_flags.is_pathref) { + /* + * We can use an io_fd to change ownership. + */ + result = ceph_fchown(handle->data, + fsp_get_io_fd(fsp), + uid, + gid); + } else { + /* + * This is no longer a handle based call. + */ + result = ceph_chown(handle->data, + fsp->fsp_name->base_name, + uid, + gid); + } + DBG_DEBUG("[CEPH] fchown(...) = %d\n", result); WRAP_RETURN(result); } @@ -1207,7 +1224,7 @@ static bool cephwrap_getlock(struct vfs_handle_struct *handle, files_struct *fsp /* * We cannot let this fall through to the default, because the file might only - * be accessible from libceph (which is a user-space client) but the fd might + * be accessible from libcephfs (which is a user-space client) but the fd might * be for some file the kernel knows about. */ static int cephwrap_linux_setlease(struct vfs_handle_struct *handle, files_struct *fsp, @@ -1337,7 +1354,7 @@ static int cephwrap_mknodat(struct vfs_handle_struct *handle, /* * This is a simple version of real-path ... a better version is needed to - * ask libceph about symbolic links. + * ask libcephfs about symbolic links. */ static struct smb_filename *cephwrap_realpath(struct vfs_handle_struct *handle, TALLOC_CTX *ctx, -- Samba Shared Repository