]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: smbd: In reply_ntrename() remove 'bool dest_has_wcard' and all uses.
authorJeremy Allison <jra@samba.org>
Thu, 2 Dec 2021 00:17:51 +0000 (16:17 -0800)
committerRalph Boehme <slow@samba.org>
Thu, 9 Dec 2021 18:06:35 +0000 (18:06 +0000)
It's always false now.

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

index 18b6c087a02a3085675b3d06d52dc3af74fcea53..7ebc972f9519e43e9b4b74e962b23d1df8df461d 100644 (file)
@@ -1732,7 +1732,6 @@ void reply_ntrename(struct smb_request *req)
        const char *dst_original_lcomp = NULL;
        const char *p;
        NTSTATUS status;
-       bool dest_has_wcard = False;
        uint32_t attrs;
        uint32_t ucf_flags_src = ucf_flags_from_smb_request(req);
        uint32_t ucf_flags_dst = ucf_flags_from_smb_request(req);
@@ -1862,27 +1861,20 @@ void reply_ntrename(struct smb_request *req)
                                                DELETE_ACCESS);
                        break;
                case RENAME_FLAG_HARD_LINK:
-                       if (dest_has_wcard) {
-                               /* No wildcards. */
-                               status = NT_STATUS_OBJECT_PATH_SYNTAX_BAD;
-                       } else {
-                               status = hardlink_internals(ctx, conn,
-                                                           req,
-                                                           false,
-                                                           smb_fname_old,
-                                                           smb_fname_new);
-                       }
+                       status = hardlink_internals(ctx,
+                                                   conn,
+                                                   req,
+                                                   false,
+                                                   smb_fname_old,
+                                                   smb_fname_new);
                        break;
                case RENAME_FLAG_COPY:
-                       if (dest_has_wcard) {
-                               /* No wildcards. */
-                               status = NT_STATUS_OBJECT_PATH_SYNTAX_BAD;
-                       } else {
-                               status = copy_internals(ctx, conn, req,
-                                                       smb_fname_old,
-                                                       smb_fname_new,
-                                                       attrs);
-                       }
+                       status = copy_internals(ctx,
+                                               conn,
+                                               req,
+                                               smb_fname_old,
+                                               smb_fname_new,
+                                               attrs);
                        break;
                case RENAME_FLAG_MOVE_CLUSTER_INFORMATION:
                        status = NT_STATUS_INVALID_PARAMETER;