summaryrefslogtreecommitdiff
path: root/source4/libcli
diff options
context:
space:
mode:
Diffstat (limited to 'source4/libcli')
-rw-r--r--source4/libcli/raw/clisession.c12
-rw-r--r--source4/libcli/raw/clitransport.c5
-rw-r--r--source4/libcli/raw/rawnegotiate.c2
3 files changed, 11 insertions, 8 deletions
diff --git a/source4/libcli/raw/clisession.c b/source4/libcli/raw/clisession.c
index 431d225021..5d769f9e32 100644
--- a/source4/libcli/raw/clisession.c
+++ b/source4/libcli/raw/clisession.c
@@ -263,8 +263,8 @@ static NTSTATUS smb_raw_session_setup_generic_old(struct smbcli_session *session
/* use the old interface */
s2.generic.level = RAW_SESSSETUP_OLD;
- s2.old.in.bufsize = ~0;
- s2.old.in.mpx_max = 50;
+ s2.old.in.bufsize = session->transport->options.max_xmit;
+ s2.old.in.mpx_max = session->transport->options.max_mux;
s2.old.in.vc_num = 1;
s2.old.in.sesskey = parms->generic.in.sesskey;
s2.old.in.domain = parms->generic.in.domain;
@@ -311,8 +311,8 @@ static NTSTATUS smb_raw_session_setup_generic_nt1(struct smbcli_session *session
union smb_sesssetup s2;
s2.generic.level = RAW_SESSSETUP_NT1;
- s2.nt1.in.bufsize = ~0;
- s2.nt1.in.mpx_max = 50;
+ s2.nt1.in.bufsize = session->transport->options.max_xmit;
+ s2.nt1.in.mpx_max = session->transport->options.max_mux;
s2.nt1.in.vc_num = 1;
s2.nt1.in.sesskey = parms->generic.in.sesskey;
s2.nt1.in.capabilities = parms->generic.in.capabilities;
@@ -371,8 +371,8 @@ static NTSTATUS smb_raw_session_setup_generic_spnego(struct smbcli_session *sess
const char *chosen_oid;
s2.generic.level = RAW_SESSSETUP_SPNEGO;
- s2.spnego.in.bufsize = ~0;
- s2.spnego.in.mpx_max = 50;
+ s2.spnego.in.bufsize = session->transport->options.max_xmit;
+ s2.spnego.in.mpx_max = session->transport->options.max_mux;
s2.spnego.in.vc_num = 1;
s2.spnego.in.sesskey = parms->generic.in.sesskey;
s2.spnego.in.capabilities = parms->generic.in.capabilities;
diff --git a/source4/libcli/raw/clitransport.c b/source4/libcli/raw/clitransport.c
index 3335f557e5..c0ec5d70fe 100644
--- a/source4/libcli/raw/clitransport.c
+++ b/source4/libcli/raw/clitransport.c
@@ -76,7 +76,10 @@ struct smbcli_transport *smbcli_transport_init(struct smbcli_socket *sock)
transport->socket = talloc_reference(transport, sock);
transport->negotiate.protocol = PROTOCOL_NT1;
transport->options.use_spnego = lp_use_spnego();
- transport->negotiate.max_xmit = ~0;
+ transport->options.max_xmit = lp_max_xmit();
+ transport->options.max_mux = lp_maxmux();
+
+ transport->negotiate.max_xmit = transport->options.max_xmit;
smbcli_init_signing(transport);
diff --git a/source4/libcli/raw/rawnegotiate.c b/source4/libcli/raw/rawnegotiate.c
index fdc1d0eb60..f99b9741f4 100644
--- a/source4/libcli/raw/rawnegotiate.c
+++ b/source4/libcli/raw/rawnegotiate.c
@@ -169,7 +169,7 @@ NTSTATUS smb_raw_negotiate(struct smbcli_transport *transport)
/* the old core protocol */
transport->negotiate.sec_mode = 0;
transport->negotiate.server_time = time(NULL);
- transport->negotiate.max_xmit = ~0;
+ transport->negotiate.max_xmit = transport->options.max_xmit;
transport->negotiate.server_zone = get_time_zone(transport->negotiate.server_time);
}