In vfs modules, don't use 'conn->origpath' when we really mean 'conn->cwd'.
[sfrench/samba-autobuild/.git] / source3 / modules / vfs_netatalk.c
index a4573550fad7b07d753fb967745e68c150389f3c..ff16ae301f70ce12c25e8d0d40bd022a39f50408 100644 (file)
@@ -229,7 +229,7 @@ static int atalk_rmdir(struct vfs_handle_struct *handle, const char *path)
        TALLOC_CTX *ctx = 0;
        char *dpath;
 
-       if (!handle->conn->origpath || !path) goto exit_rmdir;
+       if (!handle->conn->cwd || !path) goto exit_rmdir;
 
        /* due to there is no way to change bDeleteVetoFiles variable
         * from this module, gotta use talloc stuff..
@@ -241,7 +241,7 @@ static int atalk_rmdir(struct vfs_handle_struct *handle, const char *path)
                goto exit_rmdir;
 
        if (!(dpath = talloc_asprintf(ctx, "%s/%s%s", 
-         handle->conn->origpath, path, add ? "/"APPLEDOUBLE : "")))
+         handle->conn->cwd, path, add ? "/"APPLEDOUBLE : "")))
                goto exit_rmdir;
 
        atalk_rrmdir(ctx, dpath);
@@ -272,7 +272,7 @@ static int atalk_rename(struct vfs_handle_struct *handle,
                return ret;
        }
 
-       if (atalk_build_paths(talloc_tos(), handle->conn->origpath, oldname,
+       if (atalk_build_paths(talloc_tos(), handle->conn->cwd, oldname,
                              &adbl_path, &orig_path, &adbl_info,
                              &orig_info) != 0)
                goto exit_rename;
@@ -333,7 +333,7 @@ static int atalk_unlink(struct vfs_handle_struct *handle,
                }
        }
 
-       if (atalk_build_paths(talloc_tos(), handle->conn->origpath, path,
+       if (atalk_build_paths(talloc_tos(), handle->conn->cwd, path,
                              &adbl_path, &orig_path,
                              &adbl_info, &orig_info) != 0)
                goto exit_unlink;
@@ -368,7 +368,7 @@ static int atalk_chmod(struct vfs_handle_struct *handle, const char *path, mode_
        if (!(ctx = talloc_init("chmod_file")))
                return ret;
 
-       if (atalk_build_paths(ctx, handle->conn->origpath, path, &adbl_path,
+       if (atalk_build_paths(ctx, handle->conn->cwd, path, &adbl_path,
                              &orig_path, &adbl_info, &orig_info) != 0)
                goto exit_chmod;
 
@@ -400,7 +400,7 @@ static int atalk_chown(struct vfs_handle_struct *handle, const char *path, uid_t
        if (!(ctx = talloc_init("chown_file")))
                return ret;
 
-       if (atalk_build_paths(ctx, handle->conn->origpath, path,
+       if (atalk_build_paths(ctx, handle->conn->cwd, path,
                              &adbl_path, &orig_path,
                              &adbl_info, &orig_info) != 0)
                goto exit_chown;
@@ -435,7 +435,7 @@ static int atalk_lchown(struct vfs_handle_struct *handle, const char *path, uid_
        if (!(ctx = talloc_init("lchown_file")))
                return ret;
 
-       if (atalk_build_paths(ctx, handle->conn->origpath, path,
+       if (atalk_build_paths(ctx, handle->conn->cwd, path,
                              &adbl_path, &orig_path,
                              &adbl_info, &orig_info) != 0)
                goto exit_lchown;