1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-22 22:04:08 +03:00

s3: smbd: rename_internals_fsp(). 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 b53a69f4ffcaa5ec9b8660152802f5a7b2effc1f)
This commit is contained in:
Jeremy Allison 2022-03-18 12:24:27 -07:00 committed by Jule Anger
parent 640b6a01bd
commit 386325da31

View File

@ -7497,8 +7497,8 @@ NTSTATUS rename_internals_fsp(connection_struct *conn,
* We must set the archive bit on the newly renamed
* file.
*/
ret = SMB_VFS_FSTAT(fsp, &fsp->fsp_name->st);
if (ret == 0) {
status = vfs_stat_fsp(fsp);
if (NT_STATUS_IS_OK(status)) {
uint32_t old_dosmode;
old_dosmode = fdos_mode(fsp);
/*