summaryrefslogtreecommitdiff
path: root/source4/torture/basic/secleak.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-12-03 00:28:22 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:47:20 +0100
commitbbdfbf8d9d486aee51117976b8f825759a4c4a37 (patch)
treec0f97e145aae09c3e7e5387471fb3fb0ab839596 /source4/torture/basic/secleak.c
parent291ddf433685ee5c25e172885045a4b60d7bb1ee (diff)
downloadsamba-bbdfbf8d9d486aee51117976b8f825759a4c4a37.tar.gz
samba-bbdfbf8d9d486aee51117976b8f825759a4c4a37.tar.bz2
samba-bbdfbf8d9d486aee51117976b8f825759a4c4a37.zip
r26238: Add a loadparm context parameter to torture_context, remove more uses of global_loadparm.
(This used to be commit a33a5530545086b81a3b205aa109dff11c546926)
Diffstat (limited to 'source4/torture/basic/secleak.c')
-rw-r--r--source4/torture/basic/secleak.c8
1 files changed, 4 insertions, 4 deletions
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);