mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
smbd: allow setting ARCHIVE bit in POSIX context with "store dos attributes"
Cf https://lists.samba.org/archive/samba-technical/2023-October/138504.html Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
cd858a2a23
commit
95abd2f59f
@ -925,8 +925,10 @@ int file_set_dosmode(connection_struct *conn,
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (fsp->fsp_flags & FSP_POSIX_FLAGS_OPEN) {
|
||||
return;
|
||||
if (smb_fname->fsp->posix_flags & FSP_POSIX_FLAGS_OPEN &&
|
||||
!lp_store_dos_attributes(SNUM(conn)))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
unixmode = smb_fname->st.st_ex_mode;
|
||||
|
@ -143,7 +143,7 @@ bool run_posix_ls_wildcard_test(int dummy)
|
||||
.name = symlnk_in_share,
|
||||
.target = symlnk_dst_in_share,
|
||||
.expected = symlnk_in_share,
|
||||
.attr_win = FILE_ATTRIBUTE_NORMAL,
|
||||
.attr_win = FILE_ATTRIBUTE_ARCHIVE,
|
||||
.attr_lin = FILE_ATTRIBUTE_NORMAL,
|
||||
}, {
|
||||
.name = symlnk_outside_share,
|
||||
@ -319,7 +319,7 @@ bool run_posix_ls_single_test(int dummy)
|
||||
.name = symlnk_in_share,
|
||||
.target = symlnk_dst_in_share,
|
||||
.expected = symlnk_in_share,
|
||||
.attr_win = FILE_ATTRIBUTE_NORMAL,
|
||||
.attr_win = FILE_ATTRIBUTE_ARCHIVE,
|
||||
.attr_lin = FILE_ATTRIBUTE_NORMAL,
|
||||
}, {
|
||||
.name = symlnk_outside_share,
|
||||
|
Loading…
Reference in New Issue
Block a user