]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: modules: ceph: use current working directory instead of share path
authorRobert Sander <r.sander@heinlein-support.de>
Thu, 2 May 2019 18:20:44 +0000 (11:20 -0700)
committerJeremy Allison <jra@samba.org>
Thu, 2 May 2019 19:34:11 +0000 (19:34 +0000)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13918

Signed-off-by: Robert Sander <r.sander@heinlein-support.de>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu May  2 19:34:11 UTC 2019 on sn-devel-184

source3/modules/vfs_ceph.c

index cf45fb4c919f227766dc44d0fe9807d76a513425..57de8bc891a6bf44bbc05755eb143c9164d7b0dc 100644 (file)
@@ -1206,14 +1206,14 @@ static struct smb_filename *cephwrap_realpath(struct vfs_handle_struct *handle,
        } else if ((len >= 2) && (path[0] == '.') && (path[1] == '/')) {
                if (len == 2) {
                        r = asprintf(&result, "%s",
-                                       handle->conn->connectpath);
+                                       handle->conn->cwd_fname->base_name);
                } else {
                        r = asprintf(&result, "%s/%s",
-                                       handle->conn->connectpath, &path[2]);
+                                       handle->conn->cwd_fname->base_name, &path[2]);
                }
        } else {
                r = asprintf(&result, "%s/%s",
-                               handle->conn->connectpath, path);
+                               handle->conn->cwd_fname->base_name, path);
        }
 
        if (r < 0) {