summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-12-13 22:46:27 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:50:02 +0100
commitd1e716cf4331bf09cfe15a6634bc5887aff81d20 (patch)
treed484509808c2e776db310c24d5658ba7dbd40857 /source4/torture
parent61873ce94c172c801a4831de5550a8e0fe54c5f5 (diff)
downloadsamba-d1e716cf4331bf09cfe15a6634bc5887aff81d20.tar.gz
samba-d1e716cf4331bf09cfe15a6634bc5887aff81d20.tar.bz2
samba-d1e716cf4331bf09cfe15a6634bc5887aff81d20.zip
r26432: Require ndr_pull users to specify iconv_convenience.
(This used to be commit 28b1d36551b75241c1cf9fca5d74f45a6dc884ab)
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/ndr/ndr.c7
-rw-r--r--source4/torture/rap/rap.c6
-rw-r--r--source4/torture/rpc/eventlog.c3
3 files changed, 10 insertions, 6 deletions
diff --git a/source4/torture/ndr/ndr.c b/source4/torture/ndr/ndr.c
index e1e2918cba..55b00d1fb8 100644
--- a/source4/torture/ndr/ndr.c
+++ b/source4/torture/ndr/ndr.c
@@ -23,6 +23,7 @@
#include "torture/ndr/proto.h"
#include "torture/ui.h"
#include "util/dlinklist.h"
+#include "param/param.h"
struct ndr_pull_test_data {
DATA_BLOB data;
@@ -38,7 +39,7 @@ static bool wrap_ndr_pull_test(struct torture_context *tctx,
bool (*check_fn) (struct torture_context *ctx, void *data) = test->fn;
const struct ndr_pull_test_data *data = (const struct ndr_pull_test_data *)test->data;
void *ds = talloc_zero_size(tctx, data->struct_size);
- struct ndr_pull *ndr = ndr_pull_init_blob(&(data->data), tctx);
+ struct ndr_pull *ndr = ndr_pull_init_blob(&(data->data), tctx, lp_iconv_convenience(tctx->lp_ctx));
ndr->flags |= LIBNDR_FLAG_REF_ALLOC;
@@ -97,7 +98,7 @@ static bool test_check_string_terminator(struct torture_context *tctx)
/* Simple test */
blob = strhex_to_data_blob("0000");
- ndr = ndr_pull_init_blob(&blob, mem_ctx);
+ ndr = ndr_pull_init_blob(&blob, mem_ctx, lp_iconv_convenience(tctx->lp_ctx));
torture_assert_ndr_success(tctx, ndr_check_string_terminator(ndr, 1, 2),
"simple check_string_terminator test failed");
@@ -115,7 +116,7 @@ static bool test_check_string_terminator(struct torture_context *tctx)
talloc_free(ndr);
blob = strhex_to_data_blob("11220000");
- ndr = ndr_pull_init_blob(&blob, mem_ctx);
+ ndr = ndr_pull_init_blob(&blob, mem_ctx, lp_iconv_convenience(tctx->lp_ctx));
torture_assert_ndr_success(tctx,
ndr_check_string_terminator(ndr, 4, 1),
diff --git a/source4/torture/rap/rap.c b/source4/torture/rap/rap.c
index 8e630b6781..5294e00df9 100644
--- a/source4/torture/rap/rap.c
+++ b/source4/torture/rap/rap.c
@@ -229,10 +229,12 @@ static NTSTATUS rap_cli_do_call(struct smbcli_tree *tree, struct rap_call *call)
if (!NT_STATUS_IS_OK(result))
return result;
- call->ndr_pull_param = ndr_pull_init_blob(&trans.out.params, call);
+ call->ndr_pull_param = ndr_pull_init_blob(&trans.out.params, call,
+ lp_iconv_convenience(global_loadparm));
call->ndr_pull_param->flags = RAPNDR_FLAGS;
- call->ndr_pull_data = ndr_pull_init_blob(&trans.out.data, call);
+ call->ndr_pull_data = ndr_pull_init_blob(&trans.out.data, call,
+ lp_iconv_convenience(global_loadparm));
call->ndr_pull_data->flags = RAPNDR_FLAGS;
return result;
diff --git a/source4/torture/rpc/eventlog.c b/source4/torture/rpc/eventlog.c
index 64b012fba6..047146edaf 100644
--- a/source4/torture/rpc/eventlog.c
+++ b/source4/torture/rpc/eventlog.c
@@ -25,6 +25,7 @@
#include "librpc/gen_ndr/ndr_eventlog_c.h"
#include "librpc/gen_ndr/ndr_lsa.h"
#include "torture/rpc/rpc.h"
+#include "param/param.h"
static void init_lsa_String(struct lsa_String *name, const char *s)
{
@@ -137,7 +138,7 @@ static bool test_ReadEventLog(struct torture_context *tctx,
blob.length = *r.out.sent_size;
blob.data = talloc_steal(tctx, r.out.data);
- ndr = ndr_pull_init_blob(&blob, tctx);
+ ndr = ndr_pull_init_blob(&blob, tctx, lp_iconv_convenience(tctx->lp_ctx));
ndr_err = ndr_pull_eventlog_Record(
ndr, NDR_SCALARS|NDR_BUFFERS, &rec);