summaryrefslogtreecommitdiff
path: root/source4/libcli
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-11-02 16:20:00 +0100
committerJelmer Vernooij <jelmer@samba.org>2008-11-02 16:20:00 +0100
commit29a20af75f150a1774b187ce64199e5f0bcc2361 (patch)
treefe7e41923244415c154d11ad79fc9338453fe41d /source4/libcli
parentff36c52d8c7f146eca9c6c678456708a8e2efbab (diff)
downloadsamba-29a20af75f150a1774b187ce64199e5f0bcc2361.tar.gz
samba-29a20af75f150a1774b187ce64199e5f0bcc2361.tar.bz2
samba-29a20af75f150a1774b187ce64199e5f0bcc2361.zip
Remove use of global_loadparm for SMB2 client connections.
Diffstat (limited to 'source4/libcli')
-rw-r--r--source4/libcli/smb2/connect.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/source4/libcli/smb2/connect.c b/source4/libcli/smb2/connect.c
index e7aa8c753d..c7613841b8 100644
--- a/source4/libcli/smb2/connect.c
+++ b/source4/libcli/smb2/connect.c
@@ -35,6 +35,7 @@ struct smb2_connect_state {
const char *share;
const char **ports;
const char *socket_options;
+ struct gensec_settings *gensec_settings;
struct smbcli_options options;
struct smb2_negprot negprot;
struct smb2_tree_connect tcon;
@@ -140,7 +141,7 @@ static void continue_negprot(struct smb2_request *req)
break;
}
- state->session = smb2_session_init(transport, lp_gensec_settings(transport, global_loadparm), state, true);
+ state->session = smb2_session_init(transport, state->gensec_settings, state, true);
if (composite_nomem(state->session, c)) return;
creq = smb2_session_setup_spnego_send(state->session, state->credentials);
@@ -236,7 +237,8 @@ struct composite_context *smb2_connect_send(TALLOC_CTX *mem_ctx,
struct cli_credentials *credentials,
struct event_context *ev,
struct smbcli_options *options,
- const char *socket_options)
+ const char *socket_options,
+ struct gensec_settings *gensec_settings)
{
struct composite_context *c;
struct smb2_connect_state *state;
@@ -259,7 +261,7 @@ struct composite_context *smb2_connect_send(TALLOC_CTX *mem_ctx,
if (composite_nomem(state->share, c)) return c;
state->resolve_ctx = talloc_reference(state, resolve_ctx);
state->socket_options = talloc_reference(state, socket_options);
- if (composite_nomem(state->socket_options, c)) return c;
+ state->gensec_settings = talloc_reference(state, gensec_settings);
ZERO_STRUCT(name);
name.name = host;
@@ -297,11 +299,13 @@ NTSTATUS smb2_connect(TALLOC_CTX *mem_ctx,
struct smb2_tree **tree,
struct event_context *ev,
struct smbcli_options *options,
- const char *socket_options)
+ const char *socket_options,
+ struct gensec_settings *gensec_settings)
{
struct composite_context *c = smb2_connect_send(mem_ctx, host, ports,
share, resolve_ctx,
credentials, ev, options,
- socket_options);
+ socket_options,
+ gensec_settings);
return smb2_connect_recv(c, mem_ctx, tree);
}