]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: use smb1_strip_dfs_path() in reply_unlink()
authorRalph Boehme <slow@samba.org>
Thu, 30 Mar 2023 14:04:02 +0000 (16:04 +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 28bb23352bd5d9a3eda71d366efb8230b86984c0..ce161a3cfdf66d234602aec30d8e934dcf35a17e 100644 (file)
@@ -2548,6 +2548,11 @@ void reply_unlink(struct smb_request *req)
        if (ucf_flags & UCF_GMT_PATHNAME) {
                extract_snapshot_token(name, &twrp);
        }
+       status = smb1_strip_dfs_path(ctx, &ucf_flags, &name);
+       if (!NT_STATUS_IS_OK(status)) {
+               reply_nterror(req, status);
+               goto out;
+       }
        status = filename_convert_dirfsp(ctx,
                                         conn,
                                         name,