From: Jeremy Allison Date: Tue, 13 Jul 2021 16:15:18 +0000 (-0700) Subject: s3: VFS: default. In vfswrap_read_dfs_pathat() use sys_fstatat(). X-Git-Tag: talloc-2.3.3~67 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9fa5e171b96de569ec46f09743f98eeb5de38dfb;p=thirdparty%2Fsamba.git s3: VFS: default. In vfswrap_read_dfs_pathat() use sys_fstatat(). Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme --- diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c index d1631721bec..23fef7a6783 100644 --- a/source3/modules/vfs_default.c +++ b/source3/modules/vfs_default.c @@ -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;