summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/rpcclient/cmd_spoolss.c13
-rw-r--r--source3/utils/net_rpc_printer.c14
2 files changed, 13 insertions, 14 deletions
diff --git a/source3/rpcclient/cmd_spoolss.c b/source3/rpcclient/cmd_spoolss.c
index 48f9df3cac..6a525514a4 100644
--- a/source3/rpcclient/cmd_spoolss.c
+++ b/source3/rpcclient/cmd_spoolss.c
@@ -723,18 +723,17 @@ static void display_reg_value(struct regval_blob value)
break;
}
case REG_MULTI_SZ: {
- uint32_t i, num_values;
- char **values;
+ uint32_t i;
+ const char **values;
+ DATA_BLOB blob = data_blob_const(value.data_p, value.size);
- if (!W_ERROR_IS_OK(reg_pull_multi_sz(NULL, value.data_p,
- value.size, &num_values,
- &values))) {
- d_printf("reg_pull_multi_sz failed\n");
+ if (!pull_reg_multi_sz(NULL, &blob, &values)) {
+ d_printf("pull_reg_multi_sz failed\n");
break;
}
printf("%s: REG_MULTI_SZ: \n", value.valuename);
- for (i=0; i<num_values; i++) {
+ for (i=0; values[i] != NULL; i++) {
d_printf("%s\n", values[i]);
}
TALLOC_FREE(values);
diff --git a/source3/utils/net_rpc_printer.c b/source3/utils/net_rpc_printer.c
index c3924efc6a..9a8e0a9ba6 100644
--- a/source3/utils/net_rpc_printer.c
+++ b/source3/utils/net_rpc_printer.c
@@ -100,17 +100,17 @@ static void display_reg_value(const char *subkey, struct regval_blob value)
break;
case REG_MULTI_SZ: {
- uint32_t i, num_values;
- char **values;
+ uint32_t i;
+ const char **values;
+ DATA_BLOB blob = data_blob_const(value.data_p, value.size);
- if (!W_ERROR_IS_OK(reg_pull_multi_sz(NULL, value.data_p,
- value.size, &num_values,
- &values))) {
- d_printf(_("reg_pull_multi_sz failed\n"));
+ if (!pull_reg_multi_sz(NULL, &blob, &values)) {
+ d_printf("pull_reg_multi_sz failed\n");
break;
}
- for (i=0; i<num_values; i++) {
+ printf("%s: REG_MULTI_SZ: \n", value.valuename);
+ for (i=0; values[i] != NULL; i++) {
d_printf("%s\n", values[i]);
}
TALLOC_FREE(values);