]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Update authentication log messages for consistency and fix argument mismatch 1561/head
authorabubakar sabir <abubakarsabir924@gmail.com>
Tue, 28 Apr 2026 03:28:37 +0000 (08:28 +0500)
committerabubakar sabir <abubakarsabir924@gmail.com>
Tue, 28 Apr 2026 03:28:37 +0000 (08:28 +0500)
scheduler/auth.c

index d48a149d889cf107329bde4fde02e553dfaf128e..2153f59167c76e32f456dba7ffeb2c43ea321d39 100644 (file)
@@ -686,7 +686,7 @@ cupsdAuthorize(cupsd_client_t *con) /* I - Client connection */
       pamerr = pam_authenticate(pamh, PAM_SILENT);
       if (pamerr != PAM_SUCCESS)
       {
-  cupsdLogClient(con, CUPSD_LOG_ERROR, "Authentication failed for user \"%s\" (%s)", username, con->http->hostname, pam_strerror(pamh, pamerr));       
+  cupsdLogClient(con, CUPSD_LOG_ERROR, "Authentication failed for user \"%s\" from %s (%s)", username, con->http->hostname, pam_strerror(pamh, pamerr));
   pam_end(pamh, 0);
        return;
       }
@@ -2081,7 +2081,7 @@ cupsdIsAuthorized(cupsd_client_t *con,    /* I - Connection */
   * The user isn't part of the specified users or groups, so deny access...
   */
 
-  cupsdLogMessage(CUPSD_LOG_ERROR, "Authentication failed for user \"%s\" from %s (User not in group(s)).", con->username, con->http->hostname);
+  cupsdLogMessage(CUPSD_LOG_WARN, "Authentication failed for user \"%s\" from %s (User not in group(s)).", con->username, con->http->hostname);
 
   return (con->username[0] ? HTTP_STATUS_FORBIDDEN : HTTP_STATUS_UNAUTHORIZED);
 }