diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-02-21 15:38:35 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-02-21 15:38:35 +0100 |
commit | ede79ae482b16c3cea65d3019bc1a68f07354e89 (patch) | |
tree | 285f911d98b63493b2e65d6866bfa1a756497b05 /source4/torture/rpc/samlogon.c | |
parent | d9f8232c34a695df04a5240e270dd7ffc3101c0e (diff) | |
download | samba-ede79ae482b16c3cea65d3019bc1a68f07354e89.tar.gz samba-ede79ae482b16c3cea65d3019bc1a68f07354e89.tar.bz2 samba-ede79ae482b16c3cea65d3019bc1a68f07354e89.zip |
Remove more uses of global_loadparm.
(This used to be commit 58a5b1de2b093fe642eb11d76d12db0edf60c25c)
Diffstat (limited to 'source4/torture/rpc/samlogon.c')
-rw-r--r-- | source4/torture/rpc/samlogon.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/source4/torture/rpc/samlogon.c b/source4/torture/rpc/samlogon.c index 7fd5199908..89352ba8c4 100644 --- a/source4/torture/rpc/samlogon.c +++ b/source4/torture/rpc/samlogon.c @@ -64,6 +64,7 @@ struct samlogon_state { NTSTATUS expected_error; bool old_password; /* Allow an old password to be accepted or rejected without error, as well as session key bugs */ DATA_BLOB chall; + struct smb_iconv_convenience *iconv_convenience; }; /* @@ -1158,7 +1159,7 @@ static bool test_plaintext(struct samlogon_state *samlogon_state, enum ntlm_brea ZERO_STRUCT(user_session_key); if ((push_ucs2_talloc(samlogon_state->mem_ctx, - lp_iconv_convenience(global_loadparm), + samlogon_state->iconv_convenience, &unicodepw, samlogon_state->password)) == -1) { DEBUG(0, ("push_ucs2_allocate failed!\n")); exit(1); @@ -1169,7 +1170,7 @@ static bool test_plaintext(struct samlogon_state *samlogon_state, enum ntlm_brea password = strupper_talloc(samlogon_state->mem_ctx, samlogon_state->password); if ((convert_string_talloc(samlogon_state->mem_ctx, - lp_iconv_convenience(global_loadparm), + samlogon_state->iconv_convenience, CH_UNIX, CH_DOS, password, strlen(password)+1, (void**)&dospw)) == -1) { @@ -1310,6 +1311,7 @@ static const struct ntlm_tests { try a netlogon SamLogon */ static bool test_SamLogon(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, + struct torture_context *tctx, struct creds_CredentialState *creds, const char *comment, const char *account_domain, const char *account_name, @@ -1340,6 +1342,7 @@ static bool test_SamLogon(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, samlogon_state.chall = data_blob_talloc(fn_ctx, NULL, 8); samlogon_state.parameter_control = parameter_control; samlogon_state.old_password = old_password; + samlogon_state.iconv_convenience = lp_iconv_convenience(tctx->lp_ctx); generate_random_buffer(samlogon_state.chall.data, 8); samlogon_state.r_flags.in.server_name = talloc_asprintf(fn_ctx, "\\\\%s", dcerpc_server_name(p)); @@ -1792,7 +1795,7 @@ bool torture_rpc_samlogon(struct torture_context *torture) } if (usercreds[ci].network_login) { - if (!test_SamLogon(p, mem_ctx, creds, + if (!test_SamLogon(p, mem_ctx, torture, creds, usercreds[ci].comment, usercreds[ci].domain, usercreds[ci].username, @@ -1825,7 +1828,7 @@ bool torture_rpc_samlogon(struct torture_context *torture) } if (usercreds[0].network_login) { - if (!test_SamLogon(p, mem_ctx, creds, + if (!test_SamLogon(p, mem_ctx, torture, creds, usercreds[0].comment, usercreds[0].domain, usercreds[0].username, |