summaryrefslogtreecommitdiff
path: root/source4/libcli/smb_composite
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-09-30 02:47:19 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-09-30 02:47:19 +0200
commit181ee01da67985f5db684500247d655ce72fe611 (patch)
tree30e80ae912ea3ca940bb7d926644f412967667c2 /source4/libcli/smb_composite
parentcef80957c49c972e82a634724590b5fd5d6ca78f (diff)
downloadsamba-181ee01da67985f5db684500247d655ce72fe611.tar.gz
samba-181ee01da67985f5db684500247d655ce72fe611.tar.bz2
samba-181ee01da67985f5db684500247d655ce72fe611.zip
Pass session options around; saves another use of global_loadparm.
Diffstat (limited to 'source4/libcli/smb_composite')
-rw-r--r--source4/libcli/smb_composite/connect.c5
-rw-r--r--source4/libcli/smb_composite/fetchfile.c1
-rw-r--r--source4/libcli/smb_composite/fsinfo.c1
-rw-r--r--source4/libcli/smb_composite/smb_composite.h2
4 files changed, 5 insertions, 4 deletions
diff --git a/source4/libcli/smb_composite/connect.c b/source4/libcli/smb_composite/connect.c
index 5f651f4865..a4137290bb 100644
--- a/source4/libcli/smb_composite/connect.c
+++ b/source4/libcli/smb_composite/connect.c
@@ -229,15 +229,12 @@ static NTSTATUS connect_negprot(struct composite_context *c,
{
struct connect_state *state = talloc_get_type(c->private_data, struct connect_state);
NTSTATUS status;
- struct smbcli_session_options options;
-
- lp_smbcli_session_options(global_loadparm, &options);
status = smb_raw_negotiate_recv(state->req);
NT_STATUS_NOT_OK_RETURN(status);
/* next step is a session setup */
- state->session = smbcli_session_init(state->transport, state, true, options);
+ state->session = smbcli_session_init(state->transport, state, true, io->in.session_options);
NT_STATUS_HAVE_NO_MEMORY(state->session);
/* setup for a tconx (or at least have the structure ready to
diff --git a/source4/libcli/smb_composite/fetchfile.c b/source4/libcli/smb_composite/fetchfile.c
index 9cd02a51f4..ff4f0e7930 100644
--- a/source4/libcli/smb_composite/fetchfile.c
+++ b/source4/libcli/smb_composite/fetchfile.c
@@ -147,6 +147,7 @@ struct composite_context *smb_composite_fetchfile_send(struct smb_composite_fetc
state->connect->in.workgroup = io->in.workgroup;
state->connect->in.options = io->in.options;
+ state->connect->in.session_options = io->in.session_options;
state->creq = smb_composite_connect_send(state->connect, state,
io->in.resolve_ctx, event_ctx);
diff --git a/source4/libcli/smb_composite/fsinfo.c b/source4/libcli/smb_composite/fsinfo.c
index cd6e98547b..dc5327a29c 100644
--- a/source4/libcli/smb_composite/fsinfo.c
+++ b/source4/libcli/smb_composite/fsinfo.c
@@ -155,6 +155,7 @@ struct composite_context *smb_composite_fsinfo_send(struct smbcli_tree *tree,
state->connect->in.workgroup = io->in.workgroup;
state->connect->in.options = tree->session->transport->options;
+ state->connect->in.session_options = tree->session->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 7f4b9d73e4..08ca40c833 100644
--- a/source4/libcli/smb_composite/smb_composite.h
+++ b/source4/libcli/smb_composite/smb_composite.h
@@ -57,6 +57,7 @@ struct smb_composite_fetchfile {
const char *workgroup;
const char *filename;
struct smbcli_options options;
+ struct smbcli_session_options session_options;
struct resolve_context *resolve_ctx;
} in;
struct {
@@ -98,6 +99,7 @@ struct smb_composite_connect {
bool fallback_to_anonymous;
const char *workgroup;
struct smbcli_options options;
+ struct smbcli_session_options session_options;
} in;
struct {
struct smbcli_tree *tree;