Compare commits
No commits in common. "c8" and "c9-beta" have entirely different histories.
@ -1,2 +1 @@
|
||||
f574678c1436d91216858edc9d2baea03579e998 SOURCES/cups-filters-1.20.0.tar.xz
|
||||
ded8efb5069586c51079608354159d6c3805e877 SOURCES/testprint
|
||||
b4096e5aa17d8e398b5cc352490476175af508fd SOURCES/cups-filters-1.28.7.tar.xz
|
||||
|
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,2 +1 @@
|
||||
SOURCES/cups-filters-1.20.0.tar.xz
|
||||
SOURCES/testprint
|
||||
SOURCES/cups-filters-1.28.7.tar.xz
|
||||
|
@ -0,0 +1,29 @@
|
||||
diff --git a/utils/cups-browsed.c b/utils/cups-browsed.c
|
||||
index d4396d7..6dba2ed 100644
|
||||
--- a/utils/cups-browsed.c
|
||||
+++ b/utils/cups-browsed.c
|
||||
@@ -8793,6 +8793,10 @@ gboolean update_cups_queues(gpointer unused) {
|
||||
IPP_PRINTER_IDLE);
|
||||
/* ... and accepting jobs */
|
||||
ippAddBoolean(request, IPP_TAG_PRINTER, "printer-is-accepting-jobs", 1);
|
||||
+ // Location (only if the remote server actually provides a location string)
|
||||
+ if (p->location && p->location[0])
|
||||
+ ippAddString(request, IPP_TAG_PRINTER, IPP_TAG_TEXT,
|
||||
+ "printer-location", NULL, p->location);
|
||||
num_options = 0;
|
||||
options = NULL;
|
||||
/* Device URI: ipp(s)://<remote host>:631/printers/<remote queue>
|
||||
@@ -8808,6 +8812,13 @@ gboolean update_cups_queues(gpointer unused) {
|
||||
num_options = cupsAddOption(p->options[i].name,
|
||||
p->options[i].value,
|
||||
num_options, &options);
|
||||
+
|
||||
+ // Description (only if the remote server actually provides a description
|
||||
+ // string)
|
||||
+ if (p->info && p->info[0])
|
||||
+ num_options = cupsAddOption("printer-info", p->info,
|
||||
+ num_options, &options);
|
||||
+
|
||||
/* Encode option list into IPP attributes */
|
||||
cupsEncodeOptions2(request, num_options, options, IPP_TAG_OPERATION);
|
||||
cupsEncodeOptions2(request, num_options, options, IPP_TAG_PRINTER);
|
@ -1,34 +0,0 @@
|
||||
diff --git a/utils/cups-browsed.c b/utils/cups-browsed.c
|
||||
index 2b30c63..a6d6fd2 100644
|
||||
--- a/utils/cups-browsed.c
|
||||
+++ b/utils/cups-browsed.c
|
||||
@@ -3576,6 +3576,12 @@ create_remote_printer_entry (const char *queue_name,
|
||||
NULL, pattrs);
|
||||
response = cupsDoRequest(http_printer, request, resource);
|
||||
|
||||
+ if (response && !ippValidateAttributes(response))
|
||||
+ {
|
||||
+ fprintf(stderr, "The printer %s contains invalid attributes.", p->queue_name);
|
||||
+ goto fail;
|
||||
+ }
|
||||
+
|
||||
/* Log all printer attributes for debugging */
|
||||
if (debug_stderr || debug_logfile) {
|
||||
debug_printf("Full list of IPP attributes (get-printer-attributes) for printer %s:\n",
|
||||
diff --git a/utils/driverless.c b/utils/driverless.c
|
||||
index fe61e58..0360bff 100644
|
||||
--- a/utils/driverless.c
|
||||
+++ b/utils/driverless.c
|
||||
@@ -513,6 +513,12 @@ generate_ppd (const char *uri)
|
||||
NULL, pattrs);
|
||||
response = cupsDoRequest(http, request, resource);
|
||||
|
||||
+ if (response && !ippValidateAttributes(response))
|
||||
+ {
|
||||
+ fprintf(stderr, "ERROR: The printer provides invalid attributes, skipping.");
|
||||
+ goto fail;
|
||||
+ }
|
||||
+
|
||||
/* Log all printer attributes for debugging */
|
||||
if (debug) {
|
||||
attr = ippFirstAttribute(response);
|
@ -14,15 +14,16 @@ index bffd1e09..0c335055 100644
|
||||
--- a/utils/cups-browsed.c
|
||||
+++ b/utils/cups-browsed.c
|
||||
@@ -5648,9 +5648,7 @@ record_printer_options(const char *printer) {
|
||||
strcasecmp(key + strlen(key) - strlen(*ptr) + 1, *ptr + 1) == 0))
|
||||
break;
|
||||
if (*ptr != NULL) {
|
||||
strcasecmp(key + strlen(key) - strlen(*ptr) + 1, *ptr + 1) == 0))
|
||||
break;
|
||||
if (*ptr != NULL) {
|
||||
- if (strcasecmp(key, CUPS_BROWSED_DEST_PRINTER "-default") != 0 &&
|
||||
- (ppdname == NULL ||
|
||||
- strncasecmp(key + strlen(key) - 8, "-default", 8))) {
|
||||
+ if (strcasecmp(key, CUPS_BROWSED_DEST_PRINTER "-default") != 0) {
|
||||
ippAttributeString(attr, buf, sizeof(buf));
|
||||
buf[sizeof(buf) - 1] = '\0';
|
||||
c = buf;
|
||||
--
|
||||
ippAttributeString(attr, buf, sizeof(buf));
|
||||
buf[sizeof(buf) - 1] = '\0';
|
||||
c = buf;
|
||||
--
|
||||
2.30.2
|
||||
|
||||
|
@ -0,0 +1,128 @@
|
||||
From d90a4fc57b00b4a1f6c196bcb96025251b555dd9 Mon Sep 17 00:00:00 2001
|
||||
From: zdohnal <zdohnal@redhat.com>
|
||||
Date: Fri, 18 Jun 2021 12:27:53 +0200
|
||||
Subject: [PATCH] cups-browsed.c: Make NotifLeaseDuration configurable and
|
||||
renew after half the lease duration not 60 sec before end
|
||||
|
||||
1) NotifLeaseDuration directive for cups-browsed.conf - it will make
|
||||
lease duration for notifications configurable by users. IMO it is not
|
||||
useful for regular users, but it is helpful during sanity testing
|
||||
(for verifying that we actually renew the subscription when time
|
||||
comes). The current hardcoded 1 day is unusuable for that :( .
|
||||
I implemented the lowest threshold to 300s to prevent a possible DoS.
|
||||
2) Subscription renewal is set to happen in the middle of NotifLeaseDuration,
|
||||
not one minute before lease expiration. This was a problem on busy servers,
|
||||
where cups-browsed was busy and wasn't able to renew the subscription
|
||||
before cupsd removed it. Then if some jobs had come before the subscription
|
||||
was created again, the queue got disabled. The proposed approach is based
|
||||
on behavior of DHCP.
|
||||
---
|
||||
utils/cups-browsed.c | 17 +++++++++++++----
|
||||
utils/cups-browsed.conf.5 | 11 +++++++++++
|
||||
utils/cups-browsed.conf.in | 8 ++++++++
|
||||
3 files changed, 32 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/utils/cups-browsed.c b/utils/cups-browsed.c
|
||||
index 61d6c551..2d367c59 100644
|
||||
--- a/utils/cups-browsed.c
|
||||
+++ b/utils/cups-browsed.c
|
||||
@@ -142,7 +142,6 @@ static int ldap_rebind_proc(LDAP *RebindLDAPHandle,
|
||||
#define TIMEOUT_REMOVE -1
|
||||
#define TIMEOUT_CHECK_LIST 2
|
||||
|
||||
-#define NOTIFY_LEASE_DURATION (24 * 60 * 60)
|
||||
#define CUPS_DBUS_NAME "org.cups.cupsd.Notifier"
|
||||
#define CUPS_DBUS_PATH "/org/cups/cupsd/Notifier"
|
||||
#define CUPS_DBUS_INTERFACE "org.cups.cupsd.Notifier"
|
||||
@@ -508,6 +507,7 @@ static int autoshutdown_timeout = 30;
|
||||
static autoshutdown_inactivity_type_t autoshutdown_on = NO_QUEUES;
|
||||
static guint autoshutdown_exec_id = 0;
|
||||
static const char *default_printer = NULL;
|
||||
+static unsigned int notify_lease_duration = 86400;
|
||||
|
||||
static int debug_stderr = 0;
|
||||
static int debug_logfile = 0;
|
||||
@@ -5017,7 +5017,7 @@ create_subscription ()
|
||||
ippAddString (req, IPP_TAG_SUBSCRIPTION, IPP_TAG_URI,
|
||||
"notify-recipient-uri", NULL, "dbus://");
|
||||
ippAddInteger (req, IPP_TAG_SUBSCRIPTION, IPP_TAG_INTEGER,
|
||||
- "notify-lease-duration", NOTIFY_LEASE_DURATION);
|
||||
+ "notify-lease-duration", notify_lease_duration);
|
||||
|
||||
resp = cupsDoRequest (conn, req, "/");
|
||||
if (!resp || cupsLastError() != IPP_STATUS_OK) {
|
||||
@@ -5060,7 +5060,7 @@ renew_subscription (int id)
|
||||
ippAddString (req, IPP_TAG_SUBSCRIPTION, IPP_TAG_URI,
|
||||
"notify-recipient-uri", NULL, "dbus://");
|
||||
ippAddInteger (req, IPP_TAG_SUBSCRIPTION, IPP_TAG_INTEGER,
|
||||
- "notify-lease-duration", NOTIFY_LEASE_DURATION);
|
||||
+ "notify-lease-duration", notify_lease_duration);
|
||||
|
||||
resp = cupsDoRequest (conn, req, "/");
|
||||
if (!resp || cupsLastError() != IPP_STATUS_OK) {
|
||||
@@ -11857,6 +11857,15 @@ read_configuration (const char *filename)
|
||||
} else
|
||||
debug_printf("Invalid %s value: %d\n",
|
||||
line, t);
|
||||
+ } else if (!strcasecmp(line, "NotifLeaseDuration") && value) {
|
||||
+ int t = atoi(value);
|
||||
+ if (t >= 300) {
|
||||
+ notify_lease_duration = t;
|
||||
+ debug_printf("Set %s to %d sec.\n",
|
||||
+ line, t);
|
||||
+ } else
|
||||
+ debug_printf("Invalid %s value: %d\n",
|
||||
+ line, t);
|
||||
} else if (!strcasecmp(line, "HttpMaxRetries") && value) {
|
||||
int t = atoi(value);
|
||||
if (t > 0) {
|
||||
@@ -12728,7 +12737,7 @@ int main(int argc, char*argv[]) {
|
||||
/* Subscribe to CUPS' D-Bus notifications and create a proxy to receive
|
||||
the notifications */
|
||||
subscription_id = create_subscription ();
|
||||
- g_timeout_add_seconds (NOTIFY_LEASE_DURATION - 60,
|
||||
+ g_timeout_add_seconds (notify_lease_duration / 2,
|
||||
renew_subscription_timeout,
|
||||
&subscription_id);
|
||||
cups_notifier = cups_notifier_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM,
|
||||
diff --git a/utils/cups-browsed.conf.5 b/utils/cups-browsed.conf.5
|
||||
index c47f8e8d..263f0843 100644
|
||||
--- a/utils/cups-browsed.conf.5
|
||||
+++ b/utils/cups-browsed.conf.5
|
||||
@@ -966,6 +966,17 @@ shutdown.
|
||||
|
||||
.fam T
|
||||
.fi
|
||||
+NotifLeaseDuration defines how long the D-BUS subscription created by cups-browsed
|
||||
+in cupsd will last before cupsd cancels it. The default value is 1 day
|
||||
+in seconds - 86400. The subscription renewal is set to happen after half of
|
||||
+NotifLeaseDuration passed. The D-BUS notifications are used for watching over queues
|
||||
+and doing specific actions when a D-BUS notification comes.
|
||||
+.PP
|
||||
+.nf
|
||||
+.fam C
|
||||
+ NotifLeaseDuration 86400
|
||||
+.fam T
|
||||
+.fi
|
||||
.SH SEE ALSO
|
||||
|
||||
\fBcups-browsed\fP(8)
|
||||
diff --git a/utils/cups-browsed.conf.in b/utils/cups-browsed.conf.in
|
||||
index 3cc4ebb1..ffdf83d6 100644
|
||||
--- a/utils/cups-browsed.conf.in
|
||||
+++ b/utils/cups-browsed.conf.in
|
||||
@@ -741,3 +741,11 @@ BrowseRemoteProtocols @BROWSEREMOTEPROTOCOLS@
|
||||
# on the size of the file.
|
||||
|
||||
# DebugLogFileSize 300
|
||||
+
|
||||
+# NotifLeaseDuration defines how long the D-BUS subscription created by cups-browsed
|
||||
+# in cupsd will last before cupsd cancels it. The default value is 1 day
|
||||
+# in seconds - 86400. The subscription renewal is set to happen after half of
|
||||
+# NotifLeaseDuration passed. The D-BUS notifications are used for watching over queues
|
||||
+# and doing specific actions when a D-BUS notification comes.
|
||||
+
|
||||
+# NotifLeaseDuration 86400
|
||||
--
|
||||
2.31.1
|
||||
|
@ -1,22 +0,0 @@
|
||||
From 297cc2decc53e0b08eb03049fce375db33df2131 Mon Sep 17 00:00:00 2001
|
||||
From: Till Kamppeter <till.kamppeter@gmail.com>
|
||||
Date: Sun, 7 Apr 2019 16:34:16 +0200
|
||||
Subject: [PATCH] foomatic-rip: Changed Ghostscript call to count pages in a
|
||||
PDF file so that it works with GS 9.27.
|
||||
|
||||
diff --git a/filter/foomatic-rip/pdf.c b/filter/foomatic-rip/pdf.c
|
||||
index 9c3979bb..bc739bd8 100644
|
||||
--- a/filter/foomatic-rip/pdf.c
|
||||
+++ b/filter/foomatic-rip/pdf.c
|
||||
@@ -47,9 +47,8 @@ static int pdf_count_pages(const char *filename)
|
||||
size_t bytes;
|
||||
|
||||
snprintf(gscommand, CMDLINE_MAX, "%s -dNODISPLAY -q -c "
|
||||
- "'/pdffile (%s) (r) file def pdfdict begin pdffile pdfopen begin "
|
||||
- "(PageCount: ) print pdfpagecount == flush currentdict pdfclose "
|
||||
- "end end quit'",
|
||||
+ "'/pdffile (%s) (r) file runpdfbegin (PageCount: ) print "
|
||||
+ "pdfpagecount = quit'",
|
||||
gspath, filename);
|
||||
|
||||
FILE *pd = popen(gscommand, "r");
|
@ -1,46 +0,0 @@
|
||||
diff --git a/filter/gstoraster.c b/filter/gstoraster.c
|
||||
index 0c9f37d..820acc8 100644
|
||||
--- a/filter/gstoraster.c
|
||||
+++ b/filter/gstoraster.c
|
||||
@@ -73,29 +73,23 @@ static GsDocType
|
||||
parse_doc_type(FILE *fp)
|
||||
{
|
||||
char buf[5];
|
||||
- GsDocType doc_type;
|
||||
- char *rc;
|
||||
+ GsDocType type = GS_DOC_TYPE_UNKNOWN;
|
||||
|
||||
/* get the first few bytes of the file */
|
||||
- doc_type = GS_DOC_TYPE_UNKNOWN;
|
||||
rewind(fp);
|
||||
- rc = fgets(buf,sizeof(buf),fp);
|
||||
- if (rc == NULL)
|
||||
- goto out;
|
||||
-
|
||||
- /* is PDF */
|
||||
- if (strncmp(buf,"%PDF",4) == 0) {
|
||||
- doc_type = GS_DOC_TYPE_PDF;
|
||||
- goto out;
|
||||
+/* skip until PDF/PS start header */
|
||||
+ while (fgets(buf, sizeof(buf), fp) != 0) {
|
||||
+ if (strncmp(buf, "%PDF", 4) == 0)
|
||||
+ type = GS_DOC_TYPE_PDF;
|
||||
+ if (strncmp(buf, "%!", 2) == 0)
|
||||
+ type = GS_DOC_TYPE_PS;
|
||||
+ if (type != GS_DOC_TYPE_UNKNOWN)
|
||||
+ break;
|
||||
}
|
||||
|
||||
- /* is PS */
|
||||
- if (strncmp(buf,"%!",2) == 0) {
|
||||
- doc_type = GS_DOC_TYPE_PS;
|
||||
- goto out;
|
||||
- }
|
||||
-out:
|
||||
- return doc_type;
|
||||
+ rewind(fp);
|
||||
+
|
||||
+ return (type);
|
||||
}
|
||||
|
||||
static void
|
@ -1,27 +0,0 @@
|
||||
From e7103a7aaa43ab613701cbf094e0aa91e6526112 Mon Sep 17 00:00:00 2001
|
||||
From: Till Kamppeter <till.kamppeter@gmail.com>
|
||||
Date: Tue, 8 Oct 2019 23:38:54 +0200
|
||||
Subject: [PATCH] gstoraster: Use ".setfilladjust2" PostScript command for
|
||||
Center-of-Pixel method to fill paths.
|
||||
|
||||
---
|
||||
NEWS | 6 ++++++
|
||||
filter/gstoraster.c | 2 +-
|
||||
2 files changed, 7 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/filter/gstoraster.c b/filter/gstoraster.c
|
||||
index 4aec0799..59f39927 100644
|
||||
--- a/filter/gstoraster.c
|
||||
+++ b/filter/gstoraster.c
|
||||
@@ -895,7 +895,7 @@ main (int argc, char **argv, char *envp[])
|
||||
(t && (!strcasecmp(t, "true") || !strcasecmp(t, "on") ||
|
||||
!strcasecmp(t, "yes")))) {
|
||||
fprintf(stderr, "DEBUG: Ghostscript using Center-of-Pixel method to fill paths.\n");
|
||||
- cupsArrayAdd(gs_args, strdup("0 .setfilladjust"));
|
||||
+ cupsArrayAdd(gs_args, strdup("0 0 .setfilladjust2"));
|
||||
} else
|
||||
fprintf(stderr, "DEBUG: Ghostscript using Any-Part-of-Pixel method to fill paths.\n");
|
||||
|
||||
--
|
||||
2.26.2
|
||||
|
@ -1,49 +0,0 @@
|
||||
From a07a43f885a4a7186310639b214c499e09e453c5 Mon Sep 17 00:00:00 2001
|
||||
From: Till Kamppeter <till.kamppeter@gmail.com>
|
||||
Date: Tue, 13 Nov 2018 13:04:59 +0100
|
||||
Subject: [PATCH] pdftopdf: Fixed printing multiple copies on driverless IPP
|
||||
printers.
|
||||
|
||||
---
|
||||
NEWS | 4 ++++
|
||||
filter/pdftopdf/pdftopdf.cc | 24 +++++++++++++++++++-----
|
||||
2 files changed, 23 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/filter/pdftopdf/pdftopdf.cc b/filter/pdftopdf/pdftopdf.cc
|
||||
index f474f08c6..880b664fd 100644
|
||||
--- a/filter/pdftopdf/pdftopdf.cc
|
||||
+++ b/filter/pdftopdf/pdftopdf.cc
|
||||
@@ -783,11 +783,25 @@ void calculate(ppd_file_t *ppd,ProcessingParameters ¶m) // {{{
|
||||
} else if ((ppd)&&(!ppd->manual_copies)) { // hw copy generation available
|
||||
param.deviceCopies=param.numCopies;
|
||||
if (param.collate) { // collate requested by user
|
||||
- // check collate device, with current/final(!) ppd settings
|
||||
- param.deviceCollate=printerWillCollate(ppd);
|
||||
- if (!param.deviceCollate) {
|
||||
- // printer can't hw collate -> we must copy collated in sw
|
||||
- param.deviceCopies=1;
|
||||
+ // Check output format (FINAL_CONTENT_TYPE env variable) whether it is
|
||||
+ // of a driverless IPP printer (PDF, Apple Raster, PWG Raster, PCLm).
|
||||
+ // These printers do always hardware collate if they do hardware copies.
|
||||
+ // https://github.com/apple/cups/issues/5433
|
||||
+ char *final_content_type = getenv("FINAL_CONTENT_TYPE");
|
||||
+ if (final_content_type &&
|
||||
+ (strcasestr(final_content_type, "/pdf") ||
|
||||
+ strcasestr(final_content_type, "/vnd.cups-pdf") ||
|
||||
+ strcasestr(final_content_type, "/pwg-raster") ||
|
||||
+ strcasestr(final_content_type, "/urf") ||
|
||||
+ strcasestr(final_content_type, "/PCLm"))) {
|
||||
+ param.deviceCollate = true;
|
||||
+ } else {
|
||||
+ // check collate device, with current/final(!) ppd settings
|
||||
+ param.deviceCollate=printerWillCollate(ppd);
|
||||
+ if (!param.deviceCollate) {
|
||||
+ // printer can't hw collate -> we must copy collated in sw
|
||||
+ param.deviceCopies=1;
|
||||
+ }
|
||||
}
|
||||
} // else: printer copies w/o collate and takes care of duplex/evenDuplex
|
||||
} else { // sw copies
|
||||
--
|
||||
2.43.0
|
||||
|
@ -1,63 +0,0 @@
|
||||
diff --git a/utils/cups-browsed.c b/utils/cups-browsed.c
|
||||
index 80bde46..54ae2ac 100644
|
||||
--- a/utils/cups-browsed.c
|
||||
+++ b/utils/cups-browsed.c
|
||||
@@ -439,6 +439,19 @@ static remote_printer_t
|
||||
#define HAVE_CUPS_1_6 1
|
||||
#endif
|
||||
|
||||
+/*
|
||||
+ * Option 'printer-is-shared' cannot be set on remote CUPS
|
||||
+ * queue and requests for setting it ends with error since
|
||||
+ * 2.1.1. Define HAVE_CUPS_2_2 to do not send IPP request
|
||||
+ * for setting 'printer-is-shared' option on remote CUPS queues
|
||||
+ * for newer versions of CUPS.
|
||||
+ */
|
||||
+#if (CUPS_VERSION_MAJOR > 2) || (CUPS_VERSION_MINOR > 1)
|
||||
+#define HAVE_CUPS_2_2 1
|
||||
+#else
|
||||
+#define HAVE_CUPS_2_2 0
|
||||
+#endif
|
||||
+
|
||||
/*
|
||||
* CUPS 1.6 makes various structures private and
|
||||
* introduces these ippGet and ippSet functions
|
||||
@@ -4394,7 +4407,20 @@ gboolean update_cups_queues(gpointer unused) {
|
||||
num_options, &options);
|
||||
cupsEncodeOptions2(request, num_options, options, IPP_TAG_OPERATION);
|
||||
cupsEncodeOptions2(request, num_options, options, IPP_TAG_PRINTER);
|
||||
- ippDelete(cupsDoRequest(http, request, "/admin/"));
|
||||
+ /*
|
||||
+ * Do IPP request for printer-is-shared option only when we have
|
||||
+ * network printer or if we have remote CUPS queue, do IPP request
|
||||
+ * only if we have CUPS older than 2.2.
|
||||
+ * When you have remote queue, clean up and break from the loop.
|
||||
+ */
|
||||
+ if (p->netprinter != 0 || !HAVE_CUPS_2_2)
|
||||
+ ippDelete(cupsDoRequest(http, request, "/admin/"));
|
||||
+ else
|
||||
+ {
|
||||
+ ippDelete(request);
|
||||
+ cupsFreeOptions(num_options, options);
|
||||
+ break;
|
||||
+ }
|
||||
cupsFreeOptions(num_options, options);
|
||||
if (cupsLastError() > IPP_STATUS_OK_EVENTS_COMPLETE) {
|
||||
debug_printf("Unable change printer-is-shared bit to %s (%s)!\n",
|
||||
@@ -4803,7 +4829,15 @@ gboolean update_cups_queues(gpointer unused) {
|
||||
}
|
||||
cupsEncodeOptions2(request, num_options, options, IPP_TAG_OPERATION);
|
||||
cupsEncodeOptions2(request, num_options, options, IPP_TAG_PRINTER);
|
||||
- ippDelete(cupsDoRequest(http, request, "/admin/"));
|
||||
+ /*
|
||||
+ * Do IPP request for printer-is-shared option only when we have
|
||||
+ * network printer or if we have remote CUPS queue, do IPP request
|
||||
+ * only if we have CUPS older than 2.2.
|
||||
+ */
|
||||
+ if (p->netprinter != 0 || !HAVE_CUPS_2_2)
|
||||
+ ippDelete(cupsDoRequest(http, request, "/admin/"));
|
||||
+ else
|
||||
+ ippDelete(request);
|
||||
cupsFreeOptions(num_options, options);
|
||||
if (cupsLastError() > IPP_STATUS_OK_EVENTS_COMPLETE)
|
||||
debug_printf("Unable to set printer-is-shared bit to false (%s)!\n",
|
@ -1,219 +0,0 @@
|
||||
diff --git a/cupsfilters/ppdgenerator.c b/cupsfilters/ppdgenerator.c
|
||||
index 3bc4d8a..44d9313 100644
|
||||
--- a/cupsfilters/ppdgenerator.c
|
||||
+++ b/cupsfilters/ppdgenerator.c
|
||||
@@ -752,12 +752,17 @@ load_opt_strings_catalog(const char *location, cups_array_t *options)
|
||||
2: "..." = "..."
|
||||
10: EOF, save last entry */
|
||||
int digit;
|
||||
+ int found_in_catalog = 0;
|
||||
|
||||
if (location == NULL || (strncasecmp(location, "http:", 5) &&
|
||||
strncasecmp(location, "https:", 6))) {
|
||||
if (location == NULL ||
|
||||
(stat(location, &statbuf) == 0 && S_ISDIR(statbuf.st_mode))) /* directory? */
|
||||
+ {
|
||||
filename = _findCUPSMessageCatalog(location);
|
||||
+ if (filename)
|
||||
+ found_in_catalog = 1;
|
||||
+ }
|
||||
else
|
||||
filename = location;
|
||||
} else {
|
||||
@@ -943,6 +948,8 @@ load_opt_strings_catalog(const char *location, cups_array_t *options)
|
||||
free(opt_name);
|
||||
if (filename == tmpfile)
|
||||
unlink(filename);
|
||||
+ if (found_in_catalog)
|
||||
+ free(filename);
|
||||
}
|
||||
|
||||
|
||||
@@ -1417,10 +1424,16 @@ ppdCreateFromIPP(char *buffer, /* I - Filename buffer */
|
||||
} else {
|
||||
if ((current_res = resolutionArrayNew()) != NULL) {
|
||||
if ((current_def = resolutionNew(lowdpi, lowdpi)) != NULL)
|
||||
+ {
|
||||
cupsArrayAdd(current_res, current_def);
|
||||
+ free_resolution(current_def, NULL);
|
||||
+ }
|
||||
if (hidpi != lowdpi &&
|
||||
(current_def = resolutionNew(hidpi, hidpi)) != NULL)
|
||||
+ {
|
||||
cupsArrayAdd(current_res, current_def);
|
||||
+ free_resolution(current_def, NULL);
|
||||
+ }
|
||||
current_def = NULL;
|
||||
if (cupsArrayCount(current_res) > 0 &&
|
||||
joinResolutionArrays(&common_res, ¤t_res, &common_def,
|
||||
@@ -1506,7 +1519,10 @@ ppdCreateFromIPP(char *buffer, /* I - Filename buffer */
|
||||
if (common_res == NULL) {
|
||||
if ((common_res = resolutionArrayNew()) != NULL) {
|
||||
if ((current_def = resolutionNew(300, 300)) != NULL)
|
||||
+ {
|
||||
cupsArrayAdd(common_res, current_def);
|
||||
+ free_resolution(current_def, NULL);
|
||||
+ }
|
||||
current_def = NULL;
|
||||
} else
|
||||
goto bad_ppd;
|
||||
diff --git a/utils/cups-browsed.c b/utils/cups-browsed.c
|
||||
index 54ae2ac..507977c 100644
|
||||
--- a/utils/cups-browsed.c
|
||||
+++ b/utils/cups-browsed.c
|
||||
@@ -2555,7 +2555,7 @@ record_printer_options(const char *printer) {
|
||||
const char *key;
|
||||
char buf[65536], *c;
|
||||
const char *ppdname = NULL;
|
||||
- ppd_file_t *ppd;
|
||||
+ ppd_file_t *ppd = NULL;
|
||||
ppd_option_t *ppd_opt;
|
||||
cups_option_t *option;
|
||||
int i;
|
||||
@@ -2825,7 +2825,8 @@ on_printer_state_changed (CupsNotifier *object,
|
||||
char *ptr, buf[1024];
|
||||
remote_printer_t *p, *q;
|
||||
http_t *http = NULL;
|
||||
- ipp_t *request, *response;
|
||||
+ ipp_t *request = NULL;
|
||||
+ ipp_t *response = NULL;
|
||||
ipp_attribute_t *attr;
|
||||
const char *pname = NULL;
|
||||
char *remote_cups_queue;
|
||||
@@ -3107,6 +3108,10 @@ on_printer_state_changed (CupsNotifier *object,
|
||||
break;
|
||||
}
|
||||
}
|
||||
+ if (response) {
|
||||
+ ippDelete(response);
|
||||
+ response = NULL;
|
||||
+ }
|
||||
if (pstate == IPP_PRINTER_IDLE && paccept) {
|
||||
q->last_printer = i;
|
||||
break;
|
||||
@@ -3863,7 +3868,7 @@ create_remote_printer_entry (const char *queue_name,
|
||||
debug_printf("Default page size: %s\n",
|
||||
default_page_size);
|
||||
p->num_options = cupsAddOption("media-default",
|
||||
- strdup(default_page_size),
|
||||
+ default_page_size,
|
||||
p->num_options, &(p->options));
|
||||
} else {
|
||||
attr = ippFindAttribute(response,
|
||||
@@ -3874,7 +3879,7 @@ create_remote_printer_entry (const char *queue_name,
|
||||
debug_printf("Default page size: %s\n",
|
||||
default_page_size);
|
||||
p->num_options = cupsAddOption("media-default",
|
||||
- strdup(default_page_size),
|
||||
+ default_page_size,
|
||||
p->num_options, &(p->options));
|
||||
} else
|
||||
debug_printf("No default page size found!\n");
|
||||
@@ -3889,7 +3894,7 @@ create_remote_printer_entry (const char *queue_name,
|
||||
bottom = 1270;
|
||||
snprintf(buffer, sizeof(buffer), "%d", bottom);
|
||||
p->num_options = cupsAddOption("media-bottom-margin-default",
|
||||
- strdup(buffer),
|
||||
+ buffer,
|
||||
p->num_options, &(p->options));
|
||||
|
||||
if ((attr = ippFindAttribute(response, "media-left-margin-supported", IPP_TAG_INTEGER)) != NULL) {
|
||||
@@ -3900,7 +3905,7 @@ create_remote_printer_entry (const char *queue_name,
|
||||
left = 635;
|
||||
snprintf(buffer, sizeof(buffer), "%d", left);
|
||||
p->num_options = cupsAddOption("media-left-margin-default",
|
||||
- strdup(buffer),
|
||||
+ buffer,
|
||||
p->num_options, &(p->options));
|
||||
|
||||
if ((attr = ippFindAttribute(response, "media-right-margin-supported", IPP_TAG_INTEGER)) != NULL) {
|
||||
@@ -3911,7 +3916,7 @@ create_remote_printer_entry (const char *queue_name,
|
||||
right = 635;
|
||||
snprintf(buffer, sizeof(buffer), "%d", right);
|
||||
p->num_options = cupsAddOption("media-right-margin-default",
|
||||
- strdup(buffer),
|
||||
+ buffer,
|
||||
p->num_options, &(p->options));
|
||||
|
||||
if ((attr = ippFindAttribute(response, "media-top-margin-supported", IPP_TAG_INTEGER)) != NULL) {
|
||||
@@ -3922,7 +3927,7 @@ create_remote_printer_entry (const char *queue_name,
|
||||
top = 1270;
|
||||
snprintf(buffer, sizeof(buffer), "%d", top);
|
||||
p->num_options = cupsAddOption("media-top-margin-default",
|
||||
- strdup(buffer),
|
||||
+ buffer,
|
||||
p->num_options, &(p->options));
|
||||
|
||||
debug_printf("Margins: Left: %d, Right: %d, Top: %d, Bottom: %d\n",
|
||||
@@ -3943,7 +3948,7 @@ create_remote_printer_entry (const char *queue_name,
|
||||
debug_printf("Best color space: %s\n",
|
||||
best_color_space);
|
||||
p->num_options = cupsAddOption("print-color-mode-default",
|
||||
- strdup(best_color_space),
|
||||
+ best_color_space,
|
||||
p->num_options, &(p->options));
|
||||
} else {
|
||||
debug_printf("No info about supported color spaces found!\n");
|
||||
@@ -3956,7 +3961,7 @@ create_remote_printer_entry (const char *queue_name,
|
||||
p->num_options = cupsAddOption("sides-default", "two-sided-long-edge",
|
||||
p->num_options, &(p->options));
|
||||
|
||||
- p->num_options = cupsAddOption("output-format-default", strdup(pdl),
|
||||
+ p->num_options = cupsAddOption("output-format-default", pdl,
|
||||
p->num_options, &(p->options));
|
||||
p->num_options = cupsAddOption("make-and-model-default",
|
||||
remove_bad_chars(make_model, 0),
|
||||
@@ -4119,7 +4124,7 @@ gboolean update_cups_queues(gpointer unused) {
|
||||
char *disabled_str, *ptr, *prefix;
|
||||
const char *loadedppd = NULL;
|
||||
int pass_through_ppd;
|
||||
- ppd_file_t *ppd;
|
||||
+ ppd_file_t *ppd = NULL;
|
||||
ppd_choice_t *choice;
|
||||
cups_file_t *in, *out;
|
||||
char keyword[1024], *keyptr;
|
||||
@@ -4588,6 +4593,7 @@ gboolean update_cups_queues(gpointer unused) {
|
||||
p->timeout = current_time + TIMEOUT_RETRY;
|
||||
p->no_autosave = 0;
|
||||
ppdClose(ppd);
|
||||
+ ppd = NULL;
|
||||
unlink(loadedppd);
|
||||
break;
|
||||
}
|
||||
@@ -4597,6 +4603,7 @@ gboolean update_cups_queues(gpointer unused) {
|
||||
p->no_autosave = 0;
|
||||
cupsFileClose(out);
|
||||
ppdClose(ppd);
|
||||
+ ppd = NULL;
|
||||
unlink(loadedppd);
|
||||
break;
|
||||
}
|
||||
@@ -4710,6 +4717,7 @@ gboolean update_cups_queues(gpointer unused) {
|
||||
cupsFileClose(in);
|
||||
cupsFileClose(out);
|
||||
ppdClose(ppd);
|
||||
+ ppd = NULL;
|
||||
unlink(loadedppd);
|
||||
loadedppd = NULL;
|
||||
if (p->ppd)
|
||||
@@ -4748,8 +4756,8 @@ gboolean update_cups_queues(gpointer unused) {
|
||||
/* Default option settings from printer entry */
|
||||
for (i = 0; i < p->num_options; i ++)
|
||||
if (strcasecmp(p->options[i].name, "printer-is-shared"))
|
||||
- num_options = cupsAddOption(strdup(p->options[i].name),
|
||||
- strdup(p->options[i].value),
|
||||
+ num_options = cupsAddOption(p->options[i].name,
|
||||
+ p->options[i].value,
|
||||
num_options, &options);
|
||||
/* Encode option list into IPP attributes */
|
||||
cupsEncodeOptions2(request, num_options, options, IPP_TAG_OPERATION);
|
||||
@@ -8342,6 +8350,9 @@ fail:
|
||||
|
||||
if (local_printers_context) {
|
||||
browse_poll_cancel_subscription (local_printers_context);
|
||||
+#ifdef HAVE_CUPS_2_0
|
||||
+ free(local_printers_context->server);
|
||||
+#endif
|
||||
g_list_free_full (local_printers_context->printers,
|
||||
browsepoll_printer_free);
|
||||
free (local_printers_context);
|
@ -1,13 +0,0 @@
|
||||
diff --git a/utils/cups-browsed.c b/utils/cups-browsed.c
|
||||
index 078348a..2b30c63 100644
|
||||
--- a/utils/cups-browsed.c
|
||||
+++ b/utils/cups-browsed.c
|
||||
@@ -8268,7 +8268,7 @@ int main(int argc, char*argv[]) {
|
||||
/* Subscribe to CUPS' D-Bus notifications and create a proxy to receive
|
||||
the notifications */
|
||||
subscription_id = create_subscription ();
|
||||
- g_timeout_add_seconds (NOTIFY_LEASE_DURATION - 60,
|
||||
+ g_timeout_add_seconds (NOTIFY_LEASE_DURATION / 2,
|
||||
renew_subscription_timeout,
|
||||
&subscription_id);
|
||||
cups_notifier = cups_notifier_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM,
|
@ -1,18 +0,0 @@
|
||||
diff --git a/utils/cups-browsed.c b/utils/cups-browsed.c
|
||||
index c6c257e..2cc64dd 100644
|
||||
--- a/utils/cups-browsed.c
|
||||
+++ b/utils/cups-browsed.c
|
||||
@@ -2747,6 +2747,13 @@ on_printer_state_changed (CupsNotifier *object,
|
||||
if (i == q->last_printer)
|
||||
break;
|
||||
}
|
||||
+
|
||||
+ /* Close remote connection */
|
||||
+ if (http) {
|
||||
+ httpClose(http);
|
||||
+ http = NULL;
|
||||
+ }
|
||||
+
|
||||
/* Find the ID of the current job */
|
||||
request = ippNewRequest(IPP_GET_JOBS);
|
||||
httpAssembleURIf(HTTP_URI_CODING_ALL, uri, sizeof(uri), "ipp", NULL,
|
@ -1,14 +0,0 @@
|
||||
diff -up cups-filters-1.20.0/utils/cups-browsed.8.manpage cups-filters-1.20.0/utils/cups-browsed.8
|
||||
--- cups-filters-1.20.0/utils/cups-browsed.8.manpage 2018-11-12 14:14:48.436062013 +0100
|
||||
+++ cups-filters-1.20.0/utils/cups-browsed.8 2018-11-12 14:19:10.188091043 +0100
|
||||
@@ -100,8 +100,8 @@ and command line tools.
|
||||
|
||||
\fBcups-browsed.conf\fP(5)
|
||||
.PP
|
||||
-/usr/share/doc/\fBcups-browsed\fP/README.gz
|
||||
+/usr/share/doc/cups-filters/README.gz
|
||||
.SH AUTHOR
|
||||
-The authors of \fBcups-browsed\fP are listed in /usr/share/doc/\fBcups-browsed\fP/AUTHORS.
|
||||
+The authors of \fBcups-browsed\fP are listed in /usr/share/doc/cups-filters/AUTHORS.
|
||||
.PP
|
||||
This manual page was written for the Debian Project, but it may be used by others.
|
@ -1,356 +0,0 @@
|
||||
diff --git a/cupsfilters/ppdgenerator.c b/cupsfilters/ppdgenerator.c
|
||||
index 44d9313..a8acde4 100644
|
||||
--- a/cupsfilters/ppdgenerator.c
|
||||
+++ b/cupsfilters/ppdgenerator.c
|
||||
@@ -82,6 +82,7 @@ typedef struct _pwg_finishings_s /**** PWG finishings mapping data ****/
|
||||
|
||||
static void pwg_ppdize_name(const char *ipp, char *name, size_t namesize);
|
||||
static void pwg_ppdize_resolution(ipp_attribute_t *attr, int element, int *xres, int *yres, char *name, size_t namesize);
|
||||
+static void ppd_put_string(cups_file_t *fp, cups_lang_t *lang, const char *ppd_option, const char *ppd_choice, const char *pwg_msgid);
|
||||
|
||||
/*
|
||||
* '_cupsSetError()' - Set the last PPD generator status-message.
|
||||
@@ -1188,9 +1189,10 @@ ppdCreateFromIPP(char *buffer, /* I - Filename buffer */
|
||||
ipp_t *media_col, /* Media collection */
|
||||
*media_size; /* Media size collection */
|
||||
char make[256], /* Make and model */
|
||||
- *model, /* Model name */
|
||||
+ *mptr, // Pointer into make and model
|
||||
ppdname[PPD_MAX_NAME];
|
||||
/* PPD keyword */
|
||||
+ const char *model; /* Model name */
|
||||
int i, j, /* Looping vars */
|
||||
count = 0, /* Number of values */
|
||||
bottom, /* Largest bottom margin */
|
||||
@@ -1263,6 +1265,69 @@ ppdCreateFromIPP(char *buffer, /* I - Filename buffer */
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
+ //
|
||||
+ // Get a sanitized make and model...
|
||||
+ //
|
||||
+
|
||||
+ if ((attr = ippFindAttribute(response, "printer-make-and-model", IPP_TAG_TEXT)) != NULL && ippValidateAttribute(attr))
|
||||
+ {
|
||||
+ // Sanitize the model name to only contain PPD-safe characters.
|
||||
+ strlcpy(make, ippGetString(attr, 0, NULL), sizeof(make));
|
||||
+
|
||||
+ for (mptr = make; *mptr; mptr ++)
|
||||
+ {
|
||||
+ if (*mptr < ' ' || *mptr >= 127 || *mptr == '\"')
|
||||
+ {
|
||||
+ // Truncate the make and model on the first bad character...
|
||||
+ *mptr = '\0';
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ while (mptr > make)
|
||||
+ {
|
||||
+ // Strip trailing whitespace...
|
||||
+ mptr --;
|
||||
+ if (*mptr == ' ')
|
||||
+ *mptr = '\0';
|
||||
+ }
|
||||
+
|
||||
+ if (!make[0])
|
||||
+ {
|
||||
+ // Use a default make and model if nothing remains...
|
||||
+ strlcpy(make, "Unknown", sizeof(make));
|
||||
+ }
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ // Use a default make and model...
|
||||
+ strlcpy(make, "Unknown", sizeof(make));
|
||||
+ }
|
||||
+
|
||||
+ if (!strncasecmp(make, "Hewlett Packard ", 16) || !strncasecmp(make, "Hewlett-Packard ", 16))
|
||||
+ {
|
||||
+ // Normalize HP printer make and model...
|
||||
+ model = make + 16;
|
||||
+ strlcpy(make, "HP", sizeof(make));
|
||||
+
|
||||
+ if (!strncasecmp(model, "HP ", 3))
|
||||
+ model += 3;
|
||||
+ }
|
||||
+ else if ((mptr = strchr(make, ' ')) != NULL)
|
||||
+ {
|
||||
+ // Separate "MAKE MODEL"...
|
||||
+ while (*mptr && *mptr == ' ')
|
||||
+ *mptr++ = '\0';
|
||||
+
|
||||
+ model = mptr;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ // No separate model name...
|
||||
+ model = "Printer";
|
||||
+ }
|
||||
+
|
||||
+
|
||||
/*
|
||||
* Standard stuff for PPD file...
|
||||
*/
|
||||
@@ -1277,24 +1342,6 @@ ppdCreateFromIPP(char *buffer, /* I - Filename buffer */
|
||||
cupsFilePuts(fp, "*FileSystem: False\n");
|
||||
cupsFilePuts(fp, "*PCFileName: \"drvless.ppd\"\n");
|
||||
|
||||
- if ((attr = ippFindAttribute(response, "printer-make-and-model", IPP_TAG_TEXT)) != NULL)
|
||||
- strlcpy(make, ippGetString(attr, 0, NULL), sizeof(make));
|
||||
- else if (make_model && make_model[0] != '\0')
|
||||
- strlcpy(make, make_model, sizeof(make));
|
||||
- else
|
||||
- strlcpy(make, "Unknown Printer", sizeof(make));
|
||||
-
|
||||
- if (!_cups_strncasecmp(make, "Hewlett Packard ", 16) ||
|
||||
- !_cups_strncasecmp(make, "Hewlett-Packard ", 16))
|
||||
- {
|
||||
- model = make + 16;
|
||||
- strlcpy(make, "HP", sizeof(make));
|
||||
- }
|
||||
- else if ((model = strchr(make, ' ')) != NULL)
|
||||
- *model++ = '\0';
|
||||
- else
|
||||
- model = make;
|
||||
-
|
||||
cupsFilePrintf(fp, "*Manufacturer: \"%s\"\n", make);
|
||||
cupsFilePrintf(fp, "*ModelName: \"%s %s\"\n", make, model);
|
||||
cupsFilePrintf(fp, "*Product: \"(%s %s)\"\n", make, model);
|
||||
@@ -1311,10 +1358,10 @@ ppdCreateFromIPP(char *buffer, /* I - Filename buffer */
|
||||
cupsFilePuts(fp, "*cupsSNMPSupplies: False\n");
|
||||
cupsFilePuts(fp, "*cupsLanguages: \"en\"\n");
|
||||
|
||||
- if ((attr = ippFindAttribute(response, "printer-more-info", IPP_TAG_URI)) != NULL)
|
||||
+ if ((attr = ippFindAttribute(response, "printer-more-info", IPP_TAG_URI)) != NULL && ippValidateAttribute(attr))
|
||||
cupsFilePrintf(fp, "*APSupplies: \"%s\"\n", ippGetString(attr, 0, NULL));
|
||||
|
||||
- if ((attr = ippFindAttribute(response, "printer-charge-info-uri", IPP_TAG_URI)) != NULL)
|
||||
+ if ((attr = ippFindAttribute(response, "printer-charge-info-uri", IPP_TAG_URI)) != NULL && ippValidateAttribute(attr))
|
||||
cupsFilePrintf(fp, "*cupsChargeInfoURI: \"%s\"\n", ippGetString(attr, 0, NULL));
|
||||
|
||||
/* Message catalogs for UI strings */
|
||||
@@ -1322,7 +1369,7 @@ ppdCreateFromIPP(char *buffer, /* I - Filename buffer */
|
||||
opt_strings_catalog = optArrayNew();
|
||||
load_opt_strings_catalog(NULL, opt_strings_catalog);
|
||||
}
|
||||
- if ((attr = ippFindAttribute(response, "printer-strings-uri", IPP_TAG_URI)) != NULL) {
|
||||
+ if ((attr = ippFindAttribute(response, "printer-strings-uri", IPP_TAG_URI)) != NULL && ippValidateAttribute(attr)) {
|
||||
printer_opt_strings_catalog = optArrayNew();
|
||||
load_opt_strings_catalog(ippGetString(attr, 0, NULL), printer_opt_strings_catalog);
|
||||
if (printer_opt_strings_catalog)
|
||||
@@ -2150,13 +2197,15 @@ ppdCreateFromIPP(char *buffer, /* I - Filename buffer */
|
||||
break;
|
||||
}
|
||||
if (j >= 0)
|
||||
- cupsFilePrintf(fp, "*InputSlot %s/%s: \"<</MediaPosition %d>>setpagedevice\"\n",
|
||||
- ppdname, human_readable, j);
|
||||
+ {
|
||||
+ cupsFilePrintf(fp, "*InputSlot %s: \"<</MediaPosition %d>>setpagedevice\"\n", ppdname, j);
|
||||
+ ppd_put_string(fp, lang, "InputSlot", ppdname, human_readable);
|
||||
+ }
|
||||
else
|
||||
- cupsFilePrintf(fp, "*InputSlot %s%s%s: \"\"\n",
|
||||
- ppdname,
|
||||
- (human_readable ? "/" : ""),
|
||||
- (human_readable ? human_readable : ""));
|
||||
+ {
|
||||
+ cupsFilePrintf(fp, "*InputSlot %s%s%s:\"\"\n", ppdname, human_readable ? "/" : "", human_readable ? human_readable : "");
|
||||
+ ppd_put_string(fp, lang, "InputSlot", ppdname, human_readable);
|
||||
+ }
|
||||
}
|
||||
cupsFilePuts(fp, "*CloseUI: *InputSlot\n");
|
||||
}
|
||||
@@ -2337,11 +2386,8 @@ ppdCreateFromIPP(char *buffer, /* I - Filename buffer */
|
||||
human_readable = (char *)_cupsLangString(lang, media_types[j][1]);
|
||||
break;
|
||||
}
|
||||
- cupsFilePrintf(fp, "*MediaType %s%s%s: \"<</MediaType(%s)>>setpagedevice\"\n",
|
||||
- ppdname,
|
||||
- (human_readable ? "/" : ""),
|
||||
- (human_readable ? human_readable : ""),
|
||||
- ppdname);
|
||||
+ cupsFilePrintf(fp, "*MediaType %s: \"<</MediaType(%s)>>setpagedevice\"\n", ppdname, ppdname);
|
||||
+ ppd_put_string(fp, lang, "MediaType", ppdname, human_readable);
|
||||
}
|
||||
cupsFilePuts(fp, "*CloseUI: *MediaType\n");
|
||||
}
|
||||
@@ -2755,10 +2801,8 @@ ppdCreateFromIPP(char *buffer, /* I - Filename buffer */
|
||||
human_readable = (char *)_cupsLangString(lang, output_bins[j][1]);
|
||||
break;
|
||||
}
|
||||
- cupsFilePrintf(fp, "*OutputBin %s%s%s: \"\"\n",
|
||||
- ppdname,
|
||||
- (human_readable ? "/" : ""),
|
||||
- (human_readable ? human_readable : ""));
|
||||
+ cupsFilePrintf(fp, "*OutputBin %s: \"\"\n", ppdname);
|
||||
+ ppd_put_string(fp, lang, "OutputBin", ppdname, human_readable);
|
||||
}
|
||||
cupsFilePuts(fp, "*CloseUI: *OutputBin\n");
|
||||
}
|
||||
@@ -2898,9 +2942,8 @@ ppdCreateFromIPP(char *buffer, /* I - Filename buffer */
|
||||
human_readable = (char *)_cupsLangString(lang, finishings[j][1]);
|
||||
break;
|
||||
}
|
||||
- cupsFilePrintf(fp, "*StapleLocation %s%s%s: \"\"\n", name,
|
||||
- (human_readable ? "/" : ""),
|
||||
- (human_readable ? human_readable : ""));
|
||||
+ cupsFilePrintf(fp, "*StapleLocation %s: \"\"\n", name);
|
||||
+ ppd_put_string(fp, lang, "StapleLocation", name, human_readable);
|
||||
cupsFilePrintf(fp, "*cupsIPPFinishings %d/%s: \"*StapleLocation %s\"\n", value, name, name);
|
||||
}
|
||||
|
||||
@@ -2955,9 +2998,8 @@ ppdCreateFromIPP(char *buffer, /* I - Filename buffer */
|
||||
human_readable = (char *)_cupsLangString(lang, finishings[j][1]);
|
||||
break;
|
||||
}
|
||||
- cupsFilePrintf(fp, "*FoldType %s%s%s: \"\"\n", name,
|
||||
- (human_readable ? "/" : ""),
|
||||
- (human_readable ? human_readable : ""));
|
||||
+ cupsFilePrintf(fp, "*FoldType %s: \"\"\n", name);
|
||||
+ ppd_put_string(fp, lang, "FoldType", name, human_readable);
|
||||
cupsFilePrintf(fp, "*cupsIPPFinishings %d/%s: \"*FoldType %s\"\n", value, name, name);
|
||||
}
|
||||
|
||||
@@ -3012,9 +3054,8 @@ ppdCreateFromIPP(char *buffer, /* I - Filename buffer */
|
||||
human_readable = (char *)_cupsLangString(lang, finishings[j][1]);
|
||||
break;
|
||||
}
|
||||
- cupsFilePrintf(fp, "*PunchMedia %s%s%s: \"\"\n", name,
|
||||
- (human_readable ? "/" : ""),
|
||||
- (human_readable ? human_readable : ""));
|
||||
+ cupsFilePrintf(fp, "*PunchMedia %s: \"\"\n", name);
|
||||
+ ppd_put_string(fp, lang, "PunchMedia", name, human_readable);
|
||||
cupsFilePrintf(fp, "*cupsIPPFinishings %d/%s: \"*PunchMedia %s\"\n", value, name, name);
|
||||
}
|
||||
|
||||
@@ -3076,7 +3117,9 @@ ppdCreateFromIPP(char *buffer, /* I - Filename buffer */
|
||||
printer_opt_strings_catalog);
|
||||
if (human_readable == NULL)
|
||||
human_readable = (char *)keyword;
|
||||
- cupsFilePrintf(fp, "*cupsFinishingTemplate %s/%s: \"\n", keyword, human_readable);
|
||||
+ pwg_ppdize_name(keyword, ppdname, sizeof(ppdname));
|
||||
+ cupsFilePrintf(fp, "*cupsFinishingTemplate %s: \"\n", ppdname);
|
||||
+ ppd_put_string(fp, lang, "cupsFinishingTemplate", ppdname, human_readable);
|
||||
for (finishing_attr = ippFirstAttribute(finishing_col); finishing_attr; finishing_attr = ippNextAttribute(finishing_col))
|
||||
{
|
||||
if (ippGetValueTag(finishing_attr) == IPP_TAG_BEGIN_COLLECTION)
|
||||
@@ -3332,11 +3375,11 @@ ppdCreateFromIPP(char *buffer, /* I - Filename buffer */
|
||||
if (!preset || !preset_name)
|
||||
continue;
|
||||
|
||||
- if ((localized_name = lookup_option((char *)preset_name, opt_strings_catalog,
|
||||
- printer_opt_strings_catalog)) == NULL)
|
||||
- cupsFilePrintf(fp, "*APPrinterPreset %s: \"\n", preset_name);
|
||||
- else
|
||||
- cupsFilePrintf(fp, "*APPrinterPreset %s/%s: \"\n", preset_name, localized_name);
|
||||
+ pwg_ppdize_name(preset_name, ppdname, sizeof(ppdname));
|
||||
+
|
||||
+ localized_name = lookup_option((char *)preset_name, opt_strings_catalog, printer_opt_strings_catalog);
|
||||
+ cupsFilePrintf(fp, "*APPrinterPreset %s: \"\n", ppdname);
|
||||
+ ppd_put_string(fp, lang, "APPrinterPreset", ppdname, localized_name);
|
||||
|
||||
for (member = ippFirstAttribute(preset); member; member = ippNextAttribute(preset))
|
||||
{
|
||||
@@ -3378,7 +3421,10 @@ ppdCreateFromIPP(char *buffer, /* I - Filename buffer */
|
||||
fin_col = ippGetCollection(member, i);
|
||||
|
||||
if ((keyword = ippGetString(ippFindAttribute(fin_col, "finishing-template", IPP_TAG_ZERO), 0, NULL)) != NULL)
|
||||
- cupsFilePrintf(fp, "*cupsFinishingTemplate %s\n", keyword);
|
||||
+ {
|
||||
+ pwg_ppdize_name(keyword, ppdname, sizeof(ppdname));
|
||||
+ cupsFilePrintf(fp, "*cupsFinishingTemplate %s\n", ppdname);
|
||||
+ }
|
||||
}
|
||||
}
|
||||
else if (!strcmp(member_name, "media"))
|
||||
@@ -3405,13 +3451,13 @@ ppdCreateFromIPP(char *buffer, /* I - Filename buffer */
|
||||
if ((keyword = ippGetString(ippFindAttribute(media_col, "media-source", IPP_TAG_ZERO), 0, NULL)) != NULL)
|
||||
{
|
||||
pwg_ppdize_name(keyword, ppdname, sizeof(ppdname));
|
||||
- cupsFilePrintf(fp, "*InputSlot %s\n", keyword);
|
||||
+ cupsFilePrintf(fp, "*InputSlot %s\n", ppdname);
|
||||
}
|
||||
|
||||
if ((keyword = ippGetString(ippFindAttribute(media_col, "media-type", IPP_TAG_ZERO), 0, NULL)) != NULL)
|
||||
{
|
||||
pwg_ppdize_name(keyword, ppdname, sizeof(ppdname));
|
||||
- cupsFilePrintf(fp, "*MediaType %s\n", keyword);
|
||||
+ cupsFilePrintf(fp, "*MediaType %s\n", ppdname);
|
||||
}
|
||||
}
|
||||
else if (!strcmp(member_name, "print-quality"))
|
||||
@@ -3670,18 +3716,29 @@ pwg_ppdize_name(const char *ipp, /* I - IPP keyword */
|
||||
char *ptr, /* Pointer into name buffer */
|
||||
*end; /* End of name buffer */
|
||||
|
||||
+ if (!ipp || !_cups_isalnum(*ipp))
|
||||
+ {
|
||||
+ *name = '\0';
|
||||
+ return;
|
||||
+ }
|
||||
|
||||
*name = (char)toupper(*ipp++);
|
||||
|
||||
for (ptr = name + 1, end = name + namesize - 1; *ipp && ptr < end;)
|
||||
{
|
||||
- if (*ipp == '-' && _cups_isalpha(ipp[1]))
|
||||
+ if (*ipp == '-' && isalnum(ipp[1]))
|
||||
{
|
||||
ipp ++;
|
||||
*ptr++ = (char)toupper(*ipp++ & 255);
|
||||
}
|
||||
- else
|
||||
+ else if (*ipp == '_' || *ipp == '.' || *ipp == '-' || isalnum(*ipp))
|
||||
+ {
|
||||
*ptr++ = *ipp++;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ ipp ++;
|
||||
+ }
|
||||
}
|
||||
|
||||
*ptr = '\0';
|
||||
@@ -3721,6 +3778,41 @@ pwg_ppdize_resolution(
|
||||
snprintf(name, namesize, "%dx%ddpi", *xres, *yres);
|
||||
}
|
||||
}
|
||||
+
|
||||
+
|
||||
+/*
|
||||
+ * 'ppd_put_strings()' - Write localization attributes to a PPD file.
|
||||
+ */
|
||||
+
|
||||
+static void
|
||||
+ppd_put_string(cups_file_t *fp, /* I - PPD file */
|
||||
+ cups_lang_t *lang, /* I - Language */
|
||||
+ const char *ppd_option,/* I - PPD option */
|
||||
+ const char *ppd_choice,/* I - PPD choice */
|
||||
+ const char *text) /* I - Localized text */
|
||||
+{
|
||||
+ if (!text)
|
||||
+ return;
|
||||
+
|
||||
+ // Add the first line of localized text...
|
||||
+#if CUPS_VERSION_MAJOR > 2
|
||||
+ cupsFilePrintf(fp, "*%s.%s %s/", cupsLangGetName(lang), ppd_option, ppd_choice);
|
||||
+#else
|
||||
+ cupsFilePrintf(fp, "*%s.%s %s/", lang->language, ppd_option, ppd_choice);
|
||||
+#endif // CUPS_VERSION_MAJOR > 2
|
||||
+
|
||||
+ while (*text && *text != '\n')
|
||||
+ {
|
||||
+ // Escape ":" and "<"...
|
||||
+ if (*text == ':' || *text == '<')
|
||||
+ cupsFilePrintf(fp, "<%02X>", *text);
|
||||
+ else
|
||||
+ cupsFilePutChar(fp, *text);
|
||||
+
|
||||
+ text ++;
|
||||
+ }
|
||||
+ cupsFilePuts(fp, ": \"\"\n");
|
||||
+}
|
||||
#endif /* HAVE_CUPS_1_6 */
|
||||
|
||||
/*
|
@ -1,172 +0,0 @@
|
||||
diff -up cups-filters-1.20.0/configure.ac.brftopagedbrf-install cups-filters-1.20.0/configure.ac
|
||||
--- cups-filters-1.20.0/configure.ac.brftopagedbrf-install 2018-01-29 19:14:59.000000000 +0100
|
||||
+++ cups-filters-1.20.0/configure.ac 2018-04-27 11:19:33.987213243 +0200
|
||||
@@ -856,6 +856,7 @@ AC_CONFIG_FILES([
|
||||
filter/braille/filters/cups-braille.sh
|
||||
filter/braille/filters/imagetobrf
|
||||
filter/braille/filters/texttobrf
|
||||
+ filter/braille/filters/brftopagedbrf
|
||||
filter/braille/filters/vectortopdf
|
||||
filter/braille/filters/vectortobrf
|
||||
filter/braille/filters/musicxmltobrf
|
||||
diff -up cups-filters-1.20.0/filter/braille/filters/brftopagedbrf.in.brftopagedbrf-install cups-filters-1.20.0/filter/braille/filters/brftopagedbrf.in
|
||||
--- cups-filters-1.20.0/filter/braille/filters/brftopagedbrf.in.brftopagedbrf-install 2018-04-27 11:19:41.038152279 +0200
|
||||
+++ cups-filters-1.20.0/filter/braille/filters/brftopagedbrf.in 2018-04-27 11:21:47.344068714 +0200
|
||||
@@ -0,0 +1,146 @@
|
||||
+#!/bin/bash
|
||||
+
|
||||
+#
|
||||
+# Copyright (c) 2015-2017 Samuel Thibault <samuel.thibault@ens-lyon.org>
|
||||
+#
|
||||
+# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
+# of this software and associated documentation files (the "Software"), to deal
|
||||
+# in the Software without restriction, including without limitation the rights
|
||||
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
+# copies of the Software, and to permit persons to whom the Software is
|
||||
+# furnished to do so, subject to the following conditions:
|
||||
+#
|
||||
+#
|
||||
+# The above copyright notice and this permission notice shall be included in
|
||||
+# all copies or substantial portions of the Software.
|
||||
+#
|
||||
+#
|
||||
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
+# THE SOFTWARE.
|
||||
+#
|
||||
+
|
||||
+# Make sure we have enough options
|
||||
+if [ $# != 5 -a $# != 6 ]; then
|
||||
+ echo "ERROR: $0 jobid user name nb options [filename]" >&2
|
||||
+ exit 1
|
||||
+fi
|
||||
+
|
||||
+NB=$4
|
||||
+OPTIONS=$5
|
||||
+FILE=$6
|
||||
+
|
||||
+. @CUPS_DATADIR@/braille/cups-braille.sh
|
||||
+
|
||||
+shopt -s extglob
|
||||
+
|
||||
+# Construct list of pages from PAGERANGES
|
||||
+
|
||||
+PAGES=" " # Explicit list of pages
|
||||
+AFTER= # All pages including and after this
|
||||
+BEFORE= # All pages before and including this
|
||||
+
|
||||
+[ -n "$PAGERANGES" ] || PAGERANGES="1-"
|
||||
+
|
||||
+while [ -n "${PAGERANGES}" ]
|
||||
+do
|
||||
+ PAGERANGE=${PAGERANGES/,*}
|
||||
+ PAGERANGE=${PAGERANGE%%*( )}
|
||||
+ PAGERANGE=${PAGERANGE##*( )}
|
||||
+ if [ -n "${PAGERANGES/*,*}" ]
|
||||
+ then
|
||||
+ # last range
|
||||
+ PAGERANGES=""
|
||||
+ else
|
||||
+ # Remove leading range
|
||||
+ PAGERANGES="${PAGERANGES#*,}"
|
||||
+ fi
|
||||
+
|
||||
+ if [ -n "${PAGERANGE/*-*}" ]
|
||||
+ then
|
||||
+ # single-page
|
||||
+ PAGES="$PAGES$PAGERANGE "
|
||||
+
|
||||
+ elif [ -z "${PAGERANGE%%*-}" ]
|
||||
+ then
|
||||
+ # To the end
|
||||
+ FIRST=${PAGERANGE%%-*}
|
||||
+ if [ -z "$AFTER" ] || [ "$FIRST" -lt "$AFTER" ]
|
||||
+ then
|
||||
+ AFTER="$FIRST"
|
||||
+ fi
|
||||
+
|
||||
+ elif [ -z "${PAGERANGE##-*}" ]
|
||||
+ then
|
||||
+ # From the beginning
|
||||
+ LAST=${PAGERANGE##*-}
|
||||
+ if [ -z "$BEFORE" ] || [ "$LAST" -gt "$BEFORE" ]
|
||||
+ then
|
||||
+ BEFORE="$LAST"
|
||||
+ fi
|
||||
+
|
||||
+ else
|
||||
+ # page range
|
||||
+ FIRST=${PAGERANGE/-*}
|
||||
+ LAST=${PAGERANGE/*-}
|
||||
+ PAGES="$PAGES$(seq "$FIRST" "$LAST" | tr $'\012' ' ')"
|
||||
+
|
||||
+ fi
|
||||
+done
|
||||
+
|
||||
+# Determine whether to print this page
|
||||
+doprint() {
|
||||
+ PAGE="$1"
|
||||
+ if [ -n "$BEFORE" ] && [ "$PAGE" -le "$BEFORE" ]
|
||||
+ then
|
||||
+ echo 1
|
||||
+ return
|
||||
+ elif [ -n "$AFTER" ] && [ "$PAGE" -ge "$AFTER" ]
|
||||
+ then
|
||||
+ echo 1
|
||||
+ return
|
||||
+ fi
|
||||
+ case "$PAGES" in
|
||||
+ *\ $PAGE\ *)
|
||||
+ echo 1
|
||||
+ return
|
||||
+ ;;
|
||||
+ esac
|
||||
+ echo 0
|
||||
+}
|
||||
+
|
||||
+if [ -z "$FILE" ]
|
||||
+then
|
||||
+ cat
|
||||
+else
|
||||
+ cat "$FILE"
|
||||
+fi | (
|
||||
+ P=1
|
||||
+ DOPRINT=$(doprint $P)
|
||||
+ while IFS=$'\n' read -r LINE
|
||||
+ do
|
||||
+ while [ -z "${LINE/*$'\014'*}" ]
|
||||
+ do
|
||||
+ # Possibly print before FF
|
||||
+ HEAD=${LINE%%$'\014'*}
|
||||
+ [ $DOPRINT == 0 ] || printf %s "$HEAD"$'\014'
|
||||
+
|
||||
+ # Next page
|
||||
+ P=$(($P + 1))
|
||||
+ DOPRINT=$(doprint $P)
|
||||
+
|
||||
+ # Drop head of line
|
||||
+ LINE=${LINE#*$'\014'}
|
||||
+ done
|
||||
+
|
||||
+ # Remainder of line
|
||||
+ [ $DOPRINT == 0 ] || printf "%s\n" "$LINE"
|
||||
+ done
|
||||
+)
|
||||
+
|
||||
+echo "INFO: Ready" >&2
|
||||
+exit 0
|
||||
diff -up cups-filters-1.20.0/Makefile.am.brftopagedbrf-install cups-filters-1.20.0/Makefile.am
|
||||
--- cups-filters-1.20.0/Makefile.am.brftopagedbrf-install 2017-12-15 02:15:32.000000000 +0100
|
||||
+++ cups-filters-1.20.0/Makefile.am 2018-04-27 11:19:33.987213243 +0200
|
||||
@@ -591,6 +591,7 @@ nodist_pkgfilter_SCRIPTS = \
|
||||
filter/braille/filters/vectortopdf \
|
||||
filter/braille/filters/vectortobrf \
|
||||
filter/braille/filters/texttobrf \
|
||||
+ filter/braille/filters/brftopagedbrf \
|
||||
filter/braille/filters/musicxmltobrf
|
||||
endif
|
||||
|
@ -1,11 +0,0 @@
|
||||
diff -up cups-filters-1.20.3/filter/foomatic-rip/foomaticrip.c.cleareof cups-filters-1.20.3/filter/foomatic-rip/foomaticrip.c
|
||||
--- cups-filters-1.20.3/filter/foomatic-rip/foomaticrip.c.cleareof 2018-09-21 13:38:05.882666106 +0200
|
||||
+++ cups-filters-1.20.3/filter/foomatic-rip/foomaticrip.c 2018-09-21 13:38:55.330277816 +0200
|
||||
@@ -663,6 +663,7 @@ int print_file(const char *filename, int
|
||||
rip_die(EXIT_PRNERR_NORETRY_BAD_SETTINGS,
|
||||
"Couldn't dup stdout of pdf-to-ps\n");
|
||||
|
||||
+ clearerr(stdin);
|
||||
ret = print_file("<STDIN>", 0);
|
||||
|
||||
wait_for_process(renderer_pid);
|
@ -1,678 +0,0 @@
|
||||
diff --git a/backend/beh.c b/backend/beh.c
|
||||
index 9ba6613..7514e33 100644
|
||||
--- a/backend/beh.c
|
||||
+++ b/backend/beh.c
|
||||
@@ -223,6 +223,8 @@ call_backend(char *uri, /* I - URI of final destination */
|
||||
*/
|
||||
|
||||
strncpy(scheme, uri, sizeof(scheme));
|
||||
+ if (strlen(uri) > 1023)
|
||||
+ scheme[1023] = '\0';
|
||||
if ((ptr = strchr(scheme, ':')) != NULL)
|
||||
*ptr = '\0';
|
||||
|
||||
diff --git a/backend/implicitclass.c b/backend/implicitclass.c
|
||||
index 3ce4d10..1593191 100644
|
||||
--- a/backend/implicitclass.c
|
||||
+++ b/backend/implicitclass.c
|
||||
@@ -104,6 +104,8 @@ main(int argc, /* I - Number of command-line args */
|
||||
}
|
||||
ptr1 ++;
|
||||
strncpy(queue_name, ptr1, sizeof(queue_name));
|
||||
+ if (strlen(ptr1) > 1023)
|
||||
+ queue_name[1023] = '\0';
|
||||
httpAssembleURIf(HTTP_URI_CODING_ALL, uri, sizeof(uri), "ipp", NULL,
|
||||
"localhost", ippPort(), "/printers/%s", queue_name);
|
||||
job_id = argv[1];
|
||||
@@ -162,6 +164,8 @@ main(int argc, /* I - Number of command-line args */
|
||||
/* Read destination host name (or message) and check whether it is
|
||||
complete (second double quote) */
|
||||
strncpy(dest_host, ptr1, sizeof(dest_host));
|
||||
+ if (strlen(ptr1) > 1023)
|
||||
+ dest_host[1023] = '\0';
|
||||
ptr1 = dest_host;
|
||||
if ((ptr2 = strchr(ptr1, '"')) != NULL) {
|
||||
*ptr2 = '\0';
|
||||
diff --git a/cupsfilters/colormanager.c b/cupsfilters/colormanager.c
|
||||
index 70074a3..a4a929d 100644
|
||||
--- a/cupsfilters/colormanager.c
|
||||
+++ b/cupsfilters/colormanager.c
|
||||
@@ -272,6 +272,9 @@ _get_colord_profile(const char *printer_name, /* Dest name */
|
||||
free(qualifier);
|
||||
}
|
||||
|
||||
+ if (icc_profile != NULL)
|
||||
+ free(icc_profile);
|
||||
+
|
||||
return is_profile_set;
|
||||
|
||||
}
|
||||
@@ -325,8 +328,11 @@ _get_ppd_icc_fallback (ppd_file_t *ppd, char **qualifier)
|
||||
if (attr->value[0] != '/')
|
||||
snprintf(full_path, sizeof(full_path),
|
||||
"%s/profiles/%s", CUPSDATA, attr->value);
|
||||
- else
|
||||
+ else {
|
||||
strncpy(full_path, attr->value, sizeof(full_path));
|
||||
+ if (strlen(attr->value) > 1023)
|
||||
+ full_path[1023] = '\0';
|
||||
+ }
|
||||
|
||||
/* check the file exists */
|
||||
if (access(full_path, 0)) {
|
||||
diff --git a/cupsfilters/image-sgilib.c b/cupsfilters/image-sgilib.c
|
||||
index 0b70c13..bf2dd80 100644
|
||||
--- a/cupsfilters/image-sgilib.c
|
||||
+++ b/cupsfilters/image-sgilib.c
|
||||
@@ -282,7 +282,7 @@ sgiOpenFile(FILE *file, /* I - File to open */
|
||||
sgip->mode = SGI_WRITE;
|
||||
|
||||
putshort(SGI_MAGIC, sgip->file);
|
||||
- putc((sgip->comp = comp) != 0, sgip->file);
|
||||
+ putc(((sgip->comp = comp) != 0) ? '1': '0', sgip->file);
|
||||
putc(sgip->bpp = bpp, sgip->file);
|
||||
putshort(3, sgip->file); /* Dimensions */
|
||||
putshort(sgip->xsize = xsize, sgip->file);
|
||||
diff --git a/cupsfilters/image-sun.c b/cupsfilters/image-sun.c
|
||||
index 609b194..989d039 100644
|
||||
--- a/cupsfilters/image-sun.c
|
||||
+++ b/cupsfilters/image-sun.c
|
||||
@@ -114,6 +114,7 @@ _cupsImageReadSunRaster(
|
||||
ras_depth == 0 || ras_depth > 32)
|
||||
{
|
||||
fputs("DEBUG: Raster image cannot be loaded!\n", stderr);
|
||||
+ fclose(fp);
|
||||
return (1);
|
||||
}
|
||||
|
||||
diff --git a/cupsfilters/ppdgenerator.c b/cupsfilters/ppdgenerator.c
|
||||
index 052e3c5..3bc4d8a 100644
|
||||
--- a/cupsfilters/ppdgenerator.c
|
||||
+++ b/cupsfilters/ppdgenerator.c
|
||||
@@ -937,6 +937,10 @@ load_opt_strings_catalog(const char *location, cups_array_t *options)
|
||||
}
|
||||
}
|
||||
cupsFileClose(fp);
|
||||
+ if (choice_name != NULL)
|
||||
+ free(choice_name);
|
||||
+ if (opt_name != NULL)
|
||||
+ free(opt_name);
|
||||
if (filename == tmpfile)
|
||||
unlink(filename);
|
||||
}
|
||||
diff --git a/cupsfilters/raster.c b/cupsfilters/raster.c
|
||||
index 8203690..67d6b9b 100644
|
||||
--- a/cupsfilters/raster.c
|
||||
+++ b/cupsfilters/raster.c
|
||||
@@ -151,11 +151,14 @@ cupsRasterParseIPPOptions(cups_page_header2_t *h, /* I - Raster header */
|
||||
strcasestr(s, "right") ||
|
||||
strcasestr(s, "side") ||
|
||||
strcasestr(s, "main"))
|
||||
- media_source = strdup(s);
|
||||
+ {
|
||||
+ if (media_source == NULL)
|
||||
+ media_source = strdup(s);
|
||||
+ }
|
||||
else
|
||||
media_type = strdup(s);
|
||||
}
|
||||
- if (size_found)
|
||||
+ if (page_size == NULL && size_found)
|
||||
page_size = strdup(size_found->pwg);
|
||||
}
|
||||
}
|
||||
@@ -1079,6 +1082,13 @@ cupsRasterParseIPPOptions(cups_page_header2_t *h, /* I - Raster header */
|
||||
h->cupsRenderingIntent[0] = '\0';
|
||||
#endif /* HAVE_CUPS_1_7 */
|
||||
|
||||
+ if (media_source != NULL)
|
||||
+ free(media_source);
|
||||
+ if (media_type != NULL)
|
||||
+ free(media_type);
|
||||
+ if (page_size != NULL)
|
||||
+ free(page_size);
|
||||
+
|
||||
return (0);
|
||||
}
|
||||
|
||||
diff --git a/filter/bannertopdf.c b/filter/bannertopdf.c
|
||||
index b78ea37..2b9bd76 100644
|
||||
--- a/filter/bannertopdf.c
|
||||
+++ b/filter/bannertopdf.c
|
||||
@@ -513,6 +513,15 @@ static int generate_banner_pdf(banner_t *banner,
|
||||
pdf_duplicate_page(doc, 1, copies);
|
||||
|
||||
pdf_write(doc, stdout);
|
||||
+
|
||||
+ opt_t * opt_current = known_opts;
|
||||
+ opt_t * opt_next = NULL;
|
||||
+ while (opt_current != NULL)
|
||||
+ {
|
||||
+ opt_next = opt_current->next;
|
||||
+ free(opt_current);
|
||||
+ opt_current = opt_next;
|
||||
+ }
|
||||
free(buf);
|
||||
pdf_free(doc);
|
||||
return 0;
|
||||
diff --git a/filter/foomatic-rip/foomaticrip.c b/filter/foomatic-rip/foomaticrip.c
|
||||
index 2a642ed..13d2035 100644
|
||||
--- a/filter/foomatic-rip/foomaticrip.c
|
||||
+++ b/filter/foomatic-rip/foomaticrip.c
|
||||
@@ -666,6 +666,11 @@ int print_file(const char *filename, int convert)
|
||||
ret = print_file("<STDIN>", 0);
|
||||
|
||||
wait_for_process(renderer_pid);
|
||||
+ if (in != NULL)
|
||||
+ fclose(in);
|
||||
+ if (out != NULL)
|
||||
+ fclose(out);
|
||||
+
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -683,6 +688,8 @@ int print_file(const char *filename, int convert)
|
||||
|
||||
case UNKNOWN_FILE:
|
||||
_log("Cannot process \"%s\": Unknown filetype.\n", filename);
|
||||
+ if (file != NULL)
|
||||
+ fclose(file);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -811,10 +818,14 @@ int main(int argc, char** argv)
|
||||
|
||||
if (getenv("PPD")) {
|
||||
strncpy(job->ppdfile, getenv("PPD"), 2048);
|
||||
+ if (strlen(getenv("PPD")) > 2047)
|
||||
+ job->ppdfile[2047] = '\0';
|
||||
spooler = SPOOLER_CUPS;
|
||||
- if (getenv("CUPS_SERVERBIN"))
|
||||
- strncpy(cupsfilterpath, getenv("CUPS_SERVERBIN"),
|
||||
- sizeof(cupsfilterpath));
|
||||
+ if (getenv("CUPS_SERVERBIN")) {
|
||||
+ strncpy(cupsfilterpath, getenv("CUPS_SERVERBIN"), sizeof(cupsfilterpath));
|
||||
+ if (strlen(getenv("CUPS_SERVERBIN")) > PATH_MAX-1)
|
||||
+ cupsfilterpath[PATH_MAX-1] = '\0';
|
||||
+ }
|
||||
}
|
||||
|
||||
/* Check status of printer color management from the color manager */
|
||||
@@ -834,10 +845,14 @@ int main(int argc, char** argv)
|
||||
allow duplicates, and use the last specified one */
|
||||
while ((str = arglist_get_value(arglist, "-p"))) {
|
||||
strncpy(job->ppdfile, str, 2048);
|
||||
+ if (strlen(str) > 2047)
|
||||
+ job->ppdfile[2047] = '\0';
|
||||
arglist_remove(arglist, "-p");
|
||||
}
|
||||
while ((str = arglist_get_value(arglist, "--ppd"))) {
|
||||
strncpy(job->ppdfile, str, 2048);
|
||||
+ if (strlen(str) > 2047)
|
||||
+ job->ppdfile[2047] = '\0';
|
||||
arglist_remove(arglist, "--ppd");
|
||||
}
|
||||
|
||||
@@ -1020,6 +1035,7 @@ int main(int argc, char** argv)
|
||||
cmd[0] = '\0';
|
||||
|
||||
snprintf(gstoraster, sizeof(gstoraster), "gs -dQUIET -dDEBUG -dPARANOIDSAFER -dNOPAUSE -dBATCH -dNOINTERPOLATE -dNOMEDIAATTRS -sDEVICE=cups -dShowAcroForm %s -sOutputFile=- -", cmd);
|
||||
+ free(icc_profile);
|
||||
}
|
||||
|
||||
/* build Ghostscript/CUPS driver command line */
|
||||
diff --git a/filter/foomatic-rip/options.c b/filter/foomatic-rip/options.c
|
||||
index 325a0a6..798ddf9 100644
|
||||
--- a/filter/foomatic-rip/options.c
|
||||
+++ b/filter/foomatic-rip/options.c
|
||||
@@ -1031,12 +1031,10 @@ int option_set_value(option_t *opt, int optionset, const char *value)
|
||||
/* TODO only set the changed option, not all of them */
|
||||
choice = option_find_choice(fromopt,
|
||||
option_get_value(fromopt, optionset));
|
||||
-
|
||||
composite_set_values(fromopt, optionset, choice->command);
|
||||
- }
|
||||
- else {
|
||||
+ free(newvalue);
|
||||
+ } else
|
||||
val->value = newvalue;
|
||||
- }
|
||||
|
||||
if (option_is_composite(opt)) {
|
||||
/* set dependent values */
|
||||
@@ -1914,6 +1912,8 @@ int ppd_supports_pdf()
|
||||
if (startswith(cmd, "gs"))
|
||||
{
|
||||
strncpy(cmd_pdf, cmd, 4096);
|
||||
+ if (strlen(cmd) > 4095)
|
||||
+ cmd_pdf[4095] = '\0';
|
||||
return 1;
|
||||
}
|
||||
|
||||
diff --git a/filter/foomatic-rip/spooler.c b/filter/foomatic-rip/spooler.c
|
||||
index 236551f..4f27563 100644
|
||||
--- a/filter/foomatic-rip/spooler.c
|
||||
+++ b/filter/foomatic-rip/spooler.c
|
||||
@@ -94,6 +94,8 @@ void init_cups(list_t *arglist, dstr_t *filelist, jobparams_t *job)
|
||||
CUPS puts the print queue name into the PRINTER environment variable
|
||||
when calling filters. */
|
||||
strncpy(job->printer, getenv("PRINTER"), 256);
|
||||
+ if (strlen(getenv("PRINTER")) > 255)
|
||||
+ job->printer[255] = '\0';
|
||||
|
||||
free(cups_options);
|
||||
}
|
||||
diff --git a/filter/pdftops.c b/filter/pdftops.c
|
||||
index 55d2ec1..a648444 100644
|
||||
--- a/filter/pdftops.c
|
||||
+++ b/filter/pdftops.c
|
||||
@@ -427,6 +427,8 @@ main(int argc, /* I - Number of command-line args */
|
||||
if ((val = cupsGetOption("make-and-model", num_options, options)) != NULL)
|
||||
{
|
||||
strncpy(make_model, val, sizeof(make_model));
|
||||
+ if (strlen(val) > 127)
|
||||
+ make_model[127] = '\0';
|
||||
for (ptr = make_model; *ptr; ptr ++)
|
||||
if (*ptr == '-') *ptr = ' ';
|
||||
}
|
||||
diff --git a/filter/pdftoraster.cxx b/filter/pdftoraster.cxx
|
||||
index 4cd656a..0c63ab8 100644
|
||||
--- a/filter/pdftoraster.cxx
|
||||
+++ b/filter/pdftoraster.cxx
|
||||
@@ -558,8 +558,10 @@ static void parseOpts(int argc, char **argv)
|
||||
if (!cm_disabled)
|
||||
cmGetPrinterIccProfile(getenv("PRINTER"), &profile, ppd);
|
||||
|
||||
- if (profile != NULL)
|
||||
- colorProfile = cmsOpenProfileFromFile(profile,"r");
|
||||
+ if (profile != NULL) {
|
||||
+ colorProfile = cmsOpenProfileFromFile(profile,"r");
|
||||
+ free(profile);
|
||||
+ }
|
||||
|
||||
#ifdef HAVE_CUPS_1_7
|
||||
if ((attr = ppdFindAttr(ppd,"PWGRaster",0)) != 0 &&
|
||||
diff --git a/filter/rastertoescpx.c b/filter/rastertoescpx.c
|
||||
index 5a3e5df..a0ec416 100644
|
||||
--- a/filter/rastertoescpx.c
|
||||
+++ b/filter/rastertoescpx.c
|
||||
@@ -1141,7 +1141,10 @@ EndPage(ppd_file_t *ppd, /* I - PPD file */
|
||||
}
|
||||
}
|
||||
else
|
||||
+ {
|
||||
free(DotBuffers[0]);
|
||||
+ DotBuffers[0] = NULL;
|
||||
+ }
|
||||
|
||||
/*
|
||||
* Output a page eject sequence...
|
||||
@@ -1440,7 +1443,7 @@ CompressData(ppd_file_t *ppd, /* I - PPD file information */
|
||||
|
||||
printf("\033i");
|
||||
putchar(ctable[PrinterPlanes - 1][plane]);
|
||||
- putchar(type != 0);
|
||||
+ putchar((type != 0) ? '1': '0');
|
||||
putchar(BitPlanes);
|
||||
putchar(bytes & 255);
|
||||
putchar(bytes >> 8);
|
||||
@@ -1470,7 +1473,7 @@ CompressData(ppd_file_t *ppd, /* I - PPD file information */
|
||||
bytes *= 8;
|
||||
|
||||
printf("\033.");
|
||||
- putchar(type != 0);
|
||||
+ putchar((type != 0) ? '1': '0');
|
||||
putchar(ystep);
|
||||
putchar(xstep);
|
||||
putchar(rows);
|
||||
@@ -1907,6 +1910,10 @@ main(int argc, /* I - Number of command-line arguments */
|
||||
if (fd != 0)
|
||||
close(fd);
|
||||
|
||||
+ for (int i = 0; i < 7; i++)
|
||||
+ if (DotBuffers[i] != NULL)
|
||||
+ free(DotBuffers[i]);
|
||||
+
|
||||
return (page == 0);
|
||||
}
|
||||
|
||||
diff --git a/filter/rastertops.c b/filter/rastertops.c
|
||||
index d5d955b..531eb70 100644
|
||||
--- a/filter/rastertops.c
|
||||
+++ b/filter/rastertops.c
|
||||
@@ -282,6 +282,8 @@ write_flate(cups_raster_t *ras, /* I - Image data */
|
||||
if (fwrite(out, 1, have, stdout) != have)
|
||||
{
|
||||
(void)deflateEnd(&strm);
|
||||
+ if (convertedpix != NULL)
|
||||
+ free(convertedpix);
|
||||
return Z_ERRNO;
|
||||
}
|
||||
} while (strm.avail_out == 0);
|
||||
diff --git a/filter/sys5ippprinter.c b/filter/sys5ippprinter.c
|
||||
index ad75551..9a92c8e 100644
|
||||
--- a/filter/sys5ippprinter.c
|
||||
+++ b/filter/sys5ippprinter.c
|
||||
@@ -570,6 +570,8 @@ exec_filter(const char *filter, /* I - Filter to execute */
|
||||
dup2(fd, 2);
|
||||
close(fd);
|
||||
}
|
||||
+ else
|
||||
+ close(fd);
|
||||
fcntl(2, F_SETFL, O_NDELAY);
|
||||
}
|
||||
|
||||
@@ -578,6 +580,8 @@ exec_filter(const char *filter, /* I - Filter to execute */
|
||||
dup2(fd, 3);
|
||||
close(fd);
|
||||
}
|
||||
+ else
|
||||
+ close(fd);
|
||||
fcntl(3, F_SETFL, O_NDELAY);
|
||||
|
||||
if ((fd = open("/dev/null", O_RDWR)) > 4)
|
||||
@@ -585,6 +589,8 @@ exec_filter(const char *filter, /* I - Filter to execute */
|
||||
dup2(fd, 4);
|
||||
close(fd);
|
||||
}
|
||||
+ else
|
||||
+ close(fd);
|
||||
fcntl(4, F_SETFL, O_NDELAY);
|
||||
|
||||
/*
|
||||
@@ -654,8 +660,11 @@ exec_filters(cups_array_t *filters, /* I - Array of filters to run */
|
||||
{
|
||||
next = (char *)cupsArrayNext(filters);
|
||||
|
||||
- if (filter[0] == '/')
|
||||
+ if (filter[0] == '/') {
|
||||
strncpy(program, filter, sizeof(program));
|
||||
+ if (strlen(filter) > 1023)
|
||||
+ program[1023] = '\0';
|
||||
+ }
|
||||
else
|
||||
{
|
||||
if ((cups_serverbin = getenv("CUPS_SERVERBIN")) == NULL)
|
||||
diff --git a/utils/cups-browsed.c b/utils/cups-browsed.c
|
||||
index a2a4a08..19a2ac8 100644
|
||||
--- a/utils/cups-browsed.c
|
||||
+++ b/utils/cups-browsed.c
|
||||
@@ -2245,7 +2245,10 @@ is_disabled(const char *printer, const char *reason) {
|
||||
pstate = (ipp_pstate_t)ippGetInteger(attr, 0);
|
||||
else if (!strcmp(ippGetName(attr), "printer-state-message") &&
|
||||
ippGetValueTag(attr) == IPP_TAG_TEXT) {
|
||||
- free(pstatemsg);
|
||||
+ if (pstatemsg != NULL) {
|
||||
+ free(pstatemsg);
|
||||
+ pstatemsg = NULL;
|
||||
+ }
|
||||
p = ippGetString(attr, 0, NULL);
|
||||
if (p != NULL) pstatemsg = strdup(p);
|
||||
}
|
||||
@@ -2262,16 +2265,22 @@ is_disabled(const char *printer, const char *reason) {
|
||||
case IPP_PRINTER_IDLE:
|
||||
case IPP_PRINTER_PROCESSING:
|
||||
ippDelete(response);
|
||||
- free(pstatemsg);
|
||||
+ if (pstatemsg != NULL) {
|
||||
+ free(pstatemsg);
|
||||
+ pstatemsg = NULL;
|
||||
+ }
|
||||
return NULL;
|
||||
case IPP_PRINTER_STOPPED:
|
||||
ippDelete(response);
|
||||
if (reason == NULL)
|
||||
return pstatemsg;
|
||||
- else if (strcasestr(pstatemsg, reason) != NULL)
|
||||
+ else if (pstatemsg != NULL && (strcasestr(pstatemsg, reason) != NULL))
|
||||
return pstatemsg;
|
||||
else {
|
||||
- free(pstatemsg);
|
||||
+ if (pstatemsg != NULL) {
|
||||
+ free(pstatemsg);
|
||||
+ pstatemsg = NULL;
|
||||
+ }
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
@@ -2280,12 +2289,18 @@ is_disabled(const char *printer, const char *reason) {
|
||||
debug_printf("No information regarding enabled/disabled found about the requested printer '%s'\n",
|
||||
printer);
|
||||
ippDelete(response);
|
||||
- free(pstatemsg);
|
||||
+ if (pstatemsg != NULL) {
|
||||
+ free(pstatemsg);
|
||||
+ pstatemsg = NULL;
|
||||
+ }
|
||||
return NULL;
|
||||
}
|
||||
debug_printf("ERROR: Request for printer info failed: %s\n",
|
||||
cupsLastErrorString());
|
||||
- free(pstatemsg);
|
||||
+ if (pstatemsg != NULL) {
|
||||
+ free(pstatemsg);
|
||||
+ pstatemsg = NULL;
|
||||
+ }
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -3040,6 +3055,8 @@ on_printer_state_changed (CupsNotifier *object,
|
||||
dest_host = p->ip ? p->ip : p->host;
|
||||
dest_port = p->port;
|
||||
strncpy(dest_name, remote_cups_queue, sizeof(dest_name));
|
||||
+ if (strlen(remote_cups_queue) > 1023)
|
||||
+ dest_name[1023] = '\0';
|
||||
dest_index = i;
|
||||
debug_printf("Printer %s on host %s, port %d is idle, take this as destination and stop searching.\n",
|
||||
remote_cups_queue, p->host, p->port);
|
||||
@@ -3056,8 +3073,9 @@ on_printer_state_changed (CupsNotifier *object,
|
||||
min_jobs = num_jobs;
|
||||
dest_host = p->ip ? p->ip : p->host;
|
||||
dest_port = p->port;
|
||||
- strncpy(dest_name, remote_cups_queue,
|
||||
- sizeof(dest_name));
|
||||
+ strncpy(dest_name, remote_cups_queue, sizeof(dest_name));
|
||||
+ if (strlen(remote_cups_queue) > 1023)
|
||||
+ dest_name[1023] = '\0';
|
||||
dest_index = i;
|
||||
}
|
||||
debug_printf("Printer %s on host %s, port %d is printing and it has %d jobs.\n",
|
||||
@@ -3566,8 +3584,9 @@ create_remote_printer_entry (const char *queue_name,
|
||||
IPP_TAG_KEYWORD)) != NULL) {
|
||||
debug_printf(" Attr: %s\n", ippGetName(attr));
|
||||
for (i = 0; i < ippGetCount(attr); i ++) {
|
||||
- strncpy(valuebuffer, ippGetString(attr, i, NULL),
|
||||
- sizeof(valuebuffer));
|
||||
+ strncpy(valuebuffer, ippGetString(attr, i, NULL), sizeof(valuebuffer));
|
||||
+ if (strlen(ippGetString(attr, i, NULL)) > 65535)
|
||||
+ valuebuffer[65535] = '\0';
|
||||
debug_printf(" Keyword: %s\n", valuebuffer);
|
||||
if (valuebuffer[0] > '1')
|
||||
break;
|
||||
@@ -3598,8 +3617,9 @@ create_remote_printer_entry (const char *queue_name,
|
||||
debug_printf(" Value: %s\n", valuebuffer);
|
||||
if (valuebuffer[0] == '\0') {
|
||||
for (i = 0; i < ippGetCount(attr); i ++) {
|
||||
- strncpy(valuebuffer, ippGetString(attr, i, NULL),
|
||||
- sizeof(valuebuffer));
|
||||
+ strncpy(valuebuffer, ippGetString(attr, i, NULL), sizeof(valuebuffer));
|
||||
+ if (strlen(ippGetString(attr, i, NULL)) > 65535)
|
||||
+ valuebuffer[65535] = '\0';
|
||||
debug_printf(" Keyword: %s\n", valuebuffer);
|
||||
if (valuebuffer[0] != '\0')
|
||||
break;
|
||||
@@ -3629,8 +3649,9 @@ create_remote_printer_entry (const char *queue_name,
|
||||
debug_printf(" Value: %s\n", valuebuffer);
|
||||
if (valuebuffer[0] == '\0') {
|
||||
for (i = 0; i < ippGetCount(attr); i ++) {
|
||||
- strncpy(valuebuffer, ippGetString(attr, i, NULL),
|
||||
- sizeof(valuebuffer));
|
||||
+ strncpy(valuebuffer, ippGetString(attr, i, NULL), sizeof(valuebuffer));
|
||||
+ if (strlen(ippGetString(attr, i, NULL)) > 65535)
|
||||
+ valuebuffer[65535] = '\0';
|
||||
debug_printf(" Keyword: %s\n", valuebuffer);
|
||||
if (valuebuffer[0] != '\0')
|
||||
break;
|
||||
@@ -3663,8 +3684,9 @@ create_remote_printer_entry (const char *queue_name,
|
||||
debug_printf(" Value: %s\n", p->queue_name, valuebuffer);
|
||||
if (valuebuffer[0] == '\0') {
|
||||
for (i = 0; i < ippGetCount(attr); i ++) {
|
||||
- strncpy(valuebuffer, ippGetString(attr, i, NULL),
|
||||
- sizeof(valuebuffer));
|
||||
+ strncpy(valuebuffer, ippGetString(attr, i, NULL), sizeof(valuebuffer));
|
||||
+ if (strlen(ippGetString(attr, i, NULL)) > 65535)
|
||||
+ valuebuffer[65535] = '\0';
|
||||
debug_printf(" Keyword: %s\n", valuebuffer);
|
||||
if (valuebuffer[0] != '\0')
|
||||
break;
|
||||
@@ -4498,6 +4520,8 @@ gboolean update_cups_queues(gpointer unused) {
|
||||
} else {
|
||||
/* Device URI: ipp(s)://<remote host>:631/printers/<remote queue> */
|
||||
strncpy(device_uri, p->uri, sizeof(device_uri));
|
||||
+ if (strlen(p->uri) > HTTP_MAX_URI-1)
|
||||
+ device_uri[HTTP_MAX_URI-1] = '\0';
|
||||
debug_printf("Print queue %s is for an IPP network printer, or we do not get notifications from CUPS, using direct device URI %s\n",
|
||||
p->queue_name, device_uri);
|
||||
}
|
||||
@@ -4606,6 +4630,8 @@ gboolean update_cups_queues(gpointer unused) {
|
||||
} else if (!strncmp(line, "*Default", 8)) {
|
||||
cont_line_read = 0;
|
||||
strncpy(keyword, line + 8, sizeof(keyword));
|
||||
+ if ((strlen(line) + 8) > 1023)
|
||||
+ keyword[1023] = '\0';
|
||||
for (keyptr = keyword; *keyptr; keyptr ++)
|
||||
if (*keyptr == ':' || isspace(*keyptr & 255))
|
||||
break;
|
||||
@@ -7144,7 +7170,7 @@ read_configuration (const char *filename)
|
||||
in the configuration file is used. */
|
||||
while ((i < cupsArrayCount(command_line_config) &&
|
||||
(value = cupsArrayIndex(command_line_config, i++)) &&
|
||||
- strncpy(line, value, sizeof(line))) ||
|
||||
+ strncpy(line, value, sizeof(line)) && ((strlen(value) > HTTP_MAX_BUFFER-1)? line[HTTP_MAX_BUFFER-1] = '\0': 1)) ||
|
||||
cupsFileGetConf(fp, line, sizeof(line), &value, &linenum)) {
|
||||
if (linenum < 0) {
|
||||
/* We are still reading options from the command line ("-o ..."),
|
||||
@@ -7371,6 +7397,7 @@ read_configuration (const char *filename)
|
||||
if (filter->cregexp)
|
||||
regfree(filter->cregexp);
|
||||
free(filter);
|
||||
+ filter = NULL;
|
||||
}
|
||||
} else if ((!strcasecmp(line, "BrowseInterval") || !strcasecmp(line, "BrowseTimeout")) && value) {
|
||||
int t = atoi(value);
|
||||
@@ -7386,8 +7413,11 @@ read_configuration (const char *filename)
|
||||
debug_printf("Invalid %s value: %d\n",
|
||||
line, t);
|
||||
} else if (!strcasecmp(line, "DomainSocket") && value) {
|
||||
- if (value[0] != '\0')
|
||||
+ if (value[0] != '\0') {
|
||||
+ if (DomainSocket != NULL)
|
||||
+ free(DomainSocket);
|
||||
DomainSocket = strdup(value);
|
||||
+ }
|
||||
} else if ((!strcasecmp(line, "HttpLocalTimeout") || !strcasecmp(line, "HttpRemoteTimeout")) && value) {
|
||||
int t = atoi(value);
|
||||
if (t >= 0) {
|
||||
@@ -7555,6 +7585,10 @@ read_configuration (const char *filename)
|
||||
}
|
||||
}
|
||||
cupsArrayAdd (clusters, cluster);
|
||||
+ if (start != NULL) {
|
||||
+ free(start);
|
||||
+ start = NULL;
|
||||
+ }
|
||||
continue;
|
||||
cluster_fail:
|
||||
if (cluster) {
|
||||
@@ -7568,6 +7602,11 @@ read_configuration (const char *filename)
|
||||
cupsArrayDelete (cluster->members);
|
||||
}
|
||||
free(cluster);
|
||||
+ cluster = NULL;
|
||||
+ }
|
||||
+ if (start != NULL) {
|
||||
+ free(start);
|
||||
+ start = NULL;
|
||||
}
|
||||
} else if (!strcasecmp(line, "LoadBalancing") && value) {
|
||||
if (!strncasecmp(value, "QueueOnClient", 13))
|
||||
@@ -7575,7 +7614,7 @@ read_configuration (const char *filename)
|
||||
else if (!strncasecmp(value, "QueueOnServers", 14))
|
||||
LoadBalancingType = QUEUE_ON_SERVERS;
|
||||
} else if (!strcasecmp(line, "DefaultOptions") && value) {
|
||||
- if (strlen(value) > 0)
|
||||
+ if (DefaultOptions == NULL && strlen(value) > 0)
|
||||
DefaultOptions = strdup(value);
|
||||
} else if (!strcasecmp(line, "AutoShutdown") && value) {
|
||||
char *p, *saveptr;
|
||||
@@ -7949,10 +7988,12 @@ int main(int argc, char*argv[]) {
|
||||
daemon, not with remote ones. */
|
||||
if (getenv("CUPS_SERVER") != NULL) {
|
||||
strncpy(local_server_str, getenv("CUPS_SERVER"), sizeof(local_server_str));
|
||||
+ if (strlen(getenv("CUPS_SERVER")) > 1023)
|
||||
+ local_server_str[1023] = '\0';
|
||||
} else {
|
||||
#ifdef CUPS_DEFAULT_DOMAINSOCKET
|
||||
if (DomainSocket == NULL)
|
||||
- DomainSocket = CUPS_DEFAULT_DOMAINSOCKET;
|
||||
+ DomainSocket = strdup(CUPS_DEFAULT_DOMAINSOCKET);
|
||||
#endif
|
||||
if (DomainSocket != NULL) {
|
||||
struct stat sockinfo; /* Domain socket information */
|
||||
@@ -8293,6 +8334,11 @@ fail:
|
||||
if (debug_logfile == 1)
|
||||
stop_debug_logging();
|
||||
|
||||
+ if (DefaultOptions != NULL)
|
||||
+ free(DefaultOptions);
|
||||
+ if (DomainSocket != NULL)
|
||||
+ free(DomainSocket);
|
||||
+
|
||||
return ret;
|
||||
|
||||
help:
|
||||
diff --git a/utils/driverless.c b/utils/driverless.c
|
||||
index 7fc6dae..fe61e58 100644
|
||||
--- a/utils/driverless.c
|
||||
+++ b/utils/driverless.c
|
||||
@@ -227,12 +227,16 @@ list_printers (int mode)
|
||||
|
||||
if (txt_usb_mfg[0] != '\0') {
|
||||
strncpy(make, txt_usb_mfg, sizeof(make));
|
||||
+ if (strlen(txt_usb_mfg) > 511)
|
||||
+ make[511] = '\0';
|
||||
ptr = device_id + strlen(device_id);
|
||||
snprintf(ptr, sizeof(device_id) - (size_t)(ptr - device_id),
|
||||
"MFG:%s;", txt_usb_mfg);
|
||||
}
|
||||
if (txt_usb_mdl[0] != '\0') {
|
||||
strncpy(model, txt_usb_mdl, sizeof(model));
|
||||
+ if (strlen(txt_usb_mdl) > 255)
|
||||
+ model[255] = '\0';
|
||||
ptr = device_id + strlen(device_id);
|
||||
snprintf(ptr, sizeof(device_id) - (size_t)(ptr - device_id),
|
||||
"MDL:%s;", txt_usb_mdl);
|
||||
@@ -243,15 +247,22 @@ list_printers (int mode)
|
||||
*ptr == ')')
|
||||
*ptr = '\0';
|
||||
strncpy(model, txt_product + 1, sizeof(model));
|
||||
+ if ((strlen(txt_product) + 1) > 255)
|
||||
+ model[255] = '\0';
|
||||
} else
|
||||
strncpy(model, txt_product, sizeof(model));
|
||||
} else if (txt_ty[0] != '\0') {
|
||||
strncpy(model, txt_ty, sizeof(model));
|
||||
+ if (strlen(txt_ty) > 255)
|
||||
+ model[255] = '\0';
|
||||
if ((ptr = strchr(model, ',')) != NULL)
|
||||
*ptr = '\0';
|
||||
}
|
||||
- if (txt_pdl[0] != '\0')
|
||||
+ if (txt_pdl[0] != '\0') {
|
||||
strncpy(pdl, txt_pdl, sizeof(pdl));
|
||||
+ if (strlen(txt_pdl) > 255)
|
||||
+ pdl[255] = '\0';
|
||||
+ }
|
||||
|
||||
if (!device_id[0] && strcasecmp(model, "Unknown")) {
|
||||
if (make[0])
|
@ -1,21 +0,0 @@
|
||||
diff -up cups-filters-1.16.1/utils/cups-browsed.conf.in.createall cups-filters-1.16.1/utils/cups-browsed.conf.in
|
||||
--- cups-filters-1.16.1/utils/cups-browsed.conf.in.createall 2018-01-02 17:17:51.555941155 +0100
|
||||
+++ cups-filters-1.16.1/utils/cups-browsed.conf.in 2018-01-02 17:19:49.651048564 +0100
|
||||
@@ -359,7 +359,7 @@ BrowseRemoteProtocols @BROWSEREMOTEPROTO
|
||||
|
||||
# LocalQueueNamingRemoteCUPS DNS-SD
|
||||
# LocalQueueNamingRemoteCUPS MakeModel
|
||||
-# LocalQueueNamingRemoteCUPS RemoteName
|
||||
+LocalQueueNamingRemoteCUPS RemoteName
|
||||
# LocalQueueNamingIPPPrinter DNS-SD
|
||||
# LocalQueueNamingIPPPrinter MakeModel
|
||||
|
||||
@@ -453,7 +453,7 @@ BrowseRemoteProtocols @BROWSEREMOTEPROTO
|
||||
# CreateIPPPrinterQueues AppleRaster
|
||||
# CreateIPPPrinterQueues Everywhere AppleRaster
|
||||
# CreateIPPPrinterQueues Driverless
|
||||
-# CreateIPPPrinterQueues All
|
||||
+CreateIPPPrinterQueues All
|
||||
|
||||
|
||||
# If cups-browsed is automatically creating print queues for native
|
@ -1,17 +0,0 @@
|
||||
diff --git a/filter/foomatic-rip/foomaticrip.c b/filter/foomatic-rip/foomaticrip.c
|
||||
index 7dc2426..146125f 100644
|
||||
--- a/filter/foomatic-rip/foomaticrip.c
|
||||
+++ b/filter/foomatic-rip/foomaticrip.c
|
||||
@@ -672,6 +672,12 @@ int print_file(const char *filename, int convert)
|
||||
if (out != NULL)
|
||||
fclose(out);
|
||||
|
||||
+ // Delete temp file if we created one
|
||||
+ if ( *tmpfilename ) {
|
||||
+ _log("Removing temporary file %s\n", tmpfilename);
|
||||
+ unlink(tmpfilename);
|
||||
+ }
|
||||
+
|
||||
return ret;
|
||||
}
|
||||
|
@ -1,13 +0,0 @@
|
||||
diff --git a/filter/gstoraster.c b/filter/gstoraster.c
|
||||
index 7fd9ccf..0c9f37d 100644
|
||||
--- a/filter/gstoraster.c
|
||||
+++ b/filter/gstoraster.c
|
||||
@@ -906,7 +906,7 @@ main (int argc, char **argv, char *envp[])
|
||||
cupsArrayAdd(gs_args, strdup("-c"));
|
||||
|
||||
/* Set margins if we have a bounding box defined */
|
||||
- if (h.cupsImagingBBox[3] > 0.0) {
|
||||
+ if (h.cupsImagingBBox[3] > 0.0 && outformat != OUTPUT_FORMAT_PDF) {
|
||||
snprintf(tmpstr, sizeof(tmpstr),
|
||||
"<</.HWMargins[%f %f %f %f] /Margins[0 0]>>setpagedevice",
|
||||
h.cupsImagingBBox[0], h.cupsImagingBBox[1],
|
@ -1,20 +0,0 @@
|
||||
diff --git a/filter/pdftopdf/qpdf_pdftopdf_processor.cc b/filter/pdftopdf/qpdf_pdftopdf_processor.cc
|
||||
index 73e4f06..0752a99 100644
|
||||
--- a/filter/pdftopdf/qpdf_pdftopdf_processor.cc
|
||||
+++ b/filter/pdftopdf/qpdf_pdftopdf_processor.cc
|
||||
@@ -623,6 +623,7 @@ void QPDF_PDFTOPDF_Processor::emitFile(FILE *f,ArgOwnership take) // {{{
|
||||
if (!extraheader.empty()) {
|
||||
out.setExtraHeaderText(extraheader);
|
||||
}
|
||||
+ out.setPreserveEncryption(false);
|
||||
out.write();
|
||||
}
|
||||
// }}}
|
||||
@@ -642,6 +643,7 @@ void QPDF_PDFTOPDF_Processor::emitFilename(const char *name) // {{{
|
||||
if (!extraheader.empty()) {
|
||||
out.setExtraHeaderText(extraheader);
|
||||
}
|
||||
+ out.setPreserveEncryption(false);
|
||||
out.write();
|
||||
}
|
||||
// }}}
|
@ -1,459 +0,0 @@
|
||||
--- cups-filters-1.20.0/filter/pdf.cxx
|
||||
+++ cups-filters-1.20.0/filter/pdf.cxx
|
||||
@@ -87,7 +87,11 @@ static EMB_PARAMS *Font;
|
||||
extern "C" pdf_t * pdf_load_template(const char *filename)
|
||||
{
|
||||
/* Init poppler */
|
||||
+#if POPPLER_VERSION_MAJOR > 0 || POPPLER_VERSION_MINOR >= 83
|
||||
+ globalParams.reset(new GlobalParams());
|
||||
+#else
|
||||
globalParams = new GlobalParams();
|
||||
+#endif
|
||||
|
||||
PDFDoc *doc = new PDFDoc(new GooString(filename));
|
||||
|
||||
@@ -136,7 +140,7 @@ extern "C" void pdf_prepend_stream(pdf_t
|
||||
#endif
|
||||
if (!pageobj.isDict() ||
|
||||
#if POPPLER_VERSION_MAJOR > 0 || POPPLER_VERSION_MINOR >= 58
|
||||
- (contents = pageobj.dictLookupNF("Contents")).isNull()
|
||||
+ (contents = pageobj.dictLookupNF("Contents").copy()).isNull()
|
||||
#else
|
||||
!pageobj.dictLookupNF("Contents", &contents)
|
||||
#endif
|
||||
@@ -166,11 +170,15 @@ extern "C" void pdf_prepend_stream(pdf_t
|
||||
#endif
|
||||
|
||||
r = xref->addIndirectObject(&stream);
|
||||
+#if POPPLER_VERSION_MAJOR > 0 || POPPLER_VERSION_MINOR >= 75
|
||||
+ streamrefobj = Object(r);
|
||||
+#else
|
||||
#if POPPLER_VERSION_MAJOR > 0 || POPPLER_VERSION_MINOR >= 58
|
||||
streamrefobj = Object(r.num, r.gen);
|
||||
#else
|
||||
streamrefobj.initRef(r.num, r.gen);
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
#if POPPLER_VERSION_MAJOR > 0 || POPPLER_VERSION_MINOR >= 58
|
||||
array = Object(new Array(xref));
|
||||
@@ -182,7 +190,7 @@ extern "C" void pdf_prepend_stream(pdf_t
|
||||
|
||||
if (contents.isStream()) {
|
||||
#if POPPLER_VERSION_MAJOR > 0 || POPPLER_VERSION_MINOR >= 58
|
||||
- contents = pageobj.dictLookupNF("Contents"); // streams must be indirect, i.e. not fetch()-ed
|
||||
+ contents = pageobj.dictLookupNF("Contents").copy(); // streams must be indirect, i.e. not fetch()-ed
|
||||
array.arrayAdd(std::move(contents));
|
||||
#else
|
||||
pageobj.dictLookupNF("Contents", &contents); // streams must be indirect, i.e. not fetch()-ed
|
||||
@@ -194,7 +202,7 @@ extern "C" void pdf_prepend_stream(pdf_t
|
||||
Object obj;
|
||||
for (i = 0; i < len; i++) {
|
||||
#if POPPLER_VERSION_MAJOR > 0 || POPPLER_VERSION_MINOR >= 58
|
||||
- obj = contents.arrayGetNF(i);
|
||||
+ obj = contents.arrayGetNF(i).copy();
|
||||
array.arrayAdd(std::move(obj));
|
||||
#else
|
||||
contents.arrayGetNF(i, &obj);
|
||||
@@ -258,7 +266,7 @@ static Object * get_resource_dict(XRef *
|
||||
|
||||
/* TODO resource dict can also be inherited */
|
||||
#if POPPLER_VERSION_MAJOR > 0 || POPPLER_VERSION_MINOR >= 58
|
||||
- res = pagedict->lookupNF("Resources");
|
||||
+ res = pagedict->lookupNF("Resources").copy();
|
||||
if (res.isNull())
|
||||
#else
|
||||
if (!pagedict->lookupNF("Resources", &res))
|
||||
@@ -331,7 +339,7 @@ extern "C" void pdf_add_type1_font(pdf_t
|
||||
xref->addIndirectObject(&font);
|
||||
|
||||
#if POPPLER_VERSION_MAJOR > 0 || POPPLER_VERSION_MINOR >= 58
|
||||
- fonts = resdict.dictLookupNF("Font");
|
||||
+ fonts = resdict.dictLookupNF("Font").copy();
|
||||
#else
|
||||
resdict.dictLookupNF("Font", &fonts);
|
||||
#endif
|
||||
@@ -540,7 +548,7 @@ extern "C" void pdf_duplicate_page (pdf_
|
||||
}
|
||||
|
||||
#if POPPLER_VERSION_MAJOR > 0 || POPPLER_VERSION_MINOR >= 58
|
||||
- parentref = page.dictLookupNF("Parent");
|
||||
+ parentref = page.dictLookupNF("Parent").copy();
|
||||
parent = parentref.fetch(xref);
|
||||
#else
|
||||
page.dictLookupNF("Parent", &parentref);
|
||||
@@ -568,6 +576,9 @@ extern "C" void pdf_duplicate_page (pdf_
|
||||
// the pages tree (not supported by major pdf implementations).
|
||||
for (i = 1; i < count; i++) {
|
||||
Ref r = xref->addIndirectObject(&page);
|
||||
+#if POPPLER_VERSION_MAJOR > 0 || POPPLER_VERSION_MINOR >= 75
|
||||
+ kids.arrayAdd(Object(r));
|
||||
+#else
|
||||
#if POPPLER_VERSION_MAJOR > 0 || POPPLER_VERSION_MINOR >= 58
|
||||
kids.arrayAdd(Object(r.num, r.gen));
|
||||
#else
|
||||
@@ -575,6 +586,7 @@ extern "C" void pdf_duplicate_page (pdf_
|
||||
kids.arrayAdd(&ref);
|
||||
ref.free();
|
||||
#endif
|
||||
+#endif
|
||||
}
|
||||
|
||||
#if POPPLER_VERSION_MAJOR > 0 || POPPLER_VERSION_MINOR >= 58
|
||||
@@ -734,7 +746,7 @@ extern "C" int pdf_fill_form(pdf_t *doc,
|
||||
}
|
||||
|
||||
FormField *ff = fm_text->getField();
|
||||
- GooString *field_name;
|
||||
+ const GooString *field_name;
|
||||
field_name = ff->getFullyQualifiedName();
|
||||
if ( ! field_name )
|
||||
field_name = ff->getPartialName();
|
||||
@@ -743,7 +755,11 @@ extern "C" int pdf_fill_form(pdf_t *doc,
|
||||
continue;
|
||||
}
|
||||
|
||||
+#if POPPLER_VERSION_MAJOR > 0 || POPPLER_VERSION_MINOR >= 72
|
||||
+ const char *name = field_name->c_str();
|
||||
+#else
|
||||
const char *name = field_name->getCString();
|
||||
+#endif
|
||||
const char *fill_with = lookup_opt(opt, name);
|
||||
if ( ! fill_with ) {
|
||||
fprintf(stderr, "Lack information for widget: %s.\n", name);
|
||||
@@ -831,6 +847,9 @@ extern "C" int pdf_fill_form(pdf_t *doc,
|
||||
appearance_stream_dic.dictSet("Type", name_object("XObject"));
|
||||
appearance_stream_dic.dictSet("Subtype", name_object("Form"));
|
||||
appearance_stream_dic.dictSet("FormType", int_object(1));
|
||||
+#if POPPLER_VERSION_MAJOR > 0 || POPPLER_VERSION_MINOR >= 75
|
||||
+ appearance_stream_dic.dictSet("Resources", Object(resref));
|
||||
+#else
|
||||
#if POPPLER_VERSION_MAJOR > 0 || POPPLER_VERSION_MINOR >= 58
|
||||
appearance_stream_dic.dictSet("Resources", Object(resref.num, resref.gen));
|
||||
#else
|
||||
@@ -838,6 +857,7 @@ extern "C" int pdf_fill_form(pdf_t *doc,
|
||||
obj_ref_x.initRef(resref.num, resref.gen);
|
||||
appearance_stream_dic.dictSet("Resources", &obj_ref_x);
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
/* BBox array: TODO. currently out of the head. */
|
||||
Object array;
|
||||
@@ -851,8 +871,13 @@ extern "C" int pdf_fill_form(pdf_t *doc,
|
||||
appearance_stream_dic.dictSet("BBox", std::move(array));
|
||||
appearance_stream_dic.dictSet("Length", Object(appearance_stream->getLength()));
|
||||
|
||||
+#if POPPLER_VERSION_MAJOR > 0 || POPPLER_VERSION_MINOR >= 72
|
||||
+ MemStream *mem_stream = new MemStream(appearance_stream->c_str(),
|
||||
+ 0, appearance_stream->getLength(), std::move(appearance_stream_dic));
|
||||
+#else
|
||||
MemStream *mem_stream = new MemStream(appearance_stream->getCString(),
|
||||
0, appearance_stream->getLength(), std::move(appearance_stream_dic));
|
||||
+#endif
|
||||
|
||||
/* Make obj stream */
|
||||
Object stream = Object(static_cast<Stream *>(mem_stream));
|
||||
@@ -860,8 +885,11 @@ extern "C" int pdf_fill_form(pdf_t *doc,
|
||||
Ref r = xref->addIndirectObject(&stream);
|
||||
|
||||
/* Update Xref table */
|
||||
+#if POPPLER_VERSION_MAJOR > 0 || POPPLER_VERSION_MINOR >= 75
|
||||
+ Object obj_ref = Object(r);
|
||||
+#else
|
||||
Object obj_ref = Object(r.num, r.gen);
|
||||
-
|
||||
+#endif
|
||||
/*
|
||||
* Fill Annotation's appearance streams dic /AP
|
||||
* See: 8.4.4 Appearance Streams
|
||||
@@ -884,8 +912,13 @@ extern "C" int pdf_fill_form(pdf_t *doc,
|
||||
appearance_stream_dic.dictSet("BBox", &array);
|
||||
appearance_stream_dic.dictSet("Length", int_object(appearance_stream->getLength()));
|
||||
|
||||
+#if POPPLER_VERSION_MAJOR > 0 || POPPLER_VERSION_MINOR >= 72
|
||||
+ MemStream *mem_stream = new MemStream(appearance_stream->c_str(),
|
||||
+ 0, appearance_stream->getLength(), &appearance_stream_dic);
|
||||
+#else
|
||||
MemStream *mem_stream = new MemStream(appearance_stream->getCString(),
|
||||
0, appearance_stream->getLength(), &appearance_stream_dic);
|
||||
+#endif
|
||||
|
||||
/* Make obj stream */
|
||||
Object stream;
|
||||
@@ -925,10 +958,10 @@ extern "C" int pdf_fill_form(pdf_t *doc,
|
||||
*/
|
||||
Object *obj_form = catalog->getAcroForm();
|
||||
#if POPPLER_VERSION_MAJOR > 0 || POPPLER_VERSION_MINOR >= 58
|
||||
- obj_form->dictSet("NeedAppearances", Object(gFalse));
|
||||
+ obj_form->dictSet("NeedAppearances", Object(false));
|
||||
#else
|
||||
Object obj1;
|
||||
- obj1.initBool(gFalse);
|
||||
+ obj1.initBool(false);
|
||||
obj_form->dictSet("NeedAppearances", &obj1);
|
||||
#endif
|
||||
|
||||
@@ -948,7 +981,11 @@ extern "C" int pdf_fill_form(pdf_t *doc,
|
||||
catRef.gen = xref->getRootGen();
|
||||
catRef.num = xref->getRootNum();
|
||||
#if POPPLER_VERSION_MAJOR > 0 || POPPLER_VERSION_MINOR >= 58
|
||||
+#if POPPLER_VERSION_MAJOR > 0 || POPPLER_VERSION_MINOR >= 75
|
||||
+ catObj.dictSet("AcroForm", Object(ref_form));
|
||||
+#else
|
||||
catObj.dictSet("AcroForm", Object(ref_form.num, ref_form.gen));
|
||||
+#endif
|
||||
xref->setModifiedObject(&catObj, catRef);
|
||||
#else
|
||||
Object obj2;
|
||||
@@ -1020,12 +1057,22 @@ static int pdf_embed_font(pdf_t *doc,
|
||||
|
||||
/* Create memory stream font. Add it to font dic. */
|
||||
#if POPPLER_VERSION_MAJOR > 0 || POPPLER_VERSION_MINOR >= 58
|
||||
+#if POPPLER_VERSION_MAJOR > 0 || POPPLER_VERSION_MINOR >= 72
|
||||
+ MemStream *mem_stream = new MemStream(font_stream->c_str(),
|
||||
+ 0, outlen, std::move(f_dic));
|
||||
+#else
|
||||
MemStream *mem_stream = new MemStream(font_stream->getCString(),
|
||||
0, outlen, std::move(f_dic));
|
||||
+#endif
|
||||
Object stream = Object(static_cast<Stream *>(mem_stream));
|
||||
#else
|
||||
+#if POPPLER_VERSION_MAJOR > 0 || POPPLER_VERSION_MINOR >= 72
|
||||
+ MemStream *mem_stream = new MemStream(font_stream->c_str(),
|
||||
+ 0, outlen, &f_dic);
|
||||
+#else
|
||||
MemStream *mem_stream = new MemStream(font_stream->getCString(),
|
||||
0, outlen, &f_dic);
|
||||
+#endif
|
||||
|
||||
/* Make obj stream */
|
||||
Object stream;
|
||||
@@ -1066,7 +1113,7 @@ static int pdf_embed_font(pdf_t *doc,
|
||||
Object fonts;
|
||||
|
||||
#if POPPLER_VERSION_MAJOR > 0 || POPPLER_VERSION_MINOR >= 58
|
||||
- fonts = resdict.dictLookupNF("Font");
|
||||
+ fonts = resdict.dictLookupNF("Font").copy();
|
||||
#else
|
||||
resdict.dictLookupNF("Font", &fonts);
|
||||
#endif
|
||||
@@ -1074,7 +1121,7 @@ static int pdf_embed_font(pdf_t *doc,
|
||||
/* Create new one, if doesn't exists */
|
||||
#if POPPLER_VERSION_MAJOR > 0 || POPPLER_VERSION_MINOR >= 58
|
||||
resdict.dictSet("Font", Object(new Dict(xref)));
|
||||
- fonts = resdict.dictLookupNF("Font");
|
||||
+ fonts = resdict.dictLookupNF("Font").copy();
|
||||
#else
|
||||
fonts.initDict(xref);
|
||||
resdict.dictSet("Font", &fonts);
|
||||
@@ -1108,11 +1155,15 @@ static int pdf_embed_font(pdf_t *doc,
|
||||
|
||||
/* r - cid resource dic */
|
||||
Object font_res_obj_ref;
|
||||
+#if POPPLER_VERSION_MAJOR > 0 || POPPLER_VERSION_MINOR >= 75
|
||||
+ font_res_obj_ref = Object(r);
|
||||
+#else
|
||||
#if POPPLER_VERSION_MAJOR > 0 || POPPLER_VERSION_MINOR >= 58
|
||||
font_res_obj_ref = Object(r.num, r.gen);
|
||||
#else
|
||||
font_res_obj_ref.initRef(r.num, r.gen);
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
Object *fonts_dic;
|
||||
Object dereferenced_obj;
|
||||
@@ -1440,6 +1491,9 @@ static Object *make_fontdescriptor_dic(
|
||||
#endif
|
||||
}
|
||||
|
||||
+#if POPPLER_VERSION_MAJOR > 0 || POPPLER_VERSION_MINOR >= 75
|
||||
+ dic->dictSet(emb_pdf_get_fontfile_key(emb), Object(fontfile_obj_ref));
|
||||
+#else
|
||||
#if POPPLER_VERSION_MAJOR > 0 || POPPLER_VERSION_MINOR >= 58
|
||||
dic->dictSet(emb_pdf_get_fontfile_key(emb), Object(fontfile_obj_ref.num, fontfile_obj_ref.gen));
|
||||
#else
|
||||
@@ -1447,6 +1501,7 @@ static Object *make_fontdescriptor_dic(
|
||||
ref_obj.initRef(fontfile_obj_ref.num, fontfile_obj_ref.gen);
|
||||
dic->dictSet(emb_pdf_get_fontfile_key(emb), &ref_obj);
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
return dic;
|
||||
}
|
||||
@@ -1480,6 +1535,9 @@ static Object *make_font_dic(
|
||||
"BaseFont",
|
||||
name_object(copyString(emb_pdf_escape_name(fdes->fontname,-1))));
|
||||
|
||||
+#if POPPLER_VERSION_MAJOR > 0 || POPPLER_VERSION_MINOR >= 75
|
||||
+ dic->dictSet("FontDescriptor", Object(fontdescriptor_obj_ref));
|
||||
+#else
|
||||
#if POPPLER_VERSION_MAJOR > 0 || POPPLER_VERSION_MINOR >= 58
|
||||
dic->dictSet("FontDescriptor", Object(fontdescriptor_obj_ref.num, fontdescriptor_obj_ref.gen));
|
||||
#else
|
||||
@@ -1487,6 +1545,7 @@ static Object *make_font_dic(
|
||||
ref_obj.initRef(fontdescriptor_obj_ref.num, fontdescriptor_obj_ref.gen);
|
||||
dic->dictSet("FontDescriptor", &ref_obj);
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
if ( emb->plan & EMB_A_MULTIBYTE ) {
|
||||
assert(fwid->warray);
|
||||
@@ -1573,17 +1632,26 @@ static Object *make_cidfont_dic(
|
||||
basefont->append(addenc);
|
||||
basefont->append((addenc[0])?encoding:"");
|
||||
|
||||
+#if POPPLER_VERSION_MAJOR > 0 || POPPLER_VERSION_MINOR >= 72
|
||||
+ dic->dictSet("BaseFont",
|
||||
+ name_object(copyString(basefont->c_str())));
|
||||
+#else
|
||||
dic->dictSet("BaseFont",
|
||||
name_object(copyString(basefont->getCString())));
|
||||
+#endif
|
||||
|
||||
dic->dictSet("Encoding", name_object(copyString(encoding)));
|
||||
|
||||
Object obj;
|
||||
+#if POPPLER_VERSION_MAJOR > 0 || POPPLER_VERSION_MINOR >= 75
|
||||
+ obj = Object(fontdescriptor_obj_ref);
|
||||
+#else
|
||||
#if POPPLER_VERSION_MAJOR > 0 || POPPLER_VERSION_MINOR >= 58
|
||||
obj = Object(fontdescriptor_obj_ref.num, fontdescriptor_obj_ref.gen);
|
||||
#else
|
||||
obj.initRef(fontdescriptor_obj_ref.num, fontdescriptor_obj_ref.gen);
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
Object array;
|
||||
#if POPPLER_VERSION_MAJOR > 0 || POPPLER_VERSION_MINOR >= 58
|
||||
--- cups-filters-1.20.0/filter/pdftoraster.cxx
|
||||
+++ cups-filters-1.20.0/filter/pdftoraster.cxx
|
||||
@@ -282,8 +282,13 @@ cmsHPROFILE sgray_profile()
|
||||
|
||||
#if POPPLER_VERSION_MAJOR > 0 || POPPLER_VERSION_MINOR >= 19
|
||||
#if POPPLER_VERSION_MAJOR > 0 || POPPLER_VERSION_MINOR >= 23
|
||||
+#if POPPLER_VERSION_MAJOR > 0 || POPPLER_VERSION_MINOR >= 85
|
||||
+void CDECL myErrorFun(ErrorCategory category,
|
||||
+ Goffset pos, const char *msg)
|
||||
+#else
|
||||
void CDECL myErrorFun(void *data, ErrorCategory category,
|
||||
Goffset pos, char *msg)
|
||||
+#endif
|
||||
#else
|
||||
void CDECL myErrorFun(void *data, ErrorCategory category,
|
||||
int pos, char *msg)
|
||||
@@ -412,9 +417,9 @@ static GBool getColorProfilePath(ppd_fil
|
||||
path->append("/profiles/");
|
||||
}
|
||||
path->append(attr->value);
|
||||
- return gTrue;
|
||||
+ return true;
|
||||
}
|
||||
- return gFalse;
|
||||
+ return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1686,7 +1691,7 @@ static void outPage(PDFDoc *doc, Catalog
|
||||
{
|
||||
SplashBitmap *bitmap;
|
||||
Page *page = catalog->getPage(pageNo);
|
||||
- PDFRectangle *mediaBox = page->getMediaBox();
|
||||
+ const PDFRectangle *mediaBox = page->getMediaBox();
|
||||
int rotate = page->getRotate();
|
||||
double paperdimensions[2], /* Physical size of the paper */
|
||||
margins[4]; /* Physical margins of print */
|
||||
@@ -1814,7 +1819,7 @@ static void outPage(PDFDoc *doc, Catalog
|
||||
|
||||
doc->displayPage(out,pageNo,header.HWResolution[0],
|
||||
header.HWResolution[1],(landscape == 0 ? 0 : 90),
|
||||
- gTrue,gTrue,gTrue);
|
||||
+ true,true,true);
|
||||
bitmap = out->getBitmap();
|
||||
bitmapoffset[0] = margins[0] / 72.0 * header.HWResolution[0];
|
||||
bitmapoffset[1] = margins[3] / 72.0 * header.HWResolution[1];
|
||||
@@ -1867,7 +1872,7 @@ static void outPage(PDFDoc *doc, Catalog
|
||||
writePageImage(raster,bitmap,pageNo);
|
||||
}
|
||||
|
||||
-static void setPopplerColorProfile()
|
||||
+static void setPopplerColorProfile(SplashOutputDev *out)
|
||||
{
|
||||
if (header.cupsBitsPerColor != 8 && header.cupsBitsPerColor != 16) {
|
||||
/* color Profile is not supported */
|
||||
@@ -1951,7 +1956,13 @@ static void setPopplerColorProfile()
|
||||
break;
|
||||
}
|
||||
if (popplerColorProfile != NULL) {
|
||||
+#if POPPLER_VERSION_MAJOR > 0 || POPPLER_VERSION_MINOR >= 90
|
||||
+#ifdef USE_CMS
|
||||
+ out->setDisplayProfile(make_GfxLCMSProfilePtr(popplerColorProfile));
|
||||
+#endif
|
||||
+#else
|
||||
GfxColorSpace::setDisplayProfile(popplerColorProfile);
|
||||
+#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1966,13 +1977,21 @@ int main(int argc, char *argv[]) {
|
||||
int rowpad;
|
||||
Catalog *catalog;
|
||||
|
||||
+#if POPPLER_VERSION_MAJOR > 0 || POPPLER_VERSION_MINOR >= 85
|
||||
+ setErrorCallback(::myErrorFun);
|
||||
+#else
|
||||
#if POPPLER_VERSION_MAJOR > 0 || POPPLER_VERSION_MINOR >= 19
|
||||
setErrorCallback(::myErrorFun,NULL);
|
||||
#else
|
||||
setErrorFunction(::myErrorFun);
|
||||
#endif
|
||||
+#endif
|
||||
cmsSetLogErrorHandler(lcmsErrorHandler);
|
||||
- globalParams = new GlobalParams();
|
||||
+#if POPPLER_VERSION_MAJOR > 0 || POPPLER_VERSION_MINOR >= 83
|
||||
+ globalParams.reset(new GlobalParams());
|
||||
+#else
|
||||
+ globalParams = new GlobalParams();
|
||||
+#endif
|
||||
parseOpts(argc, argv);
|
||||
|
||||
if (argc == 6) {
|
||||
@@ -2119,14 +2138,10 @@ int main(int argc, char *argv[]) {
|
||||
break;
|
||||
}
|
||||
|
||||
- if (!cm_disabled) {
|
||||
- setPopplerColorProfile();
|
||||
- }
|
||||
-
|
||||
out = new SplashOutputDev(cmode,rowpad/* row padding */,
|
||||
- gFalse,paperColor,gTrue
|
||||
+ false,paperColor,true
|
||||
#if POPPLER_VERSION_MAJOR == 0 && POPPLER_VERSION_MINOR <= 30
|
||||
- ,gFalse
|
||||
+ ,false
|
||||
#endif
|
||||
);
|
||||
#if POPPLER_VERSION_MAJOR > 0 || POPPLER_VERSION_MINOR >= 19
|
||||
@@ -2135,6 +2150,10 @@ int main(int argc, char *argv[]) {
|
||||
out->startDoc(doc->getXRef());
|
||||
#endif
|
||||
|
||||
+ if (!cm_disabled) {
|
||||
+ setPopplerColorProfile(out);
|
||||
+ }
|
||||
+
|
||||
if ((raster = cupsRasterOpen(1, pwgraster ? CUPS_RASTER_WRITE_PWG :
|
||||
CUPS_RASTER_WRITE)) == 0) {
|
||||
pdfError(-1,const_cast<char *>("Can't open raster stream"));
|
||||
@@ -2162,9 +2181,11 @@ err1:
|
||||
cmsDeleteTransform(colorTransform);
|
||||
}
|
||||
|
||||
+#if POPPLER_VERSION_MAJOR == 0 && POPPLER_VERSION_MINOR <= 68
|
||||
// Check for memory leaks
|
||||
Object::memCheck(stderr);
|
||||
gMemReport(stderr);
|
||||
+#endif
|
||||
|
||||
return exitCode;
|
||||
}
|
@ -10,8 +10,8 @@
|
||||
|
||||
Summary: OpenPrinting CUPS filters and backends
|
||||
Name: cups-filters
|
||||
Version: 1.20.0
|
||||
Release: 35%{?dist}
|
||||
Version: 1.28.7
|
||||
Release: 15%{?dist}
|
||||
|
||||
# For a breakdown of the licensing, see COPYING file
|
||||
# GPLv2: filters: commandto*, imagetoraster, pdftops, rasterto*,
|
||||
@ -26,67 +26,31 @@ License: GPLv2 and GPLv2+ and GPLv3 and GPLv3+ and LGPLv2+ and MIT and BSD with
|
||||
|
||||
Url: http://www.linuxfoundation.org/collaborate/workgroups/openprinting/cups-filters
|
||||
Source0: http://www.openprinting.org/download/cups-filters/cups-filters-%{version}.tar.xz
|
||||
Source1: testprint
|
||||
Source2: lftocrlf.ppd
|
||||
Source3: lftocrlf
|
||||
Source1: lftocrlf.ppd
|
||||
Source2: lftocrlf
|
||||
|
||||
Patch01: cups-filters-createall.patch
|
||||
Patch02: cups-filters-brftopagedbrf-install.patch
|
||||
# covscan fixes from upstream
|
||||
Patch03: cups-filters-covscan.patch
|
||||
# 1626996 - cups-filters: Sticky EOF behavior in glibc breaks descriptor concatenation using dup2
|
||||
Patch04: cups-filters-cleareof.patch
|
||||
# 1609264 - links in man page is wrong - it shows 'cups-browsed' in path, but we
|
||||
# have 'cups-filters' in path, because it is shipped in 'cups-filters' package
|
||||
# instead of 'cups-browsed' as Ubuntu does. I can repack the project later,
|
||||
# so cups-browsed would have separate sub package, so the link would be correct
|
||||
Patch05: cups-browsed.8.patch
|
||||
# change in ghostscript broke printing for several printer models, the fix is to use
|
||||
# different ghostscript option, taken from upstream
|
||||
# bugzilla https://bugzilla.redhat.com/show_bug.cgi?id=1712814
|
||||
Patch06: 0001-foomatic-rip-Changed-Ghostscript-call-to-count-pages.patch
|
||||
# rebuild and patch for FIPS compliance, backported from upstream (#1605101)
|
||||
Patch07: pdftopdf-nocrypt.patch
|
||||
# 1776270 - cups-browsed leaks sockets
|
||||
Patch08: cups-browsed-socket-leak.patch
|
||||
# 1677731 - error messages when using cups-browsed
|
||||
Patch09: cups-browsed-error-messages.patch
|
||||
# 1813229 - cups-browsed leaks memory
|
||||
Patch10: cups-browsed-memory-leaks.patch
|
||||
# 1891681 - [RHEL 8] foomatic-rip files up /var/spool/tmp with temporary files
|
||||
Patch11: foomatic-remove-tmpfile.patch
|
||||
# 1889798 - Rebuild cups-filters due to rebase of poppler
|
||||
Patch12: poppler-20.11.0.patch
|
||||
# 1894543 - Fix '.setfilladjust' usage after gs upgrade to 9.27
|
||||
Patch13: 0001-gstoraster-Use-.setfilladjust2-PostScript-command-fo.patch
|
||||
# 1931603 - cups-browsed doesn't save "-default" options
|
||||
Patch14: 0001-cups-browsed-Always-save-.-default-option-entries-fr.patch
|
||||
# 1972981 - cups-browsed doesn't renew DBus subscription in time and all printing comes to a halt
|
||||
Patch15: cups-browsed-renew.patch
|
||||
# 1981612 - [RHEL 8] pdftopdf doesn't handle "page-range=10-2147483647" correctly
|
||||
Patch16: 0001-libcupsfilters-Fix-page-range-like-10-in-pdftopdf-fi.patch
|
||||
# 2185675 - Edges cropped when printing PostScript document
|
||||
Patch17: gstoraster-margins.patch
|
||||
# backported from upstream
|
||||
#Patch01: 0001-libcupsfilters-In-the-PPD-generator-really-give-prio.patch
|
||||
# 1954523 - cups-browsed doesn't save "*-default" options
|
||||
# upstream https://github.com/OpenPrinting/cups-filters/commit/cdd61132e1719a88dd8006c65e8e260c1aaa02e4
|
||||
Patch01: 0001-cups-browsed-Always-save-.-default-option-entries-fr.patch
|
||||
# 1973055 - cups-browsed doesn't renew DBus subscription in time and all printing comes to a halt
|
||||
Patch02: 0001-cups-browsed.c-Make-NotifLeaseDuration-configurable-.patch
|
||||
# 1982118 - [RHEL 9] pdftopdf doesn't handle "page-range=10-2147483647" correctly
|
||||
Patch03: 0001-libcupsfilters-Fix-page-range-like-10-in-pdftopdf-fi.patch
|
||||
# CVE-2023-24805 cups-filters: remote code execution in cups-filters, beh CUPS backend
|
||||
Patch18: beh-cve2023.patch
|
||||
# RHEL-19433 Incorrect PS header handling in gstopdf
|
||||
Patch19: 0001-gstoraster-Improved-detection-whether-input-is-PostS.patch
|
||||
# RHEL-16034 pdftopdf results with (N > 1)^2 copies if a file is sent to IPP printer with collate
|
||||
Patch20: 0001-pdftopdf-Fixed-printing-multiple-copies-on-driverles.patch
|
||||
# CVE-2024-47175 cups-filters: remote command injection via attacker controlled data in PPD file
|
||||
Patch21: cups-filters-CVE-2024-47175.patch
|
||||
# CVE-2024-47076 cups-filters: `cfGetPrinterAttributes` API does not perform sanitization on returned IPP attributes
|
||||
Patch22: 0001-cfGetPrinterAttributes5-Validate-response-attributes.patch
|
||||
Patch04: beh-cve2023.patch
|
||||
# RHEL-16026 Cups Browsed does not correctly pull printer location and description information from print server
|
||||
Patch05: 0001-Use-description-location-from-server-if-available-ot.patch
|
||||
|
||||
|
||||
%if %{with braille}
|
||||
Recommends: %{name}-braille%{?_isa} = %{version}-%{release}
|
||||
%endif
|
||||
|
||||
Requires: cups-filters-libs%{?_isa} = %{version}-%{release}
|
||||
|
||||
# gcc and gcc-c++ is not in buildroot by default
|
||||
# autogen.sh
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
BuildRequires: gettext-devel
|
||||
BuildRequires: libtool
|
||||
|
||||
# build requirements for build system:
|
||||
# gcc for backends (implicitclass, parallel, serial, backend error handling)
|
||||
# cupsfilters (colord, color manager...), filter (banners,
|
||||
# commandto*, braille, foomatic-rip, imagetoraster, imagetopdf, gstoraster e.g.),
|
||||
@ -94,27 +58,36 @@ Requires: cups-filters-libs%{?_isa} = %{version}-%{release}
|
||||
BuildRequires: gcc
|
||||
# gcc-c++ for pdftoopvp, pdftopdf
|
||||
BuildRequires: gcc-c++
|
||||
# for autosetup
|
||||
BuildRequires: git-core
|
||||
# uses make for compiling
|
||||
BuildRequires: make
|
||||
# we use pkgconfig to get a proper devel packages
|
||||
# proper CFLAGS and LDFLAGS
|
||||
BuildRequires: pkgconf-pkg-config
|
||||
|
||||
# uses CUPS API functions - arrays, ipp functions
|
||||
BuildRequires: cups-devel
|
||||
BuildRequires: pkgconfig
|
||||
|
||||
# pdftopdf
|
||||
BuildRequires: pkgconfig(libqpdf)
|
||||
|
||||
# pdftops
|
||||
BuildRequires: poppler-utils
|
||||
# pdftoijs, pdftoopvp, pdftoraster, gstoraster
|
||||
BuildRequires: pkgconfig(poppler)
|
||||
BuildRequires: poppler-cpp-devel
|
||||
BuildRequires: libjpeg-devel
|
||||
BuildRequires: libtiff-devel
|
||||
BuildRequires: pkgconfig(libpng)
|
||||
BuildRequires: pkgconfig(zlib)
|
||||
BuildRequires: pkgconfig(dbus-1)
|
||||
|
||||
# pdftoraster, gstoraster
|
||||
BuildRequires: ghostscript
|
||||
# libijs
|
||||
BuildRequires: pkgconfig(ijs)
|
||||
BuildRequires: pkgconfig(freetype2)
|
||||
BuildRequires: libjpeg-turbo-devel
|
||||
BuildRequires: libtiff-devel
|
||||
BuildRequires: pkgconfig(dbus-1)
|
||||
BuildRequires: pkgconfig(fontconfig)
|
||||
BuildRequires: pkgconfig(freetype2)
|
||||
BuildRequires: pkgconfig(lcms2)
|
||||
BuildRequires: pkgconfig(libpng)
|
||||
BuildRequires: pkgconfig(poppler)
|
||||
BuildRequires: pkgconfig(zlib)
|
||||
BuildRequires: poppler-cpp-devel
|
||||
|
||||
# cups-browsed
|
||||
BuildRequires: avahi-devel
|
||||
BuildRequires: pkgconfig(avahi-glib)
|
||||
@ -127,44 +100,44 @@ BuildRequires: python3-cups
|
||||
# Testing font for test scripts.
|
||||
BuildRequires: dejavu-sans-fonts
|
||||
|
||||
# autogen.sh
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
BuildRequires: libtool
|
||||
# needed for systemd rpm macros in scriptlets
|
||||
BuildRequires: systemd-rpm-macros
|
||||
|
||||
Requires: cups-filesystem
|
||||
# poppler required for banner printing and with ghostscript needed when project
|
||||
# is configured with --with-pdftops=hybrid
|
||||
Requires: poppler-utils
|
||||
# 1894543 - just to make sure our filter will work if there is a case when cups-filters
|
||||
# is updated alone and ghostscript isn't updated. This requirement will make sure we will
|
||||
# bring along a new ghostscript too.
|
||||
Requires: ghostscript%{?_isa} >= 0:9.27-1
|
||||
# cups-browsed needs systemd-resolved or nss-mdns for resolving .local addresses of remote print queues
|
||||
# let's not require a specific package and let the user decide what he wants to use.
|
||||
# just recommend nss-mdns for Fedora for now to have working default, but
|
||||
# don't hardwire it for resolved users
|
||||
%if 0%{?fedora}
|
||||
Recommends: nss-mdns
|
||||
%endif
|
||||
# ippfind is used in driverless backend, not needed classic PPD based print queue
|
||||
Recommends: cups-ipptool
|
||||
|
||||
# texttopdf
|
||||
Requires: liberation-mono-fonts
|
||||
%if %{with braille}
|
||||
Recommends: %{name}-braille%{?_isa} = %{version}-%{release}
|
||||
%endif
|
||||
|
||||
# pstopdf
|
||||
Requires: bc grep sed which
|
||||
# for getting ICC profiles for filters (dbus must run)
|
||||
Requires: colord
|
||||
Requires: cups-filesystem
|
||||
# have the same libs for the package
|
||||
Requires: cups-filters-libs%{?_isa} = %{version}-%{release}
|
||||
# several filters calls 'gs' binary during filtering
|
||||
Requires: ghostscript
|
||||
# texttopdf
|
||||
Requires: liberation-mono-fonts
|
||||
# if --with-pdftops is set to hybrid, we use poppler filters for several printers
|
||||
# and for printing banners, for other printers we need gs - ghostscript
|
||||
Requires: poppler-utils
|
||||
|
||||
# cups-browsed
|
||||
# it needs cups.service for running
|
||||
# cups-browsed needs to have cups.service to run
|
||||
Requires(post): systemd
|
||||
Requires(preun): systemd
|
||||
Requires(postun): systemd
|
||||
|
||||
# recommends cups-ipptool - it is needed for driverless support,
|
||||
# but it is useless for older devices and cups servers
|
||||
Recommends: cups-ipptool
|
||||
|
||||
# older installations can still have ghostscript-cups and foomatic-filters
|
||||
# installed, but they are replaced by cups-filters now. We need to obsolete
|
||||
# them to have them uninstalled (#1632268)
|
||||
# rpm complains about unversioned Obsoletes - use NVR bigger than is in RHEL7
|
||||
# to make the upgrade to RHEL8 work even if RHEL7 obsoleted packages
|
||||
# get an update
|
||||
Obsoletes: ghostscript-cups < 9.26-1
|
||||
Obsoletes: foomatic-filters < 4.0.10-1
|
||||
|
||||
%package libs
|
||||
Summary: OpenPrinting CUPS filters and backends - cupsfilters and fontembed libraries
|
||||
@ -213,52 +186,7 @@ The package provides filters and cups-brf backend needed for braille printing.
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
%patch01 -p1 -b .createall
|
||||
# 1572450 - cupsd: Filter "brftopagedbrf" not found.
|
||||
%patch02 -p1 -b .brftopagedbrf-install
|
||||
# covscan fixes from upstream
|
||||
%patch03 -p1 -b .covscan
|
||||
# 1626996 - cups-filters: Sticky EOF behavior in glibc breaks descriptor concatenation using dup2
|
||||
%patch04 -p1 -b .cleareof
|
||||
# 1609264 - man pages: wrong links in man cups-browsed
|
||||
%patch05 -p1 -b .manpage
|
||||
# 1712814 - Removed option from Ghostscript causes breakage of printing by foomatic-rip filter
|
||||
%patch06 -p1 -b .foomatic-rip-crash
|
||||
# 1605101 - qpdf: should not re-implement crypto
|
||||
%patch07 -p1 -b .pdftopdf-nocrypt
|
||||
# 1776270 - cups-browsed leaks sockets
|
||||
%patch08 -p1 -b .cups-browsed-socket-leak
|
||||
# 1677731 - error messages when using cups-browsed
|
||||
%patch09 -p1 -b .cups-browsed-error-messages
|
||||
# 1813229 - cups-browsed leaks memory
|
||||
%patch10 -p1 -b .cups-browsed-memory-leak
|
||||
# 1891681 - [RHEL 8] foomatic-rip files up /var/spool/tmp with temporary files
|
||||
%patch11 -p1 -b .remove-tmpfile
|
||||
# 1889798 - Rebuild cups-filters due to rebase of poppler
|
||||
%patch12 -p1 -b .poppler2011
|
||||
# 1894543 - Fix '.setfilladjust' usage after gs upgrade to 9.27
|
||||
%patch13 -p1 -b .setfilladjust
|
||||
# 1931603 - cups-browsed doesn't save "-default" options
|
||||
%patch14 -p1 -b .cups-browsed-save-default-options
|
||||
# 1972981 - cups-browsed doesn't renew DBus subscription in time and all printing comes to a halt
|
||||
%patch15 -p1 -b .renew
|
||||
# 1981612 - [RHEL 8] pdftopdf doesn't handle "page-range=10-2147483647" correctly
|
||||
%patch16 -p1 -b .ranges
|
||||
# 2185675 - Edges cropped when printing PostScript document
|
||||
%patch17 -p1 -b .margins
|
||||
# CVE-2023-24805 cups-filters: remote code execution in cups-filters, beh CUPS backend
|
||||
%patch18 -p1 -b .cve202324805
|
||||
# RHEL-19433 Incorrect PS header handling in gstopdf
|
||||
%patch19 -p1 -b .gstoraster-psdetect
|
||||
# RHEL-16034 pdftopdf results with (N > 1)^2 copies if a file is sent to IPP printer with collate
|
||||
%patch20 -p1 -b .pdftopdf-ncopies
|
||||
# CVE-2024-47175 cups-filters: remote command injection via attacker controlled data in PPD file
|
||||
%patch21 -p1 -b .CVE-2024-47175
|
||||
# CVE-2024-47076 cups-filters: `cfGetPrinterAttributes` API does not perform sanitization on returned IPP attributes
|
||||
%patch22 -p1 -b .CVE-2024-47076
|
||||
|
||||
%autosetup -S git
|
||||
|
||||
%build
|
||||
# work-around Rpath
|
||||
@ -268,8 +196,6 @@ The package provides filters and cups-brf backend needed for braille printing.
|
||||
# Brother, Minolta, and Konica Minolta to work around
|
||||
# bugs in the printer's PS interpreters
|
||||
# --with-rcdir=no - don't install SysV init script
|
||||
# --enable-auto-setup-driverless - enable automatic setup of IPP network printers
|
||||
# with driverless support
|
||||
# --enable-driverless - enable PPD generator for driverless printing in
|
||||
# /usr/lib/cups/driver, it is for manual setup of
|
||||
# driverless printers with printer setup tool
|
||||
@ -278,6 +204,9 @@ The package provides filters and cups-brf backend needed for braille printing.
|
||||
# --enable-dbus - enable DBus Connection Manager's code
|
||||
# --disable-silent-rules - verbose build output
|
||||
# --disable-mutool - mupdf is retired in Fedora, use qpdf
|
||||
# --enable-pclm - support for pclm language
|
||||
# --with-remote-cups-local-queue-naming=RemoteName - name created local queues, which point to
|
||||
# remote CUPS queue, by its name from the server
|
||||
|
||||
%configure --disable-static \
|
||||
--disable-silent-rules \
|
||||
@ -286,23 +215,23 @@ The package provides filters and cups-brf backend needed for braille printing.
|
||||
--with-rcdir=no \
|
||||
--disable-mutool \
|
||||
--enable-driverless \
|
||||
--enable-pclm \
|
||||
--with-apple-raster-filter=rastertopdf \
|
||||
%if %{with braille}
|
||||
--enable-braille \
|
||||
%else
|
||||
--disable-braille \
|
||||
%endif
|
||||
--with-browseremoteprotocols=none\
|
||||
--enable-auto-setup-driverless
|
||||
--with-remote-cups-local-queue-naming=RemoteName
|
||||
|
||||
make %{?_smp_mflags}
|
||||
%make_build
|
||||
|
||||
%install
|
||||
make install DESTDIR=%{buildroot}
|
||||
%make_install
|
||||
|
||||
# Add textonly driver back, but as lftocrlf
|
||||
# part of 2118406 - texttotext filter strips ESC causing PCL files to be printed improperly
|
||||
install -p -m 0755 %{SOURCE3} %{buildroot}%{_cups_serverbin}/filter/lftocrlf
|
||||
install -p -m 0644 %{SOURCE2} %{buildroot}%{_datadir}/ppd/cupsfilters/lftocrlf.ppd
|
||||
# 2229784 - Add textonly driver back, but as lftocrlf
|
||||
install -p -m 0755 %{SOURCE2} %{buildroot}%{_cups_serverbin}/filter/lftocrlf
|
||||
install -p -m 0644 %{SOURCE1} %{buildroot}%{_datadir}/ppd/cupsfilters/lftocrlf.ppd
|
||||
|
||||
# Don't ship libtool la files.
|
||||
rm -f %{buildroot}%{_libdir}/lib*.la
|
||||
@ -322,18 +251,6 @@ install -p -m 644 utils/cups-browsed.service %{buildroot}%{_unitdir}
|
||||
# create it temporarily as a relative symlink
|
||||
ln -sf %{_cups_serverbin}/filter/foomatic-rip %{buildroot}%{_bindir}/foomatic-rip
|
||||
|
||||
# Don't ship urftopdf for now (bug #1002947).
|
||||
rm -f %{buildroot}%{_cups_serverbin}/filter/urftopdf
|
||||
sed -i '/urftopdf/d' %{buildroot}%{_datadir}/cups/mime/cupsfilters.convs
|
||||
|
||||
# Don't ship pdftoopvp for now (bug #1027557).
|
||||
rm -f %{buildroot}%{_cups_serverbin}/filter/pdftoopvp
|
||||
rm -f %{buildroot}%{_sysconfdir}/fonts/conf.d/99pdftoopvp.conf
|
||||
|
||||
# use pregenerated PDF for test page to workaround the broken bannertopdf filter
|
||||
# for printers requesting PDF document format (bz#2064606)
|
||||
install -p -m 644 %{SOURCE1} %{buildroot}%{_datadir}/cups/data/testprint
|
||||
|
||||
|
||||
%check
|
||||
make check
|
||||
@ -341,13 +258,22 @@ make check
|
||||
%post
|
||||
%systemd_post cups-browsed.service
|
||||
|
||||
# Set BrowseRemoteProtocols to none in light of CVE-2024-47176
|
||||
if ! grep -Fxq "# added by post scriptlet" %{_sysconfdir}/cups/cups-browsed.conf
|
||||
then
|
||||
cp %{_sysconfdir}/cups/cups-browsed.conf %{_sysconfdir}/cups/cups-browsed.conf.rpmsave
|
||||
sed -i "s/^\s*BrowseRemoteProtocols.*/# added by post scriptlet\nBrowseRemoteProtocols none/" %{_sysconfdir}/cups/cups-browsed.conf
|
||||
fi
|
||||
|
||||
# put UpdateCUPSQueuesMaxPerCall and PauseBetweenCUPSQueueUpdates into cups-browsed.conf
|
||||
# for making cups-browsed work more stable for environments with many print queues
|
||||
# remove this after 1-2 releases
|
||||
for directive in "UpdateCUPSQueuesMaxPerCall" "PauseBetweenCUPSQueueUpdates"
|
||||
do
|
||||
found=`%{_bindir}/grep "^[[:blank:]]*$directive" %{_sysconfdir}/cups/cups-browsed.conf`
|
||||
if [ -z "$found" ]
|
||||
then
|
||||
if [ "x$directive" == "xUpdateCUPSQueuesMaxPerCall" ]
|
||||
then
|
||||
%{_bindir}/echo "UpdateCUPSQueuesMaxPerCall 20" >> %{_sysconfdir}/cups/cups-browsed.conf
|
||||
else
|
||||
%{_bindir}/echo "PauseBetweenCUPSQueueUpdates 5" >> %{_sysconfdir}/cups/cups-browsed.conf
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
%preun
|
||||
%systemd_preun cups-browsed.service
|
||||
@ -355,21 +281,27 @@ fi
|
||||
%postun
|
||||
%systemd_postun_with_restart cups-browsed.service
|
||||
|
||||
%post libs -p /sbin/ldconfig
|
||||
|
||||
%postun libs -p /sbin/ldconfig
|
||||
%ldconfig_scriptlets libs
|
||||
|
||||
|
||||
%files
|
||||
%{_pkgdocdir}/README
|
||||
%{_pkgdocdir}/ABOUT-NLS
|
||||
%{_pkgdocdir}/AUTHORS
|
||||
%{_pkgdocdir}/NEWS
|
||||
%config(noreplace) %verify(not size filedigest mtime) %{_sysconfdir}/cups/cups-browsed.conf
|
||||
%attr(0755,root,root) %{_cups_serverbin}/backend/parallel
|
||||
%{_bindir}/foomatic-rip
|
||||
%{_bindir}/driverless
|
||||
%{_bindir}/driverless-fax
|
||||
%{_sbindir}/cups-browsed
|
||||
%attr(0700,root,root) %{_cups_serverbin}/backend/beh
|
||||
# implicitclass backend must be run as root
|
||||
%attr(0700,root,root) %{_cups_serverbin}/backend/implicitclass
|
||||
# all backends needs to be run only as root because of kerberos
|
||||
%attr(0700,root,root) %{_cups_serverbin}/backend/parallel
|
||||
# Serial backend needs to run as root (bug #212577#c4).
|
||||
%attr(0700,root,root) %{_cups_serverbin}/backend/serial
|
||||
%attr(0755,root,root) %{_cups_serverbin}/backend/implicitclass
|
||||
%attr(0755,root,root) %{_cups_serverbin}/backend/beh
|
||||
%{_cups_serverbin}/backend/driverless
|
||||
%{_cups_serverbin}/backend/driverless-fax
|
||||
%attr(0755,root,root) %{_cups_serverbin}/filter/bannertopdf
|
||||
%attr(0755,root,root) %{_cups_serverbin}/filter/commandtoescpx
|
||||
%attr(0755,root,root) %{_cups_serverbin}/filter/commandtopclx
|
||||
@ -380,8 +312,7 @@ fi
|
||||
%attr(0755,root,root) %{_cups_serverbin}/filter/imagetopdf
|
||||
%attr(0755,root,root) %{_cups_serverbin}/filter/imagetops
|
||||
%attr(0755,root,root) %{_cups_serverbin}/filter/imagetoraster
|
||||
# Add textonly driver back, but as lftocrlf
|
||||
# part of 2118406 - texttotext filter strips ESC causing PCL files to be printed improperly
|
||||
# 2229784 - Add textonly driver back, but as lftocrlf
|
||||
%attr(0755,root,root) %{_cups_serverbin}/filter/lftocrlf
|
||||
%attr(0755,root,root) %{_cups_serverbin}/filter/pdftopdf
|
||||
%attr(0755,root,root) %{_cups_serverbin}/filter/pdftops
|
||||
@ -395,43 +326,42 @@ fi
|
||||
%attr(0755,root,root) %{_cups_serverbin}/filter/texttopdf
|
||||
%attr(0755,root,root) %{_cups_serverbin}/filter/texttops
|
||||
%attr(0755,root,root) %{_cups_serverbin}/filter/texttotext
|
||||
%{_bindir}/foomatic-rip
|
||||
%{_bindir}/driverless
|
||||
%{_cups_serverbin}/backend/driverless
|
||||
%{_cups_serverbin}/driver/driverless
|
||||
%{_cups_serverbin}/driver/driverless-fax
|
||||
%{_datadir}/cups/banners
|
||||
%{_datadir}/cups/charsets
|
||||
%{_datadir}/cups/data/*
|
||||
# this needs to be in the main package because of cupsfilters.drv
|
||||
%{_datadir}/cups/ppdc/pcl.h
|
||||
%{_datadir}/cups/drv/cupsfilters.drv
|
||||
%{_datadir}/cups/mime/cupsfilters.types
|
||||
%{_datadir}/cups/mime/cupsfilters.convs
|
||||
%{_datadir}/cups/mime/cupsfilters-ghostscript.convs
|
||||
%{_datadir}/cups/mime/cupsfilters-poppler.convs
|
||||
%{_datadir}/ppd/cupsfilters
|
||||
%{_sbindir}/cups-browsed
|
||||
%{_unitdir}/cups-browsed.service
|
||||
%{_mandir}/man8/cups-browsed.8.gz
|
||||
%{_mandir}/man5/cups-browsed.conf.5.gz
|
||||
# this needs to be in the main package because of cupsfilters.drv
|
||||
%{_datadir}/cups/ppdc/pcl.h
|
||||
%{_mandir}/man1/foomatic-rip.1.gz
|
||||
%{_mandir}/man1/driverless.1.gz
|
||||
%{_mandir}/man5/cups-browsed.conf.5.gz
|
||||
%{_mandir}/man8/cups-browsed.8.gz
|
||||
%config(noreplace) %{_sysconfdir}/cups/cups-browsed.conf
|
||||
%{_unitdir}/cups-browsed.service
|
||||
|
||||
%files libs
|
||||
%dir %{_pkgdocdir}/
|
||||
%{_pkgdocdir}/COPYING
|
||||
%dir %{_pkgdocdir}/fontembed
|
||||
%{_pkgdocdir}/fontembed/README
|
||||
%{_libdir}/libcupsfilters.so.*
|
||||
%{_libdir}/libfontembed.so.*
|
||||
%{_libdir}/libcupsfilters.so.1*
|
||||
%{_libdir}/libfontembed.so.1*
|
||||
|
||||
%files devel
|
||||
%{_datadir}/cups/ppdc/escp.h
|
||||
%{_includedir}/cupsfilters
|
||||
%{_includedir}/fontembed
|
||||
%{_datadir}/cups/ppdc/escp.h
|
||||
%{_libdir}/pkgconfig/libcupsfilters.pc
|
||||
%{_libdir}/pkgconfig/libfontembed.pc
|
||||
%{_libdir}/libcupsfilters.so
|
||||
%{_libdir}/libfontembed.so
|
||||
%{_libdir}/pkgconfig/libcupsfilters.pc
|
||||
%{_libdir}/pkgconfig/libfontembed.pc
|
||||
|
||||
%if %{with braille}
|
||||
%files braille
|
||||
@ -477,104 +407,264 @@ fi
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Fri Sep 27 2024 Zdenek Dohnal <zdohnal@redhat.com> - 1.20.0-35
|
||||
- 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
|
||||
- CVE-2024-47176 cups-filters: cups-browsed binds on UDP INADDR_ANY:631 trusting any packet from any source
|
||||
* Mon Feb 26 2024 Zdenek Dohnal <zdohnal@redhat.com> - 1.28.7-15
|
||||
- RHEL-19201 redhat-lsb unnecessary pulls in cups and avahi dependencies
|
||||
|
||||
* Mon Feb 26 2024 Zdenek Dohnal <zdohnal@redhat.com> - 1.20.0-34
|
||||
- RHEL-13211 redhat-lsb unnecessary pulls in cups and avahi dependencies
|
||||
* Wed Dec 20 2023 Zdenek Dohnal <zdohnal@redhat.com> - 1.28.7-14
|
||||
- RHEL-19201 redhat-lsb unnecessary pulls in cups and avahi dependencies
|
||||
- RHEL-16026 Cups Browsed does not correctly pull printer location and description information from print server
|
||||
|
||||
* Tue Dec 19 2023 Zdenek Dohnal <zdohnal@redhat.com> - 1.20.0-33
|
||||
- RHEL-19433 Incorrect PS header handling in gstopdf
|
||||
- RHEL-16034 pdftopdf results with (N > 1)^2 copies if a file is sent to IPP printer with collate
|
||||
- RHEL-13211 redhat-lsb unnecessary pulls in cups and avahi dependencies
|
||||
* Tue Aug 08 2023 Zdenek Dohnal <zdohnal@redhat.com> - 1.28.7-13
|
||||
- 2229784 - Add textonly driver back, but as lftocrlf
|
||||
|
||||
* Tue Aug 08 2023 Zdenek Dohnal <zdohnal@redhat.com> - 1.20.0-32
|
||||
- 2118406 - texttotext filter strips ESC causing PCL files to be printed improperly
|
||||
|
||||
* Wed Jun 07 2023 Zdenek Dohnal <zdohnal@redhat.com> - 1.20.0-31
|
||||
* Wed Jun 07 2023 Zdenek Dohnal <zdohnal@redhat.com> - 1.28.7-12
|
||||
- CVE-2023-24805 cups-filters: remote code execution in cups-filters, beh CUPS backend
|
||||
|
||||
* Thu Apr 13 2023 Zdenek Dohnal <zdohnal@redhat.com> - 1.20.0-30
|
||||
- 2185675 - Edges cropped when printing PostScript document
|
||||
* Thu Sep 22 2022 Zdenek Dohnal <zdohnal@redhat.com> - 1.28.7-11
|
||||
- 2129054 - build braille subpackage only on Fedora and CentOS Stream > 9
|
||||
|
||||
* Thu Sep 22 2022 Zdenek Dohnal <zdohnal@redhat.com> - 1.20.0-29
|
||||
- 2128539 - build braille subpackage only on Fedora and CentOS Stream > 9
|
||||
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 1.28.7-10
|
||||
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
||||
Related: rhbz#1991688
|
||||
|
||||
* Thu Jun 16 2022 Zdenek Dohnal <zdohnal@redhat.com> - 1.20.0-28
|
||||
- 2064606 - [RHEL8.5] Test page is not working if the destination document format is PDF
|
||||
* Mon Jul 26 2021 Zdenek Dohnal <zdohnal@redhat.com> - 1.28.7-9
|
||||
- 1982118 - [RHEL 9] pdftopdf doesn't handle "page-range=10-2147483647" correctly
|
||||
|
||||
* Tue Jul 13 2021 Zdenek Dohnal <zdohnal@redhat.com> - 1.20.0-27
|
||||
- 1981612 - [RHEL 8] pdftopdf doesn't handle "page-range=10-2147483647" correctly
|
||||
* Mon Jun 21 2021 Zdenek Dohnal <zdohnal@redhat.com> - 1.28.7-8
|
||||
- 1973055 - cups-browsed doesn't renew DBus subscription in time and all printing comes to a halt
|
||||
|
||||
* Mon Jun 21 2021 Zdenek Dohnal <zdohnal@redhat.com> - 1.20.0-26
|
||||
- 1972981 - cups-browsed doesn't renew DBus subscription in time and all printing comes to a halt
|
||||
* Thu May 20 2021 Zdenek Dohnal <zdohnal@redhat.com> - 1.28.7-7
|
||||
- 1954523 - cups-browsed doesn't save "*-default" options
|
||||
|
||||
* Thu Jun 03 2021 Richard Lescak <zdohnal@redhat.com> - 1.20.0-25
|
||||
- 1931603 - cups-browsed doesn't save "*-default" options
|
||||
* Thu Apr 15 2021 Mohan Boddu <mboddu@redhat.com> - 1.28.7-6
|
||||
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
||||
|
||||
* Mon Dec 14 2020 Zdenek Dohnal <zdohnal@redhat.com> - 1.20.0-24
|
||||
- require the explicit gs version
|
||||
* Mon Feb 01 2021 Zdenek Dohnal <zdohnal@redhat.com> - 1.28.7-5
|
||||
- rebuilt
|
||||
|
||||
* Tue Dec 08 2020 Zdenek Dohnal <zdohnal@redhat.com> - 1.20.0-23
|
||||
- 1894543 - Fix '.setfilladjust' usage after gs upgrade to 9.27
|
||||
* Thu Jan 28 2021 Zdenek Dohnal <zdohnal@redhat.com> - 1.28.7-4
|
||||
- remove nss-mdns - dont require a specific way how to resolve .local addresses
|
||||
|
||||
* Wed Nov 18 2020 Zdenek Dohnal <zdohnal@redhat.com> - 1.20.0-22
|
||||
- 1889798 - Rebuild cups-filters due to rebase of poppler
|
||||
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.28.7-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||
|
||||
* Tue Oct 27 2020 Zdenek Dohnal <zdohnal@redhat.com> - 1.20.0-21
|
||||
- 1891681 - [RHEL 8] foomatic-rip files up /var/spool/tmp with temporary files
|
||||
* Mon Jan 25 2021 Zdenek Dohnal <zdohnal@redhat.com> - 1.28.7-2
|
||||
- unpush fix for 1904405 - M281fdw now often chokes on URF
|
||||
|
||||
* Wed Apr 08 2020 Zdenek Dohnal <zdohnal@redhat.com> - 1.20.0-20
|
||||
- 1813229 - cups-browsed leaks memory
|
||||
* Mon Jan 11 2021 Zdenek Dohnal <zdohnal@redhat.com> - 1.28.7-1
|
||||
- 1.28.7, urftopdf nor pdftoopvp aren't compiled anymore
|
||||
- 1904405 - HP M281fdw: čžš characters printed as squares with "driverless" driver
|
||||
|
||||
* Mon Apr 06 2020 Zdenek Dohnal <zdohnal@redhat.com> - 1.20.0-20
|
||||
- 1677731 - error messages when using cups-browsed
|
||||
- 1776230 - missing dependency for ippfind
|
||||
* Mon Dec 07 2020 Zdenek Dohnal <zdohnal@redhat.com> - 1.28.6-1
|
||||
- 1.28.6
|
||||
|
||||
* Mon Nov 25 2019 Zdenek Dohnal <zdohnal@redhat.com> - 1.20.0-19
|
||||
- 1776270 - cups-browsed leaks sockets
|
||||
* Tue Dec 01 2020 Zdenek Dohnal <zdohnal@redhat.com> - 1.28.5-4
|
||||
- filters using ijs were removed, removed the dep
|
||||
|
||||
* Mon Sep 02 2019 Zdenek Dohnal <zdohnal@redhat.com> - 1.20.0-18
|
||||
- 1605101 - qpdf: should not re-implement crypto
|
||||
* Tue Nov 24 2020 Zdenek Dohnal <zdohnal@redhat.com> - 1.28.5-3
|
||||
- fix various memory issues within cups-browsed
|
||||
|
||||
* Wed Aug 07 2019 Zdenek Dohnal <zdohnal@redhat.com> - 1.20.0-17
|
||||
- 1738533 - rpm -V failed for /etc/cups/cups-browsed.conf
|
||||
* Thu Nov 05 2020 Zdenek Dohnal <zdohnal@redhat.com> - 1.28.5-2
|
||||
- use make and git-core
|
||||
|
||||
* Fri Jun 28 2019 Marek Kasik <mkasik@redhat.com> - 1.20.0-16
|
||||
- Rebuild due to soname bump in poppler-0.66.0-21
|
||||
- Resolves: #1715836
|
||||
* Mon Nov 02 2020 Zdenek Dohnal <zdohnal@redhat.com> - 1.28.5-1
|
||||
- 1.28.5, 1881365 - cups-browsed crashing
|
||||
|
||||
* Thu May 23 2019 Zdenek Dohnal <zdohnal@redhat.com> - 1.20.0-15
|
||||
- 1712814 - Removed option from Ghostscript causes breakage of printing by foomatic-rip filter
|
||||
* Tue Sep 29 2020 Zdenek Dohnal <zdohnal@redhat.com> - 1.28.2-3
|
||||
- 1891720 - foomatic-rip files up /var/spool/tmp with temporary files
|
||||
|
||||
* Mon Nov 12 2018 Zdenek Dohnal <zdohnal@redhat.com> - 1.20.0-14
|
||||
- 1609264 - man pages: wrong links in man cups-browsed
|
||||
* Thu Sep 17 2020 Zdenek Dohnal <zdohnal@redhat.com> - 1.28.2-2
|
||||
- 1879147 - driverless cannot generate ppd for dns-sd based uris
|
||||
|
||||
* Fri Sep 21 2018 Zdenek Dohnal <zdohnal@redhat.com> - 1.20.0-13
|
||||
- 1602470 - covscan fixes from upstream
|
||||
- 1632268 - cups-filters needs to obsolete ghostscript-cups and foomatic-filters
|
||||
- 1626996 - cups-filters: Sticky EOF behavior in glibc breaks descriptor concatenation using dup2
|
||||
* Tue Sep 15 2020 Zdenek Dohnal <zdohnal@redhat.com> - 1.28.2-1
|
||||
- 1.28.2
|
||||
|
||||
* Tue Jul 24 2018 Zdenek Dohnal <zdohnal@redhat.com> - 1.20.0-12
|
||||
* Thu Sep 03 2020 Zdenek Dohnal <zdohnal@redhat.com> - 1.28.1-2
|
||||
- revert previous commit - systemd-resolved doesn't work with avahi right now
|
||||
because missing link in NetworkManager
|
||||
|
||||
* Mon Aug 31 2020 Zdenek Dohnal <zdohnal@redhat.com> - 1.28.1-2
|
||||
- MDNS resolving should be done by systemd-resolved now
|
||||
|
||||
* Thu Aug 27 2020 Zdenek Dohnal <zdohnal@redhat.com> - 1.28.1-1
|
||||
- 1.28.1 - added driverless fax support
|
||||
|
||||
* Fri Aug 21 2020 Zdenek Dohnal <zdohnal@redhat.com> - 1.27.5-7
|
||||
- use configure option instead of downstream, cups-browsed.conf editing, patch
|
||||
- the exact path in cups-browsed manpage was removed, use the patch removing it instead of downstream one
|
||||
- use configure option to dont save queues between restarts instead of downstream patch reverting the issue
|
||||
- memory leaks patch is from upstream too
|
||||
|
||||
* Wed Aug 19 2020 Zdenek Dohnal <zdohnal@redhat.com> - 1.27.5-6
|
||||
- 1867412 - cups-browsed leaks memory
|
||||
|
||||
* Thu Aug 06 2020 Zdenek Dohnal <zdohnal@redhat.com> - 1.27.5-5
|
||||
- require ipptool explicitly
|
||||
- remove buildrequire on ipptool
|
||||
|
||||
* Wed Aug 05 2020 Zdenek Dohnal <zdohnal@redhat.com> - 1.27.5-4
|
||||
- use %%make_build and %%make_install according FPG
|
||||
- own 'new' directories
|
||||
|
||||
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.27.5-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||
|
||||
* Mon Jul 20 2020 Zdenek Dohnal <zdohnal@redhat.com> - 1.27.5-2
|
||||
- 1848575 - [cups, cups-filters] PPD generators creates invalid cupsManualCopies entry
|
||||
|
||||
* Mon Jun 08 2020 Zdenek Dohnal <zdohnal@redhat.com> - 1.27.5-1
|
||||
- 1.27.5
|
||||
|
||||
* Tue Apr 14 2020 Zdenek Dohnal <zdohnal@redhat.com> - 1.27.4-1
|
||||
- 1.27.4
|
||||
|
||||
* Wed Apr 08 2020 Zdenek Dohnal <zdohnal@redhat.com> - 1.27.3-3
|
||||
- memory issues in cups-browsed
|
||||
|
||||
* Mon Apr 06 2020 Zdenek Dohnal <zdohnal@redhat.com> - 1.27.3-2
|
||||
- make nss-mdns and avahi recommended
|
||||
|
||||
* Mon Mar 23 2020 Zdenek Dohnal <zdohnal@redhat.com> - 1.27.3-1
|
||||
- 1.27.3
|
||||
|
||||
* Fri Mar 13 2020 Zdenek Dohnal <zdohnal@redhat.com> - 1.27.2-2
|
||||
- fix leaks in cups-browsed
|
||||
- add require on nss-mdns
|
||||
|
||||
* Mon Mar 02 2020 Zdenek Dohnal <zdohnal@redhat.com> - 1.27.2-1
|
||||
- 1.27.2
|
||||
|
||||
* Tue Feb 25 2020 Zdenek Dohnal <zdohnal@redhat.com> - 1.27.1-2
|
||||
- 1806862 - foomatic-rip handles empty files in bad way
|
||||
|
||||
* Tue Feb 18 2020 Zdenek Dohnal <zdohnal@redhat.com> - 1.27.1-1
|
||||
- 1.27.1
|
||||
|
||||
* Tue Feb 18 2020 Zdenek Dohnal <zdohnal@redhat.com> - 1.27.0-2
|
||||
- 1802969 - Service "cups-browsed" is crashing all the time
|
||||
|
||||
* Tue Jan 28 2020 Zdenek Dohnal <zdohnal@redhat.com> - 1.27.0-1
|
||||
- 1.27.0
|
||||
- add post scriptlet for update
|
||||
|
||||
* Wed Jan 22 2020 Zdenek Dohnal <zdohnal@redhat.com> - 1.22.5-13
|
||||
- fix build with GCC 10 and remove old obsoletes
|
||||
|
||||
* Fri Jan 17 2020 Marek Kasik <mkasik@redhat.com> - 1.22.5-11
|
||||
- Rebuild for poppler-0.84.0
|
||||
|
||||
* Wed Jan 15 2020 Zdenek Dohnal <zdohnal@redhat.com> - 1.22.5-11
|
||||
- add buildrequires fro systemd-rpm-macros
|
||||
|
||||
* Tue Nov 26 2019 Zdenek Dohnal <zdohnal@redhat.com> - 1.22.5-10
|
||||
- 1776271 - Updated cups-browsed in RHEL 7.7 leaks sockets
|
||||
|
||||
* Tue Nov 19 2019 Zdenek Dohnal <zdohnal@redhat.com> - 1.22.5-9
|
||||
- rebuilt for qpdf-9.1.0
|
||||
|
||||
* Tue Oct 22 2019 Zdenek Dohnal <zdohnal@redhat.com> - 1.22.5-8
|
||||
- 1756726 - Epson ET 7700 reports pwg support, but pwg does not work
|
||||
|
||||
* Wed Oct 09 2019 Zdenek Dohnal <zdohnal@redhat.com> - 1.22.5-7
|
||||
- gs 9.27 now uses setfilladjust2
|
||||
|
||||
* Tue Sep 17 2019 Zdenek Dohnal <zdohnal@redhat.com> - 1.22.5-6
|
||||
- ftbfs with qpdf-9.0.0
|
||||
- pdftopdf output should not be encrypted
|
||||
|
||||
* Wed Sep 11 2019 Zdenek Dohnal <zdohnal@redhat.com> - 1.22.5-5
|
||||
- require colord, because it is needed for ICC profiles for filters
|
||||
|
||||
* Tue Aug 13 2019 Zdenek Dohnal <zdohnal@redhat.com> - 1.22.5-4
|
||||
- 1740122 - foomatic-rip segfaults when env variable PRINTER is not defined
|
||||
|
||||
* Wed Aug 07 2019 Zdenek Dohnal <zdohnal@redhat.com> - 1.22.5-3
|
||||
- remove unneeded scriptlet
|
||||
|
||||
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.22.5-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||
|
||||
* Mon Apr 08 2019 Zdenek Dohnal <zdohnal@redhat.com> - 1.22.5-1
|
||||
- 1.22.5
|
||||
|
||||
* Tue Mar 26 2019 Zdenek Dohnal <zdohnal@redhat.com> - 1.22.3-1
|
||||
- 1.22.3
|
||||
|
||||
* Fri Feb 01 2019 Zdenek Dohnal <zdohnal@redhat.com> - 1.22.0-4
|
||||
- cups-brf needs to be run as root
|
||||
|
||||
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.22.0-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||
|
||||
* Fri Jan 25 2019 Marek Kasik <mkasik@redhat.com> - 1.22.0-2
|
||||
- Rebuild for poppler-0.73.0
|
||||
|
||||
* Fri Jan 25 2019 Zdenek Dohnal <zdohnal@redhat.com> - 1.22.0-1
|
||||
- 1.22.0
|
||||
|
||||
* Mon Jan 14 2019 Björn Esser <besser82@fedoraproject.org> - 1.21.6-2
|
||||
- Rebuilt for libcrypt.so.2 (#1666033)
|
||||
|
||||
* Tue Jan 08 2019 Zdenek Dohnal <zdohnal@redhat.com> - 1.21.6-1
|
||||
- 1.21.6
|
||||
|
||||
* Thu Dec 13 2018 Zdenek Dohnal <zdohnal@redhat.com> - 1.21.5-1
|
||||
- 1.21.5
|
||||
|
||||
* Mon Nov 12 2018 Zdenek Dohnal <zdohnal@redhat.com> - 1.21.2-4
|
||||
- links in manpages are wrong
|
||||
|
||||
* Mon Sep 24 2018 Zdenek Dohnal <zdohnal@redhat.com> - 1.21.2-3
|
||||
- 1632267 - cups-filters needs to obsolete ghostscript-cups and foomatic-filters
|
||||
- rebuilt for qpdf-8.2.1
|
||||
|
||||
* Fri Sep 21 2018 Zdenek Dohnal <zdohnal@redhat.com> - 1.21.2-2
|
||||
- 1628255 - cups-filters: Sticky EOF behavior in glibc breaks descriptor concatenation using dup2 (breaks printing)
|
||||
|
||||
* Mon Sep 10 2018 Zdenek Dohnal <zdohnal@redhat.com> - 1.21.2-1
|
||||
- 1.21.2
|
||||
|
||||
* Tue Aug 14 2018 Marek Kasik <mkasik@redhat.com> - 1.20.3-7
|
||||
- Rebuild for poppler-0.67.0
|
||||
|
||||
* Tue Jul 24 2018 Zdenek Dohnal <zdohnal@redhat.com> - 1.20.3-6
|
||||
- correcting license
|
||||
|
||||
* Thu Jul 12 2018 Marek Kasik <mkasik@redhat.com> - 1.20.0-11
|
||||
- Rebuild for poppler-0.66.0
|
||||
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.20.3-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||
|
||||
* Tue Jun 12 2018 Zdenek Dohnal <zdohnal@redhat.com> - 1.20.0-10
|
||||
- requires ghostscript and poppler-utils
|
||||
* Mon Jun 25 2018 Zdenek Dohnal <zdohnal@redhat.com> - 1.20.3-4
|
||||
- rebuilt for new qpdf-8.1.0
|
||||
|
||||
* Tue Jun 12 2018 Zdenek Dohnal <zdohnal@redhat.com> - 1.20.0-9
|
||||
- cups-browsed needs cups.service to run
|
||||
* Tue Jun 12 2018 Zdenek Dohnal <zdohnal@redhat.com> - 1.20.3-3
|
||||
- hybrid pdftops filter requires poppler and ghostscript for run
|
||||
|
||||
* Fri Apr 27 2018 Zdenek Dohnal <zdohnal@redhat.com> - 1.20.0-8
|
||||
- 1572450 - cupsd: Filter "brftopagedbrf" not found.
|
||||
* Tue Jun 12 2018 Zdenek Dohnal <zdohnal@redhat.com> - 1.20.3-2
|
||||
- cups-browsed needs to have cups.service to run
|
||||
|
||||
* Thu Apr 05 2018 Zdenek Dohnal <zdohnal@redhat.com> - 1.20.0-7
|
||||
* Fri Apr 13 2018 Zdenek Dohnal <zdohnal@redhat.com> - 1.20.3-1
|
||||
- 1.20.3
|
||||
|
||||
* Wed Apr 04 2018 Zdenek Dohnal <zdohnal@redhat.com> - 1.20.2-1
|
||||
- 1.20.2
|
||||
- fixing discovering of remote CUPS queues and LDAP queues
|
||||
- dependency on poppler-utils is now only recommended
|
||||
|
||||
* Fri Mar 23 2018 Marek Kasik <mkasik@redhat.com> - 1.20.1-4
|
||||
- Rebuild for poppler-0.63.0
|
||||
|
||||
* Wed Mar 07 2018 Zdenek Dohnal <zdohnal@redhat.com> - 1.20.1-3
|
||||
- Rebuilt for qpdf-8.0.2
|
||||
|
||||
* Mon Mar 05 2018 Zdenek Dohnal <zdohnal@redhat.com> - 1.20.1-2
|
||||
- 1.20.1
|
||||
|
||||
* Wed Feb 28 2018 Zdenek Dohnal <zdohnal@redhat.com> - 1.20.0-8
|
||||
- add explicit soname -> warning about soname change
|
||||
|
||||
* Wed Feb 21 2018 Zdenek Dohnal <zdohnal@redhat.com> - 1.20.0-7
|
||||
- libjpeg is shipped in libjpeg-turbo and pkgconfig in pkgconf-pkg-config
|
||||
|
||||
* Mon Feb 19 2018 Zdenek Dohnal <zdohnal@redhat.com> - 1.20.0-6
|
||||
- gcc and gcc-c++ is no longer in buildroot by default
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user