s3: add iconv_convenience handle to pull/push sz helpers.
authorGünther Deschner <gd@samba.org>
Fri, 9 Apr 2010 14:47:45 +0000 (16:47 +0200)
committerGünther Deschner <gd@samba.org>
Fri, 9 Apr 2010 16:33:45 +0000 (18:33 +0200)
Guenther

15 files changed:
source3/include/proto.h
source3/lib/util_reg.c
source3/lib/util_reg_api.c
source3/printing/nt_printing.c
source3/registry/reg_backend_printing.c
source3/registry/reg_eventlog.c
source3/registry/reg_objects.c
source3/registry/reg_perfcount.c
source3/rpc_server/srv_netlog_nt.c
source3/rpc_server/srv_ntsvcs_nt.c
source3/rpc_server/srv_spoolss_nt.c
source3/rpcclient/cmd_spoolss.c
source3/services/services_db.c
source3/utils/net_rpc_printer.c
source3/utils/net_rpc_registry.c

index a3435a8430b06014708552b519df5db373325592..5a8eeb1e25aa3422e10867f30b9c23a92f2c4df8 100644 (file)
@@ -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  */
 
index 850dbfae663a704436d4c22cb4b0345b49d2c1e3..c5528e41b51c4596bef079debbe832316e51e712 100644 (file)
@@ -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;
index 7150444cf67e7150b69c6850711f75273d14034d..65a74b845d7a05cae68d6757045ef118ad103742 100644 (file)
@@ -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;
                }
index 3791c0dfc7134471dbae4c40bbdc307bc7c3181e..a2d7e8c94748118005042a4c0840e83439e8a255 100644 (file)
@@ -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;
index 26227b547ea0df024f338ca639c7f8b1855c1540..7383ce66bd925d76aaf9158ba85971c1642321d0 100644 (file)
@@ -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);
index 722cd58f696a763725e3764b8ca4f563d6a1008b..7a277e2032b1d670dc43a28900e540db5e891071 100644 (file)
@@ -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);
index b4b8ff26307d79124a6bc0e55af3630bf672f27a..a07e36157ef7402d9dfa19d5036f8fbc4a00738c 100644 (file)
@@ -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;
 }
index 1991af10ca52e8fae6d1f0109d60b3bd0b0a6a38..ff9e5db46c547c68bc9ce5b8a8a774c643f7d81a 100644 (file)
@@ -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;
 
index b41b3d10709a65b4517fb431cfde52b9ef4d9774..866d1715667948ce08e2aeb7fd4e2c117e8ee17b 100644 (file)
@@ -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;
        }
index ec0c884acf3ac5f62791740dd931a7f35783c07b..c9f7b222914ee3a19e39b700e1835f0a3f309c4b 100644 (file)
@@ -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;
        }
 
index 236f15a9fca254e970ac67730539418cd72aa4f6..eec421f67a1c2f1130e09ced6d0c98a9b4b29ef8 100644 (file)
@@ -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;
        }
index ecbc341b1627639e79f083f7499a894fa9c65eab..16c54e8ffec3459db893baa0e5a154a39c1f9435 100644 (file)
@@ -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;
                }
index b610c922a9df2d7ed044997d2b835befef1bcfca..556194bf2a09ca77e6f3f1928d8bf40b6114a5c9 100644 (file)
@@ -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);
 
index 6c11a2feb2ba878190c3ed0bf4a57de3f2996ad7..9d38fca77e962ffda8998baa1079dc6c1d59d6e8 100644 (file)
@@ -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);
                                        }
 
index fb9d80b876dacd062ae5e2117b4880942cb187e3..28a1c8d82f2737156d5bb8737d1e8b4297f94e8d 100644 (file)
@@ -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;
                                }