summaryrefslogtreecommitdiff
path: root/source3/smbd/smb2_create.c
diff options
context:
space:
mode:
authorTim Prouty <tprouty@samba.org>2009-07-08 12:24:03 -0700
committerTim Prouty <tprouty@samba.org>2009-07-08 21:36:03 -0700
commit1a1d10d22f7a2eebd22e76614c3c74b4d49e5c33 (patch)
treedcf066a27e61aa592ef9b9b2e53fc033ce41ab39 /source3/smbd/smb2_create.c
parent69c8795b672054cb6b5a85cc5f8961099425bd7a (diff)
downloadsamba-1a1d10d22f7a2eebd22e76614c3c74b4d49e5c33.tar.gz
samba-1a1d10d22f7a2eebd22e76614c3c74b4d49e5c33.tar.bz2
samba-1a1d10d22f7a2eebd22e76614c3c74b4d49e5c33.zip
s3: Plumb smb_filename through dos_mode() and related funtions
Diffstat (limited to 'source3/smbd/smb2_create.c')
-rw-r--r--source3/smbd/smb2_create.c13
1 files changed, 11 insertions, 2 deletions
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;
}