From 8a4dc0999472e14764763be4cd6ec8be48d1e577 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Tue, 17 Sep 2019 12:49:44 +0200 Subject: [PATCH] pdftopdf output should not be encrypted --- cups-filters.spec | 8 +++++++- pdftopdf-nocrypt.patch | 20 ++++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 pdftopdf-nocrypt.patch diff --git a/cups-filters.spec b/cups-filters.spec index 6f04bb0..b90f9f2 100644 --- a/cups-filters.spec +++ b/cups-filters.spec @@ -4,7 +4,7 @@ Summary: OpenPrinting CUPS filters and backends Name: cups-filters Version: 1.22.5 -Release: 5%{?dist} +Release: 6%{?dist} # For a breakdown of the licensing, see COPYING file # GPLv2: filters: commandto*, imagetoraster, pdftops, rasterto*, @@ -30,6 +30,8 @@ Patch02: cups-browsed.8.patch # issue caused by bad covscan fix, strlen() was called on NULL pointer, # fixed upstream Patch03: cups-filters-foomaticrip-segfault.patch +# backported from upstream, do not create encrypted file during filtering +Patch04: pdftopdf-nocrypt.patch Requires: cups-filters-libs%{?_isa} = %{version}-%{release} @@ -142,6 +144,7 @@ This is the development package for OpenPrinting CUPS filters and backends. %patch02 -p1 -b .manpage # 1740122 - foomatic-rip segfaults when env variable PRINTER is not defined %patch03 -p1 -b .foomaticrip-segfault +%patch04 -p1 -b .pdftopdf-nocrypt %build # work-around Rpath @@ -290,6 +293,9 @@ make check %{_libdir}/libfontembed.so %changelog +* Tue Sep 17 2019 Zdenek Dohnal - 1.22.5-6 +- pdftopdf output should not be encrypted + * Wed Sep 11 2019 Zdenek Dohnal - 1.22.5-5 - require colord, because it is needed for ICC profiles for filters diff --git a/pdftopdf-nocrypt.patch b/pdftopdf-nocrypt.patch new file mode 100644 index 0000000..24caf5c --- /dev/null +++ b/pdftopdf-nocrypt.patch @@ -0,0 +1,20 @@ +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(); + } + // }}}