]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: smbd: In reply_unlink() remove the possibility of receiving a wildcard name.
authorJeremy Allison <jra@samba.org>
Wed, 1 Dec 2021 20:31:44 +0000 (12:31 -0800)
committerRalph Boehme <slow@samba.org>
Thu, 9 Dec 2021 18:06:35 +0000 (18:06 +0000)
This was the only user of "has_wild=true" passed to
unlink_internals().

Next commit will remove this functionality from unlink_internals().

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

index 8ee17643200a124cf87bc907824f60965a164775..64c386785a924b2b738c327a0b34b2ea454c9ddf 100644 (file)
@@ -3543,10 +3543,8 @@ void reply_unlink(struct smb_request *req)
        struct smb_filename *smb_fname = NULL;
        uint32_t dirtype;
        NTSTATUS status;
-       uint32_t ucf_flags = UCF_ALWAYS_ALLOW_WCARD_LCOMP |
-                       ucf_flags_from_smb_request(req);
+       uint32_t ucf_flags = ucf_flags_from_smb_request(req);
        TALLOC_CTX *ctx = talloc_tos();
-       bool has_wild = false;
 
        START_PROFILE(SMBunlink);
 
@@ -3579,22 +3577,9 @@ void reply_unlink(struct smb_request *req)
                goto out;
        }
 
-       if (!req->posix_pathnames) {
-               char *lcomp = get_original_lcomp(ctx,
-                                       conn,
-                                       name,
-                                       ucf_flags);
-               if (lcomp == NULL) {
-                       reply_nterror(req, NT_STATUS_NO_MEMORY);
-                       goto out;
-               }
-               has_wild = ms_has_wild(lcomp);
-               TALLOC_FREE(lcomp);
-       }
-
        DEBUG(3,("reply_unlink : %s\n", smb_fname_str_dbg(smb_fname)));
 
-       status = unlink_internals(conn, req, dirtype, smb_fname, has_wild);
+       status = unlink_internals(conn, req, dirtype, smb_fname, false);
        if (!NT_STATUS_IS_OK(status)) {
                if (open_was_deferred(req->xconn, req->mid)) {
                        /* We have re-scheduled this call. */