diff options
author | Andrew Tridgell <tridge@samba.org> | 2004-10-29 06:01:00 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:05:00 -0500 |
commit | 072dfad0afc9940c4c51cbecad9b3acf0cc38844 (patch) | |
tree | 371bf1f77b46e34d5311e30db9ddd0053affc327 /source4/libcli/raw | |
parent | d1a732dd2d0828cb3f1f67e86acffcb053ca6851 (diff) | |
download | samba-072dfad0afc9940c4c51cbecad9b3acf0cc38844.tar.gz samba-072dfad0afc9940c4c51cbecad9b3acf0cc38844.tar.bz2 samba-072dfad0afc9940c4c51cbecad9b3acf0cc38844.zip |
r3354: honor "max xmit" and "max mux" from smb.conf in our client code. This
is important as it allows the test suite to exercise the multiple
reply logic in smbd for trans2 search replies.
(This used to be commit 865159016ab1e806465a55697444228fb3fa286e)
Diffstat (limited to 'source4/libcli/raw')
-rw-r--r-- | source4/libcli/raw/clisession.c | 12 | ||||
-rw-r--r-- | source4/libcli/raw/clitransport.c | 5 | ||||
-rw-r--r-- | source4/libcli/raw/rawnegotiate.c | 2 |
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); } |