summaryrefslogtreecommitdiff
path: root/source3/rpcclient
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2009-09-30 20:00:52 +0200
committerGünther Deschner <gd@samba.org>2009-10-01 11:40:30 +0200
commitad836c4d48e7c7a8a6f1d240f20cca730487a651 (patch)
treeaeab897279f88524727cc4c7703ff5e1dca77938 /source3/rpcclient
parent98245727c9a314849248e5419b347b444e79a2f7 (diff)
downloadsamba-ad836c4d48e7c7a8a6f1d240f20cca730487a651.tar.gz
samba-ad836c4d48e7c7a8a6f1d240f20cca730487a651.tar.bz2
samba-ad836c4d48e7c7a8a6f1d240f20cca730487a651.zip
s3-registry: use pull_reg_sz() where appropriate.
(and move away from rpcstr_pull and rpcstr_pull_talloc). Guenther
Diffstat (limited to 'source3/rpcclient')
-rw-r--r--source3/rpcclient/cmd_spoolss.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/source3/rpcclient/cmd_spoolss.c b/source3/rpcclient/cmd_spoolss.c
index 6a525514a4..8b1a6eac03 100644
--- a/source3/rpcclient/cmd_spoolss.c
+++ b/source3/rpcclient/cmd_spoolss.c
@@ -689,7 +689,8 @@ static WERROR cmd_spoolss_getprinter(struct rpc_pipe_client *cli,
static void display_reg_value(struct regval_blob value)
{
- char *text = NULL;
+ const char *text = NULL;
+ DATA_BLOB blob;
switch(value.type) {
case REG_DWORD:
@@ -697,11 +698,8 @@ static void display_reg_value(struct regval_blob value)
*((uint32_t *) value.data_p));
break;
case REG_SZ:
- rpcstr_pull_talloc(talloc_tos(),
- &text,
- value.data_p,
- value.size,
- STR_TERMINATE);
+ blob = data_blob_const(value.data_p, value.size);
+ pull_reg_sz(talloc_tos(), &blob, &text);
printf("%s: REG_SZ: %s\n", value.valuename, text ? text : "");
break;
case REG_BINARY: {
@@ -725,7 +723,7 @@ static void display_reg_value(struct regval_blob value)
case REG_MULTI_SZ: {
uint32_t i;
const char **values;
- DATA_BLOB blob = data_blob_const(value.data_p, value.size);
+ blob = data_blob_const(value.data_p, value.size);
if (!pull_reg_multi_sz(NULL, &blob, &values)) {
d_printf("pull_reg_multi_sz failed\n");