summaryrefslogtreecommitdiff
path: root/source4/libcli/smb_composite
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-01-03 17:22:12 -0600
committerStefan Metzmacher <metze@samba.org>2008-01-03 12:33:36 -0600
commitdcc282590b34537fc1ead61c3300172528273b44 (patch)
tree9890dda1e9f3001c23828caf1e8da1afbc3feb45 /source4/libcli/smb_composite
parentdc8ccffed40ed5a5978961c632a9e28331a0fd4f (diff)
downloadsamba-dcc282590b34537fc1ead61c3300172528273b44.tar.gz
samba-dcc282590b34537fc1ead61c3300172528273b44.tar.bz2
samba-dcc282590b34537fc1ead61c3300172528273b44.zip
r26654: libcli/smb_composite: Rather than specifying each of the gazillion options for SMB individually, just specify the smbcli_options struct.
(This used to be commit 8a97886e24a4b969aa91409c06f423b71a45f6eb)
Diffstat (limited to 'source4/libcli/smb_composite')
-rw-r--r--source4/libcli/smb_composite/connect.c7
-rw-r--r--source4/libcli/smb_composite/fetchfile.c9
-rw-r--r--source4/libcli/smb_composite/fsinfo.c9
-rw-r--r--source4/libcli/smb_composite/smb_composite.h9
4 files changed, 6 insertions, 28 deletions
diff --git a/source4/libcli/smb_composite/connect.c b/source4/libcli/smb_composite/connect.c
index e45a8a25f9..a44765e980 100644
--- a/source4/libcli/smb_composite/connect.c
+++ b/source4/libcli/smb_composite/connect.c
@@ -63,7 +63,7 @@ static NTSTATUS connect_send_negprot(struct composite_context *c,
{
struct connect_state *state = talloc_get_type(c->private_data, struct connect_state);
- state->req = smb_raw_negotiate_send(state->transport, io->in.unicode, io->in.max_protocol);
+ state->req = smb_raw_negotiate_send(state->transport, io->in.options.unicode, io->in.options.max_protocol);
NT_STATUS_HAVE_NO_MEMORY(state->req);
state->req->async.fn = request_handler;
@@ -307,10 +307,7 @@ static NTSTATUS connect_socket(struct composite_context *c,
/* the socket is up - we can initialise the smbcli transport layer */
state->transport = smbcli_transport_init(state->sock, state, true,
- io->in.max_xmit,
- io->in.max_mux,
- io->in.use_spnego,
- io->in.signing);
+ &io->in.options);
NT_STATUS_HAVE_NO_MEMORY(state->transport);
if (is_ipaddress(state->sock->hostname) &&
diff --git a/source4/libcli/smb_composite/fetchfile.c b/source4/libcli/smb_composite/fetchfile.c
index 5fa48b4863..c7d02e323c 100644
--- a/source4/libcli/smb_composite/fetchfile.c
+++ b/source4/libcli/smb_composite/fetchfile.c
@@ -147,14 +147,7 @@ struct composite_context *smb_composite_fetchfile_send(struct smb_composite_fetc
state->connect->in.fallback_to_anonymous = false;
state->connect->in.workgroup = io->in.workgroup;
- state->connect->in.max_xmit = lp_max_xmit(global_loadparm);
- state->connect->in.max_mux = lp_maxmux(global_loadparm);
- state->connect->in.ntstatus_support = lp_nt_status_support(global_loadparm);
- state->connect->in.max_protocol = lp_cli_maxprotocol(global_loadparm);
- state->connect->in.unicode = lp_unicode(global_loadparm);
- state->connect->in.use_spnego = lp_use_spnego(global_loadparm) &&
- lp_nt_status_support(global_loadparm);
- state->connect->in.signing = lp_client_signing(global_loadparm);
+ lp_smbcli_options(global_loadparm, &state->connect->in.options);
state->creq = smb_composite_connect_send(state->connect, state,
lp_resolve_context(global_loadparm), event_ctx);
diff --git a/source4/libcli/smb_composite/fsinfo.c b/source4/libcli/smb_composite/fsinfo.c
index b6a5a5f2cc..26b19e8759 100644
--- a/source4/libcli/smb_composite/fsinfo.c
+++ b/source4/libcli/smb_composite/fsinfo.c
@@ -153,14 +153,7 @@ struct composite_context *smb_composite_fsinfo_send(struct smbcli_tree *tree,
state->connect->in.fallback_to_anonymous = false;
state->connect->in.workgroup = io->in.workgroup;
- state->connect->in.max_xmit = lp_max_xmit(global_loadparm);
- state->connect->in.max_mux = lp_maxmux(global_loadparm);
- state->connect->in.ntstatus_support = lp_nt_status_support(global_loadparm);
- state->connect->in.max_protocol = lp_cli_maxprotocol(global_loadparm);
- state->connect->in.unicode = lp_unicode(global_loadparm);
- state->connect->in.use_spnego = lp_use_spnego(global_loadparm) &&
- lp_nt_status_support(global_loadparm);
- state->connect->in.signing = lp_client_signing(global_loadparm);
+ lp_smbcli_options(global_loadparm, &state->connect->in.options);
c->state = COMPOSITE_STATE_IN_PROGRESS;
state->stage = FSINFO_CONNECT;
diff --git a/source4/libcli/smb_composite/smb_composite.h b/source4/libcli/smb_composite/smb_composite.h
index dd193fc820..a732617f80 100644
--- a/source4/libcli/smb_composite/smb_composite.h
+++ b/source4/libcli/smb_composite/smb_composite.h
@@ -28,6 +28,7 @@
*/
#include "libcli/raw/signing.h"
+#include "libcli/raw/libcliraw.h"
/*
@@ -93,13 +94,7 @@ struct smb_composite_connect {
struct cli_credentials *credentials;
bool fallback_to_anonymous;
const char *workgroup;
- bool use_spnego;
- bool ntstatus_support;
- bool unicode;
- int max_xmit;
- int max_mux;
- int max_protocol;
- enum smb_signing_state signing;
+ struct smbcli_options options;
} in;
struct {
struct smbcli_tree *tree;