diff options
author | Jeremy Allison <jra@samba.org> | 2017-08-16 15:48:01 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2017-08-18 00:51:25 +0200 |
commit | 428fc22e8bb7b7a74ba9e29bf962ebfbfd50c47b (patch) | |
tree | cbe9794d551b1a2363afa977e07e7b440c3718d9 /source3/libsmb/clifile.c | |
parent | c4771246b7b31302a32629dde3bbbe8f003b4857 (diff) | |
download | samba-428fc22e8bb7b7a74ba9e29bf962ebfbfd50c47b.tar.gz |
s3: libsmb: Add cli_smb2_chkpath() and use from cli_chkpath().
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12968
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source3/libsmb/clifile.c')
-rw-r--r-- | source3/libsmb/clifile.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source3/libsmb/clifile.c b/source3/libsmb/clifile.c index 828448f2d5a..a6a0bafa2cd 100644 --- a/source3/libsmb/clifile.c +++ b/source3/libsmb/clifile.c @@ -4233,12 +4233,18 @@ NTSTATUS cli_chkpath_recv(struct tevent_req *req) NTSTATUS cli_chkpath(struct cli_state *cli, const char *path) { - TALLOC_CTX *frame = talloc_stackframe(); + TALLOC_CTX *frame = NULL; struct tevent_context *ev = NULL; struct tevent_req *req = NULL; char *path2 = NULL; NTSTATUS status = NT_STATUS_OK; + if (smbXcli_conn_protocol(cli->conn) >= PROTOCOL_SMB2_02) { + return cli_smb2_chkpath(cli, path); + } + + frame = talloc_stackframe(); + if (smbXcli_conn_has_async_calls(cli->conn)) { /* * Can't use sync call while an async call is in flight |