s3: smbd: SMB1 reply_unlink() - use srvstr_get_path_req() not srvstr_get_path_req_wcard()
authorJeremy Allison <jra@samba.org>
Tue, 29 Sep 2020 19:32:02 +0000 (12:32 -0700)
committerRalph Boehme <slow@samba.org>
Wed, 30 Sep 2020 20:46:40 +0000 (20:46 +0000)
Now unlink_internals() checks its own wildcard on the mask.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/smbd/reply.c

index 7a8d7c766eb429d6af0dcf9be4e59e15cd61b20e..a3110fb0a62613d1bbaa8f103dad7f72d41bf041 100644 (file)
@@ -3613,7 +3613,6 @@ void reply_unlink(struct smb_request *req)
        struct smb_filename *smb_fname = NULL;
        uint32_t dirtype;
        NTSTATUS status;
-       bool path_contains_wcard = False;
        uint32_t ucf_flags = UCF_ALWAYS_ALLOW_WCARD_LCOMP |
                        ucf_flags_from_smb_request(req);
        TALLOC_CTX *ctx = talloc_tos();
@@ -3627,9 +3626,8 @@ void reply_unlink(struct smb_request *req)
 
        dirtype = SVAL(req->vwv+0, 0);
 
-       srvstr_get_path_req_wcard(ctx, req, &name, (const char *)req->buf + 1,
-                                 STR_TERMINATE, &status,
-                                 &path_contains_wcard);
+       srvstr_get_path_req(ctx, req, &name, (const char *)req->buf + 1,
+                                 STR_TERMINATE, &status);
        if (!NT_STATUS_IS_OK(status)) {
                reply_nterror(req, status);
                goto out;
@@ -3639,7 +3637,7 @@ void reply_unlink(struct smb_request *req)
                                  name,
                                  ucf_flags,
                                  0,
-                                 &path_contains_wcard,
+                                 NULL,
                                  &smb_fname);
        if (!NT_STATUS_IS_OK(status)) {
                if (NT_STATUS_EQUAL(status,NT_STATUS_PATH_NOT_COVERED)) {