From: Volker Lendecke Date: Thu, 30 Jun 2022 08:45:54 +0000 (+0200) Subject: smbd: Update fsp->fsp_flags.is_directory in vfs_stat_fsp() X-Git-Tag: tevent-0.13.0~20 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d67c7c091fec5b196df6064bd9ff115a58388234;p=thirdparty%2Fsamba.git smbd: Update fsp->fsp_flags.is_directory in vfs_stat_fsp() The type of a fsp should never change, but if this call to vfs_stat_fsp() is the very first one on this fsp, we must update this flag. Signed-off-by: Volker Lendecke Reviewed-by: Ralph Boehme --- diff --git a/source3/smbd/vfs.c b/source3/smbd/vfs.c index 1f46e9a2529..33481455911 100644 --- a/source3/smbd/vfs.c +++ b/source3/smbd/vfs.c @@ -1395,6 +1395,7 @@ NTSTATUS vfs_stat_fsp(files_struct *fsp) return map_nt_error_from_unix(errno); } update_stat_ex_from_saved_stat(&fsp->fsp_name->st, &saved_stat); + fsp->fsp_flags.is_directory = S_ISDIR(fsp->fsp_name->st.st_ex_mode); return NT_STATUS_OK; }