diff options
author | Günther Deschner <gd@samba.org> | 2013-01-18 22:22:13 +0100 |
---|---|---|
committer | Andreas Schneider <asn@samba.org> | 2013-01-24 17:42:25 +0100 |
commit | 11fba102082239c5d70b6314b19dab72b49478ed (patch) | |
tree | 7c3511c0ed56d0b76347867db071223957eb491d /source3/printing | |
parent | 6bcd3dda2825a8791e7284b3229aa518416e8544 (diff) | |
download | samba-11fba102082239c5d70b6314b19dab72b49478ed.tar.gz samba-11fba102082239c5d70b6314b19dab72b49478ed.tar.bz2 samba-11fba102082239c5d70b6314b19dab72b49478ed.zip |
spoolss: make spoolss deal with ndr64 StartDocPrinter by using proper container object.
Guenther
Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'source3/printing')
-rw-r--r-- | source3/printing/printspoolss.c | 23 |
1 files changed, 15 insertions, 8 deletions
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; } |