]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: return correct error when trying to create a hardlink to a VSS file
authorRalph Boehme <slow@samba.org>
Fri, 22 Dec 2023 10:19:38 +0000 (11:19 +0100)
committerJule Anger <janger@samba.org>
Tue, 16 Jan 2024 09:09:15 +0000 (09:09 +0000)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13688

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit a0ae45be770a13373c148a689b9761f14c4f942c)

source3/smbd/smb2_trans2.c

index f6a3166719e54b4bba0557a2fdd39502132d315c..03639f218db79935e51b94cecc1fec4a9d92f520 100644 (file)
@@ -3904,6 +3904,11 @@ NTSTATUS hardlink_internals(TALLOC_CTX *ctx,
                goto out;
        }
 
+       if (smb_fname_old->twrp != 0) {
+               status = NT_STATUS_NOT_SAME_DEVICE;
+               goto out;
+       }
+
        status = parent_pathref(talloc_tos(),
                                conn->cwd_fsp,
                                smb_fname_old,