diff options
Diffstat (limited to 'source4/torture/basic')
-rw-r--r-- | source4/torture/basic/base.c | 12 | ||||
-rw-r--r-- | source4/torture/basic/misc.c | 2 | ||||
-rw-r--r-- | source4/torture/basic/secleak.c | 8 |
3 files changed, 11 insertions, 11 deletions
diff --git a/source4/torture/basic/base.c b/source4/torture/basic/base.c index 5c5428d61f..9a5616e274 100644 --- a/source4/torture/basic/base.c +++ b/source4/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); @@ -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) { @@ -1443,9 +1443,9 @@ 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; } @@ -1454,7 +1454,7 @@ static bool torture_samba3_errorpaths(struct torture_context *tctx) 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; } @@ -1463,7 +1463,7 @@ static bool torture_samba3_errorpaths(struct torture_context *tctx) 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; diff --git a/source4/torture/basic/misc.c b/source4/torture/basic/misc.c index f0d5ef5536..46f74ee1b1 100644 --- a/source4/torture/basic/misc.c +++ b/source4/torture/basic/misc.c @@ -442,7 +442,7 @@ static int init_benchrw_params(struct torture_context *tctx, lpar->writeratio = torture_setting_int(tctx, "writeratio",5); lpar->num_parallel_requests = torture_setting_int( tctx, "parallel_requests", 5); - lpar->workgroup = lp_workgroup(global_loadparm); + lpar->workgroup = lp_workgroup(tctx->lp_ctx); p = torture_setting_string(tctx, "unclist", NULL); if (p) { diff --git a/source4/torture/basic/secleak.c b/source4/torture/basic/secleak.c index 3d4aeea956..d0c048425d 100644 --- a/source4/torture/basic/secleak.c +++ b/source4/torture/basic/secleak.c @@ -29,7 +29,7 @@ #include "auth/credentials/credentials.h" #include "param/param.h" -static bool try_failed_login(struct smbcli_state *cli) +static bool try_failed_login(struct torture_context *tctx, struct smbcli_state *cli) { NTSTATUS status; struct smb_composite_sesssetup setup; @@ -38,10 +38,10 @@ static bool try_failed_login(struct smbcli_state *cli) session = smbcli_session_init(cli->transport, cli, false); setup.in.sesskey = cli->transport->negotiate.sesskey; setup.in.capabilities = cli->transport->negotiate.capabilities; - setup.in.workgroup = lp_workgroup(global_loadparm); + setup.in.workgroup = lp_workgroup(tctx->lp_ctx); setup.in.credentials = cli_credentials_init(session); - cli_credentials_set_conf(setup.in.credentials, global_loadparm); + cli_credentials_set_conf(setup.in.credentials, tctx->lp_ctx); cli_credentials_set_domain(setup.in.credentials, "INVALID-DOMAIN", CRED_SPECIFIED); cli_credentials_set_username(setup.in.credentials, "INVALID-USERNAME", CRED_SPECIFIED); cli_credentials_set_password(setup.in.credentials, "INVALID-PASSWORD", CRED_SPECIFIED); @@ -62,7 +62,7 @@ bool torture_sec_leak(struct torture_context *tctx, struct smbcli_state *cli) int timelimit = torture_setting_int(tctx, "timelimit", 20); while (time(NULL) < t1+timelimit) { - if (!try_failed_login(cli)) { + if (!try_failed_login(tctx, cli)) { return false; } talloc_report(NULL, stdout); |