struct resolve_context *resolve_ctx,
struct cli_credentials *credentials,
struct event_context *ev,
- struct smbcli_options *options)
+ struct smbcli_options *options,
+ const char *socket_options)
{
struct composite_context *c;
struct smb2_connect_state *state;
state->share = talloc_strdup(c, share);
if (composite_nomem(state->share, c)) return c;
state->resolve_ctx = talloc_reference(state, resolve_ctx);
- state->socket_options = lp_socket_options(global_loadparm);
+ state->socket_options = talloc_reference(state, socket_options);
if (composite_nomem(state->socket_options, c)) return c;
ZERO_STRUCT(name);
struct cli_credentials *credentials,
struct smb2_tree **tree,
struct event_context *ev,
- struct smbcli_options *options)
+ struct smbcli_options *options,
+ const char *socket_options)
{
struct composite_context *c = smb2_connect_send(mem_ctx, host, ports,
share, resolve_ctx,
- credentials, ev, options);
+ credentials, ev, options,
+ socket_options);
return smb2_connect_recv(c, mem_ctx, tree);
}
remote_share,
lp_resolve_context(ntvfs->ctx->lp_ctx),
credentials,
- ntvfs->ctx->event_ctx, &options);
+ ntvfs->ctx->event_ctx, &options,
+ lp_socket_options(ntvfs->ctx->lp_ctx)
+ );
status = smb2_connect_recv(creq, private, &tree);
NT_STATUS_NOT_OK_RETURN(status);
status = smb2_connect(mem_ctx, host, share,
lp_resolve_context(torture->lp_ctx),
credentials, &tree,
- torture->ev, &options);
+ torture->ev, &options,
+ lp_socket_options(torture->lp_ctx)
+ );
if (!NT_STATUS_IS_OK(status)) {
printf("Connection failed - %s\n", nt_errstr(status));
return false;
status = smb2_connect(tctx, host, share,
lp_resolve_context(tctx->lp_ctx),
credentials, tree,
- tctx->ev, &options);
+ tctx->ev, &options,
+ lp_socket_options(tctx->lp_ctx)
+ );
if (!NT_STATUS_IS_OK(status)) {
printf("Failed to connect to SMB2 share \\\\%s\\%s - %s\n",
host, share, nt_errstr(status));