From: Ralph Boehme Date: Wed, 26 Jun 2019 11:40:05 +0000 (+0200) Subject: s3:smbd: mark itime non-calculated if we created a file or dir X-Git-Tag: ldb-2.0.5~107 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c03094cc1f975dbf6dd5bde9c5b246850b94ce16;p=thirdparty%2Fsamba.git s3:smbd: mark itime non-calculated if we created a file or dir Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison --- diff --git a/source3/smbd/open.c b/source3/smbd/open.c index 411c917e55f..b86559ec417 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -3811,6 +3811,10 @@ static NTSTATUS open_file_ntcreate(connection_struct *conn, fsp->initial_delete_on_close = True; } + if (info == FILE_WAS_CREATED) { + smb_fname->st.st_ex_iflags &= ~ST_EX_IFLAG_CALCULATED_ITIME; + } + if (info != FILE_WAS_OPENED) { /* Overwritten files should be initially set as archive */ if ((info == FILE_WAS_OVERWRITTEN && lp_map_archive(SNUM(conn))) || @@ -3958,6 +3962,8 @@ static NTSTATUS mkdir_internal(connection_struct *conn, return NT_STATUS_NOT_A_DIRECTORY; } + smb_dname->st.st_ex_iflags &= ~ST_EX_IFLAG_CALCULATED_ITIME; + if (lp_store_dos_attributes(SNUM(conn))) { if (!posix_open) { file_set_dosmode(conn, smb_dname,