summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRalph Boehme <slow@samba.org>2021-07-07 12:40:05 +0200
committerKarolin Seeger <kseeger@samba.org>2021-08-17 09:08:36 +0000
commit93383852f0dec537e2f9b062f113c6f5747a80b9 (patch)
tree9037b9ae65ce2b0b25b4dbf2ecf83b65b6164ccb
parente12c92d0175ea8a0057e9bc6b01ad65ce9153d84 (diff)
downloadsamba-93383852f0dec537e2f9b062f113c6f5747a80b9.tar.gz
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 <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> (cherry picked from commit b32e56d6eb29bfb5f368602edbc10d4b8bc9b4f0)
-rw-r--r--source3/smbd/files.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source3/smbd/files.c b/source3/smbd/files.c
index b70ce9f70e6..78629eb1d94 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,