From: Jeremy Allison Date: Mon, 24 May 2021 23:49:44 +0000 (-0700) Subject: s3: smbd: In open_file_ntcreate() initialize the local parent_dir_fname from the... X-Git-Tag: tevent-0.11.0~605 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=066729f8ce84240026ab02a26c3824e2a31d226b;p=thirdparty%2Fsamba.git 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 --- 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);