From: Volker Lendecke Date: Fri, 8 Apr 2022 11:27:39 +0000 (+0200) Subject: smbd: Use filename_convert_dirfsp() in smbd_smb2_create_send() X-Git-Tag: talloc-2.3.4~313 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=922261d77ae9190aada81e97ce8a41c5306acd9c;p=thirdparty%2Fsamba.git smbd: Use filename_convert_dirfsp() in smbd_smb2_create_send() Signed-off-by: Volker Lendecke Reviewed-by: Ralph Boehme Autobuild-User(master): Ralph Böhme Autobuild-Date(master): Thu Apr 28 14:02:53 UTC 2022 on sn-devel-184 --- diff --git a/source3/smbd/smb2_create.c b/source3/smbd/smb2_create.c index 275f539af7f..eae522a0619 100644 --- a/source3/smbd/smb2_create.c +++ b/source3/smbd/smb2_create.c @@ -705,6 +705,7 @@ static struct tevent_req *smbd_smb2_create_send(TALLOC_CTX *mem_ctx, struct smbd_smb2_create_state *state = NULL; NTSTATUS status; struct smb_request *smb1req = NULL; + struct files_struct *dirfsp = NULL; struct smb_filename *smb_fname = NULL; uint32_t ucf_flags; @@ -968,12 +969,15 @@ static struct tevent_req *smbd_smb2_create_send(TALLOC_CTX *mem_ctx, ucf_flags = filename_create_ucf_flags( smb1req, state->in_create_disposition); - status = filename_convert(req, - smb1req->conn, - state->fname, - ucf_flags, - state->twrp_time, - &smb_fname); + + status = filename_convert_dirfsp( + req, + smb1req->conn, + state->fname, + ucf_flags, + state->twrp_time, + &dirfsp, + &smb_fname); if (!NT_STATUS_IS_OK(status)) { tevent_req_nterror(req, status); return tevent_req_post(req, state->ev); @@ -1015,7 +1019,7 @@ static struct tevent_req *smbd_smb2_create_send(TALLOC_CTX *mem_ctx, status = SMB_VFS_CREATE_FILE(smb1req->conn, smb1req, - NULL, + dirfsp, smb_fname, in_desired_access, in_share_access,