spoolss: accept XPS_PASS datatype used by Windows 8
authorArvid Requate <requate@univention.de>
Thu, 21 Nov 2013 11:35:20 +0000 (12:35 +0100)
committerKarolin Seeger <kseeger@samba.org>
Fri, 22 Nov 2013 10:52:05 +0000 (11:52 +0100)
The new v4 driver model used in Windows 8 declares print jobs
intended to bypass the XPS processing layer by setting datatype to
"XPS_PASS" instead of "RAW".

BUG: https://bugzilla.samba.org/show_bug.cgi?id=10267

Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
(cherry picked from commit b2815b4c8c3e436a79fb7f07be285a417fd6e8cb)

source3/rpc_server/spoolss/srv_spoolss_nt.c

index 2f1f7c432cc998b2a61add5078f6dcc9d9afd74f..8372c43fbaf24c5eeea15f4ce5174cb915370a2f 100644 (file)
@@ -5769,7 +5769,13 @@ WERROR _spoolss_StartDocPrinter(struct pipes_struct *p,
         */
 
        if (info_1->datatype) {
-               if (strcmp(info_1->datatype, "RAW") != 0) {
+               /*
+                * The v4 driver model used in Windows 8 declares print jobs
+                * intended to bypass the XPS processing layer by setting
+                * datatype to "XPS_PASS" instead of "RAW".
+                */
+                if ((strcmp(info_1->datatype, "RAW") != 0)
+                 && (strcmp(info_1->datatype, "XPS_PASS") != 0)) {
                        *r->out.job_id = 0;
                        return WERR_INVALID_DATATYPE;
                }