import UBI cups-filters-1.28.7-18.el9_5.1

This commit is contained in:
eabdullin 2025-03-18 02:40:15 +00:00
parent d578e6af0f
commit f4426a2d40
2 changed files with 57 additions and 1 deletions

View File

@ -0,0 +1,51 @@
diff --git a/utils/cups-browsed.c b/utils/cups-browsed.c
index a5e5779..b190829 100644
--- a/utils/cups-browsed.c
+++ b/utils/cups-browsed.c
@@ -7271,8 +7271,14 @@ create_remote_printer_entry (const char *queue_name,
p->prattrs = get_printer_attributes(p->uri, NULL, 0, NULL, 0, 1);
debug_log_out(get_printer_attributes_log);
if (p->prattrs == NULL)
+ {
debug_printf("get-printer-attributes IPP call failed on printer %s (%s).\n",
p->queue_name, p->uri);
+ goto fail;
+ }
+
+ attr = ippFindAttribute(p->prattrs, "printer-make-and-model", IPP_TAG_TEXT);
+ p->make_model = attr ? strdup(ippGetString(attr, 0, NULL)) : NULL;
}
} else {
#ifndef HAVE_CUPS_1_6
@@ -8242,7 +8248,8 @@ gboolean update_cups_queues(gpointer unused) {
debug_printf("Generated Default Attributes for local queue %s\n",
p->queue_name);
}
- if (ppdfile == NULL) {
+ if (ppdfile == NULL && make_model && strcmp(make_model, "Local Raw Printer"))
+ {
/* If we do not want CUPS-generated PPDs or we cannot obtain a
CUPS-generated PPD, for example if CUPS does not create a
temporary queue for this printer, we generate a PPD by
@@ -8580,7 +8587,8 @@ gboolean update_cups_queues(gpointer unused) {
debug_printf("Generated Default Attributes for local queue %s\n",
p->queue_name);
}
- if (ppdfile == NULL) {
+ if (ppdfile == NULL && make_model && strcmp(make_model, "Local Raw Printer"))
+ {
/* If we do not want CUPS-generated PPDs or we cannot obtain a
CUPS-generated PPD, for example if CUPS does not create a
temporary queue for this printer, we generate a PPD by
@@ -8793,6 +8801,11 @@ gboolean update_cups_queues(gpointer unused) {
}
ppdfile = strdup(buf);
}
+ else
+ {
+ // No PPD - define nickname as make_model for remote raw queue
+ p->nickname = p->make_model ? strdup(p->make_model) : strdup("Local Raw Printer");
+ }
/* Create a new CUPS queue or modify the existing queue */
request = ippNewRequest(CUPS_ADD_MODIFY_PRINTER);

View File

@ -11,7 +11,7 @@
Summary: OpenPrinting CUPS filters and backends
Name: cups-filters
Version: 1.28.7
Release: 18%{?dist}
Release: 18%{?dist}.1
# For a breakdown of the licensing, see COPYING file
# GPLv2: filters: commandto*, imagetoraster, pdftops, rasterto*,
@ -48,6 +48,8 @@ Patch06: browsed-ignore-NULL-attrs.patch
Patch07: cups-filters-CVE-2024-47175.patch
# CVE-2024-47076 cups-filters: `cfGetPrinterAttributes` API does not perform sanitization on returned IPP attributes
Patch08: 0001-cfGetPrinterAttributes5-Validate-response-attributes.patch
# RHEL-78978 [cups-browsed] Prints to remote RAW queues are converted to PDF documents
Patch09: 0001-Do-not-generate-PPD-for-remote-raw-queues-44.patch
# autogen.sh
@ -454,6 +456,9 @@ fi
%endif
%changelog
* Tue Feb 18 2025 Zdenek Dohnal <zdohnal@redhat.com> - 1.28.7-18.1
- RHEL-78978 [cups-browsed] Prints to remote RAW queues are converted to PDF documents
* Tue Oct 01 2024 Zdenek Dohnal <zdohnal@redhat.com> - 1.28.7-18
- CVE-2024-47175 cups-filters: remote command injection via attacker controlled data in PPD file
- CVE-2024-47076 cups-filters: `cfGetPrinterAttributes` API does not perform sanitization on returned IPP attributes