From: Michael R Sweet Date: Fri, 24 Apr 2026 18:01:37 +0000 (-0400) Subject: Fix unauthenticated print policies (Issue #1557) X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=3f2d8f6d59ea6594aa77c36a98e4f6bdc249595f;p=thirdparty%2Fcups.git Fix unauthenticated print policies (Issue #1557) --- diff --git a/scheduler/auth.c b/scheduler/auth.c index 0e2c0be80a..1b82e0707a 100644 --- a/scheduler/auth.c +++ b/scheduler/auth.c @@ -2004,8 +2004,8 @@ cupsdIsAuthorized(cupsd_client_t *con, /* I - Connection */ name; name = (char *)cupsArrayNext(best->names)) { - if (!_cups_strcasecmp(name, "@OWNER") && owner && pw && - !strcmp(pw->pw_name, ownername)) + if (!_cups_strcasecmp(name, "@OWNER") && owner && ((pw && + !strcmp(pw->pw_name, ownername)) || (!pw && type == CUPSD_AUTH_NONE && !_cups_strcasecmp(username, ownername)))) return (HTTP_STATUS_OK); else if (!_cups_strcasecmp(name, "@SYSTEM")) { @@ -2019,6 +2019,8 @@ cupsdIsAuthorized(cupsd_client_t *con, /* I - Connection */ } else if (pw && !strcmp(pw->pw_name, name)) return (HTTP_STATUS_OK); + else if (!pw && type == CUPSD_AUTH_NONE && !_cups_strcasecmp(username, name)) + return (HTTP_STATUS_OK); } for (name = (char *)cupsArrayFirst(best->names);