From 11fba102082239c5d70b6314b19dab72b49478ed Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Fri, 18 Jan 2013 22:22:13 +0100 Subject: spoolss: make spoolss deal with ndr64 StartDocPrinter by using proper container object. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Guenther Signed-off-by: Günther Deschner Reviewed-by: Andreas Schneider --- source3/printing/printspoolss.c | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'source3/printing') diff --git a/source3/printing/printspoolss.c b/source3/printing/printspoolss.c index 7a730a55bb..acf4c0d19a 100644 --- a/source3/printing/printspoolss.c +++ b/source3/printing/printspoolss.c @@ -64,7 +64,8 @@ NTSTATUS print_spool_open(files_struct *fsp, struct print_file_data *pf; struct dcerpc_binding_handle *b = NULL; struct spoolss_DevmodeContainer devmode_ctr; - union spoolss_DocumentInfo info; + struct spoolss_DocumentInfoCtr info_ctr; + struct spoolss_DocumentInfo1 *info1; int fd = -1; WERROR werr; @@ -173,17 +174,23 @@ NTSTATUS print_spool_open(files_struct *fsp, goto done; } - info.info1 = talloc(tmp_ctx, struct spoolss_DocumentInfo1); - if (!info.info1) { + info1 = talloc(tmp_ctx, struct spoolss_DocumentInfo1); + if (info1 == NULL) { status = NT_STATUS_NO_MEMORY; goto done; } - info.info1->document_name = pf->docname; - info.info1->output_file = pf->filename; - info.info1->datatype = "RAW"; + info1->document_name = pf->docname; + info1->output_file = pf->filename; + info1->datatype = "RAW"; - status = dcerpc_spoolss_StartDocPrinter(b, tmp_ctx, &pf->handle, - 1, info, &pf->jobid, &werr); + info_ctr.level = 1; + info_ctr.info.info1 = info1; + + status = dcerpc_spoolss_StartDocPrinter(b, tmp_ctx, + &pf->handle, + &info_ctr, + &pf->jobid, + &werr); if (!NT_STATUS_IS_OK(status)) { goto done; } -- cgit