From 9ed026dd7ca7cd1abc9fe2d41ea1e14110629e5c Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Sat, 19 Oct 2024 07:47:33 +0200 Subject: [PATCH] smbd: trigger NOTIFY_ACTION_DIRLEASE_BREAK when truncating files Signed-off-by: Ralph Boehme Reviewed-by: Stefan Metzmacher --- source3/smbd/open.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source3/smbd/open.c b/source3/smbd/open.c index 267ac700e52..925d23d1e1e 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -4656,11 +4656,12 @@ unlock: } if (truncated) { notify_fname(fsp->conn, - NOTIFY_ACTION_MODIFIED, + NOTIFY_ACTION_MODIFIED | + NOTIFY_ACTION_DIRLEASE_BREAK, FILE_NOTIFY_CHANGE_SIZE | FILE_NOTIFY_CHANGE_ATTRIBUTES, fsp->fsp_name, - NULL); + fsp_get_smb2_lease(fsp)); } if (!NT_STATUS_IS_OK(status)) { fd_close(fsp);