From: Ralph Boehme Date: Thu, 5 Sep 2024 17:29:23 +0000 (+0200) Subject: smbd: trigger NOTIFY_ACTION_DIRLEASE_BREAK when modifying DOS attributes X-Git-Tag: tdb-1.4.13~697 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=db59ecab86baa3e2b63779edf57cfb490eafea69;p=thirdparty%2Fsamba.git smbd: trigger NOTIFY_ACTION_DIRLEASE_BREAK when modifying DOS attributes Signed-off-by: Ralph Boehme Reviewed-by: Stefan Metzmacher --- diff --git a/source3/smbd/dosmode.c b/source3/smbd/dosmode.c index 26356bc721b..f39f8a7d15b 100644 --- a/source3/smbd/dosmode.c +++ b/source3/smbd/dosmode.c @@ -1072,10 +1072,11 @@ int file_set_dosmode(connection_struct *conn, done: if (!newfile) { notify_fname(conn, - NOTIFY_ACTION_MODIFIED, + NOTIFY_ACTION_MODIFIED | + NOTIFY_ACTION_DIRLEASE_BREAK, FILE_NOTIFY_CHANGE_ATTRIBUTES, smb_fname, - NULL); + fsp_get_smb2_lease(smb_fname->fsp)); } if (ret == 0) { smb_fname->st.st_ex_mode = unixmode; @@ -1176,10 +1177,11 @@ NTSTATUS file_set_sparse(connection_struct *conn, } notify_fname(conn, - NOTIFY_ACTION_MODIFIED, + NOTIFY_ACTION_MODIFIED | + NOTIFY_ACTION_DIRLEASE_BREAK, FILE_NOTIFY_CHANGE_ATTRIBUTES, fsp->fsp_name, - NULL); + fsp_get_smb2_lease(fsp)); fsp->fsp_name->st.cached_dos_attributes = new_dosmode; fsp->fsp_flags.is_sparse = sparse;