components/cups/patches/22-16362516,16321334,15731683.patch
author Stefan Teleman <stefan.teleman@oracle.com>
Tue, 17 Mar 2015 19:06:56 -0700
changeset 3966 cca72467a46d
parent 1281 f2d16b3e76db
permissions -rw-r--r--
19078668 unixODBC version 2.3.1 needs a TPNO

--- scheduler/ipp.c	Thu Mar 28 22:47:57 2013
+++ scheduler/ipp.c	Tue Apr  9 00:31:58 2013
@@ -7424,8 +7424,12 @@
       continue;
     }
 
-    if (username[0] && strcasecmp(username, job->username))
-      continue;
+    /*
+     * If no username is given, then it might be set to 'anonymous'.
+     * In this case we don't compare with job->username.
+     */
+    if (username[0] && strcasecmp(username, "anonymous") && strcasecmp(username, job->username))
+	continue;
 
     if (count > 0)
       ippAddSeparator(con->response);
@@ -8780,7 +8784,7 @@
    * Validate that the label associated with the job is acceptable for
    * printing on the printer.
    */
-  if (cupsdInPrinterLabelRange(job->slabel, dprinter) == 0)
+  if (job && (cupsdInPrinterLabelRange(job->slabel, dprinter) == 0))
   {
     send_ipp_status(con, IPP_NOT_AUTHORIZED, _("label violation."));
     return;