summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Disseldorp <ddiss@samba.org>2019-03-27 13:10:04 +0100
committerDavid Disseldorp <ddiss@samba.org>2019-05-14 22:17:32 +0000
commit76d7d05b1da6c0703b1c2bade0c4467c7cc1adec (patch)
treefff4dee800f6f496651a4ff7217b301f5dc48d9a
parent43958af1d50f0185e21e6cd74110c455ee8996af (diff)
downloadsamba-76d7d05b1da6c0703b1c2bade0c4467c7cc1adec.tar.gz
vfs_ceph: drop fdopendir handler
libcephfs doesn't currently offer an fdopendir equivalent, so the existing implementation peeks at fsp->fsp_name->base_name, which can break if vfs_ceph is used under a separate path-munging VFS module. Return ENOSYS instead and rely on existing OpenDir_fsp() fallback. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
-rw-r--r--source3/modules/vfs_ceph.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/source3/modules/vfs_ceph.c b/source3/modules/vfs_ceph.c
index 6f29629566e..e1f3d757bf1 100644
--- a/source3/modules/vfs_ceph.c
+++ b/source3/modules/vfs_ceph.c
@@ -328,18 +328,9 @@ static DIR *cephwrap_fdopendir(struct vfs_handle_struct *handle,
const char *mask,
uint32_t attributes)
{
- int ret = 0;
- struct ceph_dir_result *result;
- DBG_DEBUG("[CEPH] fdopendir(%p, %p)\n", handle, fsp);
-
- ret = ceph_opendir(handle->data, fsp->fsp_name->base_name, &result);
- if (ret < 0) {
- result = NULL;
- errno = -ret; /* We return result which is NULL in this case */
- }
-
- DBG_DEBUG("[CEPH] fdopendir(...) = %d\n", ret);
- return (DIR *) result;
+ /* OpenDir_fsp() falls back to regular open */
+ errno = ENOSYS;
+ return NULL;
}
static struct dirent *cephwrap_readdir(struct vfs_handle_struct *handle,