mirror of
https://github.com/samba-team/samba.git
synced 2025-02-24 13:57:43 +03:00
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>
This commit is contained in:
parent
43958af1d5
commit
76d7d05b1d
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user