]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: VFS: default: vfswrap_create_dfs_pathat() isn't restricted to dirfsp->conn->cwd_f...
authorJeremy Allison <jra@samba.org>
Wed, 17 Mar 2021 01:26:43 +0000 (18:26 -0700)
committerNoel Power <npower@samba.org>
Mon, 22 Mar 2021 18:37:34 +0000 (18:37 +0000)
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power<npower@samba.org>
source3/modules/vfs_default.c

index e48deb022a7e79f52640b84ce4bbe37c60111593..9a2c13d743b07504f570fbc71e80fc1ac634aa87 100644 (file)
@@ -386,8 +386,6 @@ static NTSTATUS vfswrap_create_dfs_pathat(struct vfs_handle_struct *handle,
        int ret;
        char *msdfs_link = NULL;
 
-       SMB_ASSERT(dirfsp == dirfsp->conn->cwd_fsp);
-
        /* Form the msdfs_link contents */
        msdfs_link = msdfs_link_string(frame,
                                        reflist,
@@ -397,7 +395,7 @@ static NTSTATUS vfswrap_create_dfs_pathat(struct vfs_handle_struct *handle,
        }
 
        ret = symlinkat(msdfs_link,
-                       fsp_get_io_fd(dirfsp),
+                       fsp_get_pathref_fd(dirfsp),
                        smb_fname->base_name);
        if (ret == 0) {
                status = NT_STATUS_OK;