]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: trigger change notification when creating hardlink
authorRalph Boehme <slow@samba.org>
Sun, 20 Oct 2024 19:36:59 +0000 (21:36 +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/smb2_trans2.c

index 2a23f06032578b288980625ea107301b89144661..4bd285e4c48f614348aec99137f43e102de94d1a 100644 (file)
@@ -3808,8 +3808,15 @@ NTSTATUS hardlink_internals(TALLOC_CTX *ctx,
                DEBUG(3,("hardlink_internals: Error %s hard link %s -> %s\n",
                         nt_errstr(status), smb_fname_old->base_name,
                         smb_fname_new->base_name));
+               goto out;
        }
 
+       notify_fname(conn,
+                    NOTIFY_ACTION_ADDED,
+                    FILE_NOTIFY_CHANGE_FILE_NAME,
+                    smb_fname_new,
+                    NULL);
+
   out:
 
        TALLOC_FREE(parent_fname_old);