summaryrefslogtreecommitdiffstats
path: root/source3/utils/net_rpc_printer.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/utils/net_rpc_printer.c')
-rw-r--r--source3/utils/net_rpc_printer.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/source3/utils/net_rpc_printer.c b/source3/utils/net_rpc_printer.c
index 6ad8224c869..d1d38e8e00f 100644
--- a/source3/utils/net_rpc_printer.c
+++ b/source3/utils/net_rpc_printer.c
@@ -910,6 +910,15 @@ static bool net_spoolss_setprinterdataex(struct rpc_pipe_client *pipe_hnd,
{
WERROR result;
NTSTATUS status;
+ union spoolss_PrinterData data;
+ DATA_BLOB blob;
+
+ blob = data_blob_const(value->data_p, value->size);
+
+ result = pull_spoolss_PrinterData(mem_ctx, &blob, &data, value->type);
+ if (!W_ERROR_IS_OK(result)) {
+ return false;
+ }
/* setprinterdataex call */
status = rpccli_spoolss_SetPrinterDataEx(pipe_hnd, mem_ctx,
@@ -917,8 +926,8 @@ static bool net_spoolss_setprinterdataex(struct rpc_pipe_client *pipe_hnd,
keyname,
value->valuename,
value->type,
- value->data_p,
- value->size,
+ data,
+ 0,
&result);
if (!W_ERROR_IS_OK(result)) {