summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2022-03-18 12:26:27 -0700
committerJule Anger <janger@samba.org>2022-04-11 08:32:10 +0000
commit3905cfe754c9a73fc40644e305732b53b13f0694 (patch)
tree50010db0e7fe7baa29111d8860ac396c660be43e
parent462ccb63241a8043e8e2b128b63acb1f8d3960ad (diff)
downloadsamba-3905cfe754c9a73fc40644e305732b53b13f0694.tar.gz
s3: smbd: call_trans2qfilepathinfo(). All calls to SMB_VFS_FSTAT(fsp, &fsp->fsp_name->st) clobber fsp->fsp_name->st.st_ex_iflags.
If doing an SMB_VFS_FSTAT() returning onto the stat struct stored in the fsp, we must call vfs_stat_fsp() as this preserves the iflags. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15022 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> (cherry picked from commit 8d3812daa5b0c9eb534515d37498d0d6e1a40ec8)
-rw-r--r--source3/smbd/trans2.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index 33ba9da9f83..b5d5d69744f 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -6036,11 +6036,11 @@ static void call_trans2qfilepathinfo(connection_struct *conn,
/*
* Original code - this is an open file.
*/
- if (SMB_VFS_FSTAT(fsp, &smb_fname->st) != 0) {
+ status = vfs_stat_fsp(fsp);
+ if (!NT_STATUS_IS_OK(status)) {
DEBUG(3, ("fstat of %s failed (%s)\n",
- fsp_fnum_dbg(fsp), strerror(errno)));
- reply_nterror(req,
- map_nt_error_from_unix(errno));
+ fsp_fnum_dbg(fsp), nt_errstr(status)));
+ reply_nterror(req, status);
return;
}
if (lp_smbd_getinfo_ask_sharemode(SNUM(conn))) {