summaryrefslogtreecommitdiff
path: root/source4/torture/rpc
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2010-05-09 17:20:01 +0200
committerJelmer Vernooij <jelmer@samba.org>2010-05-18 11:45:30 +0200
commitf9ca9e46ad24036bf00cb361a6cef4b2e7e98d7d (patch)
tree9a0a6cb6617d855c28eb891396898096c4214e88 /source4/torture/rpc
parente9f5bdf6b5a1aeb7e2e556cf41f7cbc2abed7856 (diff)
downloadsamba-f9ca9e46ad24036bf00cb361a6cef4b2e7e98d7d.tar.gz
samba-f9ca9e46ad24036bf00cb361a6cef4b2e7e98d7d.tar.bz2
samba-f9ca9e46ad24036bf00cb361a6cef4b2e7e98d7d.zip
Finish removal of iconv_convenience in public API's.
Diffstat (limited to 'source4/torture/rpc')
-rw-r--r--source4/torture/rpc/autoidl.c2
-rw-r--r--source4/torture/rpc/dssync.c7
-rw-r--r--source4/torture/rpc/eventlog.c3
-rw-r--r--source4/torture/rpc/join.c2
-rw-r--r--source4/torture/rpc/lsa.c2
-rw-r--r--source4/torture/rpc/remote_pac.c6
-rw-r--r--source4/torture/rpc/samba3rpc.c39
-rw-r--r--source4/torture/rpc/samlogon.c5
-rw-r--r--source4/torture/rpc/samsync.c2
-rw-r--r--source4/torture/rpc/spoolss.c79
-rw-r--r--source4/torture/rpc/svcctl.c2
-rw-r--r--source4/torture/rpc/winreg.c6
12 files changed, 66 insertions, 89 deletions
diff --git a/source4/torture/rpc/autoidl.c b/source4/torture/rpc/autoidl.c
index 77bb761e0c..3bf7dab764 100644
--- a/source4/torture/rpc/autoidl.c
+++ b/source4/torture/rpc/autoidl.c
@@ -81,7 +81,7 @@ static void fill_blob_handle(DATA_BLOB *blob, TALLOC_CTX *mem_ctx,
return;
}
- ndr_push_struct_blob(&b2, mem_ctx, NULL, handle, (ndr_push_flags_fn_t)ndr_push_policy_handle);
+ ndr_push_struct_blob(&b2, mem_ctx, handle, (ndr_push_flags_fn_t)ndr_push_policy_handle);
memcpy(blob->data, b2.data, 20);
}
diff --git a/source4/torture/rpc/dssync.c b/source4/torture/rpc/dssync.c
index 2e5edfdb88..d6ed191284 100644
--- a/source4/torture/rpc/dssync.c
+++ b/source4/torture/rpc/dssync.c
@@ -361,7 +361,7 @@ static bool test_GetInfo(struct torture_context *tctx, struct DsSyncTest *ctx)
search.in.acct_control = -1;
search.in.version = NETLOGON_NT_VERSION_5 | NETLOGON_NT_VERSION_5EX;
search.in.map_response = true;
- status = cldap_netlogon(cldap, lp_iconv_convenience(tctx->lp_ctx), ctx, &search);
+ status = cldap_netlogon(cldap, ctx, &search);
if (!NT_STATUS_IS_OK(status)) {
const char *errstr = nt_errstr(status);
ctx->site_name = talloc_asprintf(ctx, "%s", "Default-First-Site-Name");
@@ -407,7 +407,7 @@ static bool test_analyse_objects(struct torture_context *tctx,
struct ldb_result *a_res;
struct ldb_result *c_res;
struct ldb_dn *schema_dn = ldb_get_schema_basedn(ldb);
- ldap_schema = dsdb_new_schema(ctx, lp_iconv_convenience(tctx->lp_ctx));
+ ldap_schema = dsdb_new_schema(ctx);
if (!ldap_schema) {
return false;
}
@@ -727,8 +727,7 @@ static bool test_analyse_objects(struct torture_context *tctx,
if (pull_fn) {
/* Can't use '_all' because of PIDL bugs with relative pointers */
ndr_err = ndr_pull_struct_blob(&plain_data, ptr,
- lp_iconv_convenience(tctx->lp_ctx), ptr,
- pull_fn);
+ ptr, pull_fn);
if (NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
ndr_print_debug(print_fn, name, ptr);
} else {
diff --git a/source4/torture/rpc/eventlog.c b/source4/torture/rpc/eventlog.c
index 1fcc0a6f3f..3b6c70e068 100644
--- a/source4/torture/rpc/eventlog.c
+++ b/source4/torture/rpc/eventlog.c
@@ -171,8 +171,7 @@ static bool test_ReadEventLog(struct torture_context *tctx,
blob = data_blob_const(r.out.data + pos, size);
dump_data(0, blob.data, blob.length);
- ndr_err = ndr_pull_struct_blob_all(&blob, tctx,
- lp_iconv_convenience(tctx->lp_ctx), &rec,
+ ndr_err = ndr_pull_struct_blob_all(&blob, tctx, &rec,
(ndr_pull_flags_fn_t)ndr_pull_EVENTLOGRECORD);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
status = ndr_map_error2ntstatus(ndr_err);
diff --git a/source4/torture/rpc/join.c b/source4/torture/rpc/join.c
index b02510930a..09519d03a5 100644
--- a/source4/torture/rpc/join.c
+++ b/source4/torture/rpc/join.c
@@ -41,7 +41,6 @@ bool torture_rpc_join(struct torture_context *torture)
machine_account,
lp_resolve_context(torture->lp_ctx),
torture->ev, &options, &session_options,
- lp_iconv_convenience(torture->lp_ctx),
lp_gensec_settings(torture, torture->lp_ctx));
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0, ("%s failed to connect to IPC$ with workstation credentials\n",
@@ -70,7 +69,6 @@ bool torture_rpc_join(struct torture_context *torture)
machine_account,
lp_resolve_context(torture->lp_ctx),
torture->ev, &options, &session_options,
- lp_iconv_convenience(torture->lp_ctx),
lp_gensec_settings(torture, torture->lp_ctx));
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0, ("%s failed to connect to IPC$ with workstation credentials\n",
diff --git a/source4/torture/rpc/lsa.c b/source4/torture/rpc/lsa.c
index 3f91afedd6..c66725672e 100644
--- a/source4/torture/rpc/lsa.c
+++ b/source4/torture/rpc/lsa.c
@@ -2438,7 +2438,7 @@ static bool test_CreateTrustedDomainEx2(struct dcerpc_pipe *p,
auth_struct.outgoing.count = 0;
auth_struct.incoming.count = 0;
- ndr_err = ndr_push_struct_blob(&auth_blob, tctx, lp_iconv_convenience(tctx->lp_ctx), &auth_struct,
+ ndr_err = ndr_push_struct_blob(&auth_blob, tctx, &auth_struct,
(ndr_push_flags_fn_t)ndr_push_trustDomainPasswords);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
torture_comment(tctx, "ndr_push_struct_blob of trustDomainPasswords structure failed");
diff --git a/source4/torture/rpc/remote_pac.c b/source4/torture/rpc/remote_pac.c
index eab835aad1..9358d44ca8 100644
--- a/source4/torture/rpc/remote_pac.c
+++ b/source4/torture/rpc/remote_pac.c
@@ -139,7 +139,7 @@ static bool test_PACVerify(struct torture_context *tctx,
session_info->server_info->pac_kdc_sig.signature.data,
pac_wrapped_struct.SignatureLength);
- ndr_err = ndr_push_struct_blob(&pac_wrapped, tmp_ctx, lp_iconv_convenience(tctx->lp_ctx), &pac_wrapped_struct,
+ ndr_err = ndr_push_struct_blob(&pac_wrapped, tmp_ctx, &pac_wrapped_struct,
(ndr_push_flags_fn_t)ndr_push_PAC_Validate);
torture_assert(tctx, NDR_ERR_CODE_IS_SUCCESS(ndr_err), "ndr_push_struct_blob of PACValidate structure failed");
@@ -245,7 +245,7 @@ static bool test_PACVerify(struct torture_context *tctx,
session_info->server_info->pac_kdc_sig.signature.data,
pac_wrapped_struct.SignatureLength);
- ndr_err = ndr_push_struct_blob(&pac_wrapped, tmp_ctx, lp_iconv_convenience(tctx->lp_ctx), &pac_wrapped_struct,
+ ndr_err = ndr_push_struct_blob(&pac_wrapped, tmp_ctx, &pac_wrapped_struct,
(ndr_push_flags_fn_t)ndr_push_PAC_Validate);
torture_assert(tctx, NDR_ERR_CODE_IS_SUCCESS(ndr_err), "ndr_push_struct_blob of PACValidate structure failed");
@@ -293,7 +293,7 @@ static bool test_PACVerify(struct torture_context *tctx,
/* Break the signature length */
pac_wrapped_struct.SignatureLength++;
- ndr_err = ndr_push_struct_blob(&pac_wrapped, tmp_ctx, lp_iconv_convenience(tctx->lp_ctx), &pac_wrapped_struct,
+ ndr_err = ndr_push_struct_blob(&pac_wrapped, tmp_ctx, &pac_wrapped_struct,
(ndr_push_flags_fn_t)ndr_push_PAC_Validate);
torture_assert(tctx, NDR_ERR_CODE_IS_SUCCESS(ndr_err), "ndr_push_struct_blob of PACValidate structure failed");
diff --git a/source4/torture/rpc/samba3rpc.c b/source4/torture/rpc/samba3rpc.c
index 96d2b5ca52..d09e80283a 100644
--- a/source4/torture/rpc/samba3rpc.c
+++ b/source4/torture/rpc/samba3rpc.c
@@ -84,7 +84,6 @@ bool torture_bind_authcontext(struct torture_context *torture)
cmdline_credentials,
lp_resolve_context(torture->lp_ctx),
torture->ev, &options, &session_options,
- lp_iconv_convenience(torture->lp_ctx),
lp_gensec_settings(torture, torture->lp_ctx));
if (!NT_STATUS_IS_OK(status)) {
torture_comment(torture, "smbcli_full_connection failed: %s\n",
@@ -92,8 +91,7 @@ bool torture_bind_authcontext(struct torture_context *torture)
goto done;
}
- lsa_pipe = dcerpc_pipe_init(mem_ctx, cli->transport->socket->event.ctx,
- lp_iconv_convenience(torture->lp_ctx));
+ lsa_pipe = dcerpc_pipe_init(mem_ctx, cli->transport->socket->event.ctx);
if (lsa_pipe == NULL) {
torture_comment(torture, "dcerpc_pipe_init failed\n");
goto done;
@@ -224,8 +222,7 @@ static bool bindtest(struct torture_context *tctx,
}
lsa_pipe = dcerpc_pipe_init(mem_ctx,
- cli->transport->socket->event.ctx,
- lp_iconv_convenience(tctx->lp_ctx));
+ cli->transport->socket->event.ctx);
if (lsa_pipe == NULL) {
torture_comment(tctx, "dcerpc_pipe_init failed\n");
goto done;
@@ -336,7 +333,6 @@ static bool torture_bind_samba3(struct torture_context *torture)
cmdline_credentials,
lp_resolve_context(torture->lp_ctx),
torture->ev, &options, &session_options,
- lp_iconv_convenience(torture->lp_ctx),
lp_gensec_settings(torture, torture->lp_ctx));
if (!NT_STATUS_IS_OK(status)) {
torture_comment(torture, "smbcli_full_connection failed: %s\n",
@@ -397,8 +393,7 @@ static bool get_usr_handle(struct torture_context *tctx,
uint32_t user_rid,access_granted;
samr_pipe = dcerpc_pipe_init(mem_ctx,
- cli->transport->socket->event.ctx,
- lp_iconv_convenience(tctx->lp_ctx));
+ cli->transport->socket->event.ctx);
torture_assert(tctx, samr_pipe, "dcerpc_pipe_init failed");
samr_handle = samr_pipe->binding_handle;
@@ -953,8 +948,7 @@ static bool auth2(struct torture_context *tctx,
}
net_pipe = dcerpc_pipe_init(mem_ctx,
- cli->transport->socket->event.ctx,
- lp_iconv_convenience(tctx->lp_ctx));
+ cli->transport->socket->event.ctx);
if (net_pipe == NULL) {
torture_comment(tctx, "dcerpc_pipe_init failed\n");
goto done;
@@ -1070,8 +1064,7 @@ static bool schan(struct torture_context *tctx,
}
net_pipe = dcerpc_pipe_init(mem_ctx,
- cli->transport->socket->event.ctx,
- lp_iconv_convenience(tctx->lp_ctx));
+ cli->transport->socket->event.ctx);
if (net_pipe == NULL) {
torture_comment(tctx, "dcerpc_pipe_init failed\n");
goto done;
@@ -1342,7 +1335,6 @@ static bool torture_netlogon_samba3(struct torture_context *torture)
anon_creds,
lp_resolve_context(torture->lp_ctx),
torture->ev, &options, &session_options,
- lp_iconv_convenience(torture->lp_ctx),
lp_gensec_settings(torture, torture->lp_ctx));
if (!NT_STATUS_IS_OK(status)) {
torture_comment(torture, "smbcli_full_connection failed: %s\n",
@@ -1432,7 +1424,6 @@ static bool test_join3(struct torture_context *tctx,
"IPC$", NULL, lp_socket_options(tctx->lp_ctx),
smb_creds, lp_resolve_context(tctx->lp_ctx),
tctx->ev, &options, &session_options,
- lp_iconv_convenience(tctx->lp_ctx),
lp_gensec_settings(tctx, tctx->lp_ctx));
torture_assert_ntstatus_ok(tctx, status,
"smbcli_full_connection failed");
@@ -1541,8 +1532,7 @@ static NTSTATUS pipe_bind_smb(struct torture_context *tctx,
NTSTATUS status;
if (!(result = dcerpc_pipe_init(
- mem_ctx, tree->session->transport->socket->event.ctx,
- lp_iconv_convenience(tctx->lp_ctx)))) {
+ mem_ctx, tree->session->transport->socket->event.ctx))) {
return NT_STATUS_NO_MEMORY;
}
@@ -1809,10 +1799,8 @@ static bool torture_samba3_rpc_getusername(struct torture_context *torture)
mem_ctx, &cli, torture_setting_string(torture, "host", NULL),
lp_smb_ports(torture->lp_ctx),
"IPC$", NULL, lp_socket_options(torture->lp_ctx), cmdline_credentials,
- lp_resolve_context(torture->lp_ctx),
- torture->ev, &options, &session_options,
- lp_iconv_convenience(torture->lp_ctx),
- lp_gensec_settings(torture, torture->lp_ctx));
+ lp_resolve_context(torture->lp_ctx), torture->ev, &options,
+ &session_options, lp_gensec_settings(torture, torture->lp_ctx));
if (!NT_STATUS_IS_OK(status)) {
torture_warning(torture, "smbcli_full_connection failed: %s\n",
nt_errstr(status));
@@ -1839,7 +1827,6 @@ static bool torture_samba3_rpc_getusername(struct torture_context *torture)
lp_socket_options(torture->lp_ctx), anon_creds,
lp_resolve_context(torture->lp_ctx),
torture->ev, &options, &session_options,
- lp_iconv_convenience(torture->lp_ctx),
lp_gensec_settings(torture, torture->lp_ctx));
if (!NT_STATUS_IS_OK(status)) {
torture_warning(torture, "anon smbcli_full_connection failed: %s\n",
@@ -2154,8 +2141,7 @@ static bool torture_samba3_rpc_randomauth2(struct torture_context *torture)
}
if (!(net_pipe = dcerpc_pipe_init(
- mem_ctx, cli->transport->socket->event.ctx,
- lp_iconv_convenience(torture->lp_ctx)))) {
+ mem_ctx, cli->transport->socket->event.ctx))) {
torture_comment(torture, "dcerpc_pipe_init failed\n");
goto done;
}
@@ -2556,7 +2542,6 @@ static bool torture_samba3_rpc_lsa(struct torture_context *torture)
}
static NTSTATUS get_servername(TALLOC_CTX *mem_ctx, struct smbcli_tree *tree,
- struct smb_iconv_convenience *iconv_convenience,
char **name)
{
struct rap_WserverGetInfo r;
@@ -2566,7 +2551,7 @@ static NTSTATUS get_servername(TALLOC_CTX *mem_ctx, struct smbcli_tree *tree,
r.in.level = 0;
r.in.bufsize = 0xffff;
- status = smbcli_rap_netservergetinfo(tree, iconv_convenience, mem_ctx, &r);
+ status = smbcli_rap_netservergetinfo(tree, mem_ctx, &r);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
@@ -2592,7 +2577,7 @@ static bool rap_get_servername(struct torture_context *tctx,
"IPC$ connection failed");
torture_assert_ntstatus_ok(tctx,
- get_servername(tctx, cli->tree, lp_iconv_convenience(tctx->lp_ctx), servername),
+ get_servername(tctx, cli->tree, servername),
"get_servername failed");
talloc_free(cli);
@@ -3241,7 +3226,7 @@ static bool torture_samba3_setconfig(struct torture_context *tctx,
"OpenKey failed");
torture_assert(tctx,
- reg_string_to_val(tctx, lp_iconv_convenience(tctx->lp_ctx), "REG_SZ", value, &type, &val),
+ reg_string_to_val(tctx, "REG_SZ", value, &type, &val),
"reg_string_to_val failed");
s.in.handle = &key_handle;
diff --git a/source4/torture/rpc/samlogon.c b/source4/torture/rpc/samlogon.c
index 2da0041c73..c59e447443 100644
--- a/source4/torture/rpc/samlogon.c
+++ b/source4/torture/rpc/samlogon.c
@@ -65,7 +65,6 @@ 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;
};
/*
@@ -1190,8 +1189,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_convenience(samlogon_state->mem_ctx,
- samlogon_state->iconv_convenience,
+ if (!convert_string_talloc(samlogon_state->mem_ctx,
CH_UNIX, CH_DOS,
password, strlen(password)+1,
(void**)&dospw, NULL, false)) {
@@ -1372,7 +1370,6 @@ 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));
diff --git a/source4/torture/rpc/samsync.c b/source4/torture/rpc/samsync.c
index e59bf3a3a8..6e0d9471d1 100644
--- a/source4/torture/rpc/samsync.c
+++ b/source4/torture/rpc/samsync.c
@@ -598,7 +598,7 @@ static bool samsync_handle_user(struct torture_context *tctx, TALLOC_CTX *mem_ct
enum ndr_err_code ndr_err;
data.data = user->user_private_info.SensitiveData;
data.length = user->user_private_info.DataLength;
- ndr_err = ndr_pull_struct_blob(&data, mem_ctx, lp_iconv_convenience(tctx->lp_ctx), &keys, (ndr_pull_flags_fn_t)ndr_pull_netr_USER_KEYS);
+ ndr_err = ndr_pull_struct_blob(&data, mem_ctx, &keys, (ndr_pull_flags_fn_t)ndr_pull_netr_USER_KEYS);
if (NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
if (keys.keys.keys2.lmpassword.length == 16) {
lm_hash_p = &lm_hash;
diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c
index 61d1bccaa4..efe975c76e 100644
--- a/source4/torture/rpc/spoolss.c
+++ b/source4/torture/rpc/spoolss.c
@@ -174,9 +174,9 @@ static bool test_AddPrinterDriver_args_level_3(struct torture_context *tctx,
#define DO_ROUND(size, n) (((size)+((n)-1)) & ~((n)-1))
-#define CHECK_NEEDED_SIZE_ENUM_LEVEL(fn, info, level, count, ic, needed, align) do { \
+#define CHECK_NEEDED_SIZE_ENUM_LEVEL(fn, info, level, count, needed, align) do { \
if (torture_setting_bool(tctx, "spoolss_check_size", false)) {\
- uint32_t size = ndr_size_##fn##_info(tctx, ic, level, count, info);\
+ uint32_t size = ndr_size_##fn##_info(tctx, level, count, info);\
uint32_t round_size = DO_ROUND(size, align);\
if (round_size != needed) {\
torture_warning(tctx, __location__": "#fn" level %d (count: %d) got unexpected needed size: %d, we calculated: %d", level, count, needed, round_size);\
@@ -185,9 +185,9 @@ static bool test_AddPrinterDriver_args_level_3(struct torture_context *tctx,
}\
} while(0)
-#define CHECK_NEEDED_SIZE_ENUM(fn, info, count, ic, needed, align) do { \
+#define CHECK_NEEDED_SIZE_ENUM(fn, info, count, needed, align) do { \
if (torture_setting_bool(tctx, "spoolss_check_size", false)) {\
- uint32_t size = ndr_size_##fn##_info(tctx, ic, count, info);\
+ uint32_t size = ndr_size_##fn##_info(tctx, count, info);\
uint32_t round_size = DO_ROUND(size, align);\
if (round_size != needed) {\
torture_warning(tctx, __location__": "#fn" (count: %d) got unexpected needed size: %d, we calculated: %d", count, needed, round_size);\
@@ -196,9 +196,9 @@ static bool test_AddPrinterDriver_args_level_3(struct torture_context *tctx,
}\
} while(0)
-#define CHECK_NEEDED_SIZE_LEVEL(fn, info, level, ic, needed, align) do { \
+#define CHECK_NEEDED_SIZE_LEVEL(fn, info, level, needed, align) do { \
if (torture_setting_bool(tctx, "spoolss_check_size", false)) {\
- uint32_t size = ndr_size_##fn(info, level, ic, 0);\
+ uint32_t size = ndr_size_##fn(info, level, 0);\
uint32_t round_size = DO_ROUND(size, align);\
if (round_size != needed) {\
torture_warning(tctx, __location__": "#fn" level %d got unexpected needed size: %d, we calculated: %d", level, needed, round_size);\
@@ -323,7 +323,7 @@ static bool test_EnumPorts(struct torture_context *tctx,
torture_assert(tctx, info, "EnumPorts returned no info");
- CHECK_NEEDED_SIZE_ENUM_LEVEL(spoolss_EnumPorts, info, r.in.level, count, lp_iconv_convenience(tctx->lp_ctx), needed, 4);
+ CHECK_NEEDED_SIZE_ENUM_LEVEL(spoolss_EnumPorts, info, r.in.level, count, needed, 4);
ctx->port_count[level] = count;
ctx->ports[level] = info;
@@ -414,7 +414,7 @@ static bool test_GetPrintProcessorDirectory(struct torture_context *tctx,
torture_assert_werr_ok(tctx, r.out.result, "GetPrintProcessorDirectory failed");
- CHECK_NEEDED_SIZE_LEVEL(spoolss_PrintProcessorDirectoryInfo, r.out.info, r.in.level, lp_iconv_convenience(tctx->lp_ctx), needed, 2);
+ CHECK_NEEDED_SIZE_LEVEL(spoolss_PrintProcessorDirectoryInfo, r.out.info, r.in.level, needed, 2);
}
return true;
@@ -479,7 +479,7 @@ static bool test_GetPrinterDriverDirectory(struct torture_context *tctx,
torture_assert_werr_ok(tctx, r.out.result, "GetPrinterDriverDirectory failed");
- CHECK_NEEDED_SIZE_LEVEL(spoolss_DriverDirectoryInfo, r.out.info, r.in.level, lp_iconv_convenience(tctx->lp_ctx), needed, 2);
+ CHECK_NEEDED_SIZE_LEVEL(spoolss_DriverDirectoryInfo, r.out.info, r.in.level, needed, 2);
}
return true;
@@ -533,7 +533,7 @@ static bool test_EnumPrinterDrivers_args(struct torture_context *tctx,
*info_p = info;
}
- CHECK_NEEDED_SIZE_ENUM_LEVEL(spoolss_EnumPrinterDrivers, info, r.in.level, count, lp_iconv_convenience(tctx->lp_ctx), needed, 4);
+ CHECK_NEEDED_SIZE_ENUM_LEVEL(spoolss_EnumPrinterDrivers, info, r.in.level, count, needed, 4);
return true;
@@ -755,7 +755,7 @@ static bool test_EnumMonitors(struct torture_context *tctx,
torture_assert_werr_ok(tctx, r.out.result, "EnumMonitors failed");
- CHECK_NEEDED_SIZE_ENUM_LEVEL(spoolss_EnumMonitors, info, r.in.level, count, lp_iconv_convenience(tctx->lp_ctx), needed, 4);
+ CHECK_NEEDED_SIZE_ENUM_LEVEL(spoolss_EnumMonitors, info, r.in.level, count, needed, 4);
ctx->monitor_count[level] = count;
ctx->monitors[level] = info;
@@ -833,7 +833,7 @@ static bool test_EnumPrintProcessors(struct torture_context *tctx,
torture_assert_werr_ok(tctx, r.out.result, "EnumPrintProcessors failed");
- CHECK_NEEDED_SIZE_ENUM_LEVEL(spoolss_EnumPrintProcessors, info, r.in.level, count, lp_iconv_convenience(tctx->lp_ctx), needed, 4);
+ CHECK_NEEDED_SIZE_ENUM_LEVEL(spoolss_EnumPrintProcessors, info, r.in.level, count, needed, 4);
ctx->print_processor_count[level] = count;
ctx->print_processors[level] = info;
@@ -908,7 +908,7 @@ static bool test_EnumPrintProcDataTypes(struct torture_context *tctx,
torture_assert_werr_ok(tctx, r.out.result, "EnumPrintProcDataTypes failed");
- CHECK_NEEDED_SIZE_ENUM_LEVEL(spoolss_EnumPrintProcDataTypes, info, r.in.level, count, lp_iconv_convenience(tctx->lp_ctx), needed, 4);
+ CHECK_NEEDED_SIZE_ENUM_LEVEL(spoolss_EnumPrintProcDataTypes, info, r.in.level, count, needed, 4);
}
@@ -961,7 +961,7 @@ static bool test_EnumPrinters(struct torture_context *tctx,
torture_assert_werr_ok(tctx, r.out.result, "EnumPrinters failed");
- CHECK_NEEDED_SIZE_ENUM_LEVEL(spoolss_EnumPrinters, info, r.in.level, count, lp_iconv_convenience(tctx->lp_ctx), needed, 4);
+ CHECK_NEEDED_SIZE_ENUM_LEVEL(spoolss_EnumPrinters, info, r.in.level, count, needed, 4);
ctx->printer_count[level] = count;
ctx->printers[level] = info;
@@ -1080,7 +1080,7 @@ bool test_GetPrinter_level(struct torture_context *tctx,
torture_assert_werr_ok(tctx, r.out.result, "GetPrinter failed");
- CHECK_NEEDED_SIZE_LEVEL(spoolss_PrinterInfo, r.out.info, r.in.level, lp_iconv_convenience(tctx->lp_ctx), needed, 4);
+ CHECK_NEEDED_SIZE_LEVEL(spoolss_PrinterInfo, r.out.info, r.in.level, needed, 4);
if (info && r.out.info) {
*info = *r.out.info;
@@ -2370,7 +2370,7 @@ static bool test_GetForm_args(struct torture_context *tctx,
torture_assert_werr_ok(tctx, r.out.result, "GetForm failed");
- CHECK_NEEDED_SIZE_LEVEL(spoolss_FormInfo, r.out.info, r.in.level, lp_iconv_convenience(tctx->lp_ctx), needed, 4);
+ CHECK_NEEDED_SIZE_LEVEL(spoolss_FormInfo, r.out.info, r.in.level, needed, 4);
if (info_p) {
*info_p = *r.out.info;
@@ -2437,7 +2437,7 @@ static bool test_EnumForms(struct torture_context *tctx,
torture_assert_werr_ok(tctx, r.out.result, "EnumForms failed");
- CHECK_NEEDED_SIZE_ENUM_LEVEL(spoolss_EnumForms, info, r.in.level, count, lp_iconv_convenience(tctx->lp_ctx), needed, 4);
+ CHECK_NEEDED_SIZE_ENUM_LEVEL(spoolss_EnumForms, info, r.in.level, count, needed, 4);
if (info_p) {
*info_p = info;
@@ -2857,7 +2857,7 @@ static bool test_EnumPorts_old(struct torture_context *tctx,
torture_assert_werr_ok(tctx, r.out.result, "EnumPorts failed");
- CHECK_NEEDED_SIZE_ENUM_LEVEL(spoolss_EnumPorts, info, 2, count, lp_iconv_convenience(tctx->lp_ctx), needed, 4);
+ CHECK_NEEDED_SIZE_ENUM_LEVEL(spoolss_EnumPorts, info, 2, count, needed, 4);
return true;
}
@@ -2934,7 +2934,7 @@ static bool test_GetJob_args(struct torture_context *tctx,
torture_assert_werr_ok(tctx, r.out.result, "GetJob failed");
torture_assert(tctx, r.out.info, "No job info returned");
- CHECK_NEEDED_SIZE_LEVEL(spoolss_JobInfo, r.out.info, r.in.level, lp_iconv_convenience(tctx->lp_ctx), needed, 4);
+ CHECK_NEEDED_SIZE_LEVEL(spoolss_JobInfo, r.out.info, r.in.level, needed, 4);
if (info_p) {
*info_p = *r.out.info;
@@ -3083,7 +3083,7 @@ static bool test_EnumJobs_args(struct torture_context *tctx,
torture_assert_werr_ok(tctx, r.out.result, "EnumJobs failed");
torture_assert(tctx, info, "No jobs returned");
- CHECK_NEEDED_SIZE_ENUM_LEVEL(spoolss_EnumJobs, *r.out.info, r.in.level, count, lp_iconv_convenience(tctx->lp_ctx), needed, 4);
+ CHECK_NEEDED_SIZE_ENUM_LEVEL(spoolss_EnumJobs, *r.out.info, r.in.level, count, needed, 4);
} else {
torture_assert_werr_ok(tctx, r.out.result, "EnumJobs failed");
@@ -3375,7 +3375,7 @@ static bool test_GetPrinterData(struct torture_context *tctx,
torture_assert_werr_ok(tctx, r.out.result,
talloc_asprintf(tctx, "GetPrinterData(%s) failed", r.in.value_name));
- CHECK_NEEDED_SIZE_LEVEL(spoolss_PrinterData, &data, type, lp_iconv_convenience(tctx->lp_ctx), needed, 1);
+ CHECK_NEEDED_SIZE_LEVEL(spoolss_PrinterData, &data, type, needed, 1);
if (type_p) {
*type_p = type;
@@ -3437,7 +3437,7 @@ static bool test_GetPrinterDataEx(struct torture_context *tctx,
torture_assert_werr_ok(tctx, r.out.result,
talloc_asprintf(tctx, "GetPrinterDataEx(%s - %s) failed", r.in.key_name, r.in.value_name));
- CHECK_NEEDED_SIZE_LEVEL(spoolss_PrinterData, &data, type, lp_iconv_convenience(tctx->lp_ctx), needed, 1);
+ CHECK_NEEDED_SIZE_LEVEL(spoolss_PrinterData, &data, type, needed, 1);
if (type_p) {
*type_p = type;
@@ -3471,7 +3471,7 @@ static bool test_get_environment(struct torture_context *tctx,
torture_assert_int_equal(tctx, type, REG_SZ, "unexpected type");
blob = data_blob_const(data, needed);
- *architecture = reg_val_data_string(tctx, lp_iconv_convenience(tctx->lp_ctx), REG_SZ, blob);
+ *architecture = reg_val_data_string(tctx, REG_SZ, blob);
return true;
}
@@ -3515,7 +3515,7 @@ static bool test_GetPrinterData_list(struct torture_context *tctx,
if (strequal(list[i], "Architecture")) {
if (architecture) {
DATA_BLOB blob = data_blob_const(data, needed);
- *architecture = reg_val_data_string(tctx, lp_iconv_convenience(tctx->lp_ctx), REG_SZ, blob);
+ *architecture = reg_val_data_string(tctx, REG_SZ, blob);
}
}
}
@@ -3656,7 +3656,7 @@ static bool test_EnumPrinterDataEx(struct torture_context *tctx,
torture_assert_werr_ok(tctx, r.out.result, "EnumPrinterDataEx failed");
- CHECK_NEEDED_SIZE_ENUM(spoolss_EnumPrinterDataEx, info, count, lp_iconv_convenience(tctx->lp_ctx), needed, 1);
+ CHECK_NEEDED_SIZE_ENUM(spoolss_EnumPrinterDataEx, info, count, needed, 1);
if (count_p) {
*count_p = count;
@@ -3698,7 +3698,7 @@ static bool test_EnumPrinterData_consistency(struct torture_context *tctx,
torture_comment(tctx, "Testing EnumPrinterData vs EnumPrinterDataEx consistency\n");
torture_assert(tctx,
- reg_string_to_val(tctx, lp_iconv_convenience(tctx->lp_ctx),
+ reg_string_to_val(tctx,
"REG_SZ", "torture_data1", &type, &blob), "");
torture_assert(tctx,
@@ -4093,7 +4093,7 @@ static bool test_winreg_symbolic_link(struct torture_context *tctx,
torture_assert_int_equal(tctx, w_type, REG_LINK, "unexpected type");
blob = data_blob(w_data, w_size);
- str = reg_val_data_string(tctx, lp_iconv_convenience(tctx->lp_ctx), REG_SZ, blob);
+ str = reg_val_data_string(tctx, REG_SZ, blob);
torture_assert_str_equal(tctx, str, symlink_destination, "unexpected symlink target string");
@@ -4162,7 +4162,7 @@ do {\
"failed to query winreg");\
torture_assert_int_equal(tctx, w_type, REG_SZ, "unexpected type");\
blob = data_blob(w_data, w_size);\
- str = reg_val_data_string(tctx, lp_iconv_convenience(tctx->lp_ctx), REG_SZ, blob);\
+ str = reg_val_data_string(tctx, REG_SZ, blob);\
if (w_size == 2 && iname == NULL) {\
/*torture_comment(tctx, "%s: \"\", %s: (null)\n", #wname, #iname);\ */\
} else {\
@@ -4205,7 +4205,7 @@ do {\
"failed to query winreg");\
torture_assert_int_equal(tctx, w_type, REG_BINARY, "unexpected type");\
blob = data_blob(w_data, w_size);\
- ndr_err = ndr_pull_struct_blob(&blob, tctx, lp_iconv_convenience(tctx->lp_ctx), &dm,\
+ ndr_err = ndr_pull_struct_blob(&blob, tctx, &dm,\
(ndr_pull_flags_fn_t)ndr_pull_spoolss_DeviceMode);\
torture_assert_ndr_success(tctx, ndr_err, "failed to unmarshall dm");\
torture_assert(tctx, test_devicemode_equal(tctx, &dm, iname),\
@@ -4227,7 +4227,7 @@ do {\
"failed to query winreg");\
torture_assert_int_equal(tctx, w_type, REG_BINARY, "unexpected type");\
blob = data_blob(w_data, w_size);\
- ndr_err = ndr_pull_struct_blob(&blob, tctx, lp_iconv_convenience(tctx->lp_ctx), &sd,\
+ ndr_err = ndr_pull_struct_blob(&blob, tctx, &sd,\
(ndr_pull_flags_fn_t)ndr_pull_security_descriptor);\
torture_assert_ndr_success(tctx, ndr_err, "failed to unmarshall sd");\
torture_assert(tctx, test_security_descriptor_equal(tctx, &sd, iname),\
@@ -4250,7 +4250,7 @@ do {\
torture_assert_int_equal(tctx, w_type, REG_MULTI_SZ, "unexpected type");\
blob = data_blob(w_data, w_size);\
torture_assert(tctx, \
- pull_reg_multi_sz(tctx, lp_iconv_convenience(tctx->lp_ctx), &blob, &array),\
+ pull_reg_multi_sz(tctx, &blob, &array),\
"failed to pull multi sz");\
for (i=0; array[i] != NULL; i++) {\
torture_assert_str_equal(tctx, array[i], iname[i],\
@@ -4591,7 +4591,7 @@ static bool test_SetPrinterData_matrix(struct torture_context *tctx,
uint32_t needed;
torture_assert(tctx,
- reg_string_to_val(tctx, lp_iconv_convenience(tctx->lp_ctx),
+ reg_string_to_val(tctx,
"REG_SZ", "dog", &type, &blob), "");
torture_assert(tctx,
@@ -4748,14 +4748,14 @@ static bool test_SetPrinterDataEx_matrix(struct torture_context *tctx,
break;
case REG_SZ:
torture_assert(tctx,
- reg_string_to_val(tctx, lp_iconv_convenience(tctx->lp_ctx),
+ reg_string_to_val(tctx,
"REG_SZ", string, &type, &data), "");
offered = data.length;
/*strlen_m_term(data.string)*2;*/
break;
case REG_MULTI_SZ:
torture_assert(tctx,
- reg_string_to_val(tctx, lp_iconv_convenience(tctx->lp_ctx),
+ reg_string_to_val(tctx,
"REG_SZ", string, &type, &data), "");
torture_assert(tctx, data_blob_realloc(tctx, &data, data.length + 2), "");
memset(&data.data[data.length - 2], '\0', 2);
@@ -5004,7 +5004,7 @@ do {\
torture_assert_int_equal(tctx, type, REG_SZ, "unexpected type");\
blob = data_blob_const(data, needed);\
torture_assert(tctx,\
- pull_reg_sz(tctx, lp_iconv_convenience(tctx->lp_ctx), &blob, &str),\
+ pull_reg_sz(tctx, &blob, &str),\
"failed to pull REG_SZ");\
torture_assert_str_equal(tctx, str, iname, "unexpected result");\
} while(0);
@@ -5027,7 +5027,7 @@ do {\
torture_assert_int_equal(tctx, type, REG_SZ, "unexpected type");\
blob = data_blob_const(data, needed);\
torture_assert(tctx,\
- pull_reg_sz(tctx, lp_iconv_convenience(tctx->lp_ctx), &blob, &str),\
+ pull_reg_sz(tctx, &blob, &str),\
"failed to pull REG_SZ");\
torture_assert_str_equal(tctx, str, val, "unexpected result");\
} while(0);
@@ -5675,7 +5675,7 @@ static bool test_EnumPrinters_old(struct torture_context *tctx,
torture_assert_werr_ok(tctx, r.out.result, "EnumPrinters failed");
- CHECK_NEEDED_SIZE_ENUM_LEVEL(spoolss_EnumPrinters, info, r.in.level, count, lp_iconv_convenience(tctx->lp_ctx), needed, 4);
+ CHECK_NEEDED_SIZE_ENUM_LEVEL(spoolss_EnumPrinters, info, r.in.level, count, needed, 4);
if (!info) {
torture_comment(tctx, "No printers returned\n");
@@ -5738,7 +5738,7 @@ static bool test_GetPrinterDriver(struct torture_context *tctx,
torture_assert_werr_ok(tctx, r.out.result,
"failed to call GetPrinterDriver");
- CHECK_NEEDED_SIZE_LEVEL(spoolss_DriverInfo, r.out.info, r.in.level, lp_iconv_convenience(tctx->lp_ctx), needed, 4);
+ CHECK_NEEDED_SIZE_LEVEL(spoolss_DriverInfo, r.out.info, r.in.level, needed, 4);
return true;
}
@@ -5806,7 +5806,7 @@ static bool test_GetPrinterDriver2_level(struct torture_context *tctx,
torture_assert_werr_ok(tctx, r.out.result,
"failed to call GetPrinterDriver2");
- CHECK_NEEDED_SIZE_LEVEL(spoolss_DriverInfo, r.out.info, r.in.level, lp_iconv_convenience(tctx->lp_ctx), needed, 4);
+ CHECK_NEEDED_SIZE_LEVEL(spoolss_DriverInfo, r.out.info, r.in.level, needed, 4);
if (info_p) {
*info_p = *r.out.info;
@@ -7658,7 +7658,6 @@ static bool connect_printer_driver_share(struct torture_context *tctx,
tctx->ev,
&smb_options,
&smb_session_options,
- lp_iconv_convenience(tctx->lp_ctx),
lp_gensec_settings(tctx, tctx->lp_ctx)),
"failed to open driver share");
diff --git a/source4/torture/rpc/svcctl.c b/source4/torture/rpc/svcctl.c
index 47efb77bfb..8f9ec1aed8 100644
--- a/source4/torture/rpc/svcctl.c
+++ b/source4/torture/rpc/svcctl.c
@@ -438,7 +438,7 @@ static bool test_EnumServicesStatus(struct torture_context *tctx, struct dcerpc_
blob.length = r.in.offered;
blob.data = talloc_steal(tctx, r.out.service);
- ndr = ndr_pull_init_blob(&blob, tctx, lp_iconv_convenience(tctx->lp_ctx));
+ ndr = ndr_pull_init_blob(&blob, tctx);
service = talloc_array(tctx, struct ENUM_SERVICE_STATUSW, services_returned);
if (!service) {
diff --git a/source4/torture/rpc/winreg.c b/source4/torture/rpc/winreg.c
index 3da8c9125a..216a30c7a8 100644
--- a/source4/torture/rpc/winreg.c
+++ b/source4/torture/rpc/winreg.c
@@ -193,7 +193,7 @@ static bool test_CreateKey_sd(struct dcerpc_binding_handle *b,
NULL);
torture_assert_ndr_success(tctx,
- ndr_push_struct_blob(&sdblob, tctx, NULL, sd,
+ ndr_push_struct_blob(&sdblob, tctx, sd,
(ndr_push_flags_fn_t)ndr_push_security_descriptor),
"Failed to push security_descriptor ?!\n");
@@ -260,7 +260,7 @@ static bool _test_GetKeySecurity(struct dcerpc_pipe *p,
sd = talloc_zero(tctx, struct security_descriptor);
torture_assert_ndr_success(tctx,
- ndr_pull_struct_blob(&sdblob, tctx, NULL, sd,
+ ndr_pull_struct_blob(&sdblob, tctx, sd,
(ndr_pull_flags_fn_t)ndr_pull_security_descriptor),
"pull_security_descriptor failed");
@@ -305,7 +305,7 @@ static bool _test_SetKeySecurity(struct dcerpc_pipe *p,
}
torture_assert_ndr_success(tctx,
- ndr_push_struct_blob(&sdblob, tctx, NULL, sd,
+ ndr_push_struct_blob(&sdblob, tctx, sd,
(ndr_push_flags_fn_t)ndr_push_security_descriptor),
"push_security_descriptor failed");