[Pkg-cups-devel] r760 - in cupsys/trunk: . debian debian/patches

Martin Pitt mpitt at alioth.debian.org
Tue Apr 22 09:09:39 UTC 2008


Author: mpitt
Date: Tue Apr 22 09:09:39 2008
New Revision: 760

Log:
* Add pdftops-dont_fail_on_cancel.dpatch: Fix behavioural change in patch
  from STR #2780 which broke the test suite: When a job is cancelled, do not
  report a failure in the exit code of pdftops.

Added:
   cupsys/trunk/debian/patches/pdftops-dont_fail_on_cancel.dpatch   (contents, props changed)
Modified:
   cupsys/trunk/   (props changed)
   cupsys/trunk/debian/changelog
   cupsys/trunk/debian/patches/00list
   cupsys/trunk/debian/patches/CVE-2008-1722.dpatch   (contents, props changed)

Modified: cupsys/trunk/debian/changelog
==============================================================================
--- cupsys/trunk/debian/changelog	(original)
+++ cupsys/trunk/debian/changelog	Tue Apr 22 09:09:39 2008
@@ -5,6 +5,9 @@
     Also wrap long fields, so that they are easier to edit.
   * Drop pdftops-wait-eintr.dpatch, an improved version has been committed
     upstream. Integrate the upstream solution into pdftops-cups-1.4.dpatch.
+  * Add pdftops-dont_fail_on_cancel.dpatch: Fix behavioural change in patch
+    from STR #2780 which broke the test suite: When a job is cancelled, do not
+    report a failure in the exit code of pdftops.
   * Rebuild against fixed debhelper to properly compress manpages again (see
     #470913). (Closes: #475887, #476495)
 
@@ -13,7 +16,7 @@
     image filter allow a denial of service attack and possibly arbitrary code
     execution. [STR #2790, CVE-2008-1722] (Closes: #476305).
 
- -- Martin Pitt <mpitt at debian.org>  Mon, 21 Apr 2008 17:41:01 +0200
+ -- Martin Pitt <mpitt at debian.org>  Mon, 21 Apr 2008 19:06:55 +0200
 
 cupsys (1.3.7-1) unstable; urgency=medium
 

Modified: cupsys/trunk/debian/patches/00list
==============================================================================
--- cupsys/trunk/debian/patches/00list	(original)
+++ cupsys/trunk/debian/patches/00list	Tue Apr 22 09:09:39 2008
@@ -14,6 +14,7 @@
 include_krb5_h_in_job_h.dpatch
 search_mime_files_in_usr_share.dpatch
 pdftops-cups-1.4.dpatch
+pdftops-dont_fail_on_cancel.dpatch
 ppd-poll-with-client-conf.dpatch
 ubuntu-disable-browsing.dpatch
 ubuntu-default-error-policy-retry-job.dpatch

Modified: cupsys/trunk/debian/patches/CVE-2008-1722.dpatch
==============================================================================

Added: cupsys/trunk/debian/patches/pdftops-dont_fail_on_cancel.dpatch
==============================================================================
--- (empty file)
+++ cupsys/trunk/debian/patches/pdftops-dont_fail_on_cancel.dpatch	Tue Apr 22 09:09:39 2008
@@ -0,0 +1,34 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## pdftops-fixes.dpatch by  <mpitt at debian.org>
+##
+## DP: Fix behavioural change in patch from STR #2780 which broke the test
+## DP: suite: When a job is cancelled, do not report a failure in the exit code
+## DP: of pdftops. (http://www.cups.org/str.php?L2808)
+
+ at DPATCH@
+diff -urNad trunk~/filter/pdftops.c trunk/filter/pdftops.c
+--- trunk~/filter/pdftops.c	2008-04-21 19:33:00.000000000 +0200
++++ trunk/filter/pdftops.c	2008-04-21 19:34:57.000000000 +0200
+@@ -270,20 +270,18 @@
+     * Parent comes here...
+     */
+ 
+-    while ((pdfwaitpid = wait(&pdfstatus)) < 0 && errno == EINTR)
++    while ((pdfwaitpid = wait(&pdfstatus)) < 0 && errno == EINTR);
+     {
+      /*
+       * Wait until we get a valid process ID or the job is canceled...
+       */
+ 
+-      if (job_canceled)
+-	break;
+     }
+ 
+     if (pdfwaitpid != pdfpid)
+     {
+       kill(pdfpid, SIGTERM);
+-      pdfstatus = 1;
++      pdfstatus = job_canceled ? 0 : 1;
+     }
+     else if (pdfstatus)
+     {



More information about the Pkg-cups-devel mailing list