]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s2: VFS: default. Fix vfswrap_read_dfs_pathat() to use fsp_get_pathref_fd() not fsp_g...
authorJeremy Allison <jra@samba.org>
Mon, 12 Jul 2021 22:24:30 +0000 (15:24 -0700)
committerRalph Boehme <slow@samba.org>
Wed, 14 Jul 2021 08:09:31 +0000 (08:09 +0000)
We don't need an io fd here, and we only get away
with it as we have the assert above:

SMB_ASSERT(dirfsp == dirfsp->conn->cwd_fsp);

This will be removed next.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/modules/vfs_default.c

index 059a38a1320f772af16e8c510b42f2d7f7c14b24..d1631721bec5cdf3a5455a59040e51be15d89e43 100644 (file)
@@ -459,7 +459,7 @@ static NTSTATUS vfswrap_read_dfs_pathat(struct vfs_handle_struct *handle,
                }
        }
 
-       referral_len = readlinkat(fsp_get_io_fd(dirfsp),
+       referral_len = readlinkat(fsp_get_pathref_fd(dirfsp),
                                smb_fname->base_name,
                                link_target,
                                bufsize - 1);