The Samba-Bugzilla – Attachment 16726 Details for
Bug 14766
vfs_ceph openat() doesn't cope with dirfsp != AT_FDCWD
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
git-am fix for 4.15.rcNext
0001-s3-VFS-ceph.-Fix-enumerating-directories.-dirfsp-fh-.patch (text/plain), 1.91 KB, created by
Jeremy Allison
on 2021-08-10 23:44:04 UTC
(
hide
)
Description:
git-am fix for 4.15.rcNext
Filename:
MIME Type:
Creator:
Jeremy Allison
Created:
2021-08-10 23:44:04 UTC
Size:
1.91 KB
patch
obsolete
>From 954a6965d70c2cd0d45d95643930d34dc16db27c Mon Sep 17 00:00:00 2001 >From: Jeremy Allison <jra@samba.org> >Date: Fri, 16 Jul 2021 18:53:24 -0700 >Subject: [PATCH] s3: VFS: ceph. Fix enumerating directories. dirfsp->fh->fd != > AT_FDCWD in this case. >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Same as the fix for glusterfs. > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=14766 > >Signed-off-by: Jeremy Allison <jra@samba.org> >Reviewed-by: Ralph Boehme <slow@samba.org> > >Autobuild-User(master): Ralph Böhme <slow@samba.org> >Autobuild-Date(master): Thu Aug 5 06:15:14 UTC 2021 on sn-devel-184 > >(cherry picked from commit 4f093ae6c9ee5b3e0f98b47fbacb0e37fad62052) >--- > source3/modules/vfs_ceph.c | 14 ++++++++++++-- > 1 file changed, 12 insertions(+), 2 deletions(-) > >diff --git a/source3/modules/vfs_ceph.c b/source3/modules/vfs_ceph.c >index 594ebce4b9a..3f55d724143 100644 >--- a/source3/modules/vfs_ceph.c >+++ b/source3/modules/vfs_ceph.c >@@ -403,14 +403,23 @@ static int cephwrap_openat(struct vfs_handle_struct *handle, > int flags, > mode_t mode) > { >+ struct smb_filename *name = NULL; > bool have_opath = false; > bool became_root = false; > int result = -ENOENT; > > /* >- * cephfs API doesn't have ceph_openat(), so for now assert this. >+ * ceph doesn't have openat(). > */ >- SMB_ASSERT(fsp_get_pathref_fd(dirfsp) == AT_FDCWD); >+ if (fsp_get_pathref_fd(dirfsp) != AT_FDCWD) { >+ name = full_path_from_dirfsp_atname(talloc_tos(), >+ dirfsp, >+ smb_fname); >+ if (name == NULL) { >+ return -1; >+ } >+ smb_fname = name; >+ } > > DBG_DEBUG("[CEPH] openat(%p, %s, %p, %d, %d)\n", handle, > smb_fname_str_dbg(smb_fname), fsp, flags, mode); >@@ -438,6 +447,7 @@ static int cephwrap_openat(struct vfs_handle_struct *handle, > } > > out: >+ TALLOC_FREE(name); > fsp->fsp_flags.have_proc_fds = false; > DBG_DEBUG("[CEPH] open(...) = %d\n", result); > WRAP_RETURN(result); >-- >2.30.2 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
slow
:
review+
npower
:
review+
Actions:
View
Attachments on
bug 14766
:
16694
| 16726