The Samba-Bugzilla – Attachment 11086 Details for
Bug 11289
libsmbclient library is looking for credits while interacting with server supporting SMB2.02
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
probable fix for handling the libsmbclient interaction with SMB2.02 based servers
0001-Fixing-libsmbclient-library-to-ignore-credit-for-SMB.patch (text/plain), 2.71 KB, created by
hargagan
on 2015-05-25 13:24:29 UTC
(
hide
)
Description:
probable fix for handling the libsmbclient interaction with SMB2.02 based servers
Filename:
MIME Type:
Creator:
hargagan
Created:
2015-05-25 13:24:29 UTC
Size:
2.71 KB
patch
obsolete
>From ae66c652432186dfef93492a2a787067614ba3be Mon Sep 17 00:00:00 2001 >From: Har Gagan Sahai <SHarGagan@novell.com> >Date: Mon, 25 May 2015 17:37:18 +0530 >Subject: [PATCH 1/1] Fixing libsmbclient library to ignore credit for SMB2_02 > dialect level. > >Signed-off-by: Har Gagan Sahai <SHarGagan@novell.com> >--- > libcli/smb/smbXcli_base.c | 7 +++++++ > source3/libsmb/clireadwrite.c | 40 ++++++++++++++++++++++------------------ > 2 files changed, 29 insertions(+), 18 deletions(-) > >diff --git a/libcli/smb/smbXcli_base.c b/libcli/smb/smbXcli_base.c >index 9f73566..e6344ef 100644 >--- a/libcli/smb/smbXcli_base.c >+++ b/libcli/smb/smbXcli_base.c >@@ -2918,6 +2918,13 @@ NTSTATUS smb2cli_req_compound_submit(struct tevent_req **reqs, > return NT_STATUS_REVISION_MISMATCH; > } > >+ /* >+ * Credits not supported with SMB2.02 >+ */ >+ if (state->conn->protocol == PROTOCOL_SMB2_02) { >+ goto skip_credits; >+ } >+ > opcode = SVAL(state->smb2.hdr, SMB2_HDR_OPCODE); > if (opcode == SMB2_OP_CANCEL) { > goto skip_credits; >diff --git a/source3/libsmb/clireadwrite.c b/source3/libsmb/clireadwrite.c >index adcd98b..3c2dc8d 100644 >--- a/source3/libsmb/clireadwrite.c >+++ b/source3/libsmb/clireadwrite.c >@@ -524,17 +524,19 @@ static void cli_pull_chunk_ship(struct cli_pull_chunk *chunk) > size = chunk->total_size - chunk->tmp_size; > > if (smbXcli_conn_protocol(state->cli->conn) >= PROTOCOL_SMB2_02) { >- uint32_t max_size; >+ if (smbXcli_conn_protocol(state->cli->conn) == PROTOCOL_SMB2_02) { >+ uint32_t max_size; > >- ok = smb2cli_conn_req_possible(state->cli->conn, &max_size); >- if (!ok) { >- return; >- } >+ ok = smb2cli_conn_req_possible(state->cli->conn, &max_size); >+ if (!ok) { >+ return; >+ } > >- /* >- * downgrade depending on the available credits >- */ >- size = MIN(max_size, size); >+ /* >+ * downgrade depending on the available credits >+ */ >+ size = MIN(max_size, size); >+ } > > chunk->subreq = cli_smb2_read_send(chunk, > state->ev, >@@ -1304,17 +1306,19 @@ static void cli_push_chunk_ship(struct cli_push_chunk *chunk) > size = chunk->total_size - chunk->tmp_size; > > if (smbXcli_conn_protocol(state->cli->conn) >= PROTOCOL_SMB2_02) { >- uint32_t max_size; >+ if (smbXcli_conn_protocol(state->cli->conn) == PROTOCOL_SMB2_02) { >+ uint32_t max_size; > >- ok = smb2cli_conn_req_possible(state->cli->conn, &max_size); >- if (!ok) { >- return; >- } >+ ok = smb2cli_conn_req_possible(state->cli->conn, &max_size); >+ if (!ok) { >+ return; >+ } > >- /* >- * downgrade depending on the available credits >- */ >- size = MIN(max_size, size); >+ /* >+ * downgrade depending on the available credits >+ */ >+ size = MIN(max_size, size); >+ } > > chunk->subreq = cli_smb2_write_send(chunk, > state->ev, >-- >1.8.4.5 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 11289
:
11085
| 11086 |
11087
|
11091