From: Ralph Boehme Date: Wed, 7 Jul 2021 10:40:05 +0000 (+0200) Subject: smbd: update smb_fname statinfo from fsp X-Git-Tag: talloc-2.3.3~77 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b32e56d6eb29bfb5f368602edbc10d4b8bc9b4f0;p=thirdparty%2Fsamba.git smbd: update smb_fname statinfo from fsp fd_openat() has done an FSTAT on the handle so update the smb_fname stat info with "truth". from the handle. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14756 Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison --- diff --git a/source3/smbd/files.c b/source3/smbd/files.c index 35419315565..413706fee0c 100644 --- a/source3/smbd/files.c +++ b/source3/smbd/files.c @@ -542,6 +542,13 @@ NTSTATUS openat_pathref_fsp(const struct files_struct *dirfsp, goto fail; } + /* + * fd_openat() has done an FSTAT on the handle + * so update the smb_fname stat info with "truth". + * from the handle. + */ + smb_fname->st = fsp->fsp_name->st; + fsp->file_id = vfs_file_id_from_sbuf(conn, &fsp->fsp_name->st); status = fsp_smb_fname_link(fsp,