s3: VFS: default. In vfswrap_read_dfs_pathat() use sys_fstatat().
authorJeremy Allison <jra@samba.org>
Tue, 13 Jul 2021 16:15:18 +0000 (09:15 -0700)
committerRalph Boehme <slow@samba.org>
Wed, 14 Jul 2021 08:09:31 +0000 (08:09 +0000)
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/modules/vfs_default.c

index d1631721bec5cdf3a5455a59040e51be15d89e43..23fef7a6783703167ddb57bd5f035f326b6eaf9b 100644 (file)
@@ -499,9 +499,11 @@ static NTSTATUS vfswrap_read_dfs_pathat(struct vfs_handle_struct *handle,
                goto err;
        }
 
-       ret = sys_lstat(smb_fname->base_name,
-                       &smb_fname->st,
-                       lp_fake_directory_create_times(SNUM(handle->conn)));
+       ret = sys_fstatat(fsp_get_pathref_fd(dirfsp),
+                        smb_fname->base_name,
+                        &smb_fname->st,
+                        AT_SYMLINK_NOFOLLOW,
+                        lp_fake_directory_create_times(SNUM(handle->conn)));
        if (ret < 0) {
                status = map_nt_error_from_unix(errno);
                goto err;