]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Fix PPD caching and IPP Everywhere PPDs (Issue #5535)
authorMichael R Sweet <michael.r.sweet@gmail.com>
Wed, 27 Feb 2019 20:22:55 +0000 (15:22 -0500)
committerMichael R Sweet <michael.r.sweet@gmail.com>
Wed, 27 Feb 2019 20:22:55 +0000 (15:22 -0500)
CHANGES.md
cups/ppd-cache.c

index d5c7dcd3fc006ce20031e33e2c54fcc523b0cc6f..53b246d97ecaab5fb2b69a75316cfc224d302681 100644 (file)
@@ -1,4 +1,4 @@
-CHANGES - 2.3b8 - 2019-02-25
+CHANGES - 2.3b8 - 2019-02-27
 ============================
 
 
@@ -32,6 +32,8 @@ Changes in CUPS v2.3b8
 - The scheduler's self-signed certificate did not include all of the alternate
   names for the server when using GNU TLS (Issue #5525)
 - Fixed compiler warnings with newer versions of GCC (Issue #5532, Issue #5533)
+- Fixed some PPD caching and IPP Everywhere PPD accounting/password bugs
+  (Issue #5535)
 - Localization updates (Issue #5461, Issues #5471, Issue #5481, Issue #5486,
   Issue #5489, Issue #5491, Issue #5492, Issue #5493, Issue #5494, Issue #5495,
   Issue #5497, Issue #5499, Issue #5500, Issue #5501, Issue #5504)
index fa6e11d90fd313a9a56be50301f35076734d5b57..2cd2ac0120fdf7f45ed0f9b674dd600394230b18 100644 (file)
@@ -2957,12 +2957,12 @@ _ppdCacheWriteFile(
   if (pc->charge_info_uri)
     cupsFilePutConf(fp, "ChargeInfoURI", pc->charge_info_uri);
 
-  cupsFilePrintf(fp, "AccountId %s\n", pc->account_id ? "true" : "false");
-  cupsFilePrintf(fp, "AccountingUserId %s\n",
+  cupsFilePrintf(fp, "JobAccountId %s\n", pc->account_id ? "true" : "false");
+  cupsFilePrintf(fp, "JobAccountingUserId %s\n",
                  pc->accounting_user_id ? "true" : "false");
 
   if (pc->password)
-    cupsFilePutConf(fp, "Password", pc->password);
+    cupsFilePutConf(fp, "JobPassword", pc->password);
 
   for (value = (char *)cupsArrayFirst(pc->mandatory);
        value;
@@ -3156,6 +3156,16 @@ _ppdCreateFromIPP(char   *buffer,        /* I - Filename buffer */
       httpClose(http);
   }
 
+ /*
+  * Accounting...
+  */
+
+  if (ippGetBoolean(ippFindAttribute(response, "job-account-id-supported", IPP_TAG_BOOLEAN), 0))
+    cupsFilePuts(fp, "*cupsJobAccountId: True\n");
+
+  if (ippGetBoolean(ippFindAttribute(response, "job-accounting-user-id-supported", IPP_TAG_BOOLEAN), 0))
+    cupsFilePuts(fp, "*cupsJobAccountingUserId: True\n");
+
  /*
   * Password/PIN printing...
   */
@@ -3188,7 +3198,7 @@ _ppdCreateFromIPP(char   *buffer, /* I - Filename buffer */
 
     pattern[maxlen] = '\0';
 
-    cupsFilePrintf(fp, "*cupsPassword: \"%s\"\n", pattern);
+    cupsFilePrintf(fp, "*cupsJobPassword: \"%s\"\n", pattern);
   }
 
  /*