1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-26 21:57:41 +03:00

s3: VFS: vxfs: 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>
This commit is contained in:
Jeremy Allison 2022-03-18 11:51:00 -07:00
parent 2fc0820afc
commit d460118be3

View File

@ -407,6 +407,7 @@ static bool vxfs_compare(struct files_struct *fsp,
TALLOC_CTX *mem_ctx = talloc_tos();
char *existing_buf = NULL, *new_buf = NULL, *compact_buf = NULL;
int status;
NTSTATUS ntstatus;
DEBUG(10, ("vfs_vxfs: Getting existing ACL for %s\n", fsp_str_dbg(fsp)));
@ -424,9 +425,10 @@ static bool vxfs_compare(struct files_struct *fsp,
goto out;
}
status = SMB_VFS_FSTAT(fsp, &fsp->fsp_name->st);
if (status == -1) {
ntstatus = vfs_stat_fsp(fsp);
if (!NT_STATUS_IS_OK(ntstatus)) {
DEBUG(10, ("vfs_vxfs: stat failed!\n"));
errno = map_errno_from_nt_status(ntstatus);
goto out;
}