From d14ca5d07abfc46c20bc87fc66314e9ede29b0ac Mon Sep 17 00:00:00 2001 From: Gregor Beck Date: Thu, 19 Apr 2012 14:00:36 +0200 Subject: [PATCH] s3:registry: remove usage of reg_objects from cmd_spoolss.c Signed-off-by: Andreas Schneider --- source3/rpcclient/cmd_spoolss.c | 43 ++++++++++++++--------------------------- 1 file changed, 14 insertions(+), 29 deletions(-) diff --git a/source3/rpcclient/cmd_spoolss.c b/source3/rpcclient/cmd_spoolss.c index b7451fc0ee5..2733aa3265d 100644 --- a/source3/rpcclient/cmd_spoolss.c +++ b/source3/rpcclient/cmd_spoolss.c @@ -27,7 +27,6 @@ #include "../librpc/gen_ndr/ndr_spoolss_c.h" #include "rpc_client/cli_spoolss.h" #include "rpc_client/init_spoolss.h" -#include "registry/reg_objects.h" #include "nt_printing.h" #include "../libcli/security/display_sec.h" #include "../libcli/security/security_descriptor.h" @@ -764,25 +763,26 @@ static WERROR cmd_spoolss_getprinter(struct rpc_pipe_client *cli, /**************************************************************************** ****************************************************************************/ -static void display_reg_value(struct regval_blob *value) +static void display_reg_value(const char *name, enum winreg_Type type, DATA_BLOB blob) { const char *text = NULL; - DATA_BLOB blob; - switch(regval_type(value)) { + switch(type) { case REG_DWORD: - printf("%s: REG_DWORD: 0x%08x\n", regval_name(value), - *((uint32_t *) regval_data_p(value))); + if (blob.length == sizeof(uint32)) { + printf("%s: REG_DWORD: 0x%08x\n", name, IVAL(blob.data,0)); + } else { + printf("%s: REG_DWORD: \n", name); + } break; case REG_SZ: - blob = data_blob_const(regval_data_p(value), regval_size(value)); pull_reg_sz(talloc_tos(), &blob, &text); - printf("%s: REG_SZ: %s\n", regval_name(value), text ? text : ""); + printf("%s: REG_SZ: %s\n", name, text ? text : ""); break; case REG_BINARY: { - char *hex = hex_encode_talloc(NULL, regval_data_p(value), regval_size(value)); + char *hex = hex_encode_talloc(NULL, blob.data, blob.length); size_t i, len; - printf("%s: REG_BINARY:", regval_name(value)); + printf("%s: REG_BINARY:", name); len = strlen(hex); for (i=0; i