diff options
-rw-r--r-- | source3/smbd/smb2_create.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/source3/smbd/smb2_create.c b/source3/smbd/smb2_create.c index 707b014388..fe414bb897 100644 --- a/source3/smbd/smb2_create.c +++ b/source3/smbd/smb2_create.c @@ -315,14 +315,20 @@ static struct tevent_req *smbd_smb2_create_send(TALLOC_CTX *mem_ctx, } info = FILE_WAS_CREATED; } else { + char *fname; struct smb_filename *smb_fname = NULL; /* these are ignored for SMB2 */ in_create_options &= ~(0x10);/* NTCREATEX_OPTIONS_SYNC_ALERT */ in_create_options &= ~(0x20);/* NTCREATEX_OPTIONS_ASYNC_ALERT */ + fname = talloc_strdup(state, in_name); + if (tevent_req_nomem(fname, req)) { + return tevent_req_post(req, ev); + } + /* convert '\\' into '/' */ - status = check_path_syntax(in_name); + status = check_path_syntax(fname); if (!NT_STATUS_IS_OK(status)) { tevent_req_nterror(req, status); return tevent_req_post(req, ev); @@ -331,7 +337,7 @@ static struct tevent_req *smbd_smb2_create_send(TALLOC_CTX *mem_ctx, status = filename_convert(req, smbreq->conn, smbreq->flags2 & FLAGS2_DFS_PATHNAMES, - in_name, + fname, 0, NULL, &smb_fname); |