summaryrefslogtreecommitdiff
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
parentbfeab64ebf9481d98ffb182adb03bbd6e6ada462 (diff)
downloadsamba-63b111bd329fddaf0bfd64ca8255deecb1fd5352.tar.gz
samba-63b111bd329fddaf0bfd64ca8255deecb1fd5352.tar.bz2
samba-63b111bd329fddaf0bfd64ca8255deecb1fd5352.zip
s3: add iconv_convenience handle to pull/push sz helpers.
Guenther
-rw-r--r--source3/include/proto.h12
-rw-r--r--source3/lib/util_reg.c20
-rw-r--r--source3/lib/util_reg_api.c6
-rw-r--r--source3/printing/nt_printing.c2
-rw-r--r--source3/registry/reg_backend_printing.c4
-rw-r--r--source3/registry/reg_eventlog.c10
-rw-r--r--source3/registry/reg_objects.c6
-rw-r--r--source3/registry/reg_perfcount.c4
-rw-r--r--source3/rpc_server/srv_netlog_nt.c2
-rw-r--r--source3/rpc_server/srv_ntsvcs_nt.c2
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c16
-rw-r--r--source3/rpcclient/cmd_spoolss.c4
-rw-r--r--source3/services/services_db.c4
-rw-r--r--source3/utils/net_rpc_printer.c14
-rw-r--r--source3/utils/net_rpc_registry.c2
15 files changed, 58 insertions, 50 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index a3435a8430..5a8eeb1e25 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -1268,10 +1268,14 @@ struct passwd *getpwuid_alloc(TALLOC_CTX *mem_ctx, uid_t uid) ;
/* The following definitions come from lib/util_reg.c */
const char *reg_type_lookup(enum winreg_Type type);
-bool push_reg_sz(TALLOC_CTX *mem_ctx, DATA_BLOB *blob, const char *s);
-bool push_reg_multi_sz(TALLOC_CTX *mem_ctx, DATA_BLOB *blob, const char **a);
-bool pull_reg_sz(TALLOC_CTX *mem_ctx, const DATA_BLOB *blob, const char **s);
-bool pull_reg_multi_sz(TALLOC_CTX *mem_ctx, const DATA_BLOB *blob, const char ***a);
+bool push_reg_sz(TALLOC_CTX *mem_ctx, struct smb_iconv_convenience *ic,
+ DATA_BLOB *blob, const char *s);
+bool push_reg_multi_sz(TALLOC_CTX *mem_ctx, struct smb_iconv_convenience *ic,
+ DATA_BLOB *blob, const char **a);
+bool pull_reg_sz(TALLOC_CTX *mem_ctx, struct smb_iconv_convenience *ic,
+ const DATA_BLOB *blob, const char **s);
+bool pull_reg_multi_sz(TALLOC_CTX *mem_ctx, struct smb_iconv_convenience *ic,
+ const DATA_BLOB *blob, const char ***a);
/* The following definitions come from lib/util_reg_api.c */
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;
diff --git a/source3/lib/util_reg_api.c b/source3/lib/util_reg_api.c
index 7150444cf6..65a74b845d 100644
--- a/source3/lib/util_reg_api.c
+++ b/source3/lib/util_reg_api.c
@@ -109,7 +109,7 @@ WERROR registry_pull_value(TALLOC_CTX *mem_ctx,
blob = data_blob_const(data, length);
- if (!pull_reg_multi_sz(mem_ctx, &blob, &vals)) {
+ if (!pull_reg_multi_sz(mem_ctx, NULL, &blob, &vals)) {
err = WERR_NOMEM;
goto error;
}
@@ -155,7 +155,7 @@ WERROR registry_push_value(TALLOC_CTX *mem_ctx,
}
case REG_SZ:
case REG_EXPAND_SZ: {
- if (!push_reg_sz(mem_ctx, presult, value->v.sz.str))
+ if (!push_reg_sz(mem_ctx, NULL, presult, value->v.sz.str))
{
return WERR_NOMEM;
}
@@ -177,7 +177,7 @@ WERROR registry_push_value(TALLOC_CTX *mem_ctx,
}
array[i] = NULL;
- if (!push_reg_multi_sz(mem_ctx, presult, array)) {
+ if (!push_reg_multi_sz(mem_ctx, NULL, presult, array)) {
talloc_free(array);
return WERR_NOMEM;
}
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c
index 3791c0dfc7..a2d7e8c947 100644
--- a/source3/printing/nt_printing.c
+++ b/source3/printing/nt_printing.c
@@ -3356,7 +3356,7 @@ bool is_printer_published(Printer_entry *print_hnd, int snum,
case REG_SZ:
blob = data_blob_const(regval_data_p(guid_val),
regval_size(guid_val));
- pull_reg_sz(talloc_tos(), &blob, (const char **)&guid_str);
+ pull_reg_sz(talloc_tos(), NULL, &blob, (const char **)&guid_str);
ret = NT_STATUS_IS_OK(GUID_from_string( guid_str, guid ));
talloc_free(guid_str);
break;
diff --git a/source3/registry/reg_backend_printing.c b/source3/registry/reg_backend_printing.c
index 26227b547e..7383ce66bd 100644
--- a/source3/registry/reg_backend_printing.c
+++ b/source3/registry/reg_backend_printing.c
@@ -578,7 +578,7 @@ static int find_valuename_index( const char *valuename )
static void pull_reg_sz_fstring(TALLOC_CTX *mem_ctx, const DATA_BLOB *blob, fstring s)
{
const char *str;
- pull_reg_sz(mem_ctx, blob, &str);
+ pull_reg_sz(mem_ctx, NULL, blob, &str);
fstrcpy(s, str);
}
@@ -927,7 +927,7 @@ static void fill_in_driver_values(const struct spoolss_DriverInfo8 *r,
break;
}
- push_reg_sz(talloc_tos(), &data, filename);
+ push_reg_sz(talloc_tos(), NULL, &data, filename);
memcpy( buffer+buffer_size, (char*)data.data, data.length);
buffer_size += (length + 1)*sizeof(uint16);
diff --git a/source3/registry/reg_eventlog.c b/source3/registry/reg_eventlog.c
index 722cd58f69..7a277e2032 100644
--- a/source3/registry/reg_eventlog.c
+++ b/source3/registry/reg_eventlog.c
@@ -116,7 +116,7 @@ bool eventlog_init_keys(void)
sizeof(uint32));
regval_ctr_addvalue_sz(values, "PrimaryModule", *elogs);
- push_reg_sz(talloc_tos(), &data, *elogs);
+ push_reg_sz(talloc_tos(), NULL, &data, *elogs);
regval_ctr_addvalue(values, "Sources", REG_MULTI_SZ,
(char *)data.data,
@@ -128,7 +128,7 @@ bool eventlog_init_keys(void)
if (!evtfilepath) {
TALLOC_FREE(values);
}
- push_reg_sz(talloc_tos(), &data, evtfilepath);
+ push_reg_sz(talloc_tos(), NULL, &data, evtfilepath);
regval_ctr_addvalue(values, "File", REG_EXPAND_SZ, (char *)data.data,
data.length);
regdb_store_values(evtlogpath, values);
@@ -161,7 +161,7 @@ bool eventlog_init_keys(void)
REG_DWORD,
( char * ) &uiCategoryCount,
sizeof( uint32 ) );
- push_reg_sz(talloc_tos(), &data,
+ push_reg_sz(talloc_tos(), NULL, &data,
"%SystemRoot%\\system32\\eventlog.dll");
regval_ctr_addvalue( values, "CategoryMessageFile",
@@ -258,7 +258,7 @@ bool eventlog_add_source( const char *eventlog, const char *sourcename,
dump_data( 1, rval->data_p, rval->size );
blob = data_blob_const(rval->data_p, rval->size);
- if (!pull_reg_multi_sz(talloc_tos(), &blob, &wrklist)) {
+ if (!pull_reg_multi_sz(talloc_tos(), NULL, &blob, &wrklist)) {
return false;
}
@@ -298,7 +298,7 @@ bool eventlog_add_source( const char *eventlog, const char *sourcename,
memcpy( wp, wrklist, sizeof( char * ) * numsources );
*( wp + numsources ) = ( char * ) sourcename;
*( wp + numsources + 1 ) = NULL;
- if (!push_reg_multi_sz(ctx, &blob, wp)) {
+ if (!push_reg_multi_sz(ctx, NULL, &blob, wp)) {
return false;
}
dump_data( 1, blob.data, blob.length);
diff --git a/source3/registry/reg_objects.c b/source3/registry/reg_objects.c
index b4b8ff2630..a07e36157e 100644
--- a/source3/registry/reg_objects.c
+++ b/source3/registry/reg_objects.c
@@ -497,7 +497,7 @@ int regval_ctr_addvalue_sz(struct regval_ctr *ctr, const char *name, const char
{
DATA_BLOB blob;
- if (!push_reg_sz(ctr, &blob, data)) {
+ if (!push_reg_sz(ctr, NULL, &blob, data)) {
return -1;
}
@@ -514,7 +514,7 @@ int regval_ctr_addvalue_multi_sz(struct regval_ctr *ctr, const char *name, const
{
DATA_BLOB blob;
- if (!push_reg_multi_sz(ctr, &blob, data)) {
+ if (!push_reg_multi_sz(ctr, NULL, &blob, data)) {
return -1;
}
@@ -607,7 +607,7 @@ const char *regval_sz(struct regval_blob *val)
const char *data = NULL;
DATA_BLOB blob = data_blob_const(regval_data_p(val), regval_size(val));
- pull_reg_sz(talloc_tos(), &blob, &data);
+ pull_reg_sz(talloc_tos(), NULL, &blob, &data);
return data;
}
diff --git a/source3/registry/reg_perfcount.c b/source3/registry/reg_perfcount.c
index 1991af10ca..ff9e5db46c 100644
--- a/source3/registry/reg_perfcount.c
+++ b/source3/registry/reg_perfcount.c
@@ -182,7 +182,7 @@ static uint32 _reg_perfcount_multi_sz_from_tdb(TDB_CONTEXT *tdb,
buffer_size = 0;
return buffer_size;
}
- push_reg_sz(talloc_tos(), &name_index, (const char *)kbuf.dptr);
+ push_reg_sz(talloc_tos(), NULL, &name_index, (const char *)kbuf.dptr);
memcpy(buf1+buffer_size, (char *)name_index.data, working_size);
buffer_size += working_size;
/* Now encode the actual name */
@@ -195,7 +195,7 @@ static uint32 _reg_perfcount_multi_sz_from_tdb(TDB_CONTEXT *tdb,
memset(temp, 0, sizeof(temp));
memcpy(temp, dbuf.dptr, dbuf.dsize);
SAFE_FREE(dbuf.dptr);
- push_reg_sz(talloc_tos(), &name, temp);
+ push_reg_sz(talloc_tos(), NULL, &name, temp);
memcpy(buf1+buffer_size, (char *)name.data, working_size);
buffer_size += working_size;
diff --git a/source3/rpc_server/srv_netlog_nt.c b/source3/rpc_server/srv_netlog_nt.c
index b41b3d1070..866d171566 100644
--- a/source3/rpc_server/srv_netlog_nt.c
+++ b/source3/rpc_server/srv_netlog_nt.c
@@ -417,7 +417,7 @@ WERROR _netr_NetrEnumerateTrustedDomains(pipes_struct *p,
}
}
- if (!push_reg_multi_sz(trusted_domains, &blob, trusted_domains)) {
+ if (!push_reg_multi_sz(trusted_domains, NULL, &blob, trusted_domains)) {
TALLOC_FREE(trusted_domains);
return WERR_NOMEM;
}
diff --git a/source3/rpc_server/srv_ntsvcs_nt.c b/source3/rpc_server/srv_ntsvcs_nt.c
index ec0c884acf..c9f7b22291 100644
--- a/source3/rpc_server/srv_ntsvcs_nt.c
+++ b/source3/rpc_server/srv_ntsvcs_nt.c
@@ -102,7 +102,7 @@ WERROR _PNP_GetDeviceList(pipes_struct *p,
multi_sz[0] = devicepath;
- if (!push_reg_multi_sz(multi_sz, &blob, multi_sz)) {
+ if (!push_reg_multi_sz(multi_sz, NULL, &blob, multi_sz)) {
return WERR_NOMEM;
}
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index 236f15a9fc..eec421f67a 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -5798,7 +5798,7 @@ static WERROR update_printer(pipes_struct *p, struct policy_handle *handle,
*/
if (!strequal(printer->info_2->comment, old_printer->info_2->comment)) {
- push_reg_sz(talloc_tos(), &buffer, printer->info_2->comment);
+ push_reg_sz(talloc_tos(), NULL, &buffer, printer->info_2->comment);
set_printer_dataex( printer, SPOOL_DSSPOOLER_KEY, "description",
REG_SZ, buffer.data, buffer.length);
@@ -5806,7 +5806,7 @@ static WERROR update_printer(pipes_struct *p, struct policy_handle *handle,
}
if (!strequal(printer->info_2->sharename, old_printer->info_2->sharename)) {
- push_reg_sz(talloc_tos(), &buffer, printer->info_2->sharename);
+ push_reg_sz(talloc_tos(), NULL, &buffer, printer->info_2->sharename);
set_printer_dataex( printer, SPOOL_DSSPOOLER_KEY, "shareName",
REG_SZ, buffer.data, buffer.length);
@@ -5822,7 +5822,7 @@ static WERROR update_printer(pipes_struct *p, struct policy_handle *handle,
pname = printer->info_2->printername;
- push_reg_sz(talloc_tos(), &buffer, pname);
+ push_reg_sz(talloc_tos(), NULL, &buffer, pname);
set_printer_dataex( printer, SPOOL_DSSPOOLER_KEY, "printerName",
REG_SZ, buffer.data, buffer.length);
@@ -5830,7 +5830,7 @@ static WERROR update_printer(pipes_struct *p, struct policy_handle *handle,
}
if (!strequal(printer->info_2->portname, old_printer->info_2->portname)) {
- push_reg_sz(talloc_tos(), &buffer, printer->info_2->portname);
+ push_reg_sz(talloc_tos(), NULL, &buffer, printer->info_2->portname);
set_printer_dataex( printer, SPOOL_DSSPOOLER_KEY, "portName",
REG_SZ, buffer.data, buffer.length);
@@ -5838,7 +5838,7 @@ static WERROR update_printer(pipes_struct *p, struct policy_handle *handle,
}
if (!strequal(printer->info_2->location, old_printer->info_2->location)) {
- push_reg_sz(talloc_tos(), &buffer, printer->info_2->location);
+ push_reg_sz(talloc_tos(), NULL, &buffer, printer->info_2->location);
set_printer_dataex( printer, SPOOL_DSSPOOLER_KEY, "location",
REG_SZ, buffer.data, buffer.length);
@@ -5848,7 +5848,7 @@ static WERROR update_printer(pipes_struct *p, struct policy_handle *handle,
/* here we need to update some more DsSpooler keys */
/* uNCName, serverName, shortServerName */
- push_reg_sz(talloc_tos(), &buffer, global_myname());
+ push_reg_sz(talloc_tos(), NULL, &buffer, global_myname());
set_printer_dataex( printer, SPOOL_DSSPOOLER_KEY, "serverName",
REG_SZ, buffer.data, buffer.length);
set_printer_dataex( printer, SPOOL_DSSPOOLER_KEY, "shortServerName",
@@ -5856,7 +5856,7 @@ static WERROR update_printer(pipes_struct *p, struct policy_handle *handle,
slprintf( asc_buffer, sizeof(asc_buffer)-1, "\\\\%s\\%s",
global_myname(), printer->info_2->sharename );
- push_reg_sz(talloc_tos(), &buffer, asc_buffer);
+ push_reg_sz(talloc_tos(), NULL, &buffer, asc_buffer);
set_printer_dataex( printer, SPOOL_DSSPOOLER_KEY, "uNCName",
REG_SZ, buffer.data, buffer.length);
@@ -9002,7 +9002,7 @@ WERROR _spoolss_EnumPrinterKey(pipes_struct *p,
}
}
- if (!push_reg_multi_sz(p->mem_ctx, &blob, array)) {
+ if (!push_reg_multi_sz(p->mem_ctx, NULL, &blob, array)) {
result = WERR_NOMEM;
goto done;
}
diff --git a/source3/rpcclient/cmd_spoolss.c b/source3/rpcclient/cmd_spoolss.c
index ecbc341b16..16c54e8ffe 100644
--- a/source3/rpcclient/cmd_spoolss.c
+++ b/source3/rpcclient/cmd_spoolss.c
@@ -700,7 +700,7 @@ static void display_reg_value(struct regval_blob value)
break;
case REG_SZ:
blob = data_blob_const(value.data_p, value.size);
- pull_reg_sz(talloc_tos(), &blob, &text);
+ pull_reg_sz(talloc_tos(), NULL, &blob, &text);
printf("%s: REG_SZ: %s\n", value.valuename, text ? text : "");
break;
case REG_BINARY: {
@@ -726,7 +726,7 @@ static void display_reg_value(struct regval_blob value)
const char **values;
blob = data_blob_const(value.data_p, value.size);
- if (!pull_reg_multi_sz(NULL, &blob, &values)) {
+ if (!pull_reg_multi_sz(NULL, NULL, &blob, &values)) {
d_printf("pull_reg_multi_sz failed\n");
break;
}
diff --git a/source3/services/services_db.c b/source3/services/services_db.c
index b610c922a9..556194bf2a 100644
--- a/source3/services/services_db.c
+++ b/source3/services/services_db.c
@@ -646,7 +646,7 @@ const char *svcctl_lookup_dispname(TALLOC_CTX *ctx, const char *name, NT_USER_TO
goto fail;
blob = data_blob_const(regval_data_p(val), regval_size(val));
- pull_reg_sz(ctx, &blob, &display_name);
+ pull_reg_sz(ctx, NULL, &blob, &display_name);
TALLOC_FREE( key );
@@ -700,7 +700,7 @@ const char *svcctl_lookup_description(TALLOC_CTX *ctx, const char *name, NT_USER
}
blob = data_blob_const(regval_data_p(val), regval_size(val));
- pull_reg_sz(ctx, &blob, &description);
+ pull_reg_sz(ctx, NULL, &blob, &description);
TALLOC_FREE(key);
diff --git a/source3/utils/net_rpc_printer.c b/source3/utils/net_rpc_printer.c
index 6c11a2feb2..9d38fca77e 100644
--- a/source3/utils/net_rpc_printer.c
+++ b/source3/utils/net_rpc_printer.c
@@ -84,7 +84,7 @@ static void display_reg_value(const char *subkey, struct regval_blob value)
case REG_SZ:
blob = data_blob_const(value.data_p, value.size);
- pull_reg_sz(talloc_tos(), &blob, &text);
+ pull_reg_sz(talloc_tos(), NULL, &blob, &text);
if (!text) {
break;
}
@@ -103,7 +103,7 @@ static void display_reg_value(const char *subkey, struct regval_blob value)
const char **values;
blob = data_blob_const(value.data_p, value.size);
- if (!pull_reg_multi_sz(NULL, &blob, &values)) {
+ if (!pull_reg_multi_sz(NULL, NULL, &blob, &values)) {
d_printf("pull_reg_multi_sz failed\n");
break;
}
@@ -2422,7 +2422,7 @@ NTSTATUS rpc_printer_migrate_settings_internals(struct net_context *c,
if (strequal(info[j].value_name, SPOOL_REG_PORTNAME)) {
/* although windows uses a multi-sz, we use a sz */
- push_reg_sz(mem_ctx, &blob, SAMBA_PRINTER_PORT_NAME);
+ push_reg_sz(mem_ctx, NULL, &blob, SAMBA_PRINTER_PORT_NAME);
fstrcpy(value.valuename, SPOOL_REG_PORTNAME);
}
@@ -2432,7 +2432,7 @@ NTSTATUS rpc_printer_migrate_settings_internals(struct net_context *c,
nt_status = NT_STATUS_NO_MEMORY;
goto done;
}
- push_reg_sz(mem_ctx, &blob, unc_name);
+ push_reg_sz(mem_ctx, NULL, &blob, unc_name);
fstrcpy(value.valuename, SPOOL_REG_UNCNAME);
}
@@ -2446,20 +2446,20 @@ NTSTATUS rpc_printer_migrate_settings_internals(struct net_context *c,
nt_status = NT_STATUS_NO_MEMORY;
goto done;
}
- push_reg_sz(mem_ctx, &blob, url);
+ push_reg_sz(mem_ctx, NULL, &blob, url);
fstrcpy(value.valuename, SPOOL_REG_URL);
#endif
}
if (strequal(info[j].value_name, SPOOL_REG_SERVERNAME)) {
- push_reg_sz(mem_ctx, &blob, longname);
+ push_reg_sz(mem_ctx, NULL, &blob, longname);
fstrcpy(value.valuename, SPOOL_REG_SERVERNAME);
}
if (strequal(info[j].value_name, SPOOL_REG_SHORTSERVERNAME)) {
- push_reg_sz(mem_ctx, &blob, global_myname());
+ push_reg_sz(mem_ctx, NULL, &blob, global_myname());
fstrcpy(value.valuename, SPOOL_REG_SHORTSERVERNAME);
}
diff --git a/source3/utils/net_rpc_registry.c b/source3/utils/net_rpc_registry.c
index fb9d80b876..28a1c8d82f 100644
--- a/source3/utils/net_rpc_registry.c
+++ b/source3/utils/net_rpc_registry.c
@@ -961,7 +961,7 @@ static void dump_values( REGF_NK_REC *nk )
switch ( nk->values[i].type ) {
case REG_SZ:
blob = data_blob_const(nk->values[i].data, data_size);
- pull_reg_sz(talloc_tos(), &blob, &data_str);
+ pull_reg_sz(talloc_tos(), NULL, &blob, &data_str);
if (!data_str) {
break;
}