diff options
Diffstat (limited to 'source3/rpcclient')
-rw-r--r-- | source3/rpcclient/cmd_spoolss.c | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/source3/rpcclient/cmd_spoolss.c b/source3/rpcclient/cmd_spoolss.c index e24fb99e6f..5393ba75a9 100644 --- a/source3/rpcclient/cmd_spoolss.c +++ b/source3/rpcclient/cmd_spoolss.c @@ -864,10 +864,9 @@ static WERROR cmd_spoolss_getprinterdataex(struct rpc_pipe_client *cli, NTSTATUS status; fstring printername; const char *valuename, *keyname; - struct regval_blob value; enum winreg_Type type; - uint8_t *buffer = NULL; + union spoolss_PrinterData data; uint32_t offered = 0; uint32_t needed; @@ -903,21 +902,20 @@ static WERROR cmd_spoolss_getprinterdataex(struct rpc_pipe_client *cli, &pol, keyname, valuename, - &type, - buffer, offered, + &type, + &data, &needed, &result); if (W_ERROR_EQUAL(result, WERR_MORE_DATA)) { offered = needed; - buffer = talloc_array(mem_ctx, uint8_t, needed); status = rpccli_spoolss_GetPrinterDataEx(cli, mem_ctx, &pol, keyname, valuename, - &type, - buffer, offered, + &type, + &data, &needed, &result); } @@ -926,22 +924,13 @@ static WERROR cmd_spoolss_getprinterdataex(struct rpc_pipe_client *cli, goto done; } - if (!W_ERROR_IS_OK(result)) { - goto done; - } - - if (!W_ERROR_IS_OK(result)) goto done; /* Display printer data */ - fstrcpy(value.valuename, valuename); - value.type = type; - value.size = needed; - value.data_p = buffer; + display_printer_data(valuename, type, &data); - display_reg_value(value); done: if (is_valid_policy_hnd(&pol)) |