mirror of
https://github.com/samba-team/samba.git
synced 2025-08-15 13:49:28 +03:00
vfs_ceph: fix cephwrap_chdir()
When provided a '/' path (i.e. CephFS root), vfs_ceph does a *local*
chdir() to the share path. This breaks smb client directory listings.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=12911
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Fri Jul 21 19:10:46 CEST 2017 on sn-devel-144
(cherry picked from commit 1dcacff083
)
Autobuild-User(v4-6-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-6-test): Tue Jul 25 19:51:08 CEST 2017 on sn-devel-144
This commit is contained in:
committed by
Karolin Seeger
parent
a81b8f2c13
commit
fd96410de6
@ -916,13 +916,6 @@ static int cephwrap_chdir(struct vfs_handle_struct *handle, const char *path)
|
|||||||
{
|
{
|
||||||
int result = -1;
|
int result = -1;
|
||||||
DBG_DEBUG("[CEPH] chdir(%p, %s)\n", handle, path);
|
DBG_DEBUG("[CEPH] chdir(%p, %s)\n", handle, path);
|
||||||
/*
|
|
||||||
* If the path is just / use chdir because Ceph is below / and
|
|
||||||
* cannot deal with changing directory above its mount point
|
|
||||||
*/
|
|
||||||
if (path && !strcmp(path, "/"))
|
|
||||||
return chdir(path);
|
|
||||||
|
|
||||||
result = ceph_chdir(handle->data, path);
|
result = ceph_chdir(handle->data, path);
|
||||||
DBG_DEBUG("[CEPH] chdir(...) = %d\n", result);
|
DBG_DEBUG("[CEPH] chdir(...) = %d\n", result);
|
||||||
WRAP_RETURN(result);
|
WRAP_RETURN(result);
|
||||||
|
Reference in New Issue
Block a user