From 066729f8ce84240026ab02a26c3824e2a31d226b Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 24 May 2021 16:49:44 -0700 Subject: [PATCH] s3: smbd: In open_file_ntcreate() initialize the local parent_dir_fname from the passed in parent_dir_fname_in. We can now remove the call to parent_smb_fname(). Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme --- source3/smbd/open.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/source3/smbd/open.c b/source3/smbd/open.c index 08b5023277e..fa846fbc80a 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -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); -- 2.47.3