From: Ralph Boehme Date: Wed, 11 May 2022 16:14:11 +0000 (+0200) Subject: smbd: use fsp_getinfo_ask_sharemode() in open_file_ntcreate() X-Git-Tag: talloc-2.4.0~381 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=46ac8daa797748290cbc15c14774a5453f38befb;p=thirdparty%2Fsamba.git smbd: use fsp_getinfo_ask_sharemode() in open_file_ntcreate() Note: this is a behaviour change in the non-default case when the user has disabled "getinfo ask sharemode". Pair-Programmed-With: Stefan Metzmacher Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison --- diff --git a/source3/smbd/open.c b/source3/smbd/open.c index 5c26ea190ff..2c57f8fefc3 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -4505,7 +4505,9 @@ static NTSTATUS open_file_ntcreate(connection_struct *conn, /* * Deal with other opens having a modified write time. */ - if (!is_omit_timespec(&lck_state.write_time)) { + if (fsp_getinfo_ask_sharemode(fsp) && + !is_omit_timespec(&lck_state.write_time)) + { update_stat_ex_mtime(&fsp->fsp_name->st, lck_state.write_time); }