*/
struct smb2_negotiate_context *smb2_negotiate_context_find(const struct smb2_negotiate_contexts *b,
uint16_t type);
+#define WINDOWS_CLIENT_PURE_SMB2_NEGPROT_INITIAL_CREDIT_ASK 31
#endif /* _LIBCLI_SMB_SMB2_NEGOTIATE_BLOB_H_ */
*/
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);