From dcc282590b34537fc1ead61c3300172528273b44 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 3 Jan 2008 17:22:12 -0600 Subject: 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) --- source4/torture/basic/base.c | 5 ++++- source4/torture/basic/misc.c | 8 +------- 2 files changed, 5 insertions(+), 8 deletions(-) (limited to 'source4/torture/basic') diff --git a/source4/torture/basic/base.c b/source4/torture/basic/base.c index fcd788481b..aa729ec0df 100644 --- a/source4/torture/basic/base.c +++ b/source4/torture/basic/base.c @@ -40,6 +40,7 @@ static struct smbcli_state *open_nbt_connection(struct torture_context *tctx) struct nbt_name called, calling; struct smbcli_state *cli; const char *host = torture_setting_string(tctx, "host", NULL); + struct smbcli_options options; make_nbt_name_client(&calling, lp_netbios_name(tctx->lp_ctx)); @@ -51,7 +52,9 @@ static struct smbcli_state *open_nbt_connection(struct torture_context *tctx) goto failed; } - if (!smbcli_socket_connect(cli, host, lp_smb_ports(tctx->lp_ctx), lp_resolve_context(tctx->lp_ctx), lp_max_xmit(tctx->lp_ctx), lp_maxmux(tctx->lp_ctx), lp_nt_status_support(tctx->lp_ctx) && lp_use_spnego(tctx->lp_ctx), lp_client_signing(tctx->lp_ctx))) { + lp_smbcli_options(tctx->lp_ctx, &options); + + if (!smbcli_socket_connect(cli, host, lp_smb_ports(tctx->lp_ctx), lp_resolve_context(tctx->lp_ctx), &options)) { torture_comment(tctx, "Failed to connect with %s\n", host); goto failed; } diff --git a/source4/torture/basic/misc.c b/source4/torture/basic/misc.c index 986a4574a9..d991f117cd 100644 --- a/source4/torture/basic/misc.c +++ b/source4/torture/basic/misc.c @@ -821,13 +821,7 @@ static struct composite_context *torture_connect_async( smb->in.credentials=cmdline_credentials; smb->in.fallback_to_anonymous=false; smb->in.workgroup=workgroup; - smb->in.max_xmit = lp_max_xmit(tctx->lp_ctx); - smb->in.max_mux = lp_maxmux(tctx->lp_ctx); - smb->in.ntstatus_support = lp_nt_status_support(tctx->lp_ctx); - smb->in.max_protocol = lp_cli_maxprotocol(tctx->lp_ctx); - smb->in.unicode = lp_unicode(tctx->lp_ctx); - smb->in.use_spnego = lp_use_spnego(tctx->lp_ctx) && lp_nt_status_support(tctx->lp_ctx); - smb->in.signing = lp_client_signing(tctx->lp_ctx); + lp_smbcli_options(tctx->lp_ctx, &smb->in.options); return smb_composite_connect_send(smb,mem_ctx, lp_resolve_context(tctx->lp_ctx),ev); -- cgit