1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-12 09:18:10 +03:00

s3: use pull_reg_multi_sz in rpcclient and net.

Guenther
This commit is contained in:
Günther Deschner 2009-09-29 23:22:46 +02:00
parent fc1c243348
commit b0a66496f5
2 changed files with 13 additions and 14 deletions

View File

@ -723,18 +723,17 @@ static void display_reg_value(struct regval_blob value)
break; break;
} }
case REG_MULTI_SZ: { case REG_MULTI_SZ: {
uint32_t i, num_values; uint32_t i;
char **values; 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, if (!pull_reg_multi_sz(NULL, &blob, &values)) {
value.size, &num_values, d_printf("pull_reg_multi_sz failed\n");
&values))) {
d_printf("reg_pull_multi_sz failed\n");
break; break;
} }
printf("%s: REG_MULTI_SZ: \n", value.valuename); 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]); d_printf("%s\n", values[i]);
} }
TALLOC_FREE(values); TALLOC_FREE(values);

View File

@ -100,17 +100,17 @@ static void display_reg_value(const char *subkey, struct regval_blob value)
break; break;
case REG_MULTI_SZ: { case REG_MULTI_SZ: {
uint32_t i, num_values; uint32_t i;
char **values; 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, if (!pull_reg_multi_sz(NULL, &blob, &values)) {
value.size, &num_values, d_printf("pull_reg_multi_sz failed\n");
&values))) {
d_printf(_("reg_pull_multi_sz failed\n"));
break; 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]); d_printf("%s\n", values[i]);
} }
TALLOC_FREE(values); TALLOC_FREE(values);