summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2013-08-07 16:06:19 -0700
committerStefan Metzmacher <metze@samba.org>2013-08-15 09:07:06 +0200
commitc1c4491d5e5bb16c274fe4fe162156a7ec910b93 (patch)
tree3c9e920ccbcebbf8a53f0d2feed0520d87fb6c5e /source3
parent04d396566b90f32dc239450596ab50502f9cbb02 (diff)
downloadsamba-c1c4491d5e5bb16c274fe4fe162156a7ec910b93.tar.gz
samba-c1c4491d5e5bb16c274fe4fe162156a7ec910b93.tar.bz2
samba-c1c4491d5e5bb16c274fe4fe162156a7ec910b93.zip
s3:libsmb: Plumb cli_smb2_create_fnum() inside cli_ntcreate().
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source3')
-rw-r--r--source3/libsmb/clifile.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/source3/libsmb/clifile.c b/source3/libsmb/clifile.c
index d63734d3f7..3c799a68a3 100644
--- a/source3/libsmb/clifile.c
+++ b/source3/libsmb/clifile.c
@@ -1914,11 +1914,26 @@ NTSTATUS cli_ntcreate(struct cli_state *cli,
uint8_t SecurityFlags,
uint16_t *pfid)
{
- TALLOC_CTX *frame = talloc_stackframe();
+ TALLOC_CTX *frame = NULL;
struct tevent_context *ev;
struct tevent_req *req;
NTSTATUS status = NT_STATUS_OK;
+ if (smbXcli_conn_protocol(cli->conn) >= PROTOCOL_SMB2_02) {
+ return cli_smb2_create_fnum(cli,
+ fname,
+ CreatFlags,
+ DesiredAccess,
+ FileAttributes,
+ ShareAccess,
+ CreateDisposition,
+ CreateOptions,
+ pfid,
+ NULL);
+ }
+
+ frame = talloc_stackframe();
+
if (smbXcli_conn_has_async_calls(cli->conn)) {
/*
* Can't use sync call while an async call is in flight