]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: use smb1_strip_dfs_path() in reply_ntrename()
authorRalph Boehme <slow@samba.org>
Thu, 30 Mar 2023 13:43:24 +0000 (15:43 +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_nttrans.c

index 007c53a15f6650eedbd5a80a187be156aaebbfca..01e901f7baca11f9af65152c32aa78b192c14264 100644 (file)
@@ -1482,6 +1482,12 @@ void reply_ntrename(struct smb_request *req)
        if (ucf_flags_src & UCF_GMT_PATHNAME) {
                extract_snapshot_token(oldname, &src_twrp);
        }
+       status = smb1_strip_dfs_path(ctx, &ucf_flags_src, &oldname);
+       if (!NT_STATUS_IS_OK(status)) {
+               reply_nterror(req, status);
+               goto out;
+       }
+
        status = filename_convert_dirfsp(ctx,
                                         conn,
                                         oldname,