summaryrefslogtreecommitdiff
path: root/source3/lib/util_reg.c
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2010-04-09 16:47:45 +0200
committerGünther Deschner <gd@samba.org>2010-04-09 18:33:45 +0200
commit63b111bd329fddaf0bfd64ca8255deecb1fd5352 (patch)
tree0a8973f5cd6e5169351d93c910a30c1edfa444e7 /source3/lib/util_reg.c
parentbfeab64ebf9481d98ffb182adb03bbd6e6ada462 (diff)
downloadsamba-63b111bd329fddaf0bfd64ca8255deecb1fd5352.tar.gz
samba-63b111bd329fddaf0bfd64ca8255deecb1fd5352.tar.bz2
samba-63b111bd329fddaf0bfd64ca8255deecb1fd5352.zip
s3: add iconv_convenience handle to pull/push sz helpers.
Guenther
Diffstat (limited to 'source3/lib/util_reg.c')
-rw-r--r--source3/lib/util_reg.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/source3/lib/util_reg.c b/source3/lib/util_reg.c
index 850dbfae66..c5528e41b5 100644
--- a/source3/lib/util_reg.c
+++ b/source3/lib/util_reg.c
@@ -77,12 +77,13 @@ const char *reg_type_lookup(enum winreg_Type type)
push a string in unix charset into a REG_SZ UCS2 null terminated blob
********************************************************************/
-bool push_reg_sz(TALLOC_CTX *mem_ctx, DATA_BLOB *blob, const char *s)
+bool push_reg_sz(TALLOC_CTX *mem_ctx, struct smb_iconv_convenience *ic,
+ DATA_BLOB *blob, const char *s)
{
union winreg_Data data;
enum ndr_err_code ndr_err;
data.string = s;
- ndr_err = ndr_push_union_blob(blob, mem_ctx, NULL, &data, REG_SZ,
+ ndr_err = ndr_push_union_blob(blob, mem_ctx, ic, &data, REG_SZ,
(ndr_push_flags_fn_t)ndr_push_winreg_Data);
return NDR_ERR_CODE_IS_SUCCESS(ndr_err);
}
@@ -92,12 +93,13 @@ bool push_reg_sz(TALLOC_CTX *mem_ctx, DATA_BLOB *blob, const char *s)
terminated blob
********************************************************************/
-bool push_reg_multi_sz(TALLOC_CTX *mem_ctx, DATA_BLOB *blob, const char **a)
+bool push_reg_multi_sz(TALLOC_CTX *mem_ctx, struct smb_iconv_convenience *ic,
+ DATA_BLOB *blob, const char **a)
{
union winreg_Data data;
enum ndr_err_code ndr_err;
data.string_array = a;
- ndr_err = ndr_push_union_blob(blob, mem_ctx, NULL, &data, REG_MULTI_SZ,
+ ndr_err = ndr_push_union_blob(blob, mem_ctx, ic, &data, REG_MULTI_SZ,
(ndr_push_flags_fn_t)ndr_push_winreg_Data);
return NDR_ERR_CODE_IS_SUCCESS(ndr_err);
}
@@ -106,11 +108,12 @@ bool push_reg_multi_sz(TALLOC_CTX *mem_ctx, DATA_BLOB *blob, const char **a)
pull a string in unix charset out of a REG_SZ UCS2 null terminated blob
********************************************************************/
-bool pull_reg_sz(TALLOC_CTX *mem_ctx, const DATA_BLOB *blob, const char **s)
+bool pull_reg_sz(TALLOC_CTX *mem_ctx, struct smb_iconv_convenience *ic,
+ const DATA_BLOB *blob, const char **s)
{
union winreg_Data data;
enum ndr_err_code ndr_err;
- ndr_err = ndr_pull_union_blob(blob, mem_ctx, NULL, &data, REG_SZ,
+ ndr_err = ndr_pull_union_blob(blob, mem_ctx, ic, &data, REG_SZ,
(ndr_pull_flags_fn_t)ndr_pull_winreg_Data);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
return false;
@@ -124,11 +127,12 @@ bool pull_reg_sz(TALLOC_CTX *mem_ctx, const DATA_BLOB *blob, const char **s)
terminated blob
********************************************************************/
-bool pull_reg_multi_sz(TALLOC_CTX *mem_ctx, const DATA_BLOB *blob, const char ***a)
+bool pull_reg_multi_sz(TALLOC_CTX *mem_ctx, struct smb_iconv_convenience *ic,
+ const DATA_BLOB *blob, const char ***a)
{
union winreg_Data data;
enum ndr_err_code ndr_err;
- ndr_err = ndr_pull_union_blob(blob, mem_ctx, NULL, &data, REG_MULTI_SZ,
+ ndr_err = ndr_pull_union_blob(blob, mem_ctx, ic, &data, REG_MULTI_SZ,
(ndr_pull_flags_fn_t)ndr_pull_winreg_Data);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
return false;