diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2009-03-01 06:33:40 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2009-03-01 06:33:40 +0100 |
commit | 9ffb6d2d9e78ed192b8215194b6328d03d1ddad3 (patch) | |
tree | fc76fb3e1d8d9e381559244440c6738574f6c21d /source4/lib/registry | |
parent | 79fc0ddaf44af1e31d7e6f2c6f576fd3c05e087d (diff) | |
download | samba-9ffb6d2d9e78ed192b8215194b6328d03d1ddad3.tar.gz samba-9ffb6d2d9e78ed192b8215194b6328d03d1ddad3.tar.bz2 samba-9ffb6d2d9e78ed192b8215194b6328d03d1ddad3.zip |
Add allow_badcharcnv argument to all conversion function, for
consistency with Samba 3.
Diffstat (limited to 'source4/lib/registry')
-rw-r--r-- | source4/lib/registry/ldb.c | 4 | ||||
-rw-r--r-- | source4/lib/registry/tests/generic.c | 6 | ||||
-rw-r--r-- | source4/lib/registry/util.c | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/source4/lib/registry/ldb.c b/source4/lib/registry/ldb.c index 1d238f4e23..41fbd22335 100644 --- a/source4/lib/registry/ldb.c +++ b/source4/lib/registry/ldb.c @@ -62,7 +62,7 @@ static void reg_ldb_unpack_value(TALLOC_CTX *mem_ctx, if (val != NULL) data->length = convert_string_talloc(mem_ctx, CH_UTF8, CH_UTF16, val->data, val->length, - (void **)&data->data); + (void **)&data->data, false); else { data->data = NULL; data->length = 0; @@ -108,7 +108,7 @@ static struct ldb_message *reg_ldb_pack_value(struct ldb_context *ctx, val.length = convert_string_talloc(mem_ctx, CH_UTF16, CH_UTF8, (void *)data.data, data.length, - (void **)&val.data); + (void **)&val.data, false); ldb_msg_add_value(msg, "data", &val, NULL); } else { ldb_msg_add_empty(msg, "data", LDB_FLAG_MOD_DELETE, NULL); diff --git a/source4/lib/registry/tests/generic.c b/source4/lib/registry/tests/generic.c index f1fa5ad0b2..3a3c3e7747 100644 --- a/source4/lib/registry/tests/generic.c +++ b/source4/lib/registry/tests/generic.c @@ -54,7 +54,7 @@ static bool test_reg_val_data_string_sz(struct torture_context *ctx) { DATA_BLOB db; db.length = convert_string_talloc_convenience(ctx, lp_iconv_convenience(ctx->lp_ctx), CH_UTF8, CH_UTF16, - "bla", 3, (void **)&db.data); + "bla", 3, (void **)&db.data, false); torture_assert_str_equal(ctx, "bla", reg_val_data_string(ctx, lp_iconv_convenience(ctx->lp_ctx), REG_SZ, db), "sz failed"); @@ -91,7 +91,7 @@ static bool test_reg_val_description(struct torture_context *ctx) data.length = convert_string_talloc_convenience(ctx, lp_iconv_convenience(ctx->lp_ctx), CH_UTF8, CH_UTF16, "stationary traveller", strlen("stationary traveller"), - (void **)&data.data); + (void **)&data.data, false); torture_assert_str_equal(ctx, "camel = REG_SZ : stationary traveller", reg_val_description(ctx, lp_iconv_convenience(ctx->lp_ctx), "camel", REG_SZ, data), "reg_val_description failed"); @@ -105,7 +105,7 @@ static bool test_reg_val_description_nullname(struct torture_context *ctx) data.length = convert_string_talloc_convenience(ctx, lp_iconv_convenience(ctx->lp_ctx), CH_UTF8, CH_UTF16, "west berlin", strlen("west berlin"), - (void **)&data.data); + (void **)&data.data, false); torture_assert_str_equal(ctx, "<No Name> = REG_SZ : west berlin", reg_val_description(ctx, lp_iconv_convenience(ctx->lp_ctx), NULL, REG_SZ, data), "description with null name failed"); diff --git a/source4/lib/registry/util.c b/source4/lib/registry/util.c index 38f994f386..742c3dca2f 100644 --- a/source4/lib/registry/util.c +++ b/source4/lib/registry/util.c @@ -65,7 +65,7 @@ _PUBLIC_ char *reg_val_data_string(TALLOC_CTX *mem_ctx, case REG_SZ: convert_string_talloc_convenience(mem_ctx, iconv_convenience, CH_UTF16, CH_UNIX, data.data, data.length, - (void **)&ret); + (void **)&ret, false); return ret; case REG_BINARY: ret = data_blob_hex_string(mem_ctx, &data); @@ -125,7 +125,7 @@ _PUBLIC_ bool reg_string_to_val(TALLOC_CTX *mem_ctx, case REG_EXPAND_SZ: data->length = convert_string_talloc_convenience(mem_ctx, iconv_convenience, CH_UNIX, CH_UTF16, data_str, strlen(data_str), - (void **)&data->data); + (void **)&data->data, false); break; case REG_DWORD: { |