]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: use fsp_getinfo_ask_sharemode() in open_file_ntcreate()
authorRalph Boehme <slow@samba.org>
Wed, 11 May 2022 16:14:11 +0000 (18:14 +0200)
committerJeremy Allison <jra@samba.org>
Fri, 9 Dec 2022 23:11:37 +0000 (23:11 +0000)
Note: this is a behaviour change in the non-default case when the user
has disabled "getinfo ask sharemode".

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/open.c

index 5c26ea190ff7e7d394f6a92b0a2507c3150a2602..2c57f8fefc373647f56d926fe33c9f3028b13063 100644 (file)
@@ -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);
        }