1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-09 09:57:48 +03:00

smbd: Use filename_convert_dirfsp() in reply_ntcreate_and_X()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
This commit is contained in:
Volker Lendecke 2022-04-08 13:27:20 +02:00 committed by Ralph Boehme
parent fde4363f58
commit 5efa2ddde3

View File

@ -508,6 +508,7 @@ static NTSTATUS get_relative_fid_filename(connection_struct *conn,
void reply_ntcreate_and_X(struct smb_request *req)
{
connection_struct *conn = req->conn;
struct files_struct *dirfsp = NULL;
struct smb_filename *smb_fname = NULL;
char *fname = NULL;
uint32_t flags;
@ -623,12 +624,8 @@ void reply_ntcreate_and_X(struct smb_request *req)
}
ucf_flags = filename_create_ucf_flags(req, create_disposition);
status = filename_convert(ctx,
conn,
fname,
ucf_flags,
0,
&smb_fname);
status = filename_convert_dirfsp(
ctx, conn, fname, ucf_flags, 0, &dirfsp, &smb_fname);
TALLOC_FREE(case_state);
@ -653,7 +650,7 @@ void reply_ntcreate_and_X(struct smb_request *req)
status = SMB_VFS_CREATE_FILE(
conn, /* conn */
req, /* req */
NULL, /* dirfsp */
dirfsp, /* dirfsp */
smb_fname, /* fname */
access_mask, /* access_mask */
share_access, /* share_access */
@ -686,7 +683,6 @@ void reply_ntcreate_and_X(struct smb_request *req)
}
/* Ensure we're pointing at the correct stat struct. */
TALLOC_FREE(smb_fname);
smb_fname = fsp->fsp_name;
/*