Skip to content

Commit 849fba7

Browse files
committed
Fix unauthenticated print policies (Issue #1557)
1 parent c955360 commit 849fba7

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

CHANGES.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ CHANGES - OpenPrinting CUPS
55
Changes in CUPS v2.4.19 (YYYY-MM-DD)
66
------------------------------------
77

8+
- Fixed a regression in shared printing from non-local accounts (Issue #1557)
9+
810

911
Changes in CUPS v2.4.18 (2026-04-22)
1012
------------------------------------

scheduler/auth.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1835,8 +1835,9 @@ cupsdIsAuthorized(cupsd_client_t *con, /* I - Connection */
18351835
name;
18361836
name = (char *)cupsArrayNext(best->names))
18371837
{
1838-
if (!_cups_strcasecmp(name, "@OWNER") && owner && pw &&
1839-
!strcmp(pw->pw_name, ownername))
1838+
if (!_cups_strcasecmp(name, "@OWNER") && owner &&
1839+
((pw && !strcmp(pw->pw_name, ownername)) ||
1840+
(!pw && type == CUPSD_AUTH_NONE && !_cups_strcasecmp(username, ownername))))
18401841
return (HTTP_OK);
18411842
else if (!_cups_strcasecmp(name, "@SYSTEM"))
18421843
{
@@ -1850,6 +1851,8 @@ cupsdIsAuthorized(cupsd_client_t *con, /* I - Connection */
18501851
}
18511852
else if (pw && !strcmp(pw->pw_name, name))
18521853
return (HTTP_OK);
1854+
else if (!pw && type == CUPSD_AUTH_NONE && !_cups_strcasecmp(username, name))
1855+
return (HTTP_STATUS_OK);
18531856
}
18541857

18551858
for (name = (char *)cupsArrayFirst(best->names);

0 commit comments

Comments
 (0)