]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: smbd: In open_file_ntcreate() initialize the local parent_dir_fname from the...
authorJeremy Allison <jra@samba.org>
Mon, 24 May 2021 23:49:44 +0000 (16:49 -0700)
committerRalph Boehme <slow@samba.org>
Wed, 9 Jun 2021 13:14:30 +0000 (13:14 +0000)
We can now remove the call to parent_smb_fname().

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

index 08b5023277efb845db7d339c4d3c90a6232fd5d7..fa846fbc80a9c06a675a8ce309d094de8d6b893d 100644 (file)
@@ -3622,7 +3622,7 @@ static NTSTATUS open_file_ntcreate(connection_struct *conn,
        struct share_mode_lock *lck = NULL;
        uint32_t open_access_mask = access_mask;
        NTSTATUS status;
-       struct smb_filename *parent_dir_fname = NULL;
+       struct smb_filename *parent_dir_fname = parent_dir_fname_in;
        SMB_STRUCT_STAT saved_stat = smb_fname->st;
        struct timespec old_write_time;
        bool setup_poll = false;
@@ -3651,15 +3651,6 @@ static NTSTATUS open_file_ntcreate(connection_struct *conn,
                                        req->vuid);
        }
 
-       status = SMB_VFS_PARENT_PATHNAME(conn,
-                                        talloc_tos(),
-                                        smb_fname,
-                                        &parent_dir_fname,
-                                        NULL);
-       if (!NT_STATUS_IS_OK(status)) {
-               return status;
-       }
-
        if (new_dos_attributes & FILE_FLAG_POSIX_SEMANTICS) {
                posix_open = True;
                unx_mode = (mode_t)(new_dos_attributes & ~FILE_FLAG_POSIX_SEMANTICS);