diff options
author | Ralph Boehme <slow@samba.org> | 2021-07-06 09:04:26 +0200 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2021-08-17 09:08:36 +0000 |
commit | e12c92d0175ea8a0057e9bc6b01ad65ce9153d84 (patch) | |
tree | 5410fb897ac53105d196ec0bea3e9547f2c8b011 | |
parent | 46995a8b14675f30536a65ceeaf687fa7cbedd9e (diff) | |
download | samba-e12c92d0175ea8a0057e9bc6b01ad65ce9153d84.tar.gz |
smbd: canonicalize SMB_VFS_FSTAT() stat buffer
This helps code inside any module implementing fstat() looking at
fsp->fsp_name->st instead of the passed in stat buf.
I only ran afoul of this in a DEBUG message I added while debugging some inode
related problem.
No change in behaviour.
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 18a30d939e6f7d49300f235385953412f9e971b9)
-rw-r--r-- | source3/smbd/open.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c index b9f5472b765..2a370fc71b1 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -796,12 +796,12 @@ static NTSTATUS non_widelink_open(const struct files_struct *dirfsp, fsp_set_fd(fsp, fd); if (fd != -1) { - ret = SMB_VFS_FSTAT(fsp, &orig_fsp_name->st); + ret = SMB_VFS_FSTAT(fsp, &fsp->fsp_name->st); if (ret != 0) { status = map_nt_error_from_unix(errno); goto out; } - fsp->fsp_name->st = orig_fsp_name->st; + orig_fsp_name->st = fsp->fsp_name->st; } if (!is_ntfs_stream_smb_fname(fsp->fsp_name) && |