summaryrefslogtreecommitdiff
path: root/source4/lib/registry/tests
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/registry/tests')
-rw-r--r--source4/lib/registry/tests/generic.c7
-rw-r--r--source4/lib/registry/tests/hive.c8
-rw-r--r--source4/lib/registry/tests/registry.c4
3 files changed, 10 insertions, 9 deletions
diff --git a/source4/lib/registry/tests/generic.c b/source4/lib/registry/tests/generic.c
index 1acb6342e7..25a89793bd 100644
--- a/source4/lib/registry/tests/generic.c
+++ b/source4/lib/registry/tests/generic.c
@@ -23,6 +23,7 @@
#include "lib/registry/registry.h"
#include "torture/torture.h"
#include "librpc/gen_ndr/winreg.h"
+#include "param/param.h"
struct torture_suite *torture_registry_hive(TALLOC_CTX *mem_ctx);
struct torture_suite *torture_registry_registry(TALLOC_CTX *mem_ctx);
@@ -52,7 +53,7 @@ static bool test_reg_val_data_string_dword(struct torture_context *ctx)
static bool test_reg_val_data_string_sz(struct torture_context *ctx)
{
DATA_BLOB db;
- db.length = convert_string_talloc(ctx, global_smb_iconv_convenience, CH_UNIX, CH_UTF16,
+ db.length = convert_string_talloc(ctx, lp_iconv_convenience(ctx->lp_ctx), CH_UNIX, CH_UTF16,
"bla", 3, (void **)&db.data);
torture_assert_str_equal(ctx, "bla",
reg_val_data_string(ctx, REG_SZ, db),
@@ -87,7 +88,7 @@ static bool test_reg_val_data_string_empty(struct torture_context *ctx)
static bool test_reg_val_description(struct torture_context *ctx)
{
DATA_BLOB data;
- data.length = convert_string_talloc(ctx, global_smb_iconv_convenience, CH_UNIX, CH_UTF16,
+ data.length = convert_string_talloc(ctx, lp_iconv_convenience(ctx->lp_ctx), CH_UNIX, CH_UTF16,
"stationary traveller",
strlen("stationary traveller"),
(void **)&data.data);
@@ -101,7 +102,7 @@ static bool test_reg_val_description(struct torture_context *ctx)
static bool test_reg_val_description_nullname(struct torture_context *ctx)
{
DATA_BLOB data;
- data.length = convert_string_talloc(ctx, global_smb_iconv_convenience, CH_UNIX, CH_UTF16,
+ data.length = convert_string_talloc(ctx, lp_iconv_convenience(ctx->lp_ctx), CH_UNIX, CH_UTF16,
"west berlin",
strlen("west berlin"),
(void **)&data.data);
diff --git a/source4/lib/registry/tests/hive.c b/source4/lib/registry/tests/hive.c
index 2a0f04eb54..fdb7282395 100644
--- a/source4/lib/registry/tests/hive.c
+++ b/source4/lib/registry/tests/hive.c
@@ -290,7 +290,7 @@ static bool hive_setup_dir(struct torture_context *tctx, void **data)
{
struct hive_key *key;
WERROR error;
- const char *dirname;
+ char *dirname;
NTSTATUS status;
status = torture_temp_dir(tctx, "hive-dir", &dirname);
@@ -314,7 +314,7 @@ static bool hive_setup_ldb(struct torture_context *tctx, void **data)
{
struct hive_key *key;
WERROR error;
- const char *dirname;
+ char *dirname;
NTSTATUS status;
status = torture_temp_dir(tctx, "hive-ldb", &dirname);
@@ -323,7 +323,7 @@ static bool hive_setup_ldb(struct torture_context *tctx, void **data)
rmdir(dirname);
- error = reg_open_ldb_file(tctx, dirname, NULL, NULL, &key);
+ error = reg_open_ldb_file(tctx, dirname, NULL, NULL, tctx->lp_ctx, &key);
if (!W_ERROR_IS_OK(error)) {
fprintf(stderr, "Unable to initialize ldb hive\n");
return false;
@@ -338,7 +338,7 @@ static bool hive_setup_regf(struct torture_context *tctx, void **data)
{
struct hive_key *key;
WERROR error;
- const char *dirname;
+ char *dirname;
NTSTATUS status;
status = torture_temp_dir(tctx, "hive-dir", &dirname);
diff --git a/source4/lib/registry/tests/registry.c b/source4/lib/registry/tests/registry.c
index f0035071f2..6c520f54ed 100644
--- a/source4/lib/registry/tests/registry.c
+++ b/source4/lib/registry/tests/registry.c
@@ -535,7 +535,7 @@ static bool setup_local_registry(struct torture_context *tctx, void **data)
{
struct registry_context *rctx;
WERROR error;
- const char *tempdir;
+ char *tempdir;
NTSTATUS status;
struct hive_key *hive_key;
const char *filename;
@@ -547,7 +547,7 @@ static bool setup_local_registry(struct torture_context *tctx, void **data)
torture_assert_ntstatus_ok(tctx, status, "Creating temp dir failed");
filename = talloc_asprintf(tctx, "%s/classes_root.ldb", tempdir);
- error = reg_open_ldb_file(tctx, filename, NULL, NULL, &hive_key);
+ error = reg_open_ldb_file(tctx, filename, NULL, NULL, tctx->lp_ctx, &hive_key);
torture_assert_werr_ok(tctx, error, "Opening classes_root file failed");
error = reg_mount_hive(rctx, hive_key, HKEY_CLASSES_ROOT, NULL);