1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-02 09:47:23 +03:00

s3: smbd: In set_ea_dos_attribute(), if we've stored btime and set XATTR_DOSINFO_CREATE_TIME successfully, we need to clear ST_EX_IFLAG_CALCULATED_BTIME.

This is no longer a calculated field, every call to fdos_mode() will
set it as non-calculated.

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:41:48 -07:00
parent 9f62a149f1
commit 2fc0820afc

View File

@ -529,6 +529,17 @@ NTSTATUS set_ea_dos_attribute(connection_struct *conn,
return status;
}
}
/*
* We correctly stored the create time.
* We *always* set XATTR_DOSINFO_CREATE_TIME,
* so now it can no longer be considered
* calculated.
*/
update_stat_ex_create_time(
&smb_fname->fsp->fsp_name->st,
smb_fname->st.st_ex_btime);
DEBUG(10,("set_ea_dos_attribute: set EA 0x%x on file %s\n",
(unsigned int)dosmode,
smb_fname_str_dbg(smb_fname)));