]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: use smb1_strip_dfs_path() in reply_mv()
authorRalph Boehme <slow@samba.org>
Thu, 30 Mar 2023 14:06:44 +0000 (16:06 +0200)
committerRalph Boehme <slow@samba.org>
Fri, 31 Mar 2023 05:12:32 +0000 (05:12 +0000)
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/smb1_reply.c

index c2eda556b48e1a50013498c890f613b71f581eb7..7efc4fe6d1af478bdbbb819e2bf46c9763872c5c 100644 (file)
@@ -6251,6 +6251,11 @@ void reply_mv(struct smb_request *req)
        if (dst_ucf_flags & UCF_GMT_PATHNAME) {
                extract_snapshot_token(newname, &dst_twrp);
        }
+       status = smb1_strip_dfs_path(ctx, &dst_ucf_flags, &newname);
+       if (!NT_STATUS_IS_OK(status)) {
+               reply_nterror(req, status);
+               goto out;
+       }
        status = filename_convert_dirfsp(ctx,
                                         conn,
                                         newname,