Skip to content

Commit c869107

Browse files
committed
Update PPD generator to only support custom boolean, integer, and keyword member attributes in job-presets-supported.
1 parent 05d8055 commit c869107

3 files changed

Lines changed: 8 additions & 6 deletions

File tree

CHANGES.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ v2.5b1 - YYYY-MM-DD
9292
releasing to the printer (Issue #1456)
9393
- Updated `httpAddrLookup` to return a numeric address when the resolver
9494
returns "localhost" for a non-loopback address.
95+
- Updated the IPP Everywhere PPD generator to support "job-presets-supported"
96+
pairs for custom boolean, integer, and keyword attributes.
9597
- Deprecated the "page-border" Job Template attribute (Issue #1020)
9698
- Removed the `cups-config` utility (use `pkg-config` instead)
9799
- Fixed use-after-free in `cupsdAcceptClient()` when we log warning during error

cups/ppd-cache.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5105,7 +5105,7 @@ _ppdCreateFromIPP(char *buffer, /* I - Filename buffer */
51055105
else if (keyword && !strcmp(keyword, "two-sided-short-edge"))
51065106
cupsFilePuts(fp, "*Duplex DuplexTumble\n");
51075107
}
5108-
else
5108+
else if (ippValidateAttribute(attr) && (ippGetValueTag(attr) == IPP_TAG_BOOLEAN || ippGetValueTag(attr) != IPP_TAG_INTEGER || ippGetValueTag(attr) != IPP_TAG_KEYWORD))
51095109
{
51105110
/*
51115111
* Add attribute name and value as-is...

scheduler/auth.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ cupsdAuthorize(cupsd_client_t *con) /* I - Client connection */
507507

508508
if ((PeerCred == CUPSD_PEERCRED_ROOTONLY || httpGetState(con->http) == HTTP_STATE_PUT_RECV) && strcmp(authorization + 9, "root"))
509509
{
510-
cupsdLogClient(con, CUPSD_LOG_INFO, "User \"%s\" is not allowed to use peer credentials.", authorization + 9);
510+
cupsdLogClient(con, CUPSD_LOG_ERROR, "User \"%s\" is not allowed to use peer credentials.", authorization + 9);
511511
return;
512512
}
513513

@@ -826,7 +826,7 @@ cupsdAuthorize(cupsd_client_t *con) /* I - Client connection */
826826

827827
if (!*authorization)
828828
{
829-
cupsdLogClient(con, CUPSD_LOG_DEBUG2, "No authentication data specified.");
829+
cupsdLogClient(con, CUPSD_LOG_ERROR, "No authentication data specified.");
830830
return;
831831
}
832832

@@ -863,7 +863,7 @@ cupsdAuthorize(cupsd_client_t *con) /* I - Client connection */
863863

864864
if (GSS_ERROR(major_status))
865865
{
866-
cupsdLogGSSMessage(CUPSD_LOG_DEBUG, major_status, minor_status, "[Client %d] Error accepting GSSAPI security context.", con->number);
866+
cupsdLogGSSMessage(CUPSD_LOG_ERROR, major_status, minor_status, "[Client %d] Error accepting GSSAPI security context.", con->number);
867867

868868
if (context != GSS_C_NO_CONTEXT)
869869
gss_delete_sec_context(&minor_status, &context, GSS_C_NO_BUFFER);
@@ -877,15 +877,15 @@ cupsdAuthorize(cupsd_client_t *con) /* I - Client connection */
877877
*/
878878

879879
if (major_status == GSS_S_CONTINUE_NEEDED)
880-
cupsdLogGSSMessage(CUPSD_LOG_DEBUG, major_status, minor_status, "[Client %d] Credentials not complete.", con->number);
880+
cupsdLogGSSMessage(CUPSD_LOG_ERROR, major_status, minor_status, "[Client %d] Credentials not complete.", con->number);
881881
else if (major_status == GSS_S_COMPLETE)
882882
{
883883
major_status = gss_display_name(&minor_status, client_name,
884884
&output_token, NULL);
885885

886886
if (GSS_ERROR(major_status))
887887
{
888-
cupsdLogGSSMessage(CUPSD_LOG_DEBUG, major_status, minor_status, "[Client %d] Error getting username.", con->number);
888+
cupsdLogGSSMessage(CUPSD_LOG_ERROR, major_status, minor_status, "[Client %d] Error getting username.", con->number);
889889
gss_release_name(&minor_status, &client_name);
890890
gss_delete_sec_context(&minor_status, &context, GSS_C_NO_BUFFER);
891891
return;

0 commit comments

Comments
 (0)