X-Git-Url: http://git.samba.org/?a=blobdiff_plain;f=source%2Ftorture%2Fbasic%2Fbase.c;h=6f02fc4fe5822d5664bda2cd3fbf5eea0ada5d95;hb=1455e0b52e8ab4af7ae36ee6df58bfbea352867b;hp=5c5428d61f345df334d487eb913fdd1104d2cbfb;hpb=18fe33ec51ee6cca100238e46e72d1de3fb6bc99;p=samba-svnmirror.git diff --git a/source/torture/basic/base.c b/source/torture/basic/base.c index 5c5428d61..6f02fc4fe 100644 --- a/source/torture/basic/base.c +++ b/source/torture/basic/base.c @@ -41,7 +41,7 @@ static struct smbcli_state *open_nbt_connection(struct torture_context *tctx) struct smbcli_state *cli; const char *host = torture_setting_string(tctx, "host", NULL); - make_nbt_name_client(&calling, lp_netbios_name(global_loadparm)); + make_nbt_name_client(&calling, lp_netbios_name(tctx->lp_ctx)); nbt_choose_called_name(NULL, &called, host, NBT_NAME_SERVER); @@ -51,7 +51,7 @@ static struct smbcli_state *open_nbt_connection(struct torture_context *tctx) goto failed; } - if (!smbcli_socket_connect(cli, host)) { + if (!smbcli_socket_connect(cli, host, lp_resolve_context(tctx->lp_ctx), lp_max_xmit(tctx->lp_ctx), lp_maxmux(tctx->lp_ctx))) { torture_comment(tctx, "Failed to connect with %s\n", host); goto failed; } @@ -355,7 +355,7 @@ static bool run_negprot_nowait(struct torture_context *tctx) for (i=0;i<100;i++) { struct smbcli_request *req; - req = smb_raw_negotiate_send(cli->transport, lp_unicode(global_loadparm), PROTOCOL_NT1); + req = smb_raw_negotiate_send(cli->transport, lp_unicode(tctx->lp_ctx), PROTOCOL_NT1); event_loop_once(cli->transport->socket->event.ctx); if (req->state == SMBCLI_REQUEST_ERROR) { if (i > 0) { @@ -370,7 +370,7 @@ static bool run_negprot_nowait(struct torture_context *tctx) } torture_comment(tctx, "Opening secondary connection\n"); - if (!torture_open_connection(&cli2, 1)) { + if (!torture_open_connection(&cli2, tctx, 1)) { torture_comment(tctx, "Failed to open secondary connection\n"); correct = false; } @@ -1443,27 +1443,27 @@ static bool torture_samba3_errorpaths(struct torture_context *tctx) return false; } - nt_status_support = lp_nt_status_support(global_loadparm); + nt_status_support = lp_nt_status_support(tctx->lp_ctx); - if (!lp_set_cmdline(global_loadparm, "nt status support", "yes")) { + if (!lp_set_cmdline(tctx->lp_ctx, "nt status support", "yes")) { torture_comment(tctx, "Could not set 'nt status support = yes'\n"); goto fail; } - if (!torture_open_connection(&cli_nt, 0)) { + if (!torture_open_connection(&cli_nt, tctx, 0)) { goto fail; } - if (!lp_set_cmdline(global_loadparm, "nt status support", "no")) { + if (!lp_set_cmdline(tctx->lp_ctx, "nt status support", "no")) { torture_comment(tctx, "Could not set 'nt status support = yes'\n"); goto fail; } - if (!torture_open_connection(&cli_dos, 1)) { + if (!torture_open_connection(&cli_dos, tctx, 1)) { goto fail; } - if (!lp_set_cmdline(global_loadparm, "nt status support", + if (!lp_set_cmdline(tctx->lp_ctx, "nt status support", nt_status_support ? "yes":"no")) { torture_comment(tctx, "Could not reset 'nt status support = yes'"); goto fail;