1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-10 01:18:15 +03:00

smbd: Fix cached dos attributes

The callers of fset_dos_mode must set the cached attributes
themselves, which I did not see. I tried, but I did not find a clean
way to fix this behind SMB_VFS_FSET_DOS_ATTRIBUTES, with a smb_fname
and smb_fname->fsp->fsp_name we might have two copies of the cached
dos attributes around and if we only update fsp->fsp_name, we might
miss the outer one.

Not doing a test, this is really fresh code, and in the future we must
reorganize setting and caching dos attributes anyway.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>

Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Fri Jun 28 14:32:27 UTC 2024 on atb-devel-224
This commit is contained in:
Volker Lendecke 2024-06-24 16:50:57 +02:00 committed by Ralph Boehme
parent a32f52e573
commit 0ebabaedbc

View File

@ -211,6 +211,8 @@ NTSTATUS fsctl_set_reparse_point(struct files_struct *fsp,
return status;
}
fsp->fsp_name->st.cached_dos_attributes = dos_mode;
return NT_STATUS_OK;
}
@ -277,5 +279,7 @@ NTSTATUS fsctl_del_reparse_point(struct files_struct *fsp,
return status;
}
fsp->fsp_name->st.cached_dos_attributes = dos_mode;
return NT_STATUS_OK;
}