]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Set default auth-info-required='username,password' if a backend doesn't set an
authorMichael R Sweet <michael.r.sweet@gmail.com>
Mon, 2 May 2022 15:46:28 +0000 (11:46 -0400)
committerMichael R Sweet <michael.r.sweet@gmail.com>
Mon, 2 May 2022 15:46:28 +0000 (11:46 -0400)
authentication method (Issue #373)

CHANGES.md
scheduler/job.c

index d4af6211c073050677e9ebd5ae6a485c0c7fabf1..c96e393f53c04d92d7d2cbcaf4c0be7db96d658c 100644 (file)
@@ -14,6 +14,9 @@ Changes in CUPS v2.4.2 (TBA)
   IPP Everywhere queue (Issues #340, #343)
 - Re-added LibreSSL/OpenSSL support (Issue #362)
 - Updated the Solaris smf service file (Issue #368)
+- Updated the scheduler to set "auth-info-required" to "username,password" if a
+  backend reports it needs authentication info but doesn't set a method for
+  authentication (Issue #373)
 - `cupsGetResponse` did not always set the last error.
 - Fixed a number of old references to the Apple CUPS web page.
 - Restored the default/generic printer icon file for the web interface.
index 17d6d54bff77a4bc6b5b62cb4c3dff2791e01a4b..49127753142bdb4bb5d1052dabfca775d6775e26 100644 (file)
@@ -3470,6 +3470,12 @@ finalize_job(cupsd_job_t *job,           /* I - Job */
             if (strncmp(job->reasons->values[0].string.text, "account-", 8))
              ippSetString(job->attrs, &job->reasons, 0,
                           "cups-held-for-authentication");
+
+            if (job->printer->num_auth_info_required == 1 && !strcmp(job->printer->auth_info_required[0], "none"))
+            {
+              // Default to "username,password" authentication if none is specified...
+              cupsdSetAuthInfoRequired(job->printer, "username,password", NULL);
+            }
           }
           break;