1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-12 20:58:37 +03:00

s3: smbd: mdssvc: 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 2b246dbf687cbb6ef1e31e22fd64a95bdca8f4e9)
This commit is contained in:
Jeremy Allison 2022-03-18 11:56:53 -07:00 committed by Jule Anger
parent 0b3fdccf2c
commit b3eb7cfdce

View File

@ -1354,13 +1354,13 @@ static bool slrpc_fetch_attributes(struct mds_ctx *mds_ctx,
return true;
}
result = SMB_VFS_FSTAT(smb_fname->fsp, &smb_fname->st);
if (result != 0) {
status = vfs_stat_fsp(smb_fname->fsp);
if (!NT_STATUS_IS_OK(status)) {
TALLOC_FREE(smb_fname);
return true;
}
sp = &smb_fname->st;
sp = &smb_fname->fsp->fsp_name->st;
}
ok = add_filemeta(mds_ctx, reqinfo, fm_array, path, sp);