From 1a1d10d22f7a2eebd22e76614c3c74b4d49e5c33 Mon Sep 17 00:00:00 2001 From: Tim Prouty Date: Wed, 8 Jul 2009 12:24:03 -0700 Subject: s3: Plumb smb_filename through dos_mode() and related funtions --- source3/smbd/smb2_create.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'source3/smbd/smb2_create.c') diff --git a/source3/smbd/smb2_create.c b/source3/smbd/smb2_create.c index a936a0892e..bdff1939e5 100644 --- a/source3/smbd/smb2_create.c +++ b/source3/smbd/smb2_create.c @@ -353,6 +353,16 @@ static struct tevent_req *smbd_smb2_create_send(TALLOC_CTX *mem_ctx, sbuf = smb_fname->st; } + if (!smb_fname) { + status = create_synthetic_smb_fname_split(talloc_tos(), + result->fsp_name, + &sbuf, &smb_fname); + if (!NT_STATUS_IS_OK(status)) { + tevent_req_nterror(req, status); + goto out; + } + } + smb2req->compat_chain_fsp = smbreq->chain_fsp; state->out_oplock_level = 0; @@ -369,8 +379,7 @@ static struct tevent_req *smbd_smb2_create_send(TALLOC_CTX *mem_ctx, state->out_allocation_size = sbuf.st_ex_blksize * sbuf.st_ex_blocks; state->out_end_of_file = sbuf.st_ex_size; state->out_file_attributes = dos_mode(result->conn, - result->fsp_name, - &sbuf); + smb_fname); if (state->out_file_attributes == 0) { state->out_file_attributes = FILE_ATTRIBUTE_NORMAL; } -- cgit