]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: smbd: Handling SMB_FILE_RENAME_INFORMATION, the destination name is a single...
authorJeremy Allison <jra@samba.org>
Fri, 10 Dec 2021 00:35:17 +0000 (16:35 -0800)
committerRalph Boehme <slow@samba.org>
Sat, 11 Dec 2021 07:17:28 +0000 (07:17 +0000)
No errors should be allowed from filename_convert().

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

index 4ae59a33e188edf4ff2d071fc7c1b599ab69b875..55857dd91192f3390f82146cf332d8e857effa2b 100644 (file)
@@ -7480,25 +7480,8 @@ static NTSTATUS smb_file_rename_information(connection_struct *conn,
                                          0,
                                          &smb_fname_dst);
 
-               /* If an error we expect this to be
-                * NT_STATUS_OBJECT_PATH_NOT_FOUND */
-
                if (!NT_STATUS_IS_OK(status)) {
-                       if(!NT_STATUS_EQUAL(NT_STATUS_OBJECT_PATH_NOT_FOUND,
-                                           status)) {
-                               goto out;
-                       }
-                       /* Create an smb_fname to call rename_internals_fsp() */
-                       smb_fname_dst = synthetic_smb_fname(ctx,
-                                               base_name,
-                                               NULL,
-                                               NULL,
-                                               smb_fname_src->twrp,
-                                               smb_fname_src->flags);
-                       if (smb_fname_dst == NULL) {
-                               status = NT_STATUS_NO_MEMORY;
-                               goto out;
-                       }
+                       goto out;
                }
                dst_original_lcomp = get_original_lcomp(smb_fname_dst,
                                        conn,