From: Ralph Boehme Date: Fri, 22 Dec 2023 10:19:38 +0000 (+0100) Subject: smbd: return correct error when trying to create a hardlink to a VSS file X-Git-Tag: samba-4.18.10~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8ee0768d6f2c1b79a4ad381f0cef1ae32a9618b7;p=thirdparty%2Fsamba.git smbd: return correct error when trying to create a hardlink to a VSS file BUG: https://bugzilla.samba.org/show_bug.cgi?id=13688 Signed-off-by: Ralph Boehme Reviewed-by: Stefan Metzmacher (cherry picked from commit a0ae45be770a13373c148a689b9761f14c4f942c) --- diff --git a/source3/smbd/smb2_trans2.c b/source3/smbd/smb2_trans2.c index f6a3166719e..03639f218db 100644 --- a/source3/smbd/smb2_trans2.c +++ b/source3/smbd/smb2_trans2.c @@ -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,