]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
vfs_ceph: fix cephwrap_chdir()
authorDavid Disseldorp <ddiss@samba.org>
Fri, 14 Jul 2017 21:55:29 +0000 (23:55 +0200)
committerKarolin Seeger <kseeger@samba.org>
Tue, 25 Jul 2017 13:53:04 +0000 (15:53 +0200)
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 1dcacff083019810e207a3d123a81fe32d9dde1a)

Autobuild-User(v4-5-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-5-test): Tue Jul 25 15:53:04 CEST 2017 on sn-devel-144

source3/modules/vfs_ceph.c

index 59e9b9cf9b3e8e5313a20823994fcacf9e4b4168..9c7a2fb5f3516d9565c9d01a6bd06d7c633407ac 100644 (file)
@@ -750,13 +750,6 @@ static int cephwrap_chdir(struct vfs_handle_struct *handle,  const char *path)
 {
        int result = -1;
        DEBUG(10, ("[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);
        DEBUG(10, ("[CEPH] chdir(...) = %d\n", result));
        WRAP_RETURN(result);