]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: trigger NOTIFY_ACTION_DIRLEASE_BREAK when closing a modified file
authorRalph Boehme <slow@samba.org>
Wed, 12 May 2021 17:53:38 +0000 (19:53 +0200)
committerRalph Boehme <slow@samba.org>
Tue, 5 Nov 2024 14:39:30 +0000 (14:39 +0000)
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
source3/smbd/close.c

index cbb2d89446c990c461f0cacf0581104d9c67ad78..1b83bae580f20b3d9d561f742a02918b5a99fb7d 100644 (file)
@@ -923,6 +923,14 @@ static NTSTATUS close_normal_file(struct smb_request *req, files_struct *fsp,
                fsp->op->global->durable = false;
        }
 
+       if (fsp->fsp_flags.modified) {
+               notify_fname(conn,
+                            NOTIFY_ACTION_DIRLEASE_BREAK,
+                            0,
+                            fsp->fsp_name,
+                            fsp_get_smb2_lease(fsp));
+       }
+
        /* If this is an old DOS or FCB open and we have multiple opens on
           the same handle we only have one share mode. Ensure we only remove
           the share mode on the last close. */