summaryrefslogtreecommitdiff
path: root/source4/libcli/raw
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/raw
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/raw')
-rw-r--r--source4/libcli/raw/clitransport.c12
-rw-r--r--source4/libcli/raw/clitree.c12
-rw-r--r--source4/libcli/raw/libcliraw.h3
3 files changed, 8 insertions, 19 deletions
diff --git a/source4/libcli/raw/clitransport.c b/source4/libcli/raw/clitransport.c
index 3ca828d46b..62c32d3058 100644
--- a/source4/libcli/raw/clitransport.c
+++ b/source4/libcli/raw/clitransport.c
@@ -74,10 +74,7 @@ static NTSTATUS smbcli_transport_finish_recv(void *private, DATA_BLOB blob);
struct smbcli_transport *smbcli_transport_init(struct smbcli_socket *sock,
TALLOC_CTX *parent_ctx,
bool primary,
- int max_xmit,
- int max_mux,
- bool use_spnego,
- enum smb_signing_state signing)
+ struct smbcli_options *options)
{
struct smbcli_transport *transport;
@@ -90,12 +87,7 @@ 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 = use_spnego;
- transport->options.max_xmit = max_xmit;
- transport->options.max_mux = max_mux;
- transport->options.request_timeout = SMB_REQUEST_TIMEOUT;
- transport->options.signing = signing;
-
+ transport->options = *options;
transport->negotiate.max_xmit = transport->options.max_xmit;
/* setup the stream -> packet parser */
diff --git a/source4/libcli/raw/clitree.c b/source4/libcli/raw/clitree.c
index 3d8a6760a1..ae63d94acd 100644
--- a/source4/libcli/raw/clitree.c
+++ b/source4/libcli/raw/clitree.c
@@ -175,7 +175,8 @@ NTSTATUS smbcli_tree_full_connection(TALLOC_CTX *parent_ctx,
const char *service, const char *service_type,
struct cli_credentials *credentials,
struct resolve_context *resolve_ctx,
- struct event_context *ev)
+ struct event_context *ev,
+ struct smbcli_options *options)
{
struct smb_composite_connect io;
NTSTATUS status;
@@ -191,14 +192,7 @@ NTSTATUS smbcli_tree_full_connection(TALLOC_CTX *parent_ctx,
io.in.service_type = service_type;
io.in.credentials = credentials;
io.in.fallback_to_anonymous = false;
- io.in.workgroup = lp_workgroup(global_loadparm);
- io.in.max_xmit = lp_max_xmit(global_loadparm);
- io.in.max_mux = lp_maxmux(global_loadparm);
- io.in.ntstatus_support = lp_nt_status_support(global_loadparm);
- io.in.max_protocol = lp_cli_maxprotocol(global_loadparm);
- io.in.unicode = lp_unicode(global_loadparm);
- io.in.use_spnego = lp_use_spnego(global_loadparm) && lp_nt_status_support(global_loadparm);
- io.in.signing = lp_client_signing(global_loadparm);
+ io.in.options = *options;
status = smb_composite_connect(&io, parent_ctx, resolve_ctx, ev);
if (NT_STATUS_IS_OK(status)) {
diff --git a/source4/libcli/raw/libcliraw.h b/source4/libcli/raw/libcliraw.h
index dd6904dec2..0032eb4e94 100644
--- a/source4/libcli/raw/libcliraw.h
+++ b/source4/libcli/raw/libcliraw.h
@@ -94,6 +94,9 @@ struct smbcli_options {
uint_t use_oplocks:1;
uint_t use_level2_oplocks:1;
uint_t use_spnego:1;
+ uint_t unicode:1;
+ uint_t ntstatus_support:1;
+ int max_protocol;
uint32_t max_xmit;
uint16_t max_mux;
int request_timeout;