summaryrefslogtreecommitdiffstats
path: root/source4/torture
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-10-24 03:40:09 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-10-24 03:40:09 +0200
commit922a29992ee38b8e1c851192677b89a2cd59a91a (patch)
tree9ea2826f7fd77b27d16de8be61ca7940fb066bad /source4/torture
parent23b04a31f14dca0a3f9bcd58181f84db4b6092c7 (diff)
downloadsamba-922a29992ee38b8e1c851192677b89a2cd59a91a.tar.gz
samba-922a29992ee38b8e1c851192677b89a2cd59a91a.tar.xz
samba-922a29992ee38b8e1c851192677b89a2cd59a91a.zip
Remove iconv_convenience parameter from simple string push/pull
functions.
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/basic/scanner.c21
-rw-r--r--source4/torture/rap/rap.c2
-rw-r--r--source4/torture/rpc/netlogon.c2
-rw-r--r--source4/torture/rpc/samba3rpc.c5
-rw-r--r--source4/torture/rpc/samlogon.c5
-rw-r--r--source4/torture/rpc/schannel.c4
-rw-r--r--source4/torture/rpc/wkssvc.c3
7 files changed, 19 insertions, 23 deletions
diff --git a/source4/torture/basic/scanner.c b/source4/torture/basic/scanner.c
index 5212f1edeec..7f88662baa5 100644
--- a/source4/torture/basic/scanner.c
+++ b/source4/torture/basic/scanner.c
@@ -163,7 +163,7 @@ static bool trans2_op_exists(struct smbcli_state *cli, int op)
/****************************************************************************
check for existance of a trans2 call
****************************************************************************/
-static bool scan_trans2(struct smb_iconv_convenience *iconv_convenience,
+static bool scan_trans2(
struct smbcli_state *cli, int op, int level,
int fnum, int dnum, int qfnum, const char *fname)
{
@@ -233,7 +233,7 @@ static bool scan_trans2(struct smb_iconv_convenience *iconv_convenience,
SSVAL(param, 0, level);
SSVAL(param, 2, 0);
SSVAL(param, 4, 0);
- param_len += push_string(iconv_convenience,
+ param_len += push_string(
&param[6], fname, PARAM_SIZE-7,
STR_TERMINATE|STR_UNICODE);
@@ -249,7 +249,7 @@ static bool scan_trans2(struct smb_iconv_convenience *iconv_convenience,
SSVAL(param, 0, level);
SSVAL(param, 2, 0);
SSVAL(param, 4, 0);
- param_len += push_string(iconv_convenience,
+ param_len += push_string(
&param[6], "\\newfile.dat", PARAM_SIZE-7,
STR_TERMINATE|STR_UNICODE);
@@ -266,7 +266,7 @@ static bool scan_trans2(struct smb_iconv_convenience *iconv_convenience,
smbcli_mkdir(cli->tree, "\\testdir");
param_len = 2;
SSVAL(param, 0, level);
- param_len += push_string(iconv_convenience,
+ param_len += push_string(
&param[2], "\\testdir", PARAM_SIZE-3,
STR_TERMINATE|STR_UNICODE);
@@ -321,15 +321,15 @@ bool torture_trans2_scan(struct torture_context *torture,
}
for (level = 0; level <= 50; level++) {
- scan_trans2(lp_iconv_convenience(torture->lp_ctx), cli, op, level, fnum, dnum, qfnum, fname);
+ scan_trans2(cli, op, level, fnum, dnum, qfnum, fname);
}
for (level = 0x100; level <= 0x130; level++) {
- scan_trans2(lp_iconv_convenience(torture->lp_ctx), cli, op, level, fnum, dnum, qfnum, fname);
+ scan_trans2(cli, op, level, fnum, dnum, qfnum, fname);
}
for (level = 1000; level < 1050; level++) {
- scan_trans2(lp_iconv_convenience(torture->lp_ctx), cli, op, level, fnum, dnum, qfnum, fname);
+ scan_trans2(cli, op, level, fnum, dnum, qfnum, fname);
}
}
@@ -494,7 +494,7 @@ static bool scan_nttrans(struct smb_iconv_convenience *iconv_convenience,
SSVAL(param, 0, level);
SSVAL(param, 2, 0);
SSVAL(param, 4, 0);
- param_len += push_string(iconv_convenience,
+ param_len += push_string(
&param[6], fname, PARAM_SIZE,
STR_TERMINATE | STR_UNICODE);
@@ -510,7 +510,7 @@ static bool scan_nttrans(struct smb_iconv_convenience *iconv_convenience,
SSVAL(param, 0, level);
SSVAL(param, 2, 0);
SSVAL(param, 4, 0);
- param_len += push_string(iconv_convenience,
+ param_len += push_string(
&param[6], "\\newfile.dat", PARAM_SIZE,
STR_TERMINATE | STR_UNICODE);
@@ -527,8 +527,7 @@ static bool scan_nttrans(struct smb_iconv_convenience *iconv_convenience,
smbcli_mkdir(cli->tree, "\\testdir");
param_len = 2;
SSVAL(param, 0, level);
- param_len += push_string(iconv_convenience,
- &param[2], "\\testdir", PARAM_SIZE,
+ param_len += push_string(&param[2], "\\testdir", PARAM_SIZE,
STR_TERMINATE | STR_UNICODE);
status = try_nttrans_len(cli, "dfs", op, level, param, data, param_len,
diff --git a/source4/torture/rap/rap.c b/source4/torture/rap/rap.c
index e93bd52b9a7..be231107dd6 100644
--- a/source4/torture/rap/rap.c
+++ b/source4/torture/rap/rap.c
@@ -184,7 +184,7 @@ static NTSTATUS rap_pull_string(TALLOC_CTX *mem_ctx, struct ndr_pull *ndr,
return NT_STATUS_INVALID_PARAMETER;
*dest = talloc_zero_array(mem_ctx, char, len+1);
- pull_string(ndr->iconv_convenience, *dest, p, len+1, len, STR_ASCII);
+ pull_string(*dest, p, len+1, len, STR_ASCII);
return NT_STATUS_OK;
}
diff --git a/source4/torture/rpc/netlogon.c b/source4/torture/rpc/netlogon.c
index f4ae5b35ebc..c2e12ec01db 100644
--- a/source4/torture/rpc/netlogon.c
+++ b/source4/torture/rpc/netlogon.c
@@ -592,7 +592,7 @@ bool test_netlogon_ops(struct dcerpc_pipe *p, struct torture_context *tctx,
chal = data_blob_const(ninfo.challenge,
sizeof(ninfo.challenge));
- names_blob = NTLMv2_generate_names_blob(tctx, lp_iconv_convenience(tctx->lp_ctx), cli_credentials_get_workstation(credentials),
+ names_blob = NTLMv2_generate_names_blob(tctx, cli_credentials_get_workstation(credentials),
cli_credentials_get_domain(credentials));
status = cli_credentials_get_ntlm_response(cmdline_credentials, tctx,
diff --git a/source4/torture/rpc/samba3rpc.c b/source4/torture/rpc/samba3rpc.c
index 260c1cc1499..25ff7d0ea9b 100644
--- a/source4/torture/rpc/samba3rpc.c
+++ b/source4/torture/rpc/samba3rpc.c
@@ -1041,7 +1041,7 @@ static bool schan(struct smbcli_state *cli,
generate_random_buffer(chal.data, chal.length);
names_blob = NTLMv2_generate_names_blob(
- mem_ctx, lp_iconv_convenience(lp_ctx),
+ mem_ctx,
cli_credentials_get_workstation(user_creds),
cli_credentials_get_domain(user_creds));
status = cli_credentials_get_ntlm_response(
@@ -2420,8 +2420,7 @@ static NTSTATUS get_servername(TALLOC_CTX *mem_ctx, struct smbcli_tree *tree,
memcpy(servername, r.out.info.info0.name, 16);
servername[16] = '\0';
- if (pull_ascii_talloc(mem_ctx, iconv_convenience,
- name, servername) < 0) {
+ if (pull_ascii_talloc(mem_ctx, name, servername) < 0) {
return NT_STATUS_NO_MEMORY;
}
diff --git a/source4/torture/rpc/samlogon.c b/source4/torture/rpc/samlogon.c
index b7028e66095..01368cccad9 100644
--- a/source4/torture/rpc/samlogon.c
+++ b/source4/torture/rpc/samlogon.c
@@ -595,7 +595,7 @@ static bool test_lmv2_ntlmv2_broken(struct samlogon_state *samlogon_state,
DATA_BLOB lmv2_response = data_blob(NULL, 0);
DATA_BLOB lmv2_session_key = data_blob(NULL, 0);
DATA_BLOB ntlmv2_session_key = data_blob(NULL, 0);
- DATA_BLOB names_blob = NTLMv2_generate_names_blob(samlogon_state->mem_ctx, samlogon_state->iconv_convenience, TEST_MACHINE_NAME, samlogon_state->workgroup);
+ DATA_BLOB names_blob = NTLMv2_generate_names_blob(samlogon_state->mem_ctx, TEST_MACHINE_NAME, samlogon_state->workgroup);
uint8_t lm_session_key[8];
uint8_t user_session_key[16];
@@ -743,7 +743,7 @@ static bool test_lmv2_ntlm_broken(struct samlogon_state *samlogon_state,
DATA_BLOB lmv2_response = data_blob(NULL, 0);
DATA_BLOB lmv2_session_key = data_blob(NULL, 0);
DATA_BLOB ntlmv2_session_key = data_blob(NULL, 0);
- DATA_BLOB names_blob = NTLMv2_generate_names_blob(samlogon_state->mem_ctx, samlogon_state->iconv_convenience, samlogon_state->netbios_name, samlogon_state->workgroup);
+ DATA_BLOB names_blob = NTLMv2_generate_names_blob(samlogon_state->mem_ctx, samlogon_state->netbios_name, samlogon_state->workgroup);
DATA_BLOB ntlm_response = data_blob_talloc(samlogon_state->mem_ctx, NULL, 24);
DATA_BLOB ntlm_session_key = data_blob_talloc(samlogon_state->mem_ctx, NULL, 16);
@@ -1162,7 +1162,6 @@ 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,
- samlogon_state->iconv_convenience,
&unicodepw, samlogon_state->password)) == -1) {
DEBUG(0, ("push_ucs2_allocate failed!\n"));
exit(1);
diff --git a/source4/torture/rpc/schannel.c b/source4/torture/rpc/schannel.c
index fae0093e4d1..15d40a2e176 100644
--- a/source4/torture/rpc/schannel.c
+++ b/source4/torture/rpc/schannel.c
@@ -68,7 +68,7 @@ bool test_netlogon_ex_ops(struct dcerpc_pipe *p, struct torture_context *tctx,
chal = data_blob_const(ninfo.challenge,
sizeof(ninfo.challenge));
- names_blob = NTLMv2_generate_names_blob(tctx, lp_iconv_convenience(tctx->lp_ctx), cli_credentials_get_workstation(credentials),
+ names_blob = NTLMv2_generate_names_blob(tctx, cli_credentials_get_workstation(credentials),
cli_credentials_get_domain(credentials));
status = cli_credentials_get_ntlm_response(cmdline_credentials, tctx,
@@ -573,7 +573,7 @@ static bool torture_schannel_bench_start(struct torture_schannel_bench_conn *con
chal = data_blob_const(conn->ninfo.challenge,
sizeof(conn->ninfo.challenge));
- names_blob = NTLMv2_generate_names_blob(conn->tmp, lp_iconv_convenience(s->tctx->lp_ctx),
+ names_blob = NTLMv2_generate_names_blob(conn->tmp,
cli_credentials_get_workstation(conn->wks_creds),
cli_credentials_get_domain(conn->wks_creds));
diff --git a/source4/torture/rpc/wkssvc.c b/source4/torture/rpc/wkssvc.c
index 015f20f6e2c..0f49562d8b3 100644
--- a/source4/torture/rpc/wkssvc.c
+++ b/source4/torture/rpc/wkssvc.c
@@ -966,8 +966,7 @@ static bool test_NetrMessageBufferSend(struct torture_context *tctx,
size_t size;
uint8_t *msg;
- size = push_ucs2_talloc(tctx, lp_iconv_convenience(tctx->lp_ctx),
- (void **)&msg, message);
+ size = push_ucs2_talloc(tctx, (void **)&msg, message);
r.in.server_name = dcerpc_server_name(p);
r.in.message_name = dcerpc_server_name(p);