The Samba-Bugzilla – Attachment 10465 Details for
Bug 10966
Can't connect to a Mac SMB2 server due to credit request bug.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
git-am fix for 4.2.0 - backport from master.
0001-libcli-SMB2-Pure-SMB2-only-negprot-fix-to-make-us-be.patch (text/plain), 1.93 KB, created by
Jeremy Allison
on 2014-11-26 21:18:46 UTC
(
hide
)
Description:
git-am fix for 4.2.0 - backport from master.
Filename:
MIME Type:
Creator:
Jeremy Allison
Created:
2014-11-26 21:18:46 UTC
Size:
1.93 KB
patch
obsolete
>From c31840ee73981a5f81cdef225c2b97758f5b86de Mon Sep 17 00:00:00 2001 >From: Jeremy Allison <jra@samba.org> >Date: Wed, 26 Nov 2014 13:15:24 -0800 >Subject: [PATCH] libcli: SMB2: Pure SMB2-only negprot fix to make us behave as > a Windows client does. > >Required as some servers return zero when asked for >zero credits in an initial SMB2-only negprot. > >Back-port of c426f97238e4f664d1b13781101ca9c942aa7d0d >from master. > >https://bugzilla.samba.org/show_bug.cgi?id=10966 > >Signed-off-by: Jeremy Allison <jra@samba.org> >--- > libcli/smb/smbXcli_base.c | 11 +++++++++++ > source3/include/local.h | 2 ++ > 2 files changed, 13 insertions(+) > >diff --git a/libcli/smb/smbXcli_base.c b/libcli/smb/smbXcli_base.c >index 8a8bbd0..e0c5ff9 100644 >--- a/libcli/smb/smbXcli_base.c >+++ b/libcli/smb/smbXcli_base.c >@@ -31,6 +31,7 @@ > #include "../libcli/smb/read_smb.h" > #include "smbXcli_base.h" > #include "librpc/ndr/libndr.h" >+#include "local.h" > > struct smbXcli_conn; > struct smbXcli_req; >@@ -3830,6 +3831,16 @@ struct tevent_req *smbXcli_negprot_send(TALLOC_CTX *mem_ctx, > */ > conn->dispatch_incoming = smb2cli_conn_dispatch_incoming; > >+ /* >+ * As we're starting with an SMB2 negprot, emulate Windows >+ * and ask for 31 credits in the initial SMB2 negprot. >+ * If we don't and leave requested credits at >+ * zero, MacOSX servers return zero credits on >+ * the negprot reply and we fail to connect. >+ */ >+ smb2cli_conn_set_max_credits(conn, >+ WINDOWS_CLIENT_PURE_SMB2_NEGPROT_INITIAL_CREDIT_ASK); >+ > subreq = smbXcli_negprot_smb2_subreq(state); > if (tevent_req_nomem(subreq, req)) { > return tevent_req_post(req, ev); >diff --git a/source3/include/local.h b/source3/include/local.h >index 85f0861..5f52d9c 100644 >--- a/source3/include/local.h >+++ b/source3/include/local.h >@@ -207,4 +207,6 @@ > #define CLIENT_NDR_PADDING_SIZE 8 > #define SERVER_NDR_PADDING_SIZE 8 > >+#define WINDOWS_CLIENT_PURE_SMB2_NEGPROT_INITIAL_CREDIT_ASK 31 >+ > #endif >-- >2.2.0.rc0.207.ga3a616c >
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
Flags:
slow
:
review+
Actions:
View
Attachments on
bug 10966
: 10465 |
10466