From 838445d80e03bd7c713e8f3681e0e25a1b6fa2b8 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Tue, 29 Sep 2009 04:41:40 +0000 Subject: [PATCH 001/110] Initialize branch F-12 for cups --- branch | 1 + 1 file changed, 1 insertion(+) create mode 100644 branch diff --git a/branch b/branch new file mode 100644 index 0000000..06de2d2 --- /dev/null +++ b/branch @@ -0,0 +1 @@ +F-12 From 1acf4fb33592c2e2bd86b86deac224c2a4a364aa Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Wed, 30 Sep 2009 12:40:01 +0000 Subject: [PATCH 002/110] - Don't use cached PPD for raw queue (bug #526405, STR #3356). --- cups-str3356.patch | 13 +++++++++++++ cups.spec | 6 +++++- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 cups-str3356.patch diff --git a/cups-str3356.patch b/cups-str3356.patch new file mode 100644 index 0000000..0283266 --- /dev/null +++ b/cups-str3356.patch @@ -0,0 +1,13 @@ +diff -up cups-1.4.1/scheduler/printers.c.str3356 cups-1.4.1/scheduler/printers.c +--- cups-1.4.1/scheduler/printers.c.str3356 2009-09-30 12:02:53.467761538 +0100 ++++ cups-1.4.1/scheduler/printers.c 2009-09-30 12:03:28.489636706 +0100 +@@ -3993,7 +3993,8 @@ load_ppd(cupsd_printer_t *p) /* I - Pri + ippDelete(p->ppd_attrs); + p->ppd_attrs = ippNew(); + +- if (cache_info.st_mtime >= ppd_info.st_mtime && ++ if (ppd_info.st_mtime != 1 && ++ cache_info.st_mtime >= ppd_info.st_mtime && + (cache = cupsFileOpen(cache_name, "r")) != NULL) + { + /* diff --git a/cups.spec b/cups.spec index efd79e8..a3435d2 100644 --- a/cups.spec +++ b/cups.spec @@ -9,7 +9,7 @@ Summary: Common Unix Printing System Name: cups Version: 1.4.1 -Release: 5%{?dist} +Release: 6%{?dist} License: GPLv2 Group: System Environment/Daemons Source: http://ftp.easysw.com/pub/cups/1.4.0/cups-%{version}-source.tar.bz2 @@ -52,6 +52,7 @@ Patch30: cups-uri-compat.patch Patch35: cups-cups-get-classes.patch Patch37: cups-avahi.patch Patch38: cups-str3332.patch +Patch39: cups-str3356.patch Patch100: cups-lspp.patch Epoch: 1 Url: http://www.cups.org/ @@ -205,6 +206,7 @@ module. %patch35 -p1 -b .cups-get-classes %patch37 -p1 -b .avahi %patch38 -p1 -b .str3332 +%patch39 -p1 -b .str3356 %if %lspp %patch100 -p1 -b .lspp @@ -505,6 +507,8 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog +* Wed Sep 30 2009 Tim Waugh 1:1.4.1-6 +- Don't use cached PPD for raw queue (bug #526405, STR #3356). * Wed Sep 23 2009 Jiri Popelka 1:1.4.1-5 - Fixed cups.init to be LSB compliant (bug #521641) From 9ee5c274f0f81afaaf27e415807b9335f738bd41 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Fri, 2 Oct 2009 12:02:44 +0000 Subject: [PATCH 003/110] - Fixed orientation of page labels when printing text in landscape mode (bug #520141, STR #3334). --- cups-page-label.patch | 92 +++++++++++++++++++++++++++++++++++++++++++ cups.spec | 8 +++- 2 files changed, 99 insertions(+), 1 deletion(-) create mode 100644 cups-page-label.patch diff --git a/cups-page-label.patch b/cups-page-label.patch new file mode 100644 index 0000000..9aa3b09 --- /dev/null +++ b/cups-page-label.patch @@ -0,0 +1,92 @@ +diff -up cups-1.4.1/filter/pstops.c.page-label cups-1.4.1/filter/pstops.c +--- cups-1.4.1/filter/pstops.c.page-label 2009-10-02 12:33:33.410719651 +0100 ++++ cups-1.4.1/filter/pstops.c 2009-10-02 12:34:11.399594180 +0100 +@@ -108,6 +108,7 @@ typedef struct /**** Document informa + int num_options; /* Number of document-wide options */ + cups_option_t *options; /* Document-wide options */ + int normal_landscape, /* Normal rotation for landscape? */ ++ orientation, /* Original orientation of the document */ + saw_eof, /* Saw the %%EOF comment? */ + slow_collate, /* Collate copies by hand? */ + slow_duplex, /* Duplex pages slowly? */ +@@ -2048,7 +2049,7 @@ do_setup(pstops_doc_t *doc, /* I - Docu + * of the pages... + */ + +- if (Orientation & 1) ++ if (doc->orientation & 1) + write_label_prolog(doc, doc->page_label, PageBottom, + PageWidth - PageLength + PageTop, PageLength); + else +@@ -2056,7 +2057,30 @@ do_setup(pstops_doc_t *doc, /* I - Docu + PageLength); + } + else +- write_label_prolog(doc, doc->page_label, PageBottom, PageTop, PageWidth); ++ { ++ switch (doc->orientation) ++ { ++ case 0 : ++ write_label_prolog(doc, doc->page_label, PageBottom, PageTop, ++ PageWidth); ++ break; ++ ++ case 1 : ++ write_label_prolog(doc, doc->page_label, PageLeft, PageRight, ++ PageLength); ++ break; ++ ++ case 2 : ++ write_label_prolog(doc, doc->page_label, PageLength - PageTop, ++ PageLength - PageBottom, PageWidth); ++ break; ++ ++ case 3 : ++ write_label_prolog(doc, doc->page_label, PageWidth - PageRight, ++ PageWidth - PageLeft, PageLength); ++ break; ++ } ++ } + } + + +@@ -2141,7 +2165,7 @@ end_nup(pstops_doc_t *doc, /* I - Docum + case 1 : + if (doc->use_ESPshowpage) + { +- write_labels(doc, Orientation); ++ write_labels(doc, doc->orientation); + doc_puts(doc, "ESPshowpage\n"); + } + break; +@@ -2156,7 +2180,7 @@ end_nup(pstops_doc_t *doc, /* I - Docum + * Rotate the labels back to portrait... + */ + +- write_labels(doc, Orientation - 1); ++ write_labels(doc, doc->orientation - 1); + } + else if (Orientation == 0) + { +@@ -2182,7 +2206,7 @@ end_nup(pstops_doc_t *doc, /* I - Docum + default : + if (is_last_page(number) && doc->use_ESPshowpage) + { +- write_labels(doc, Orientation); ++ write_labels(doc, doc->orientation); + doc_puts(doc, "ESPshowpage\n"); + } + break; +@@ -2385,6 +2409,12 @@ set_pstops_options( + doc->new_bounding_box[3] = INT_MIN; + + /* ++ * Save original orientation of the document ++ */ ++ ++ doc->orientation = Orientation; ++ ++ /* + * AP_FIRSTPAGE_InputSlot + */ + diff --git a/cups.spec b/cups.spec index a3435d2..54330e3 100644 --- a/cups.spec +++ b/cups.spec @@ -9,7 +9,7 @@ Summary: Common Unix Printing System Name: cups Version: 1.4.1 -Release: 6%{?dist} +Release: 7%{?dist} License: GPLv2 Group: System Environment/Daemons Source: http://ftp.easysw.com/pub/cups/1.4.0/cups-%{version}-source.tar.bz2 @@ -39,6 +39,7 @@ Patch11: cups-direct-usb.patch Patch12: cups-lpr-help.patch Patch13: cups-peercred.patch Patch14: cups-pid.patch +Patch15: cups-page-label.patch Patch16: cups-eggcups.patch Patch17: cups-getpass.patch Patch18: cups-driverd-timeout.patch @@ -193,6 +194,7 @@ module. %patch12 -p1 -b .lpr-help %patch13 -p1 -b .peercred %patch14 -p1 -b .pid +%patch15 -p1 -b .page-label %patch16 -p1 -b .eggcups %patch17 -p1 -b .getpass %patch18 -p1 -b .driverd-timeout @@ -507,6 +509,10 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog +* Fri Oct 2 2009 Tim Waugh 1:1.4.1-7 +- Fixed orientation of page labels when printing text in landscape + mode (bug #520141, STR #3334). + * Wed Sep 30 2009 Tim Waugh 1:1.4.1-6 - Don't use cached PPD for raw queue (bug #526405, STR #3356). From 0637105aa16cc06c1f0c44c7b40ba5deae44b504 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Wed, 7 Oct 2009 16:46:27 +0000 Subject: [PATCH 004/110] - Use upstream patch for STR #3356 (bug #526405). --- cups-str3356.patch | 110 ++++++++++++++++++++++++++++++++++++++++----- cups.spec | 5 ++- 2 files changed, 103 insertions(+), 12 deletions(-) diff --git a/cups-str3356.patch b/cups-str3356.patch index 0283266..e055c1c 100644 --- a/cups-str3356.patch +++ b/cups-str3356.patch @@ -1,13 +1,101 @@ -diff -up cups-1.4.1/scheduler/printers.c.str3356 cups-1.4.1/scheduler/printers.c ---- cups-1.4.1/scheduler/printers.c.str3356 2009-09-30 12:02:53.467761538 +0100 -+++ cups-1.4.1/scheduler/printers.c 2009-09-30 12:03:28.489636706 +0100 -@@ -3993,7 +3993,8 @@ load_ppd(cupsd_printer_t *p) /* I - Pri - ippDelete(p->ppd_attrs); - p->ppd_attrs = ippNew(); +diff -up cups-1.4.1/scheduler/ipp.c.str3356 cups-1.4.1/scheduler/ipp.c +--- cups-1.4.1/scheduler/ipp.c.str3356 2009-10-07 17:26:27.504800579 +0100 ++++ cups-1.4.1/scheduler/ipp.c 2009-10-07 17:26:31.311800539 +0100 +@@ -2324,8 +2324,9 @@ add_printer(cupsd_client_t *con, /* I - + dstfile[1024]; /* Destination Script/PPD file */ + int modify; /* Non-zero if we are modifying */ + char newname[IPP_MAX_NAME]; /* New printer name */ +- int need_restart_job; /* Need to restart job? */ +- int set_device_uri, /* Did we set the device URI? */ ++ int changed_driver, /* Changed the PPD/interface script? */ ++ need_restart_job, /* Need to restart job? */ ++ set_device_uri, /* Did we set the device URI? */ + set_port_monitor; /* Did we set the port monitor? */ -- if (cache_info.st_mtime >= ppd_info.st_mtime && -+ if (ppd_info.st_mtime != 1 && -+ cache_info.st_mtime >= ppd_info.st_mtime && - (cache = cupsFileOpen(cache_name, "r")) != NULL) + +@@ -2469,6 +2470,7 @@ add_printer(cupsd_client_t *con, /* I - + * Look for attributes and copy them over as needed... + */ + ++ changed_driver = 0; + need_restart_job = 0; + + if ((attr = ippFindAttribute(con->request, "printer-location", +@@ -2731,6 +2733,7 @@ add_printer(cupsd_client_t *con, /* I - + if (con->filename) { - /* + need_restart_job = 1; ++ changed_driver = 1; + + strlcpy(srcfile, con->filename, sizeof(srcfile)); + +@@ -2801,18 +2804,6 @@ add_printer(cupsd_client_t *con, /* I - + cupsdLogMessage(CUPSD_LOG_DEBUG, + "Copied PPD file successfully!"); + chmod(dstfile, 0644); +- +-#ifdef __APPLE__ +- /* +- * (Re)register color profiles... +- */ +- +- if (!RunUser) +- { +- apple_unregister_profiles(printer); +- apple_register_profiles(printer); +- } +-#endif /* __APPLE__ */ + } + else + { +@@ -2829,6 +2820,7 @@ add_printer(cupsd_client_t *con, /* I - + IPP_TAG_NAME)) != NULL) + { + need_restart_job = 1; ++ changed_driver = 1; + + if (!strcmp(attr->values[0].string.text, "raw")) + { +@@ -2866,19 +2858,33 @@ add_printer(cupsd_client_t *con, /* I - + cupsdLogMessage(CUPSD_LOG_DEBUG, + "Copied PPD file successfully!"); + chmod(dstfile, 0644); ++ } ++ } ++ ++ if (changed_driver) ++ { ++ /* ++ * If we changed the PPD/interface script, then remove the printer's cache ++ * file... ++ */ ++ ++ char cache_name[1024]; /* Cache filename for printer attrs */ ++ ++ snprintf(cache_name, sizeof(cache_name), "%s/%s.ipp", CacheDir, ++ printer->name); ++ unlink(cache_name); + + #ifdef __APPLE__ +- /* +- * (Re)register color profiles... +- */ ++ /* ++ * (Re)register color profiles... ++ */ + +- if (!RunUser) +- { +- apple_unregister_profiles(printer); +- apple_register_profiles(printer); +- } +-#endif /* __APPLE__ */ ++ if (!RunUser) ++ { ++ apple_unregister_profiles(printer); ++ apple_register_profiles(printer); + } ++#endif /* __APPLE__ */ + } + + /* diff --git a/cups.spec b/cups.spec index 54330e3..03cfc88 100644 --- a/cups.spec +++ b/cups.spec @@ -9,7 +9,7 @@ Summary: Common Unix Printing System Name: cups Version: 1.4.1 -Release: 7%{?dist} +Release: 8%{?dist} License: GPLv2 Group: System Environment/Daemons Source: http://ftp.easysw.com/pub/cups/1.4.0/cups-%{version}-source.tar.bz2 @@ -509,6 +509,9 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog +* Wed Oct 7 2009 Tim Waugh 1:1.4.1-8 +- Use upstream patch for STR #3356 (bug #526405). + * Fri Oct 2 2009 Tim Waugh 1:1.4.1-7 - Fixed orientation of page labels when printing text in landscape mode (bug #520141, STR #3334). From 73c49735f1cef71d6f35a3eb94b0790d628c3d4e Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Thu, 8 Oct 2009 11:37:51 +0000 Subject: [PATCH 005/110] - Fixed naming of 'Generic PostScript Printer' entry. --- cups-generic-ps.patch | 20 ++++++++++++++++++++ cups.spec | 12 ++++++++++-- 2 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 cups-generic-ps.patch diff --git a/cups-generic-ps.patch b/cups-generic-ps.patch new file mode 100644 index 0000000..eccf8a1 --- /dev/null +++ b/cups-generic-ps.patch @@ -0,0 +1,20 @@ +diff -up ./postscript.ppd.generic-ps ./postscript.ppd +--- ./postscript.ppd.generic-ps 2009-10-08 11:08:07.389336611 +0100 ++++ ./postscript.ppd 2009-10-08 11:06:40.836338000 +0100 +@@ -12,11 +12,11 @@ + *LanguageVersion: English + *LanguageEncoding: ISOLatin1 + *PCFileName: "POSTSCRIPT.PPD" +-*Manufacturer: "Postscript" +-*Product: "(CUPS v1.1)" +-*ModelName: "Generic postscript printer" +-*ShortNickName: "Generic postscript printer" +-*NickName: "Generic postscript printer" ++*Manufacturer: "Generic" ++*Product: "(PostScript Printer)" ++*ModelName: "Generic PostScript Printer" ++*ShortNickName: "Generic PostScript Printer" ++*NickName: "Generic PostScript Printer" + *PSVersion: "(2017.000) 0" + *LanguageLevel: "2" + *ColorDevice: False diff --git a/cups.spec b/cups.spec index 03cfc88..8b3bc65 100644 --- a/cups.spec +++ b/cups.spec @@ -9,7 +9,7 @@ Summary: Common Unix Printing System Name: cups Version: 1.4.1 -Release: 8%{?dist} +Release: 9%{?dist} License: GPLv2 Group: System Environment/Daemons Source: http://ftp.easysw.com/pub/cups/1.4.0/cups-%{version}-source.tar.bz2 @@ -26,6 +26,7 @@ Source10: ncp.backend Source12: cups.cron Source14: textonly.filter Source15: textonly.ppd +Patch0: cups-generic-ps.patch Patch1: cups-no-gzip-man.patch Patch2: cups-1.1.16-system-auth.patch Patch3: cups-multilib.patch @@ -181,6 +182,10 @@ module. %prep %setup -q +gunzip -c %{SOURCE8} > postscript.ppd +%patch0 -p0 -b .generic-ps +gzip -n postscript.ppd + %patch1 -p1 -b .no-gzip-man %patch2 -p1 -b .system-auth %patch3 -p1 -b .multilib @@ -296,7 +301,7 @@ install -c -m 755 %{SOURCE6} $RPM_BUILD_ROOT%{cups_serverbin}/filter install -c -m 644 %{SOURCE7} $RPM_BUILD_ROOT%{_sysconfdir}/cups # Ship a generic postscript PPD file (#73061) -install -c -m 644 %{SOURCE8} $RPM_BUILD_ROOT%{_datadir}/cups/model +install -c -m 644 postscript.ppd.gz $RPM_BUILD_ROOT%{_datadir}/cups/model # Ship a printers.conf file, and a client.conf file. That way, they get # their SELinux file contexts set correctly. @@ -509,6 +514,9 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog +* Thu Oct 8 2009 Tim Waugh 1:1.4.1-9 +- Fixed naming of 'Generic PostScript Printer' entry. + * Wed Oct 7 2009 Tim Waugh 1:1.4.1-8 - Use upstream patch for STR #3356 (bug #526405). From 4ea1f135c4adec27ced552722613bb6a2534475e Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Mon, 19 Oct 2009 11:32:51 +0000 Subject: [PATCH 006/110] - Fixed German translation (bug #529575, STR #3380). --- cups-str3380.patch | 12 ++++++++++++ cups.spec | 7 ++++++- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 cups-str3380.patch diff --git a/cups-str3380.patch b/cups-str3380.patch new file mode 100644 index 0000000..24df54e --- /dev/null +++ b/cups-str3380.patch @@ -0,0 +1,12 @@ +diff -up cups-1.4.1/doc/de/index.html.in.str3380 cups-1.4.1/doc/de/index.html.in +--- cups-1.4.1/doc/de/index.html.in.str3380 2009-04-09 22:22:42.000000000 +0100 ++++ cups-1.4.1/doc/de/index.html.in 2009-10-19 12:04:30.352768816 +0100 +@@ -17,7 +17,7 @@ SRC="/images/left.gif" WIDTH="64" HEIGHT +   Verwaltung   +   Klassen   +   On-Line Hilfe   +-  Auftrüge   ++  Aufträge   +   Drucker   +
1:1.4.1-10 +- Fixed German translation (bug #529575, STR #3380). + * Thu Oct 8 2009 Tim Waugh 1:1.4.1-9 - Fixed naming of 'Generic PostScript Printer' entry. From 37e0a9a8189f1928d1ab79d1c37aa69361c7fa6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Popelka?= Date: Tue, 20 Oct 2009 13:43:45 +0000 Subject: [PATCH 007/110] - Fix cups-lpd to create unique temporary data files (bug #529838). --- cups-str3382.patch | 64 ++++++++++++++++++++++++++++++++++++++++++++++ cups.spec | 7 ++++- 2 files changed, 70 insertions(+), 1 deletion(-) create mode 100644 cups-str3382.patch diff --git a/cups-str3382.patch b/cups-str3382.patch new file mode 100644 index 0000000..2999c79 --- /dev/null +++ b/cups-str3382.patch @@ -0,0 +1,64 @@ +diff -up cups-1.4.1/cups/tempfile.c.str3382 cups-1.4.1/cups/tempfile.c +--- cups-1.4.1/cups/tempfile.c.str3382 2008-12-10 06:03:11.000000000 +0100 ++++ cups-1.4.1/cups/tempfile.c 2009-10-20 15:08:39.000000000 +0200 +@@ -35,6 +35,7 @@ + # include + #else + # include ++# include + #endif /* WIN32 || __EMX__ */ + + +@@ -56,7 +57,7 @@ cupsTempFd(char *filename, /* I - Point + char tmppath[1024]; /* Windows temporary directory */ + DWORD curtime; /* Current time */ + #else +- struct timeval curtime; /* Current time */ ++ mode_t old_umask; /* Old umask before using mkstemp() */ + #endif /* WIN32 */ + + +@@ -107,33 +108,25 @@ cupsTempFd(char *filename, /* I - Point + + snprintf(filename, len - 1, "%s/%05lx%08lx", tmpdir, + GetCurrentProcessId(), curtime); +-#else +- /* +- * Get the current time of day... +- */ +- +- gettimeofday(&curtime, NULL); +- +- /* +- * Format a string using the hex time values... +- */ +- +- snprintf(filename, len - 1, "%s/%08lx%05lx", tmpdir, +- (unsigned long)curtime.tv_sec, (unsigned long)curtime.tv_usec); +-#endif /* WIN32 */ + + /* + * Open the file in "exclusive" mode, making sure that we don't + * stomp on an existing file or someone's symlink crack... + */ + +-#ifdef WIN32 + fd = open(filename, _O_CREAT | _O_RDWR | _O_TRUNC | _O_BINARY, + _S_IREAD | _S_IWRITE); +-#elif defined(O_NOFOLLOW) +- fd = open(filename, O_RDWR | O_CREAT | O_EXCL | O_NOFOLLOW, 0600); + #else +- fd = open(filename, O_RDWR | O_CREAT | O_EXCL, 0600); ++ ++ /* ++ * Use the standard mkstemp() call to make a temporary filename ++ * securely. -- andrew.wood@jdplc.com ++ */ ++ snprintf(filename, len - 1, "%s/cupsXXXXXX", tmpdir); ++ ++ old_umask = umask(0077); ++ fd = mkstemp(filename); ++ umask(old_umask); + #endif /* WIN32 */ + + if (fd < 0 && errno != EEXIST) diff --git a/cups.spec b/cups.spec index a521b53..ba9ee87 100644 --- a/cups.spec +++ b/cups.spec @@ -9,7 +9,7 @@ Summary: Common Unix Printing System Name: cups Version: 1.4.1 -Release: 10%{?dist} +Release: 11%{?dist} License: GPLv2 Group: System Environment/Daemons Source: http://ftp.easysw.com/pub/cups/1.4.0/cups-%{version}-source.tar.bz2 @@ -56,6 +56,7 @@ Patch35: cups-cups-get-classes.patch Patch37: cups-avahi.patch Patch38: cups-str3332.patch Patch39: cups-str3356.patch +Patch40: cups-str3382.patch Patch100: cups-lspp.patch Epoch: 1 Url: http://www.cups.org/ @@ -216,6 +217,7 @@ gzip -n postscript.ppd %patch37 -p1 -b .avahi %patch38 -p1 -b .str3332 %patch39 -p1 -b .str3356 +%patch40 -p1 -b .str3382 %if %lspp %patch100 -p1 -b .lspp @@ -516,6 +518,9 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog +* Tue Oct 20 2009 Jiri Popelka 1:1.4.1-11 +- Fix cups-lpd to create unique temporary data files (bug #529838). + * Mon Oct 19 2009 Tim Waugh 1:1.4.1-10 - Fixed German translation (bug #529575, STR #3380). From a8d370817c1445c0927bd4d579a72d0078cc3585 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Popelka?= Date: Tue, 27 Oct 2009 14:44:11 +0000 Subject: [PATCH 008/110] - Fix incorrectly applied patch from #STR3285 (bug #531108). - Set the PRINTER_IS_SHARED variable for admin.cgi (bug #529634, #STR3390). - Pass through serial parameters correctly in web interface (bug #529635, #STR3391). - Fixed German translation (bug #531144, #STR3396). --- cups-str3285_v2.patch | 12 +++ cups-str3390.patch | 15 ++++ cups-str3391.patch | 196 ++++++++++++++++++++++++++++++++++++++++++ cups-str3396.patch | 11 +++ cups.spec | 17 +++- 5 files changed, 250 insertions(+), 1 deletion(-) create mode 100644 cups-str3285_v2.patch create mode 100644 cups-str3390.patch create mode 100644 cups-str3391.patch create mode 100644 cups-str3396.patch diff --git a/cups-str3285_v2.patch b/cups-str3285_v2.patch new file mode 100644 index 0000000..d447e68 --- /dev/null +++ b/cups-str3285_v2.patch @@ -0,0 +1,12 @@ +diff -up cups-1.4.1/cups/dest.c.str3285 cups-1.4.1/cups/dest.c +--- cups-1.4.1/cups/dest.c.str3285 2009-10-27 12:50:04.560012076 +0000 ++++ cups-1.4.1/cups/dest.c 2009-10-27 12:50:23.814012173 +0000 +@@ -549,7 +549,7 @@ cupsGetNamedDest(http_t *http, /* I + + if (!cups_get_sdests(http, op, name, 0, &dest)) + { +- if (op == CUPS_GET_DEFAULT) ++ if (op == CUPS_GET_DEFAULT || name) + return (NULL); + + /* diff --git a/cups-str3390.patch b/cups-str3390.patch new file mode 100644 index 0000000..a9d958d --- /dev/null +++ b/cups-str3390.patch @@ -0,0 +1,15 @@ +diff -up cups-1.4.1/cgi-bin/admin.c.str3390 cups-1.4.1/cgi-bin/admin.c +--- cups-1.4.1/cgi-bin/admin.c.str3390 2009-08-29 08:05:14.000000000 +0200 ++++ cups-1.4.1/cgi-bin/admin.c 2009-10-27 14:44:53.000000000 +0100 +@@ -1044,6 +1044,11 @@ do_am_printer(http_t *http, /* I - HTTP + if ((attr = ippFindAttribute(oldinfo, "printer-location", + IPP_TAG_TEXT)) != NULL) + cgiSetVariable("PRINTER_LOCATION", attr->values[0].string.text); ++ ++ if ((attr = ippFindAttribute(oldinfo, "printer-is-shared", ++ IPP_TAG_BOOLEAN)) != NULL) ++ cgiSetVariable("PRINTER_IS_SHARED", ++ attr->values[0].boolean ? "1" : "0"); + } + + cgiCopyTemplateLang("modify-printer.tmpl"); diff --git a/cups-str3391.patch b/cups-str3391.patch new file mode 100644 index 0000000..4e6cc7b --- /dev/null +++ b/cups-str3391.patch @@ -0,0 +1,196 @@ +diff -up cups-1.4.1/templates/add-printer.tmpl.str3391 cups-1.4.1/templates/add-printer.tmpl +--- cups-1.4.1/templates/add-printer.tmpl.str3391 2009-06-18 19:23:21.000000000 +0200 ++++ cups-1.4.1/templates/add-printer.tmpl 2009-10-27 15:08:45.000000000 +0100 +@@ -4,6 +4,10 @@ + + + ++ ++ ++ ++ + {?current_make!?:} + {?current_make_and_model!?:} + +diff -up cups-1.4.1/templates/de/add-printer.tmpl.str3391 cups-1.4.1/templates/de/add-printer.tmpl +--- cups-1.4.1/templates/de/add-printer.tmpl.str3391 2009-06-18 19:23:21.000000000 +0200 ++++ cups-1.4.1/templates/de/add-printer.tmpl 2009-10-27 15:08:56.000000000 +0100 +@@ -4,6 +4,10 @@ + + + ++ ++ ++ ++ + {?current_make!?:} + {?current_make_and_model!?:} + +diff -up cups-1.4.1/templates/de/modify-printer.tmpl.str3391 cups-1.4.1/templates/de/modify-printer.tmpl +--- cups-1.4.1/templates/de/modify-printer.tmpl.str3391 2009-06-18 19:23:21.000000000 +0200 ++++ cups-1.4.1/templates/de/modify-printer.tmpl 2009-10-27 15:10:28.000000000 +0100 +@@ -4,6 +4,10 @@ + + + ++ ++ ++ ++ + + + +diff -up cups-1.4.1/templates/es/add-printer.tmpl.str3391 cups-1.4.1/templates/es/add-printer.tmpl +--- cups-1.4.1/templates/es/add-printer.tmpl.str3391 2009-06-18 19:23:21.000000000 +0200 ++++ cups-1.4.1/templates/es/add-printer.tmpl 2009-10-27 15:09:02.000000000 +0100 +@@ -4,6 +4,10 @@ + + + ++ ++ ++ ++ + {?current_make!?:} + {?current_make_and_model!?:} + +diff -up cups-1.4.1/templates/es/modify-printer.tmpl.str3391 cups-1.4.1/templates/es/modify-printer.tmpl +--- cups-1.4.1/templates/es/modify-printer.tmpl.str3391 2009-06-18 19:23:21.000000000 +0200 ++++ cups-1.4.1/templates/es/modify-printer.tmpl 2009-10-27 15:10:32.000000000 +0100 +@@ -4,6 +4,10 @@ + + + ++ ++ ++ ++ + + +
+diff -up cups-1.4.1/templates/eu/add-printer.tmpl.str3391 cups-1.4.1/templates/eu/add-printer.tmpl +--- cups-1.4.1/templates/eu/add-printer.tmpl.str3391 2009-07-07 18:52:34.000000000 +0200 ++++ cups-1.4.1/templates/eu/add-printer.tmpl 2009-10-27 15:09:08.000000000 +0100 +@@ -4,6 +4,10 @@ + + + ++ ++ ++ ++ + {?current_make!?:} + {?current_make_and_model!?:} + +diff -up cups-1.4.1/templates/eu/modify-printer.tmpl.str3391 cups-1.4.1/templates/eu/modify-printer.tmpl +--- cups-1.4.1/templates/eu/modify-printer.tmpl.str3391 2009-07-07 18:52:34.000000000 +0200 ++++ cups-1.4.1/templates/eu/modify-printer.tmpl 2009-10-27 15:10:37.000000000 +0100 +@@ -4,6 +4,10 @@ + + + ++ ++ ++ ++ + + +
+diff -up cups-1.4.1/templates/ja/add-printer.tmpl.str3391 cups-1.4.1/templates/ja/add-printer.tmpl +--- cups-1.4.1/templates/ja/add-printer.tmpl.str3391 2009-06-18 19:23:21.000000000 +0200 ++++ cups-1.4.1/templates/ja/add-printer.tmpl 2009-10-27 15:09:15.000000000 +0100 +@@ -4,6 +4,10 @@ + + + ++ ++ ++ ++ + {?current_make!?:} + {?current_make_and_model!?:} + +diff -up cups-1.4.1/templates/ja/modify-printer.tmpl.str3391 cups-1.4.1/templates/ja/modify-printer.tmpl +--- cups-1.4.1/templates/ja/modify-printer.tmpl.str3391 2009-06-18 19:23:21.000000000 +0200 ++++ cups-1.4.1/templates/ja/modify-printer.tmpl 2009-10-27 15:10:40.000000000 +0100 +@@ -4,6 +4,10 @@ + + + ++ ++ ++ ++ + + +
+diff -up cups-1.4.1/templates/modify-printer.tmpl.str3391 cups-1.4.1/templates/modify-printer.tmpl +--- cups-1.4.1/templates/modify-printer.tmpl.str3391 2009-06-18 19:23:21.000000000 +0200 ++++ cups-1.4.1/templates/modify-printer.tmpl 2009-10-27 15:10:23.000000000 +0100 +@@ -4,6 +4,10 @@ + + + ++ ++ ++ ++ + + +
+diff -up cups-1.4.1/templates/pl/add-printer.tmpl.str3391 cups-1.4.1/templates/pl/add-printer.tmpl +--- cups-1.4.1/templates/pl/add-printer.tmpl.str3391 2009-06-18 19:23:21.000000000 +0200 ++++ cups-1.4.1/templates/pl/add-printer.tmpl 2009-10-27 15:09:20.000000000 +0100 +@@ -4,6 +4,10 @@ + + + ++ ++ ++ ++ + {?current_make!?:} + {?current_make_and_model!?:} + +diff -up cups-1.4.1/templates/pl/modify-printer.tmpl.str3391 cups-1.4.1/templates/pl/modify-printer.tmpl +--- cups-1.4.1/templates/pl/modify-printer.tmpl.str3391 2009-06-18 19:23:21.000000000 +0200 ++++ cups-1.4.1/templates/pl/modify-printer.tmpl 2009-10-27 15:10:44.000000000 +0100 +@@ -4,6 +4,10 @@ + + + ++ ++ ++ ++ + + +
+diff -up cups-1.4.1/templates/ru/add-printer.tmpl.str3391 cups-1.4.1/templates/ru/add-printer.tmpl +--- cups-1.4.1/templates/ru/add-printer.tmpl.str3391 2009-06-18 19:23:21.000000000 +0200 ++++ cups-1.4.1/templates/ru/add-printer.tmpl 2009-10-27 15:09:24.000000000 +0100 +@@ -4,6 +4,10 @@ + + + ++ ++ ++ ++ + {?current_make!?:} + {?current_make_and_model!?:} + +diff -up cups-1.4.1/templates/ru/modify-printer.tmpl.str3391 cups-1.4.1/templates/ru/modify-printer.tmpl +--- cups-1.4.1/templates/ru/modify-printer.tmpl.str3391 2009-06-18 19:23:21.000000000 +0200 ++++ cups-1.4.1/templates/ru/modify-printer.tmpl 2009-10-27 15:10:48.000000000 +0100 +@@ -4,6 +4,10 @@ + + + ++ ++ ++ ++ + + +
diff --git a/cups-str3396.patch b/cups-str3396.patch new file mode 100644 index 0000000..d49a3b2 --- /dev/null +++ b/cups-str3396.patch @@ -0,0 +1,11 @@ +diff -up cups-1.4.1/templates/de/set-printer-options-header.tmpl.str3396 cups-1.4.1/templates/de/set-printer-options-header.tmpl +--- cups-1.4.1/templates/de/set-printer-options-header.tmpl.str3396 2009-04-03 17:55:28.000000000 +0200 ++++ cups-1.4.1/templates/de/set-printer-options-header.tmpl 2009-10-27 15:17:53.000000000 +0100 +@@ -1,6 +1,6 @@ +
+ +-

Standardeinstellungen f%uuml;r {printer_name} festlegen

++

Standardeinstellungen für {printer_name} festlegen

+ + + diff --git a/cups.spec b/cups.spec index ba9ee87..e6541ae 100644 --- a/cups.spec +++ b/cups.spec @@ -9,7 +9,7 @@ Summary: Common Unix Printing System Name: cups Version: 1.4.1 -Release: 11%{?dist} +Release: 12%{?dist} License: GPLv2 Group: System Environment/Daemons Source: http://ftp.easysw.com/pub/cups/1.4.0/cups-%{version}-source.tar.bz2 @@ -57,6 +57,11 @@ Patch37: cups-avahi.patch Patch38: cups-str3332.patch Patch39: cups-str3356.patch Patch40: cups-str3382.patch +Patch41: cups-str3285_v2.patch +Patch42: cups-str3390.patch +Patch43: cups-str3391.patch +Patch44: cups-str3396.patch + Patch100: cups-lspp.patch Epoch: 1 Url: http://www.cups.org/ @@ -218,6 +223,10 @@ gzip -n postscript.ppd %patch38 -p1 -b .str3332 %patch39 -p1 -b .str3356 %patch40 -p1 -b .str3382 +%patch41 -p1 -b .str3285_v2 +%patch42 -p1 -b .str3390 +%patch43 -p1 -b .str3391 +%patch44 -p1 -b .str3396 %if %lspp %patch100 -p1 -b .lspp @@ -518,6 +527,12 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog +* Tue Oct 27 2009 Jiri Popelka 1:1.4.1-12 +- Fix incorrectly applied patch from #STR3285 (bug #531108). +- Set the PRINTER_IS_SHARED variable for admin.cgi (bug #529634, #STR3390). +- Pass through serial parameters correctly in web interface (bug #529635, #STR3391). +- Fixed German translation (bug #531144, #STR3396). + * Tue Oct 20 2009 Jiri Popelka 1:1.4.1-11 - Fix cups-lpd to create unique temporary data files (bug #529838). From 348a9b8de940b3526e5539f553d026b4bebfadeb Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Tue, 3 Nov 2009 16:52:05 +0000 Subject: [PATCH 009/110] - Removed stale patch from STR #2831 which was causing problems with number-up (bug #532516). --- cups-str2831.patch | 13 ------------- cups.spec | 8 +++++--- 2 files changed, 5 insertions(+), 16 deletions(-) delete mode 100644 cups-str2831.patch diff --git a/cups-str2831.patch b/cups-str2831.patch deleted file mode 100644 index 8f79e04..0000000 --- a/cups-str2831.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -up cups-1.4b1/filter/pstops.c.str2831 cups-1.4b1/filter/pstops.c ---- cups-1.4b1/filter/pstops.c.str2831 2008-12-09 12:14:53.000000000 +0000 -+++ cups-1.4b1/filter/pstops.c 2008-12-09 12:14:57.000000000 +0000 -@@ -1547,9 +1547,6 @@ copy_page(cups_file_t *fp, /* I - File - else if (!strncmp(line, "%%Include", 9)) - continue; - -- if (line[0] != '%' && !feature) -- break; -- - if (!feature || (doc->number_up == 1 && !doc->fitplot)) - doc_write(doc, line, linelen); - } diff --git a/cups.spec b/cups.spec index e6541ae..583c021 100644 --- a/cups.spec +++ b/cups.spec @@ -9,7 +9,7 @@ Summary: Common Unix Printing System Name: cups Version: 1.4.1 -Release: 12%{?dist} +Release: 13%{?dist} License: GPLv2 Group: System Environment/Daemons Source: http://ftp.easysw.com/pub/cups/1.4.0/cups-%{version}-source.tar.bz2 @@ -30,7 +30,6 @@ Patch0: cups-generic-ps.patch Patch1: cups-no-gzip-man.patch Patch2: cups-1.1.16-system-auth.patch Patch3: cups-multilib.patch -Patch4: cups-str2831.patch Patch5: cups-serial.patch Patch6: cups-banners.patch Patch7: cups-serverbin-compat.patch @@ -196,7 +195,6 @@ gzip -n postscript.ppd %patch1 -p1 -b .no-gzip-man %patch2 -p1 -b .system-auth %patch3 -p1 -b .multilib -%patch4 -p1 -b .str2831 %patch5 -p1 -b .serial %patch6 -p1 -b .banners %patch7 -p1 -b .serverbin-compat @@ -527,6 +525,10 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog +* Tue Nov 3 2009 Tim Waugh 1:1.4.1-13 +- Removed stale patch from STR #2831 which was causing problems with + number-up (bug #532516). + * Tue Oct 27 2009 Jiri Popelka 1:1.4.1-12 - Fix incorrectly applied patch from #STR3285 (bug #531108). - Set the PRINTER_IS_SHARED variable for admin.cgi (bug #529634, #STR3390). From 85cfb8e7e196b4937ff9e673a4fabba76ee02867 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Tue, 10 Nov 2009 12:50:59 +0000 Subject: [PATCH 010/110] - Removed postscript.ppd.gz (bug #533371). --- cups-generic-ps.patch | 20 -------------------- cups.spec | 12 +++--------- 2 files changed, 3 insertions(+), 29 deletions(-) delete mode 100644 cups-generic-ps.patch diff --git a/cups-generic-ps.patch b/cups-generic-ps.patch deleted file mode 100644 index eccf8a1..0000000 --- a/cups-generic-ps.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff -up ./postscript.ppd.generic-ps ./postscript.ppd ---- ./postscript.ppd.generic-ps 2009-10-08 11:08:07.389336611 +0100 -+++ ./postscript.ppd 2009-10-08 11:06:40.836338000 +0100 -@@ -12,11 +12,11 @@ - *LanguageVersion: English - *LanguageEncoding: ISOLatin1 - *PCFileName: "POSTSCRIPT.PPD" --*Manufacturer: "Postscript" --*Product: "(CUPS v1.1)" --*ModelName: "Generic postscript printer" --*ShortNickName: "Generic postscript printer" --*NickName: "Generic postscript printer" -+*Manufacturer: "Generic" -+*Product: "(PostScript Printer)" -+*ModelName: "Generic PostScript Printer" -+*ShortNickName: "Generic PostScript Printer" -+*NickName: "Generic PostScript Printer" - *PSVersion: "(2017.000) 0" - *LanguageLevel: "2" - *ColorDevice: False diff --git a/cups.spec b/cups.spec index 583c021..179a696 100644 --- a/cups.spec +++ b/cups.spec @@ -20,13 +20,11 @@ Source4: pstopdf Source5: cups-lpd Source6: pstoraster Source7: pstoraster.convs -Source8: postscript.ppd.gz Source9: cups.logrotate Source10: ncp.backend Source12: cups.cron Source14: textonly.filter Source15: textonly.ppd -Patch0: cups-generic-ps.patch Patch1: cups-no-gzip-man.patch Patch2: cups-1.1.16-system-auth.patch Patch3: cups-multilib.patch @@ -188,10 +186,6 @@ module. %prep %setup -q -gunzip -c %{SOURCE8} > postscript.ppd -%patch0 -p0 -b .generic-ps -gzip -n postscript.ppd - %patch1 -p1 -b .no-gzip-man %patch2 -p1 -b .system-auth %patch3 -p1 -b .multilib @@ -311,9 +305,6 @@ install -c -m 755 %{SOURCE4} $RPM_BUILD_ROOT%{cups_serverbin}/filter install -c -m 755 %{SOURCE6} $RPM_BUILD_ROOT%{cups_serverbin}/filter install -c -m 644 %{SOURCE7} $RPM_BUILD_ROOT%{_sysconfdir}/cups -# Ship a generic postscript PPD file (#73061) -install -c -m 644 postscript.ppd.gz $RPM_BUILD_ROOT%{_datadir}/cups/model - # Ship a printers.conf file, and a client.conf file. That way, they get # their SELinux file contexts set correctly. touch $RPM_BUILD_ROOT%{_sysconfdir}/cups/printers.conf @@ -525,6 +516,9 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog +* Tue Nov 10 2009 Tim Waugh +- Removed postscript.ppd.gz (bug #533371). + * Tue Nov 3 2009 Tim Waugh 1:1.4.1-13 - Removed stale patch from STR #2831 which was causing problems with number-up (bug #532516). From 6a7d7ab6fb5cbd6033d64bb11911b79497a286fd Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Tue, 10 Nov 2009 13:09:53 +0000 Subject: [PATCH 011/110] - 1.4.2. No longer need str3380, str3332, str3356, str3396 patches. - Removed postscript.ppd.gz (bug #533371). - Renumbered patches and sources. --- .cvsignore | 2 + cups-1.1.16-system-auth.patch | 44 ++++++----- cups-str3332.patch | 12 --- cups-str3356.patch | 101 ------------------------ cups-str3380.patch | 12 --- cups-str3396.patch | 11 --- cups.spec | 142 ++++++++++++++++------------------ sources | 3 +- 8 files changed, 95 insertions(+), 232 deletions(-) delete mode 100644 cups-str3332.patch delete mode 100644 cups-str3356.patch delete mode 100644 cups-str3380.patch delete mode 100644 cups-str3396.patch diff --git a/.cvsignore b/.cvsignore index 168a39e..91ce906 100644 --- a/.cvsignore +++ b/.cvsignore @@ -39,3 +39,5 @@ cups-1.4b2-source.tar.bz2 cups-1.4b2-svn8404-source.tar.bz2 cups-1.4rc1-source.tar.bz2 cups-1.4.0-source.tar.bz2 +cups-1.4b2-source.tar.bz2 +cups-1.4b2-svn8404-source.tar.bz2 diff --git a/cups-1.1.16-system-auth.patch b/cups-1.1.16-system-auth.patch index 299871d..7ce17e5 100644 --- a/cups-1.1.16-system-auth.patch +++ b/cups-1.1.16-system-auth.patch @@ -1,18 +1,35 @@ ---- cups-1.2svn-r5238/conf/Makefile.system-auth 2006-03-07 09:34:20.000000000 +0000 -+++ cups-1.2svn-r5238/conf/Makefile 2006-03-07 09:45:41.000000000 +0000 -@@ -79,10 +79,16 @@ +diff -up /dev/null cups-1.4.2/conf/cups.password-auth +--- /dev/null 2009-11-10 09:17:06.284031490 +0000 ++++ cups-1.4.2/conf/cups.password-auth 2009-11-10 11:15:42.750666738 +0000 +@@ -0,0 +1,4 @@ ++#%PAM-1.0 ++# Use password-auth common PAM configuration for the daemon ++auth include password-auth ++account include password-auth +diff -up cups-1.4.2/conf/cups.system-auth cups-1.4.2/conf/cups +diff -up /dev/null cups-1.4.2/conf/cups.system-auth +--- /dev/null 2009-11-10 09:17:06.284031490 +0000 ++++ cups-1.4.2/conf/cups.system-auth 2009-11-10 11:15:42.750666738 +0000 +@@ -0,0 +1,3 @@ ++#%PAM-1.0 ++auth include system-auth ++account include system-auth +diff -up cups-1.4.2/conf/Makefile.system-auth cups-1.4.2/conf/Makefile +--- cups-1.4.2/conf/Makefile.system-auth 2009-09-22 22:53:31.000000000 +0100 ++++ cups-1.4.2/conf/Makefile 2009-11-10 11:18:44.188791989 +0000 +@@ -90,10 +90,16 @@ install-data: done -if test x$(PAMDIR) != x; then \ $(INSTALL_DIR) -m 755 $(BUILDROOT)$(PAMDIR); \ -- if test -r $(BUILDROOT)$(PAMDIR)/cups/$(PAMFILE) ; then \ +- if test -r $(BUILDROOT)$(PAMDIR)/cups ; then \ - $(INSTALL_DATA) $(PAMFILE) $(BUILDROOT)$(PAMDIR)/cups.N ; \ + if test -f /etc/pam.d/password-auth; then \ -+ $(INSTALL_DATA) cups.password-auth $(BUILDROOT)$(PAMDIR)/cups ; \ ++ $(INSTALL_DATA) cups.password-auth $(BUILDROOT)$(PAMDIR)/cups; \ + elif test -f /etc/pam.d/system-auth; then \ -+ $(INSTALL_DATA) cups.system-auth $(BUILDROOT)$(PAMDIR)/cups ; \ ++ $(INSTALL_DATA) cups.system-auth $(BUILDROOT)$(PAMDIR)/cups; \ else \ - $(INSTALL_DATA) $(PAMFILE) $(BUILDROOT)$(PAMDIR)/cups ; \ -+ if test -r $(BUILDROOT)$(PAMDIR)/cups/$(PAMFILE) ; then \ ++ if test -r $(BUILDROOT)$(PAMDIR)/cups ; then \ + $(INSTALL_DATA) $(PAMFILE) $(BUILDROOT)$(PAMDIR)/cups.N ; \ + else \ + $(INSTALL_DATA) $(PAMFILE) $(BUILDROOT)$(PAMDIR)/cups ; \ @@ -20,16 +37,3 @@ fi ; \ fi ---- /dev/null 2006-03-07 09:12:30.964372750 +0000 -+++ cups-1.2svn-r5238/conf/cups.system-auth 2006-03-07 09:43:12.000000000 +0000 -@@ -0,0 +1,3 @@ -+#%PAM-1.0 -+auth include system-auth -+account include system-auth ---- /dev/null 2006-03-07 09:12:30.964372750 +0000 -+++ cups-1.2svn-r5238/conf/cups.password-auth 2006-03-07 09:43:12.000000000 +0000 -@@ -0,0 +1,4 @@ -+#%PAM-1.0 -+# Use password-auth common PAM configuration for the daemon -+auth include password-auth -+account include password-auth diff --git a/cups-str3332.patch b/cups-str3332.patch deleted file mode 100644 index 27b30e8..0000000 --- a/cups-str3332.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up cups-1.4.1/backend/usb-unix.c.function-decl cups-1.4.1/backend/usb-unix.c ---- cups-1.4.1/backend/usb-unix.c.function-decl 2009-09-14 17:36:06.087996470 +0100 -+++ cups-1.4.1/backend/usb-unix.c 2009-09-14 17:36:13.656996607 +0100 -@@ -605,7 +605,7 @@ open_device(const char *uri, /* I - Dev - * 'side_cb()' - Handle side-channel requests... - */ - --static void -+static int - side_cb(int print_fd, /* I - Print file */ - int device_fd, /* I - Device file */ - int snmp_fd, /* I - SNMP socket (unused) */ diff --git a/cups-str3356.patch b/cups-str3356.patch deleted file mode 100644 index e055c1c..0000000 --- a/cups-str3356.patch +++ /dev/null @@ -1,101 +0,0 @@ -diff -up cups-1.4.1/scheduler/ipp.c.str3356 cups-1.4.1/scheduler/ipp.c ---- cups-1.4.1/scheduler/ipp.c.str3356 2009-10-07 17:26:27.504800579 +0100 -+++ cups-1.4.1/scheduler/ipp.c 2009-10-07 17:26:31.311800539 +0100 -@@ -2324,8 +2324,9 @@ add_printer(cupsd_client_t *con, /* I - - dstfile[1024]; /* Destination Script/PPD file */ - int modify; /* Non-zero if we are modifying */ - char newname[IPP_MAX_NAME]; /* New printer name */ -- int need_restart_job; /* Need to restart job? */ -- int set_device_uri, /* Did we set the device URI? */ -+ int changed_driver, /* Changed the PPD/interface script? */ -+ need_restart_job, /* Need to restart job? */ -+ set_device_uri, /* Did we set the device URI? */ - set_port_monitor; /* Did we set the port monitor? */ - - -@@ -2469,6 +2470,7 @@ add_printer(cupsd_client_t *con, /* I - - * Look for attributes and copy them over as needed... - */ - -+ changed_driver = 0; - need_restart_job = 0; - - if ((attr = ippFindAttribute(con->request, "printer-location", -@@ -2731,6 +2733,7 @@ add_printer(cupsd_client_t *con, /* I - - if (con->filename) - { - need_restart_job = 1; -+ changed_driver = 1; - - strlcpy(srcfile, con->filename, sizeof(srcfile)); - -@@ -2801,18 +2804,6 @@ add_printer(cupsd_client_t *con, /* I - - cupsdLogMessage(CUPSD_LOG_DEBUG, - "Copied PPD file successfully!"); - chmod(dstfile, 0644); -- --#ifdef __APPLE__ -- /* -- * (Re)register color profiles... -- */ -- -- if (!RunUser) -- { -- apple_unregister_profiles(printer); -- apple_register_profiles(printer); -- } --#endif /* __APPLE__ */ - } - else - { -@@ -2829,6 +2820,7 @@ add_printer(cupsd_client_t *con, /* I - - IPP_TAG_NAME)) != NULL) - { - need_restart_job = 1; -+ changed_driver = 1; - - if (!strcmp(attr->values[0].string.text, "raw")) - { -@@ -2866,19 +2858,33 @@ add_printer(cupsd_client_t *con, /* I - - cupsdLogMessage(CUPSD_LOG_DEBUG, - "Copied PPD file successfully!"); - chmod(dstfile, 0644); -+ } -+ } -+ -+ if (changed_driver) -+ { -+ /* -+ * If we changed the PPD/interface script, then remove the printer's cache -+ * file... -+ */ -+ -+ char cache_name[1024]; /* Cache filename for printer attrs */ -+ -+ snprintf(cache_name, sizeof(cache_name), "%s/%s.ipp", CacheDir, -+ printer->name); -+ unlink(cache_name); - - #ifdef __APPLE__ -- /* -- * (Re)register color profiles... -- */ -+ /* -+ * (Re)register color profiles... -+ */ - -- if (!RunUser) -- { -- apple_unregister_profiles(printer); -- apple_register_profiles(printer); -- } --#endif /* __APPLE__ */ -+ if (!RunUser) -+ { -+ apple_unregister_profiles(printer); -+ apple_register_profiles(printer); - } -+#endif /* __APPLE__ */ - } - - /* diff --git a/cups-str3380.patch b/cups-str3380.patch deleted file mode 100644 index 24df54e..0000000 --- a/cups-str3380.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up cups-1.4.1/doc/de/index.html.in.str3380 cups-1.4.1/doc/de/index.html.in ---- cups-1.4.1/doc/de/index.html.in.str3380 2009-04-09 22:22:42.000000000 +0100 -+++ cups-1.4.1/doc/de/index.html.in 2009-10-19 12:04:30.352768816 +0100 -@@ -17,7 +17,7 @@ SRC="/images/left.gif" WIDTH="64" HEIGHT -
- - -- -+ - -
  Verwaltung    Klassen    On-Line Hilfe    Auftrüge    Aufträge    Drucker   - --

Standardeinstellungen f%uuml;r {printer_name} festlegen

-+

Standardeinstellungen für {printer_name} festlegen

- - - diff --git a/cups.spec b/cups.spec index 179a696..7f28075 100644 --- a/cups.spec +++ b/cups.spec @@ -8,11 +8,11 @@ Summary: Common Unix Printing System Name: cups -Version: 1.4.1 -Release: 13%{?dist} +Version: 1.4.2 +Release: 1%{?dist} License: GPLv2 Group: System Environment/Daemons -Source: http://ftp.easysw.com/pub/cups/1.4.0/cups-%{version}-source.tar.bz2 +Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2 Source1: cups.init Source2: cupsprinter.png Source3: cups-libusb.rules @@ -20,44 +20,40 @@ Source4: pstopdf Source5: cups-lpd Source6: pstoraster Source7: pstoraster.convs -Source9: cups.logrotate -Source10: ncp.backend -Source12: cups.cron -Source14: textonly.filter -Source15: textonly.ppd +Source8: cups.logrotate +Source9: ncp.backend +Source10: cups.cron +Source11: textonly.filter +Source12: textonly.ppd Patch1: cups-no-gzip-man.patch Patch2: cups-1.1.16-system-auth.patch Patch3: cups-multilib.patch -Patch5: cups-serial.patch -Patch6: cups-banners.patch -Patch7: cups-serverbin-compat.patch -Patch8: cups-no-export-ssllibs.patch -Patch9: cups-paps.patch -Patch10: cups-str3380.patch -Patch11: cups-direct-usb.patch -Patch12: cups-lpr-help.patch -Patch13: cups-peercred.patch -Patch14: cups-pid.patch -Patch15: cups-page-label.patch -Patch16: cups-eggcups.patch -Patch17: cups-getpass.patch -Patch18: cups-driverd-timeout.patch -Patch19: cups-strict-ppd-line-length.patch -Patch20: cups-logrotate.patch -Patch21: cups-usb-paperout.patch -Patch22: cups-build.patch -Patch23: cups-res_init.patch -Patch25: cups-filter-debug.patch -Patch30: cups-uri-compat.patch -Patch35: cups-cups-get-classes.patch -Patch37: cups-avahi.patch -Patch38: cups-str3332.patch -Patch39: cups-str3356.patch -Patch40: cups-str3382.patch -Patch41: cups-str3285_v2.patch -Patch42: cups-str3390.patch -Patch43: cups-str3391.patch -Patch44: cups-str3396.patch +Patch4: cups-serial.patch +Patch5: cups-banners.patch +Patch6: cups-serverbin-compat.patch +Patch7: cups-no-export-ssllibs.patch +Patch8: cups-paps.patch +Patch9: cups-direct-usb.patch +Patch10: cups-lpr-help.patch +Patch11: cups-peercred.patch +Patch12: cups-pid.patch +Patch13: cups-page-label.patch +Patch14: cups-eggcups.patch +Patch15: cups-getpass.patch +Patch16: cups-driverd-timeout.patch +Patch17: cups-strict-ppd-line-length.patch +Patch18: cups-logrotate.patch +Patch19: cups-usb-paperout.patch +Patch20: cups-build.patch +Patch21: cups-res_init.patch +Patch22: cups-filter-debug.patch +Patch23: cups-uri-compat.patch +Patch24: cups-cups-get-classes.patch +Patch25: cups-avahi.patch +Patch26: cups-str3382.patch +Patch27: cups-str3285_v2.patch +Patch28: cups-str3390.patch +Patch29: cups-str3391.patch Patch100: cups-lspp.patch Epoch: 1 @@ -189,36 +185,32 @@ module. %patch1 -p1 -b .no-gzip-man %patch2 -p1 -b .system-auth %patch3 -p1 -b .multilib -%patch5 -p1 -b .serial -%patch6 -p1 -b .banners -%patch7 -p1 -b .serverbin-compat -%patch8 -p1 -b .no-export-ssllibs -%patch9 -p1 -b .paps -%patch10 -p1 -b .str3380 -%patch11 -p1 -b .direct-usb -%patch12 -p1 -b .lpr-help -%patch13 -p1 -b .peercred -%patch14 -p1 -b .pid -%patch15 -p1 -b .page-label -%patch16 -p1 -b .eggcups -%patch17 -p1 -b .getpass -%patch18 -p1 -b .driverd-timeout -%patch19 -p1 -b .strict-ppd-line-length -%patch20 -p1 -b .logrotate -%patch21 -p1 -b .usb-paperout -%patch22 -p1 -b .build -%patch23 -p1 -b .res_init -%patch25 -p1 -b .filter-debug -%patch30 -p1 -b .uri-compat -%patch35 -p1 -b .cups-get-classes -%patch37 -p1 -b .avahi -%patch38 -p1 -b .str3332 -%patch39 -p1 -b .str3356 -%patch40 -p1 -b .str3382 -%patch41 -p1 -b .str3285_v2 -%patch42 -p1 -b .str3390 -%patch43 -p1 -b .str3391 -%patch44 -p1 -b .str3396 +%patch4 -p1 -b .serial +%patch5 -p1 -b .banners +%patch6 -p1 -b .serverbin-compat +%patch7 -p1 -b .no-export-ssllibs +%patch8 -p1 -b .paps +%patch9 -p1 -b .direct-usb +%patch10 -p1 -b .lpr-help +%patch11 -p1 -b .peercred +%patch12 -p1 -b .pid +%patch13 -p1 -b .page-label +%patch14 -p1 -b .eggcups +%patch15 -p1 -b .getpass +%patch16 -p1 -b .driverd-timeout +%patch17 -p1 -b .strict-ppd-line-length +%patch18 -p1 -b .logrotate +%patch19 -p1 -b .usb-paperout +%patch20 -p1 -b .build +%patch21 -p1 -b .res_init +%patch22 -p1 -b .filter-debug +%patch23 -p1 -b .uri-compat +%patch24 -p1 -b .cups-get-classes +%patch25 -p1 -b .avahi +%patch26 -p1 -b .str3382 +%patch27 -p1 -b .str3285_v2 +%patch28 -p1 -b .str3390 +%patch29 -p1 -b .str3391 %if %lspp %patch100 -p1 -b .lspp @@ -290,11 +282,11 @@ popd mkdir -p $RPM_BUILD_ROOT%{_datadir}/pixmaps $RPM_BUILD_ROOT%{_sysconfdir}/X11/sysconfig $RPM_BUILD_ROOT%{_sysconfdir}/X11/applnk/System $RPM_BUILD_ROOT%{_sysconfdir}/xinetd.d $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d $RPM_BUILD_ROOT%{_sysconfdir}/cron.daily install -c -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/pixmaps install -c -m 644 cups-lpd.real $RPM_BUILD_ROOT%{_sysconfdir}/xinetd.d/cups-lpd -install -c -m 644 %{SOURCE9} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/cups -install -c -m 755 %{SOURCE10} $RPM_BUILD_ROOT%{cups_serverbin}/backend/ncp -install -c -m 755 %{SOURCE12} $RPM_BUILD_ROOT%{_sysconfdir}/cron.daily/cups -install -c -m 755 %{SOURCE14} $RPM_BUILD_ROOT%{cups_serverbin}/filter/textonly -install -c -m 644 %{SOURCE15} $RPM_BUILD_ROOT%{_datadir}/cups/model/textonly.ppd +install -c -m 644 %{SOURCE8} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/cups +install -c -m 755 %{SOURCE9} $RPM_BUILD_ROOT%{cups_serverbin}/backend/ncp +install -c -m 755 %{SOURCE10} $RPM_BUILD_ROOT%{_sysconfdir}/cron.daily/cups +install -c -m 755 %{SOURCE11} $RPM_BUILD_ROOT%{cups_serverbin}/filter/textonly +install -c -m 644 %{SOURCE12} $RPM_BUILD_ROOT%{_datadir}/cups/model/textonly.ppd # Ship pstopdf for LSPP systems to deal with malicious postscript %if %lspp @@ -516,8 +508,10 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog -* Tue Nov 10 2009 Tim Waugh +* Tue Nov 10 2009 Tim Waugh 1:1.4.2-1 +- 1.4.2. No longer need str3380, str3332, str3356, str3396 patches. - Removed postscript.ppd.gz (bug #533371). +- Renumbered patches and sources. * Tue Nov 3 2009 Tim Waugh 1:1.4.1-13 - Removed stale patch from STR #2831 which was causing problems with diff --git a/sources b/sources index 6064749..73d408c 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -b0bb017098e8e76b8a25e666c41ce540 postscript.ppd.gz -587a58039c112ecb3c932e048c8a7b01 cups-1.4.1-source.tar.bz2 +d95e2d588e3d36e563027a963b117b1b cups-1.4.2-source.tar.bz2 From 2d11048244acb8b737309db31690c8da77eab920 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Tue, 10 Nov 2009 16:57:01 +0000 Subject: [PATCH 012/110] - Added explicit version dependency on cups-libs to cups-lpd (bug #502205). --- cups.spec | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cups.spec b/cups.spec index 7f28075..f4c63c0 100644 --- a/cups.spec +++ b/cups.spec @@ -137,6 +137,7 @@ License: LGPLv2 Summary: Common Unix Printing System - lpd emulation Group: System Environment/Daemons Requires: %{name} = %{epoch}:%{version}-%{release} +Requires: %{name}-libs = %{epoch}:%{version}-%{release} Requires: xinetd %package php @@ -508,6 +509,10 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog +* Tue Nov 10 2009 Tim Waugh 1:1.4.2-2 +- Added explicit version dependency on cups-libs to cups-lpd + (bug #502205). + * Tue Nov 10 2009 Tim Waugh 1:1.4.2-1 - 1.4.2. No longer need str3380, str3332, str3356, str3396 patches. - Removed postscript.ppd.gz (bug #533371). From f7b311fb2ba42174e0dbd0ae621a9e77802aeb00 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Tue, 10 Nov 2009 16:58:03 +0000 Subject: [PATCH 013/110] 1.4.2-2 --- cups.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cups.spec b/cups.spec index f4c63c0..605c5ab 100644 --- a/cups.spec +++ b/cups.spec @@ -9,7 +9,7 @@ Summary: Common Unix Printing System Name: cups Version: 1.4.2 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 Group: System Environment/Daemons Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2 From 1ab3991a96c1742b9718169ebeba67eb2a303c4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Popelka?= Date: Wed, 11 Nov 2009 09:52:24 +0000 Subject: [PATCH 014/110] - Fixed lspp-patch to avoid memory leak (bug #536741). --- cups-lspp.patch | 13 ++++++++----- cups.spec | 5 ++++- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/cups-lspp.patch b/cups-lspp.patch index f7e4966..90f20ad 100644 --- a/cups-lspp.patch +++ b/cups-lspp.patch @@ -1740,7 +1740,7 @@ diff -up cups-1.4.1/scheduler/ipp.c.lspp cups-1.4.1/scheduler/ipp.c + + printerfile = strstr(printer->device_uri, "/dev/"); + if (printerfile == NULL && (strncmp(printer->device_uri, "file:/", 6) == 0)) -+ printerfile = strdup(printer->device_uri + strlen("file:/")); ++ printerfile = printer->device_uri + strlen("file:"); + + if (printerfile != NULL) + { @@ -2546,7 +2546,7 @@ diff -up cups-1.4.1/scheduler/job.c.lspp cups-1.4.1/scheduler/job.c + */ + printerfile = strstr(printer->device_uri, "/dev/"); + if (printerfile == NULL && (strncmp(printer->device_uri, "file:/", 6) == 0)) -+ printerfile = strdup(printer->device_uri + strlen("file:/")); ++ printerfile = printer->device_uri + strlen("file:"); + + if (printerfile != NULL) + { @@ -2776,7 +2776,7 @@ diff -up cups-1.4.1/scheduler/printers.c.lspp cups-1.4.1/scheduler/printers.c DEBUG_printf(("cupsdSetPrinterAttrs: entering name = %s, type = %x\n", p->name, -@@ -2296,6 +2309,42 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p) +@@ -2296,6 +2309,45 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p) attr->values[1].string.text = _cupsStrAlloc(Classification ? Classification : p->job_sheets[1]); } @@ -2788,12 +2788,15 @@ diff -up cups-1.4.1/scheduler/printers.c.lspp cups-1.4.1/scheduler/printers.c + printercon = 0; + printerfile = strstr(p->device_uri, "/dev/"); + if (printerfile == NULL && (strncmp(p->device_uri, "file:/", 6) == 0)) -+ printerfile = strdup(p->device_uri + strlen("file:/")); ++ printerfile = p->device_uri + strlen("file:"); + + if (printerfile != NULL) + { + if (getfilecon(printerfile, &devcon) == -1) -+ cupsdLogMessage(CUPSD_LOG_ERROR, "cupsdSetPrinterAttrs: Unable to get printer context"); ++ { ++ if(is_selinux_enabled()) ++ cupsdLogMessage(CUPSD_LOG_ERROR, "cupsdSetPrinterAttrs: Unable to get printer context"); ++ } + else + { + printercon = context_new(devcon); diff --git a/cups.spec b/cups.spec index 605c5ab..151f2d9 100644 --- a/cups.spec +++ b/cups.spec @@ -9,7 +9,7 @@ Summary: Common Unix Printing System Name: cups Version: 1.4.2 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2 Group: System Environment/Daemons Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2 @@ -509,6 +509,9 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog +* Wed Nov 11 2009 Jiri Popelka 1:1.4.2-3 +- Fixed lspp-patch to avoid memory leak (bug #536741). + * Tue Nov 10 2009 Tim Waugh 1:1.4.2-2 - Added explicit version dependency on cups-libs to cups-lpd (bug #502205). From 516ea2440dc79c039caf1861351e1ea5618bd272 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Mon, 16 Nov 2009 11:18:15 +0000 Subject: [PATCH 015/110] - Upstream fix for GNU TLS error handling bug (STR #3381). --- cups-str3381.patch | 208 +++++++++++++++++++++++++++++++++++++++++++++ cups.spec | 7 +- 2 files changed, 214 insertions(+), 1 deletion(-) create mode 100644 cups-str3381.patch diff --git a/cups-str3381.patch b/cups-str3381.patch new file mode 100644 index 0000000..88a007c --- /dev/null +++ b/cups-str3381.patch @@ -0,0 +1,208 @@ +diff -up cups-1.4.2/CHANGES.txt.str3381 cups-1.4.2/CHANGES.txt +--- cups-1.4.2/CHANGES.txt.str3381 2009-11-09 23:01:17.000000000 +0000 ++++ cups-1.4.2/CHANGES.txt 2009-11-16 10:55:21.518666538 +0000 +@@ -1,6 +1,11 @@ +-CHANGES.txt - 2009-11-09 ++CHANGES.txt - 2009-11-13 + ------------------------ + ++CHANGES IN CUPS V1.4.3 ++ ++ - Fixed a GNU TLS error handling bug (STR #3381) ++ ++ + CHANGES IN CUPS V1.4.2 + + - SECURITY: The CUPS web interface was vulnerable to several XSS and +diff -up cups-1.4.2/cups/http.c.str3381 cups-1.4.2/cups/http.c +--- cups-1.4.2/cups/http.c.str3381 2009-07-01 16:23:28.000000000 +0100 ++++ cups-1.4.2/cups/http.c 2009-11-16 10:55:21.520666380 +0000 +@@ -26,7 +26,6 @@ + * httpClearCookie() - Clear the cookie value(s). + * httpClearFields() - Clear HTTP request fields. + * httpClose() - Close an HTTP connection... +- * httpConnect() - Connect to a HTTP server. + * httpConnectEncrypt() - Connect to a HTTP server using encryption. + * _httpCreate() - Create an unconnected HTTP connection. + * httpDelete() - Send a DELETE request to the server. +@@ -721,7 +720,7 @@ httpGetField(http_t *http, /* I - + { + if (!http || field <= HTTP_FIELD_UNKNOWN || field >= HTTP_FIELD_MAX) + return (NULL); +- else if (field == HTTP_FIELD_AUTHORIZATION && ++ else if (field == HTTP_FIELD_AUTHORIZATION && + http->field_authorization) + { + /* +@@ -1137,7 +1136,7 @@ httpGets(char *line, /* I - Line to + http->activity = time(NULL); + + *lineptr = '\0'; +- ++ + DEBUG_printf(("3httpGets: Returning \"%s\"", line)); + + return (line); +@@ -2283,7 +2282,7 @@ httpWait(http_t *http, /* I - Connecti + * + * @deprecated@ + */ +- ++ + int /* O - Number of bytes written */ + httpWrite(http_t *http, /* I - Connection to server */ + const char *buffer, /* I - Buffer for data */ +@@ -2298,7 +2297,7 @@ httpWrite(http_t *http, /* I - Conn + * + * @since CUPS 1.2/Mac OS X 10.5@ + */ +- ++ + ssize_t /* O - Number of bytes written */ + httpWrite2(http_t *http, /* I - Connection to server */ + const char *buffer, /* I - Buffer for data */ +@@ -2456,7 +2455,7 @@ _httpWriteCDSA( + else + { + *dataLength = 0; +- ++ + if (errno == EAGAIN) + result = errSSLWouldBlock; + else +@@ -2517,7 +2516,7 @@ http_bio_ctrl(BIO *h, /* I - BIO data + } + else + return (0); +- ++ + case BIO_CTRL_DUP : + case BIO_CTRL_FLUSH : + return (1); +@@ -2719,7 +2718,36 @@ http_read_ssl(http_t *http, /* I - Conn + return (SSL_read((SSL *)(http->tls), buf, len)); + + # elif defined(HAVE_GNUTLS) +- return (gnutls_record_recv(((http_tls_t *)(http->tls))->session, buf, len)); ++ ssize_t result; /* Return value */ ++ ++ ++ result = gnutls_record_recv(((http_tls_t *)(http->tls))->session, buf, len); ++ ++ if (result < 0 && !errno) ++ { ++ /* ++ * Convert GNU TLS error to errno value... ++ */ ++ ++ switch (result) ++ { ++ case GNUTLS_E_INTERRUPTED : ++ errno = EINTR; ++ break; ++ ++ case GNUTLS_E_AGAIN : ++ errno = EAGAIN; ++ break; ++ ++ default : ++ errno = EPIPE; ++ break; ++ } ++ ++ result = -1; ++ } ++ ++ return ((int)result); + + # elif defined(HAVE_CDSASSL) + int result; /* Return value */ +@@ -2857,7 +2885,7 @@ http_send(http_t *http, /* I - Con + DEBUG_printf(("9http_send: %s: %s", http_fields[i], + httpGetField(http, i))); + +- if (httpPrintf(http, "%s: %s\r\n", http_fields[i], ++ if (httpPrintf(http, "%s: %s\r\n", http_fields[i], + httpGetField(http, i)) < 1) + { + http->status = HTTP_ERROR; +@@ -2896,15 +2924,15 @@ http_send(http_t *http, /* I - Con + * The Kerberos and AuthRef authentication strings can only be used once... + */ + +- if (http->field_authorization && http->authstring && +- (!strncmp(http->authstring, "Negotiate", 9) || ++ if (http->field_authorization && http->authstring && ++ (!strncmp(http->authstring, "Negotiate", 9) || + !strncmp(http->authstring, "AuthRef", 7))) + { + http->_authstring[0] = '\0'; + + if (http->authstring != http->_authstring) + free(http->authstring); +- ++ + http->authstring = http->_authstring; + } + +@@ -3220,7 +3248,7 @@ http_upgrade(http_t *http) /* I - Conne + /* + * 'http_write()' - Write a buffer to a HTTP connection. + */ +- ++ + static int /* O - Number of bytes written */ + http_write(http_t *http, /* I - Connection to server */ + const char *buffer, /* I - Buffer for data */ +@@ -3335,7 +3363,36 @@ http_write_ssl(http_t *http, /* I - + return (SSL_write((SSL *)(http->tls), buf, len)); + + # elif defined(HAVE_GNUTLS) +- return (gnutls_record_send(((http_tls_t *)(http->tls))->session, buf, len)); ++ ssize_t result; /* Return value */ ++ ++ result = gnutls_record_send(((http_tls_t *)(http->tls))->session, buf, len); ++ ++ if (result < 0 && !errno) ++ { ++ /* ++ * Convert GNU TLS error to errno value... ++ */ ++ ++ switch (result) ++ { ++ case GNUTLS_E_INTERRUPTED : ++ errno = EINTR; ++ break; ++ ++ case GNUTLS_E_AGAIN : ++ errno = EAGAIN; ++ break; ++ ++ default : ++ errno = EPIPE; ++ break; ++ } ++ ++ result = -1; ++ } ++ ++ return ((int)result); ++ + # elif defined(HAVE_CDSASSL) + int result; /* Return value */ + OSStatus error; /* Error info */ +@@ -3358,11 +3415,11 @@ http_write_ssl(http_t *http, /* I - + else + { + result = -1; +- errno = EINTR; ++ errno = EINTR; + } + break; + default : +- errno = EPIPE; ++ errno = EPIPE; + result = -1; + break; + } diff --git a/cups.spec b/cups.spec index 151f2d9..9d5d139 100644 --- a/cups.spec +++ b/cups.spec @@ -9,7 +9,7 @@ Summary: Common Unix Printing System Name: cups Version: 1.4.2 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2 Group: System Environment/Daemons Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2 @@ -54,6 +54,7 @@ Patch26: cups-str3382.patch Patch27: cups-str3285_v2.patch Patch28: cups-str3390.patch Patch29: cups-str3391.patch +Patch30: cups-str3381.patch Patch100: cups-lspp.patch Epoch: 1 @@ -212,6 +213,7 @@ module. %patch27 -p1 -b .str3285_v2 %patch28 -p1 -b .str3390 %patch29 -p1 -b .str3391 +%patch30 -p1 -b .str3381 %if %lspp %patch100 -p1 -b .lspp @@ -509,6 +511,9 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog +* Mon Nov 16 2009 Tim Waugh 1:1.4.2-4 +- Upstream fix for GNU TLS error handling bug (STR #3381). + * Wed Nov 11 2009 Jiri Popelka 1:1.4.2-3 - Fixed lspp-patch to avoid memory leak (bug #536741). From c116e5c2c7df651514d2316a72c0a19ab3d6bd6a Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Mon, 16 Nov 2009 17:18:44 +0000 Subject: [PATCH 016/110] - Reset SIGPIPE handler for child processes (bug #537886, STR #3399). --- cups-str3399.patch | 24 ++++++++++++++++++++++++ cups.spec | 9 +++++++-- 2 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 cups-str3399.patch diff --git a/cups-str3399.patch b/cups-str3399.patch new file mode 100644 index 0000000..161942d --- /dev/null +++ b/cups-str3399.patch @@ -0,0 +1,24 @@ +diff -up cups-1.4.2/CHANGES-1.4.txt.str3399 cups-1.4.2/CHANGES-1.4.txt +diff -up cups-1.4.2/scheduler/process.c.str3399 cups-1.4.2/scheduler/process.c +--- cups-1.4.2/scheduler/process.c.str3399 2009-05-16 04:04:48.000000000 +0100 ++++ cups-1.4.2/scheduler/process.c 2009-11-16 17:15:26.104542409 +0000 +@@ -505,6 +505,7 @@ cupsdStartProcess( + #ifdef HAVE_SIGSET + sigset(SIGTERM, SIG_DFL); + sigset(SIGCHLD, SIG_DFL); ++ sigset(SIGPIPE, SIG_DFL); + #elif defined(HAVE_SIGACTION) + memset(&action, 0, sizeof(action)); + +@@ -513,9 +514,11 @@ cupsdStartProcess( + + sigaction(SIGTERM, &action, NULL); + sigaction(SIGCHLD, &action, NULL); ++ sigaction(SIGPIPE, &action, NULL); + #else + signal(SIGTERM, SIG_DFL); + signal(SIGCHLD, SIG_DFL); ++ signal(SIGPIPE, SIG_DFL); + #endif /* HAVE_SIGSET */ + + cupsdReleaseSignals(); diff --git a/cups.spec b/cups.spec index 9d5d139..d89dff0 100644 --- a/cups.spec +++ b/cups.spec @@ -9,7 +9,7 @@ Summary: Common Unix Printing System Name: cups Version: 1.4.2 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv2 Group: System Environment/Daemons Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2 @@ -55,6 +55,7 @@ Patch27: cups-str3285_v2.patch Patch28: cups-str3390.patch Patch29: cups-str3391.patch Patch30: cups-str3381.patch +Patch31: cups-str3399.patch Patch100: cups-lspp.patch Epoch: 1 @@ -214,6 +215,7 @@ module. %patch28 -p1 -b .str3390 %patch29 -p1 -b .str3391 %patch30 -p1 -b .str3381 +%patch31 -p1 -b .str3399 %if %lspp %patch100 -p1 -b .lspp @@ -511,8 +513,11 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog +* Mon Nov 16 2009 Tim Waugh 1:1.4.2-5 +- Reset SIGPIPE handler for child processes (bug #537886, STR #3399). + * Mon Nov 16 2009 Tim Waugh 1:1.4.2-4 -- Upstream fix for GNU TLS error handling bug (STR #3381). +- Upstream fix for GNU TLS error handling bug (bug #537883, STR #3381). * Wed Nov 11 2009 Jiri Popelka 1:1.4.2-3 - Fixed lspp-patch to avoid memory leak (bug #536741). From 307c739deee131535f9666ac14d371bd097f2776 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Mon, 16 Nov 2009 17:23:59 +0000 Subject: [PATCH 017/110] - Fixed typo in admin web template (bug #537884, STR #3403). --- cups-str3403.patch | 84 ++++++++++++++++++++++++++++++++++++++++++++++ cups.spec | 3 ++ 2 files changed, 87 insertions(+) create mode 100644 cups-str3403.patch diff --git a/cups-str3403.patch b/cups-str3403.patch new file mode 100644 index 0000000..d66d163 --- /dev/null +++ b/cups-str3403.patch @@ -0,0 +1,84 @@ +diff -up cups-1.4.2/templates/admin.tmpl.str3403 cups-1.4.2/templates/admin.tmpl +--- cups-1.4.2/templates/admin.tmpl.str3403 2008-09-26 16:52:03.000000000 +0100 ++++ cups-1.4.2/templates/admin.tmpl 2009-11-16 17:21:56.108541688 +0000 +@@ -20,7 +20,7 @@ +

Jobs

+ +

+- ++

+

+ +
          +diff -up cups-1.4.2/templates/de/admin.tmpl.str3403 cups-1.4.2/templates/de/admin.tmpl +--- cups-1.4.2/templates/de/admin.tmpl.str3403 2009-04-03 16:55:28.000000000 +0100 ++++ cups-1.4.2/templates/de/admin.tmpl 2009-11-16 17:21:56.109542590 +0000 +@@ -20,7 +20,7 @@ +

Druckaufträge

+ +

+-

++
+

+ +
          +diff -up cups-1.4.2/templates/es/admin.tmpl.str3403 cups-1.4.2/templates/es/admin.tmpl +--- cups-1.4.2/templates/es/admin.tmpl.str3403 2009-01-10 00:26:04.000000000 +0000 ++++ cups-1.4.2/templates/es/admin.tmpl 2009-11-16 17:21:56.120542504 +0000 +@@ -20,7 +20,7 @@ +

Trabajos

+ +

+-

++
+

+ +
          +diff -up cups-1.4.2/templates/eu/admin.tmpl.str3403 cups-1.4.2/templates/eu/admin.tmpl +--- cups-1.4.2/templates/eu/admin.tmpl.str3403 2009-07-07 17:52:34.000000000 +0100 ++++ cups-1.4.2/templates/eu/admin.tmpl 2009-11-16 17:21:56.120542504 +0000 +@@ -20,7 +20,7 @@ +

Lanak

+ +

+-

++
+

+ +
          +diff -up cups-1.4.2/templates/ja/admin.tmpl.str3403 cups-1.4.2/templates/ja/admin.tmpl +--- cups-1.4.2/templates/ja/admin.tmpl.str3403 2009-02-17 19:04:25.000000000 +0000 ++++ cups-1.4.2/templates/ja/admin.tmpl 2009-11-16 17:21:56.120542504 +0000 +@@ -20,7 +20,7 @@ +

ジョブ

+ +

+-

++
+

+ +
          +diff -up cups-1.4.2/templates/pl/admin.tmpl.str3403 cups-1.4.2/templates/pl/admin.tmpl +--- cups-1.4.2/templates/pl/admin.tmpl.str3403 2009-02-25 16:48:35.000000000 +0000 ++++ cups-1.4.2/templates/pl/admin.tmpl 2009-11-16 17:21:56.121542314 +0000 +@@ -20,7 +20,7 @@ +

Zadania

+ +

+-

++
+

+ +
          +diff -up cups-1.4.2/templates/ru/admin.tmpl.str3403 cups-1.4.2/templates/ru/admin.tmpl +--- cups-1.4.2/templates/ru/admin.tmpl.str3403 2009-10-26 16:01:08.000000000 +0000 ++++ cups-1.4.2/templates/ru/admin.tmpl 2009-11-16 17:21:56.121542314 +0000 +@@ -20,7 +20,7 @@ +

Задания

+ +

+-

++
+

+ +
          diff --git a/cups.spec b/cups.spec index d89dff0..219a7bb 100644 --- a/cups.spec +++ b/cups.spec @@ -56,6 +56,7 @@ Patch28: cups-str3390.patch Patch29: cups-str3391.patch Patch30: cups-str3381.patch Patch31: cups-str3399.patch +Patch32: cups-str3403.patch Patch100: cups-lspp.patch Epoch: 1 @@ -216,6 +217,7 @@ module. %patch29 -p1 -b .str3391 %patch30 -p1 -b .str3381 %patch31 -p1 -b .str3399 +%patch32 -p1 -b .str3403 %if %lspp %patch100 -p1 -b .lspp @@ -514,6 +516,7 @@ rm -rf $RPM_BUILD_ROOT %changelog * Mon Nov 16 2009 Tim Waugh 1:1.4.2-5 +- Fixed typo in admin web template (bug #537884, STR #3403). - Reset SIGPIPE handler for child processes (bug #537886, STR #3399). * Mon Nov 16 2009 Tim Waugh 1:1.4.2-4 From 7fa196971f05fff4bdd0c831cdf288586836f27d Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Tue, 17 Nov 2009 13:15:18 +0000 Subject: [PATCH 018/110] - Fixed out-of-memory handling when loading jobs (bug #538054, STR #3407). --- cups-str3407.patch | 67 ++++++++++++++++++++++++++++++++++++++++++++++ cups.spec | 8 +++++- 2 files changed, 74 insertions(+), 1 deletion(-) create mode 100644 cups-str3407.patch diff --git a/cups-str3407.patch b/cups-str3407.patch new file mode 100644 index 0000000..4d8c6dc --- /dev/null +++ b/cups-str3407.patch @@ -0,0 +1,67 @@ +diff -up cups-1.4.2/CHANGES-1.4.txt.str3407 cups-1.4.2/CHANGES-1.4.txt +diff -up cups-1.4.2/scheduler/job.c.str3407 cups-1.4.2/scheduler/job.c +--- cups-1.4.2/scheduler/job.c.str3407 2009-11-17 12:18:38.518084476 +0000 ++++ cups-1.4.2/scheduler/job.c 2009-11-17 13:00:46.204083691 +0000 +@@ -1721,7 +1721,30 @@ cupsdLoadJob(cupsd_job_t *job) /* I - J + cupsdLogMessage(CUPSD_LOG_ERROR, + "[Job %d] Ran out of memory for job file types!", + job->id); +- return (1); ++ ++ ippDelete(job->attrs); ++ job->attrs = NULL; ++ ++ if (compressions) ++ free(compressions); ++ ++ if (filetypes) ++ free(filetypes); ++ ++ if (job->compressions) ++ { ++ free(job->compressions); ++ job->compressions = NULL; ++ } ++ ++ if (job->filetypes) ++ { ++ free(job->filetypes); ++ job->filetypes = NULL; ++ } ++ ++ job->num_files = 0; ++ return (0); + } + + job->compressions = compressions; +@@ -1789,6 +1812,21 @@ cupsdLoadJob(cupsd_job_t *job) /* I - J + + ippDelete(job->attrs); + job->attrs = NULL; ++ ++ if (job->compressions) ++ { ++ free(job->compressions); ++ job->compressions = NULL; ++ } ++ ++ if (job->filetypes) ++ { ++ free(job->filetypes); ++ job->filetypes = NULL; ++ } ++ ++ job->num_files = 0; ++ + unlink(jobfile); + + return (0); +@@ -4411,7 +4449,7 @@ update_job_attrs(cupsd_job_t *job, /* I + else if (job->printer->state_message[0] && do_message) + cupsdSetString(&(job->printer_message->values[0].string.text), + job->printer->state_message); +- ++ + /* + * ... and the printer-state-reasons value... + */ diff --git a/cups.spec b/cups.spec index 219a7bb..e270a07 100644 --- a/cups.spec +++ b/cups.spec @@ -9,7 +9,7 @@ Summary: Common Unix Printing System Name: cups Version: 1.4.2 -Release: 5%{?dist} +Release: 6%{?dist} License: GPLv2 Group: System Environment/Daemons Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2 @@ -57,6 +57,7 @@ Patch29: cups-str3391.patch Patch30: cups-str3381.patch Patch31: cups-str3399.patch Patch32: cups-str3403.patch +Patch33: cups-str3407.patch Patch100: cups-lspp.patch Epoch: 1 @@ -218,6 +219,7 @@ module. %patch30 -p1 -b .str3381 %patch31 -p1 -b .str3399 %patch32 -p1 -b .str3403 +%patch33 -p1 -b .str3407 %if %lspp %patch100 -p1 -b .lspp @@ -515,6 +517,10 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog +* Tue Nov 17 2009 Tim Waugh 1:1.4.2-6 +- Fixed out-of-memory handling when loading jobs (bug #538054, + STR #3407). + * Mon Nov 16 2009 Tim Waugh 1:1.4.2-5 - Fixed typo in admin web template (bug #537884, STR #3403). - Reset SIGPIPE handler for child processes (bug #537886, STR #3399). From 4aa703aad53a53d443c364b0c83a2f37531296bf Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Tue, 17 Nov 2009 13:27:14 +0000 Subject: [PATCH 019/110] - Fixed display of current driver (bug #537182, STR #3418). --- cups-str3418.patch | 90 ++++++++++++++++++++++++++++++++++++++++++++++ cups.spec | 3 ++ 2 files changed, 93 insertions(+) create mode 100644 cups-str3418.patch diff --git a/cups-str3418.patch b/cups-str3418.patch new file mode 100644 index 0000000..3bb4e3e --- /dev/null +++ b/cups-str3418.patch @@ -0,0 +1,90 @@ +diff -up cups-1.4.2/cgi-bin/admin.c.str3418 cups-1.4.2/cgi-bin/admin.c +--- cups-1.4.2/cgi-bin/admin.c.str3418 2009-11-17 13:23:51.130084685 +0000 ++++ cups-1.4.2/cgi-bin/admin.c 2009-11-17 13:23:56.773209143 +0000 +@@ -1261,7 +1261,7 @@ do_am_printer(http_t *http, /* I - HTTP + * Got the list of PPDs, see if the user has selected a make... + */ + +- if (cgiSetIPPVars(response, NULL, NULL, NULL, 0) == 0) ++ if (cgiSetIPPVars(response, NULL, NULL, NULL, 0) == 0 && !modify) + { + /* + * No PPD files with this make, try again with all makes... +@@ -1297,8 +1297,11 @@ do_am_printer(http_t *http, /* I - HTTP + */ + + cgiStartHTML(title); +- cgiSetVariable("CURRENT_MAKE_AND_MODEL", +- cgiGetArray("PPD_MAKE_AND_MODEL", 0)); ++ if (!cgiGetVariable("PPD_MAKE")) ++ cgiSetVariable("PPD_MAKE", cgiGetVariable("CURRENT_MAKE")); ++ if (!modify) ++ cgiSetVariable("CURRENT_MAKE_AND_MODEL", ++ cgiGetArray("PPD_MAKE_AND_MODEL", 0)); + cgiCopyTemplateLang("choose-model.tmpl"); + cgiEndHTML(); + } +@@ -1590,7 +1593,7 @@ do_config_server(http_t *http) /* I - H + #ifdef HAVE_GSSAPI + char default_auth_type[255]; + /* DefaultAuthType value */ +- const char *val; /* Setting value */ ++ const char *val; /* Setting value */ + #endif /* HAVE_GSSAPI */ + + +@@ -1662,7 +1665,7 @@ do_config_server(http_t *http) /* I - H + strcat(local_protocols, "slp"); + } + #endif /* HAVE_SLP */ +- ++ + if (cgiGetVariable("BROWSE_REMOTE_CUPS")) + strcpy(remote_protocols, "cups"); + else +@@ -1915,7 +1918,7 @@ do_config_server(http_t *http) /* I - H + cgiSetVariable("ERROR", strerror(errno)); + cgiCopyTemplateLang("error.tmpl"); + cgiEndHTML(); +- ++ + perror(tempfile); + return; + } +@@ -1927,7 +1930,7 @@ do_config_server(http_t *http) /* I - H + cgiSetVariable("ERROR", strerror(errno)); + cgiCopyTemplateLang("error.tmpl"); + cgiEndHTML(); +- ++ + perror(tempfile); + close(tempfd); + unlink(tempfile); +@@ -3342,7 +3345,7 @@ do_set_options(http_t *http, /* I - HTT + ((ppdattr = ppdFindAttr(ppd, "cupsCommands", NULL)) != NULL && + ppdattr->value && strstr(ppdattr->value, "AutoConfigure"))) + cgiSetVariable("HAVE_AUTOCONFIGURE", "YES"); +- else ++ else + { + for (i = 0; i < ppd->num_filters; i ++) + if (!strncmp(ppd->filters[i], "application/vnd.cups-postscript", 31)) +@@ -3446,7 +3449,7 @@ do_set_options(http_t *http, /* I - HTT + cgiSetVariable("GROUP", group->text); + + cgiCopyTemplateLang("option-header.tmpl"); +- ++ + for (j = group->num_options, option = group->options; + j > 0; + j --, option ++) +@@ -4090,7 +4093,7 @@ get_option_value( + + snprintf(buffer, bufsize, "Custom.%gx%g%s", width, length, uval); + } +- else if (cupsArrayCount(coption->params) == 1) ++ else if (cupsArrayCount(coption->params) == 1) + { + cparam = ppdFirstCustomParam(coption); + snprintf(keyword, sizeof(keyword), "%s.%s", coption->keyword, cparam->name); +diff -up cups-1.4.2/CHANGES-1.4.txt.str3418 cups-1.4.2/CHANGES-1.4.txt diff --git a/cups.spec b/cups.spec index e270a07..9e8a99f 100644 --- a/cups.spec +++ b/cups.spec @@ -58,6 +58,7 @@ Patch30: cups-str3381.patch Patch31: cups-str3399.patch Patch32: cups-str3403.patch Patch33: cups-str3407.patch +Patch34: cups-str3418.patch Patch100: cups-lspp.patch Epoch: 1 @@ -220,6 +221,7 @@ module. %patch31 -p1 -b .str3399 %patch32 -p1 -b .str3403 %patch33 -p1 -b .str3407 +%patch34 -p1 -b .str3418 %if %lspp %patch100 -p1 -b .lspp @@ -518,6 +520,7 @@ rm -rf $RPM_BUILD_ROOT %changelog * Tue Nov 17 2009 Tim Waugh 1:1.4.2-6 +- Fixed display of current driver (bug #537182, STR #3418). - Fixed out-of-memory handling when loading jobs (bug #538054, STR #3407). From ec5b1f332cb9cc1270d3892166b9b1c8b4a18b78 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Thu, 19 Nov 2009 13:28:02 +0000 Subject: [PATCH 020/110] - Applied patch to fix CVE-2009-3553 (bug #530111, STR #3200). --- cups-CVE-2009-3553.patch | 39 +++++++++++++++++++++++++++++++++++++++ cups.spec | 14 +++++++++++++- 2 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 cups-CVE-2009-3553.patch diff --git a/cups-CVE-2009-3553.patch b/cups-CVE-2009-3553.patch new file mode 100644 index 0000000..6aadfe4 --- /dev/null +++ b/cups-CVE-2009-3553.patch @@ -0,0 +1,39 @@ +diff -up cups-1.4.2/scheduler/select.c.CVE-2009-3553 cups-1.4.2/scheduler/select.c +--- cups-1.4.2/scheduler/select.c.CVE-2009-3553 2009-07-15 00:07:52.000000000 +0100 ++++ cups-1.4.2/scheduler/select.c 2009-11-19 12:30:39.672976150 +0000 +@@ -454,7 +454,7 @@ cupsdDoSelect(long timeout) /* I - Time + if (fdptr->read_cb && event->filter == EVFILT_READ) + (*(fdptr->read_cb))(fdptr->data); + +- if (fdptr->write_cb && event->filter == EVFILT_WRITE) ++ if (fdptr->use > 1 && fdptr->write_cb && event->filter == EVFILT_WRITE) + (*(fdptr->write_cb))(fdptr->data); + + release_fd(fdptr); +@@ -499,7 +499,7 @@ cupsdDoSelect(long timeout) /* I - Time + if (fdptr->read_cb && (event->events & (EPOLLIN | EPOLLERR | EPOLLHUP))) + (*(fdptr->read_cb))(fdptr->data); + +- if (fdptr->write_cb && (event->events & (EPOLLOUT | EPOLLERR | EPOLLHUP))) ++ if (fdptr->use > 1 && fdptr->write_cb && (event->events & (EPOLLOUT | EPOLLERR | EPOLLHUP))) + (*(fdptr->write_cb))(fdptr->data); + + release_fd(fdptr); +@@ -590,7 +590,7 @@ cupsdDoSelect(long timeout) /* I - Time + if (fdptr->read_cb && (pfd->revents & (POLLIN | POLLERR | POLLHUP))) + (*(fdptr->read_cb))(fdptr->data); + +- if (fdptr->write_cb && (pfd->revents & (POLLOUT | POLLERR | POLLHUP))) ++ if (fdptr->use > 1 && fdptr->write_cb && (pfd->revents & (POLLOUT | POLLERR | POLLHUP))) + (*(fdptr->write_cb))(fdptr->data); + + release_fd(fdptr); +@@ -645,7 +645,7 @@ cupsdDoSelect(long timeout) /* I - Time + if (fdptr->read_cb && FD_ISSET(fdptr->fd, &cupsd_current_input)) + (*(fdptr->read_cb))(fdptr->data); + +- if (fdptr->write_cb && FD_ISSET(fdptr->fd, &cupsd_current_output)) ++ if (fdptr->use > 1 && fdptr->write_cb && FD_ISSET(fdptr->fd, &cupsd_current_output)) + (*(fdptr->write_cb))(fdptr->data); + + release_fd(fdptr); diff --git a/cups.spec b/cups.spec index 9e8a99f..a0a2129 100644 --- a/cups.spec +++ b/cups.spec @@ -9,7 +9,7 @@ Summary: Common Unix Printing System Name: cups Version: 1.4.2 -Release: 6%{?dist} +Release: 7%{?dist} License: GPLv2 Group: System Environment/Daemons Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2 @@ -59,8 +59,13 @@ Patch31: cups-str3399.patch Patch32: cups-str3403.patch Patch33: cups-str3407.patch Patch34: cups-str3418.patch +Patch35: cups-CVE-2009-3553.patch Patch100: cups-lspp.patch + +## SECURITY PATCHES: + + Epoch: 1 Url: http://www.cups.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -222,11 +227,15 @@ module. %patch32 -p1 -b .str3403 %patch33 -p1 -b .str3407 %patch34 -p1 -b .str3418 +%patch35 -p1 -b .CVE-2009-3553 %if %lspp %patch100 -p1 -b .lspp %endif +# SECURITY PATCHES: + + sed -i -e '1iMaxLogSize 0' conf/cupsd.conf.in cp %{SOURCE5} cups-lpd.real @@ -519,6 +528,9 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog +* Thu Nov 19 2009 Tim Waugh 1:1.4.2-7 +- Applied patch to fix CVE-2009-3553 (bug #530111, STR #3200). + * Tue Nov 17 2009 Tim Waugh 1:1.4.2-6 - Fixed display of current driver (bug #537182, STR #3418). - Fixed out-of-memory handling when loading jobs (bug #538054, From a73b08849419bba4aeac22650c670ecaf291a944 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Popelka?= Date: Fri, 20 Nov 2009 13:58:32 +0000 Subject: [PATCH 021/110] - Do not translate russian links showing completed jobs (bug #539354, STR #3422). --- cups-str3422.patch | 22 ++++++++++++++++++++++ cups.spec | 7 ++++++- 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 cups-str3422.patch diff --git a/cups-str3422.patch b/cups-str3422.patch new file mode 100644 index 0000000..a0ac1bf --- /dev/null +++ b/cups-str3422.patch @@ -0,0 +1,22 @@ +diff -up cups-1.4.2/templates/pl/jobs-header.tmpl.localize cups-1.4.2/templates/pl/jobs-header.tmpl +--- cups-1.4.2/templates/pl/jobs-header.tmpl.localize 2009-02-25 17:48:35.000000000 +0100 ++++ cups-1.4.2/templates/pl/jobs-header.tmpl 2009-11-20 13:56:58.000000000 +0100 +@@ -2,4 +2,4 @@ + {?which_jobs=completed?:
} + {?which_jobs=all?:
} + +-

{total=0?Brak zadań:Wyświetlanie {#job_id} z {total} {?which_jobs=?aktywnych:{which_jobs=wszystkich?:zakończonych}} zadań{total=1?:s}}.

++

{total=0?Brak zadań:Wyświetlanie {#job_id} z {total} {?which_jobs=?aktywnych:{which_jobs=all?:zakończonych}} zadań{total=1?:s}}.

+diff -up cups-1.4.2/templates/ru/jobs-header.tmpl.localize cups-1.4.2/templates/ru/jobs-header.tmpl +--- cups-1.4.2/templates/ru/jobs-header.tmpl.localize 2009-02-17 20:04:25.000000000 +0100 ++++ cups-1.4.2/templates/ru/jobs-header.tmpl 2009-11-20 13:53:54.000000000 +0100 +@@ -1,5 +1,6 @@ +
{?which_jobs=?:
} +-{?which_jobs=completed?:
} +-{?which_jobs=all?:
}
++{?which_jobs=completed?:
} ++{?which_jobs=all?:
} ++ ++

{total=0?Нет заданий:Задание {#job_id} из {total} {?which_jobs=?активных:{which_jobs=all?:завершенных}}.

+ +-

{total=0?Нет заданий:Задание {#job_id} из {total} {?which_jobs=?активных:{which_jobs=всех?:завершенных}}.

diff --git a/cups.spec b/cups.spec index a0a2129..87d255d 100644 --- a/cups.spec +++ b/cups.spec @@ -9,7 +9,7 @@ Summary: Common Unix Printing System Name: cups Version: 1.4.2 -Release: 7%{?dist} +Release: 8%{?dist} License: GPLv2 Group: System Environment/Daemons Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2 @@ -60,6 +60,7 @@ Patch32: cups-str3403.patch Patch33: cups-str3407.patch Patch34: cups-str3418.patch Patch35: cups-CVE-2009-3553.patch +Patch36: cups-str3422.patch Patch100: cups-lspp.patch @@ -228,6 +229,7 @@ module. %patch33 -p1 -b .str3407 %patch34 -p1 -b .str3418 %patch35 -p1 -b .CVE-2009-3553 +%patch36 -p1 -b .str3422 %if %lspp %patch100 -p1 -b .lspp @@ -528,6 +530,9 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog +* Fri Nov 20 2009 Jiri Popelka 1:1.4.2-8 +- Do not translate russian links showing completed jobs (bug #539354, STR #3422). + * Thu Nov 19 2009 Tim Waugh 1:1.4.2-7 - Applied patch to fix CVE-2009-3553 (bug #530111, STR #3200). From 7c9ce96e70305a9cb768659edd4b0a8e6ba9e314 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Mon, 23 Nov 2009 12:05:03 +0000 Subject: [PATCH 022/110] - Fixed small typos introduced in fix for bug #536741. --- cups-lspp.patch | 6 +++--- cups.spec | 8 ++++++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/cups-lspp.patch b/cups-lspp.patch index 90f20ad..eda4115 100644 --- a/cups-lspp.patch +++ b/cups-lspp.patch @@ -1740,7 +1740,7 @@ diff -up cups-1.4.1/scheduler/ipp.c.lspp cups-1.4.1/scheduler/ipp.c + + printerfile = strstr(printer->device_uri, "/dev/"); + if (printerfile == NULL && (strncmp(printer->device_uri, "file:/", 6) == 0)) -+ printerfile = printer->device_uri + strlen("file:"); ++ printerfile = printer->device_uri + strlen("file:/"); + + if (printerfile != NULL) + { @@ -2546,7 +2546,7 @@ diff -up cups-1.4.1/scheduler/job.c.lspp cups-1.4.1/scheduler/job.c + */ + printerfile = strstr(printer->device_uri, "/dev/"); + if (printerfile == NULL && (strncmp(printer->device_uri, "file:/", 6) == 0)) -+ printerfile = printer->device_uri + strlen("file:"); ++ printerfile = printer->device_uri + strlen("file:/"); + + if (printerfile != NULL) + { @@ -2788,7 +2788,7 @@ diff -up cups-1.4.1/scheduler/printers.c.lspp cups-1.4.1/scheduler/printers.c + printercon = 0; + printerfile = strstr(p->device_uri, "/dev/"); + if (printerfile == NULL && (strncmp(p->device_uri, "file:/", 6) == 0)) -+ printerfile = p->device_uri + strlen("file:"); ++ printerfile = p->device_uri + strlen("file:/"); + + if (printerfile != NULL) + { diff --git a/cups.spec b/cups.spec index 87d255d..a28d3a1 100644 --- a/cups.spec +++ b/cups.spec @@ -9,7 +9,7 @@ Summary: Common Unix Printing System Name: cups Version: 1.4.2 -Release: 8%{?dist} +Release: 9%{?dist} License: GPLv2 Group: System Environment/Daemons Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2 @@ -530,8 +530,12 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog +* Mon Nov 23 2009 Tim Waugh 1:1.4.2-9 +- Fixed small typos introduced in fix for bug #536741. + * Fri Nov 20 2009 Jiri Popelka 1:1.4.2-8 -- Do not translate russian links showing completed jobs (bug #539354, STR #3422). +- Do not translate russian links showing completed jobs + (bug #539354, STR #3422). * Thu Nov 19 2009 Tim Waugh 1:1.4.2-7 - Applied patch to fix CVE-2009-3553 (bug #530111, STR #3200). From 2b820c95195afaf1f9191e5d1266882293c259b7 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Mon, 23 Nov 2009 13:10:07 +0000 Subject: [PATCH 023/110] - Undo last change as it was incorrect. --- cups-lspp.patch | 6 +++--- cups.spec | 5 ++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/cups-lspp.patch b/cups-lspp.patch index eda4115..90f20ad 100644 --- a/cups-lspp.patch +++ b/cups-lspp.patch @@ -1740,7 +1740,7 @@ diff -up cups-1.4.1/scheduler/ipp.c.lspp cups-1.4.1/scheduler/ipp.c + + printerfile = strstr(printer->device_uri, "/dev/"); + if (printerfile == NULL && (strncmp(printer->device_uri, "file:/", 6) == 0)) -+ printerfile = printer->device_uri + strlen("file:/"); ++ printerfile = printer->device_uri + strlen("file:"); + + if (printerfile != NULL) + { @@ -2546,7 +2546,7 @@ diff -up cups-1.4.1/scheduler/job.c.lspp cups-1.4.1/scheduler/job.c + */ + printerfile = strstr(printer->device_uri, "/dev/"); + if (printerfile == NULL && (strncmp(printer->device_uri, "file:/", 6) == 0)) -+ printerfile = printer->device_uri + strlen("file:/"); ++ printerfile = printer->device_uri + strlen("file:"); + + if (printerfile != NULL) + { @@ -2788,7 +2788,7 @@ diff -up cups-1.4.1/scheduler/printers.c.lspp cups-1.4.1/scheduler/printers.c + printercon = 0; + printerfile = strstr(p->device_uri, "/dev/"); + if (printerfile == NULL && (strncmp(p->device_uri, "file:/", 6) == 0)) -+ printerfile = p->device_uri + strlen("file:/"); ++ printerfile = p->device_uri + strlen("file:"); + + if (printerfile != NULL) + { diff --git a/cups.spec b/cups.spec index a28d3a1..8b92bf1 100644 --- a/cups.spec +++ b/cups.spec @@ -9,7 +9,7 @@ Summary: Common Unix Printing System Name: cups Version: 1.4.2 -Release: 9%{?dist} +Release: 10%{?dist} License: GPLv2 Group: System Environment/Daemons Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2 @@ -530,6 +530,9 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog +* Mon Nov 23 2009 Tim Waugh 1:1.4.2-10 +- Undo last change as it was incorrect. + * Mon Nov 23 2009 Tim Waugh 1:1.4.2-9 - Fixed small typos introduced in fix for bug #536741. From 1df94bdfb32b7a6f349d78ae2640d5ed372358e9 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Thu, 26 Nov 2009 01:35:24 +0000 Subject: [PATCH 024/110] Fix typo that causes a failure to update the common directory. (releng #2781) --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 5142377..1569e04 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,10 @@ # Makefile for source rpm: cups -# $Id: Makefile,v 1.1 2004/09/09 03:59:57 cvsdist Exp $ +# $Id: Makefile,v 1.2 2007/10/15 18:40:52 notting Exp $ NAME := cups SPECFILE = $(firstword $(wildcard *.spec)) define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done endef MAKEFILE_COMMON := $(shell $(find-makefile-common)) From 1c6d031a3c50532e0b31aa55fe5af6bf08664697 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Thu, 3 Dec 2009 10:06:20 +0000 Subject: [PATCH 025/110] - Undo last change as it was incorrect. --- cups-str3413.patch | 42 ++++++++++++++++++++++++++++++++++++++++++ cups.spec | 7 ++++++- 2 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 cups-str3413.patch diff --git a/cups-str3413.patch b/cups-str3413.patch new file mode 100644 index 0000000..ea2872a --- /dev/null +++ b/cups-str3413.patch @@ -0,0 +1,42 @@ +diff -up cups-1.4.2/backend/snmp.c.str3413 cups-1.4.2/backend/snmp.c +--- cups-1.4.2/backend/snmp.c.str3413 2009-01-14 22:40:58.000000000 +0000 ++++ cups-1.4.2/backend/snmp.c 2009-12-03 10:01:27.933335209 +0000 +@@ -999,7 +999,7 @@ read_snmp_response(int fd) /* I - SNMP + DEVICE_PRODUCT, LexmarkProductOID2); + _cupsSNMPWrite(fd, &(packet.address), CUPS_SNMP_VERSION_1, + packet.community, CUPS_ASN1_GET_REQUEST, +- DEVICE_URI, LexmarkDeviceIdOID); ++ DEVICE_ID, LexmarkDeviceIdOID); + _cupsSNMPWrite(fd, &(packet.address), CUPS_SNMP_VERSION_1, + packet.community, CUPS_ASN1_GET_REQUEST, + DEVICE_PRODUCT, XeroxProductOID); +@@ -1064,7 +1064,19 @@ read_snmp_response(int fd) /* I - SNMP + + + if (device->id) ++ { ++ if (strlen (device->id) > ++ strlen ((char *)packet.object_value.string.bytes)) ++ { ++ /* ++ * The Device ID we already saw was more complete. ++ */ ++ ++ break; ++ } ++ + free(device->id); ++ } + + device->id = strdup((char *)packet.object_value.string.bytes); + +@@ -1107,7 +1119,8 @@ read_snmp_response(int fd) /* I - SNMP + + case DEVICE_URI : + if (device && packet.object_type == CUPS_ASN1_OCTET_STRING && +- !device->uri) ++ !device->uri && ++ (char *)packet.object_value.string.bytes[0] != '\0') + { + /* + * Update an existing cache entry... diff --git a/cups.spec b/cups.spec index 8b92bf1..76b6e5f 100644 --- a/cups.spec +++ b/cups.spec @@ -9,7 +9,7 @@ Summary: Common Unix Printing System Name: cups Version: 1.4.2 -Release: 10%{?dist} +Release: 11%{?dist} License: GPLv2 Group: System Environment/Daemons Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2 @@ -61,6 +61,7 @@ Patch33: cups-str3407.patch Patch34: cups-str3418.patch Patch35: cups-CVE-2009-3553.patch Patch36: cups-str3422.patch +Patch37: cups-str3413.patch Patch100: cups-lspp.patch @@ -230,6 +231,7 @@ module. %patch34 -p1 -b .str3418 %patch35 -p1 -b .CVE-2009-3553 %patch36 -p1 -b .str3422 +%patch37 -p1 -b .str3413 %if %lspp %patch100 -p1 -b .lspp @@ -530,6 +532,9 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog +* Thu Dec 3 2009 Tim Waugh - 1:1.4.2-11 +- Fixes for SNMP scanning with Lexmark printers (bug #542857, STR #3413). + * Mon Nov 23 2009 Tim Waugh 1:1.4.2-10 - Undo last change as it was incorrect. From 29c4b9e02b4eaf4b1aeac0c9b3abf2f8e7c755ed Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Fri, 4 Dec 2009 15:49:09 +0000 Subject: [PATCH 026/110] - The web interface prevented conflicting options from being adjusted (bug #533426, STR #3439). --- cups-str3439.patch | 12 ++++++++++++ cups.spec | 8 +++++++- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 cups-str3439.patch diff --git a/cups-str3439.patch b/cups-str3439.patch new file mode 100644 index 0000000..f0e8b7b --- /dev/null +++ b/cups-str3439.patch @@ -0,0 +1,12 @@ +diff -up cups-1.4.2/cgi-bin/admin.c.str3439 cups-1.4.2/cgi-bin/admin.c +--- cups-1.4.2/cgi-bin/admin.c.str3439 2009-12-04 15:48:21.181907084 +0000 ++++ cups-1.4.2/cgi-bin/admin.c 2009-12-04 15:48:21.199906005 +0000 +@@ -3327,7 +3327,7 @@ do_set_options(http_t *http, /* I - HTT + } + } + +- if (!have_options || ppdConflicts(ppd)) ++ if (!have_options) + { + /* + * Show the options to the user... diff --git a/cups.spec b/cups.spec index 76b6e5f..07f04a9 100644 --- a/cups.spec +++ b/cups.spec @@ -9,7 +9,7 @@ Summary: Common Unix Printing System Name: cups Version: 1.4.2 -Release: 11%{?dist} +Release: 12%{?dist} License: GPLv2 Group: System Environment/Daemons Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2 @@ -62,6 +62,7 @@ Patch34: cups-str3418.patch Patch35: cups-CVE-2009-3553.patch Patch36: cups-str3422.patch Patch37: cups-str3413.patch +Patch38: cups-conflicts.patch Patch100: cups-lspp.patch @@ -232,6 +233,7 @@ module. %patch35 -p1 -b .CVE-2009-3553 %patch36 -p1 -b .str3422 %patch37 -p1 -b .str3413 +%patch38 -p1 -b .str3439 %if %lspp %patch100 -p1 -b .lspp @@ -532,6 +534,10 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog +* Fri Dec 4 2009 Tim Waugh - 1:1.4.2-12 +- The web interface prevented conflicting options from being adjusted + (bug #533426, STR #3439). + * Thu Dec 3 2009 Tim Waugh - 1:1.4.2-11 - Fixes for SNMP scanning with Lexmark printers (bug #542857, STR #3413). From b5c2a8b3d88db5ca0515c5a9fce4f875c96e025e Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Fri, 4 Dec 2009 16:06:43 +0000 Subject: [PATCH 027/110] Fixed patch reference. --- cups.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cups.spec b/cups.spec index 07f04a9..a5c5416 100644 --- a/cups.spec +++ b/cups.spec @@ -62,7 +62,7 @@ Patch34: cups-str3418.patch Patch35: cups-CVE-2009-3553.patch Patch36: cups-str3422.patch Patch37: cups-str3413.patch -Patch38: cups-conflicts.patch +Patch38: cups-str3439.patch Patch100: cups-lspp.patch From 502e82276f52669e671c0c172d727e360f4ae2d0 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Tue, 8 Dec 2009 09:38:20 +0000 Subject: [PATCH 028/110] - Moved %{_datadir}/cups/ppdc/*.h to the main package (bug #545348). --- cups.spec | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/cups.spec b/cups.spec index a5c5416..3eab81d 100644 --- a/cups.spec +++ b/cups.spec @@ -9,7 +9,7 @@ Summary: Common Unix Printing System Name: cups Version: 1.4.2 -Release: 12%{?dist} +Release: 13%{?dist} License: GPLv2 Group: System Environment/Daemons Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2 @@ -507,6 +507,7 @@ rm -rf $RPM_BUILD_ROOT %config(noreplace) %{_datadir}/cups/mime/mime.convs %dir %{_datadir}/cups/ppdc %{_datadir}/cups/ppdc/*.defs +%{_datadir}/cups/ppdc/*.h %files libs %defattr(-,root,root) @@ -517,9 +518,6 @@ rm -rf $RPM_BUILD_ROOT %{_bindir}/cups-config %{_libdir}/*.so %{_includedir}/cups -%dir %{_datadir}/cups -%dir %{_datadir}/cups/ppdc -%{_datadir}/cups/ppdc/*.h %files lpd %defattr(-,root,root) @@ -534,6 +532,9 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog +* Tue Dec 8 2009 Tim Waugh - 1:1.4.2-13 +- Moved %%{_datadir}/cups/ppdc/*.h to the main package (bug #545348). + * Fri Dec 4 2009 Tim Waugh - 1:1.4.2-12 - The web interface prevented conflicting options from being adjusted (bug #533426, STR #3439). From e7c8ff1e8c1c51c7f6a32296220c1a52f85b00f9 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Tue, 8 Dec 2009 09:56:49 +0000 Subject: [PATCH 029/110] - No longer requires paps. The texttopaps filter MIME conversion file is now provided by the paps package (bug #545036). --- cups-paps.patch | 12 ------------ cups.spec | 11 +++++------ 2 files changed, 5 insertions(+), 18 deletions(-) delete mode 100644 cups-paps.patch diff --git a/cups-paps.patch b/cups-paps.patch deleted file mode 100644 index 91da82d..0000000 --- a/cups-paps.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up cups-1.4b1/conf/mime.convs.in.paps cups-1.4b1/conf/mime.convs.in ---- cups-1.4b1/conf/mime.convs.in.paps 2008-10-08 22:07:45.000000000 +0100 -+++ cups-1.4b1/conf/mime.convs.in 2008-11-11 15:42:18.000000000 +0000 -@@ -45,7 +45,7 @@ application/x-cshell application/postsc - application/x-csource application/postscript 33 texttops - application/x-perl application/postscript 33 texttops - application/x-shell application/postscript 33 texttops --text/plain application/postscript 33 texttops -+text/plain application/postscript 33 texttopaps - text/html application/postscript 33 texttops - image/gif application/vnd.cups-postscript 66 imagetops - image/png application/vnd.cups-postscript 66 imagetops diff --git a/cups.spec b/cups.spec index 3eab81d..a940f69 100644 --- a/cups.spec +++ b/cups.spec @@ -9,7 +9,7 @@ Summary: Common Unix Printing System Name: cups Version: 1.4.2 -Release: 13%{?dist} +Release: 14%{?dist} License: GPLv2 Group: System Environment/Daemons Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2 @@ -32,7 +32,6 @@ Patch4: cups-serial.patch Patch5: cups-banners.patch Patch6: cups-serverbin-compat.patch Patch7: cups-no-export-ssllibs.patch -Patch8: cups-paps.patch Patch9: cups-direct-usb.patch Patch10: cups-lpr-help.patch Patch11: cups-peercred.patch @@ -114,9 +113,6 @@ BuildRequires: gcc >= 4.0.1 BuildPrereq: dbus-devel >= 0.90 Requires: dbus >= 0.90 -# The paps package uses pango to render UTF-8 text to PostScript. -Requires: paps >= 0.6.6-9 - # Requires tmpwatch for the cron.daily script (bug #218901). Requires: tmpwatch @@ -203,7 +199,6 @@ module. %patch5 -p1 -b .banners %patch6 -p1 -b .serverbin-compat %patch7 -p1 -b .no-export-ssllibs -%patch8 -p1 -b .paps %patch9 -p1 -b .direct-usb %patch10 -p1 -b .lpr-help %patch11 -p1 -b .peercred @@ -532,6 +527,10 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog +* Tue Dec 8 2009 Tim Waugh - 1:1.4.2-14 +- No longer requires paps. The texttopaps filter MIME conversion file + is now provided by the paps package (bug #545036). + * Tue Dec 8 2009 Tim Waugh - 1:1.4.2-13 - Moved %%{_datadir}/cups/ppdc/*.h to the main package (bug #545348). From a585b278b778d4af5f71c7a1a115d18e70ed34a8 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Tue, 8 Dec 2009 10:06:35 +0000 Subject: [PATCH 030/110] - Use upstream fix for adjustment of conflicting options (bug #533426, STR #3439). --- cups-str3439.patch | 128 ++++++++++++++++++++++++++++++++++++++++++--- cups.spec | 2 + 2 files changed, 123 insertions(+), 7 deletions(-) diff --git a/cups-str3439.patch b/cups-str3439.patch index f0e8b7b..e5b2e2e 100644 --- a/cups-str3439.patch +++ b/cups-str3439.patch @@ -1,12 +1,126 @@ diff -up cups-1.4.2/cgi-bin/admin.c.str3439 cups-1.4.2/cgi-bin/admin.c ---- cups-1.4.2/cgi-bin/admin.c.str3439 2009-12-04 15:48:21.181907084 +0000 -+++ cups-1.4.2/cgi-bin/admin.c 2009-12-04 15:48:21.199906005 +0000 -@@ -3327,7 +3327,7 @@ do_set_options(http_t *http, /* I - HTT +--- cups-1.4.2/cgi-bin/admin.c.str3439 2009-12-08 10:03:36.412157983 +0000 ++++ cups-1.4.2/cgi-bin/admin.c 2009-12-08 10:03:41.659157246 +0000 +@@ -3320,11 +3320,16 @@ do_set_options(http_t *http, /* I - HTT + for (option = ppdFirstOption(ppd); + option; + option = ppdNextOption(ppd)) ++ { + if ((var = cgiGetVariable(option->keyword)) != NULL) + { + have_options = 1; + ppdMarkOption(ppd, option->keyword, var); ++ fprintf(stderr, "DEBUG: Set %s to %s...\n", option->keyword, var); } ++ else ++ fprintf(stderr, "DEBUG: Didn't find %s...\n", option->keyword); ++ } } -- if (!have_options || ppdConflicts(ppd)) -+ if (!have_options) + if (!have_options || ppdConflicts(ppd)) +diff -up cups-1.4.2/cups/conflicts.c.str3439 cups-1.4.2/cups/conflicts.c +--- cups-1.4.2/cups/conflicts.c.str3439 2009-05-18 23:55:15.000000000 +0100 ++++ cups-1.4.2/cups/conflicts.c 2009-12-08 10:03:41.657157719 +0000 +@@ -583,9 +583,13 @@ ppdConflicts(ppd_file_t *ppd) /* I - PP + * Clear all conflicts... + */ + ++ cupsArraySave(ppd->options); ++ + for (o = ppdFirstOption(ppd); o; o = ppdNextOption(ppd)) + o->conflicted = 0; + ++ cupsArrayRestore(ppd->options); ++ + /* + * Test for conflicts... + */ +diff -up cups-1.4.2/cups/mark.c.str3439 cups-1.4.2/cups/mark.c +--- cups-1.4.2/cups/mark.c.str3439 2009-04-20 22:37:14.000000000 +0100 ++++ cups-1.4.2/cups/mark.c 2009-12-08 10:03:41.656157620 +0000 +@@ -842,6 +842,8 @@ ppd_mark_option(ppd_file_t *ppd, /* I - + + if (!strcasecmp(option, "AP_D_InputSlot")) { - /* - * Show the options to the user... ++ cupsArraySave(ppd->options); ++ + if ((o = ppdFindOption(ppd, "InputSlot")) != NULL) + { + key.option = o; +@@ -851,13 +853,21 @@ ppd_mark_option(ppd_file_t *ppd, /* I - + cupsArrayRemove(ppd->marked, oldc); + } + } ++ ++ cupsArrayRestore(ppd->options); + } + + /* + * Check for custom options... + */ + +- if ((o = ppdFindOption(ppd, option)) == NULL) ++ cupsArraySave(ppd->options); ++ ++ o = ppdFindOption(ppd, option); ++ ++ cupsArrayRestore(ppd->options); ++ ++ if (!o) + return; + + loc = localeconv(); +@@ -1060,6 +1070,8 @@ ppd_mark_option(ppd_file_t *ppd, /* I - + * appropriate... + */ + ++ cupsArraySave(ppd->options); ++ + if (!strcasecmp(option, "PageSize")) + { + if ((o = ppdFindOption(ppd, "PageRegion")) != NULL) +@@ -1084,6 +1096,8 @@ ppd_mark_option(ppd_file_t *ppd, /* I - + } + } + } ++ ++ cupsArrayRestore(ppd->options); + } + else if (!strcasecmp(option, "InputSlot")) + { +@@ -1091,6 +1105,8 @@ ppd_mark_option(ppd_file_t *ppd, /* I - + * Unmark ManualFeed option... + */ + ++ cupsArraySave(ppd->options); ++ + if ((o = ppdFindOption(ppd, "ManualFeed")) != NULL) + { + key.option = o; +@@ -1100,6 +1116,8 @@ ppd_mark_option(ppd_file_t *ppd, /* I - + cupsArrayRemove(ppd->marked, oldc); + } + } ++ ++ cupsArrayRestore(ppd->options); + } + else if (!strcasecmp(option, "ManualFeed") && + !strcasecmp(choice, "True")) +@@ -1108,6 +1126,8 @@ ppd_mark_option(ppd_file_t *ppd, /* I - + * Unmark InputSlot option... + */ + ++ cupsArraySave(ppd->options); ++ + if ((o = ppdFindOption(ppd, "InputSlot")) != NULL) + { + key.option = o; +@@ -1117,6 +1137,8 @@ ppd_mark_option(ppd_file_t *ppd, /* I - + cupsArrayRemove(ppd->marked, oldc); + } + } ++ ++ cupsArrayRestore(ppd->options); + } + } + diff --git a/cups.spec b/cups.spec index a940f69..cc281ff 100644 --- a/cups.spec +++ b/cups.spec @@ -528,6 +528,8 @@ rm -rf $RPM_BUILD_ROOT %changelog * Tue Dec 8 2009 Tim Waugh - 1:1.4.2-14 +- Use upstream fix for adjustment of conflicting options + (bug #533426, STR #3439). - No longer requires paps. The texttopaps filter MIME conversion file is now provided by the paps package (bug #545036). From 210142152c443ef2329943ca04f0c5b23bfc84a1 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Tue, 8 Dec 2009 10:14:45 +0000 Subject: [PATCH 031/110] - Show conflicting option values in web UI (bug #544326, STR #3440). --- cups-str3440.patch | 104 +++++++++++++++++++++++++++++++++++++++++++++ cups.spec | 3 ++ 2 files changed, 107 insertions(+) create mode 100644 cups-str3440.patch diff --git a/cups-str3440.patch b/cups-str3440.patch new file mode 100644 index 0000000..9dfd56b --- /dev/null +++ b/cups-str3440.patch @@ -0,0 +1,104 @@ +diff -up cups-1.4.2/cgi-bin/admin.c.str3440 cups-1.4.2/cgi-bin/admin.c +--- cups-1.4.2/cgi-bin/admin.c.str3440 2009-12-08 10:10:05.529157178 +0000 ++++ cups-1.4.2/cgi-bin/admin.c 2009-12-08 10:10:12.571033051 +0000 +@@ -3436,6 +3436,16 @@ do_set_options(http_t *http, /* I - HTT + { + cgiSetArray("ckeyword", k, option->keyword); + cgiSetArray("ckeytext", k, option->text); ++ ++ for (m = 0; m < option->num_choices; m ++) ++ { ++ if (option->choices[m].marked) ++ { ++ cgiSetArray("cchoice", k, option->choices[m].text); ++ break; ++ } ++ } ++ + k ++; + } + +diff -up cups-1.4.2/templates/de/option-conflict.tmpl.str3440 cups-1.4.2/templates/de/option-conflict.tmpl +--- cups-1.4.2/templates/de/option-conflict.tmpl.str3440 2009-04-03 16:55:28.000000000 +0100 ++++ cups-1.4.2/templates/de/option-conflict.tmpl 2009-12-08 10:10:12.567157789 +0000 +@@ -1,7 +1,7 @@ +

Error: The following options are conflicting:

+ + + +

Bitte ändern sie eine oder mehrere Einstellungen um die Konflikte zu lösen.

+diff -up cups-1.4.2/templates/es/option-conflict.tmpl.str3440 cups-1.4.2/templates/es/option-conflict.tmpl +--- cups-1.4.2/templates/es/option-conflict.tmpl.str3440 2008-12-08 21:20:06.000000000 +0000 ++++ cups-1.4.2/templates/es/option-conflict.tmpl 2009-12-08 10:10:12.568157603 +0000 +@@ -1,7 +1,7 @@ +

Error: Las siguientes opciones están en conflicto:

+ + + +

Cambie una o más de las opciones para resolver el problema.

+diff -up cups-1.4.2/templates/eu/option-conflict.tmpl.str3440 cups-1.4.2/templates/eu/option-conflict.tmpl +--- cups-1.4.2/templates/eu/option-conflict.tmpl.str3440 2009-07-07 17:52:34.000000000 +0100 ++++ cups-1.4.2/templates/eu/option-conflict.tmpl 2009-12-08 10:10:12.569157261 +0000 +@@ -1,7 +1,7 @@ +

Errorea: honako aukerak gatazkan daude:

+ + + +

Aldatu aukera bat edo gehiago gatazkak ebazteko.

+diff -up cups-1.4.2/templates/ja/option-conflict.tmpl.str3440 cups-1.4.2/templates/ja/option-conflict.tmpl +--- cups-1.4.2/templates/ja/option-conflict.tmpl.str3440 2009-02-17 19:04:25.000000000 +0000 ++++ cups-1.4.2/templates/ja/option-conflict.tmpl 2009-12-08 10:10:12.566157419 +0000 +@@ -1,7 +1,7 @@ +

エラー: 以下のオプションは競合します:

+ + + +

競合を解決するために、1 つ以上のオプションを変更してください。

+diff -up cups-1.4.2/templates/option-conflict.tmpl.str3440 cups-1.4.2/templates/option-conflict.tmpl +--- cups-1.4.2/templates/option-conflict.tmpl.str3440 2005-08-24 20:25:49.000000000 +0100 ++++ cups-1.4.2/templates/option-conflict.tmpl 2009-12-08 10:10:12.566157419 +0000 +@@ -1,7 +1,7 @@ +

Error: The following options are conflicting:

+ + + +

Please change one or more of the options to resolve the conflicts.

+diff -up cups-1.4.2/templates/pl/option-conflict.tmpl.str3440 cups-1.4.2/templates/pl/option-conflict.tmpl +--- cups-1.4.2/templates/pl/option-conflict.tmpl.str3440 2009-02-25 16:48:35.000000000 +0000 ++++ cups-1.4.2/templates/pl/option-conflict.tmpl 2009-12-08 10:10:12.567157789 +0000 +@@ -1,7 +1,7 @@ +

Błąd: następujące opcje są w konflikcie ze sobą:

+ + + +

Proszę zmienić jedną lub więcej opcji, aby rozwiązać konflikt.

+diff -up cups-1.4.2/templates/ru/option-conflict.tmpl.str3440 cups-1.4.2/templates/ru/option-conflict.tmpl +--- cups-1.4.2/templates/ru/option-conflict.tmpl.str3440 2009-02-17 19:04:25.000000000 +0000 ++++ cups-1.4.2/templates/ru/option-conflict.tmpl 2009-12-08 10:10:12.567157789 +0000 +@@ -1,7 +1,7 @@ +

Ошибка: следующие параметры конфликтуют:

+ + + +

Измените один или несколько параметров для того, чтобы избежать конфликта.

diff --git a/cups.spec b/cups.spec index cc281ff..9050319 100644 --- a/cups.spec +++ b/cups.spec @@ -62,6 +62,7 @@ Patch35: cups-CVE-2009-3553.patch Patch36: cups-str3422.patch Patch37: cups-str3413.patch Patch38: cups-str3439.patch +Patch39: cups-str3440.patch Patch100: cups-lspp.patch @@ -229,6 +230,7 @@ module. %patch36 -p1 -b .str3422 %patch37 -p1 -b .str3413 %patch38 -p1 -b .str3439 +%patch39 -p1 -b .str3440 %if %lspp %patch100 -p1 -b .lspp @@ -528,6 +530,7 @@ rm -rf $RPM_BUILD_ROOT %changelog * Tue Dec 8 2009 Tim Waugh - 1:1.4.2-14 +- Show conflicting option values in web UI (bug #544326, STR #3440). - Use upstream fix for adjustment of conflicting options (bug #533426, STR #3439). - No longer requires paps. The texttopaps filter MIME conversion file From 23771f0684e57072ad29c92afa40f78d9345b829 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Tue, 8 Dec 2009 10:21:02 +0000 Subject: [PATCH 032/110] - Use the text filter for text/css files (bug #545026, STR #3442). --- cups-str3442.patch | 11 +++++++++++ cups.spec | 3 +++ 2 files changed, 14 insertions(+) create mode 100644 cups-str3442.patch diff --git a/cups-str3442.patch b/cups-str3442.patch new file mode 100644 index 0000000..af57fd4 --- /dev/null +++ b/cups-str3442.patch @@ -0,0 +1,11 @@ +diff -up cups-1.4.2/conf/mime.convs.in.str3442 cups-1.4.2/conf/mime.convs.in +--- cups-1.4.2/conf/mime.convs.in.str3442 2009-05-22 20:30:39.000000000 +0100 ++++ cups-1.4.2/conf/mime.convs.in 2009-12-08 10:19:40.044329553 +0000 +@@ -47,6 +47,7 @@ application/x-perl application/postscri + application/x-shell application/postscript 33 texttops + text/plain application/postscript 33 texttops + text/html application/postscript 33 texttops ++text/css application/postscript 33 texttops + image/gif application/vnd.cups-postscript 66 imagetops + image/png application/vnd.cups-postscript 66 imagetops + image/jpeg application/vnd.cups-postscript 66 imagetops diff --git a/cups.spec b/cups.spec index 9050319..d7d96ef 100644 --- a/cups.spec +++ b/cups.spec @@ -63,6 +63,7 @@ Patch36: cups-str3422.patch Patch37: cups-str3413.patch Patch38: cups-str3439.patch Patch39: cups-str3440.patch +Patch40: cups-str3442.patch Patch100: cups-lspp.patch @@ -231,6 +232,7 @@ module. %patch37 -p1 -b .str3413 %patch38 -p1 -b .str3439 %patch39 -p1 -b .str3440 +%patch40 -p1 -b .str3442 %if %lspp %patch100 -p1 -b .lspp @@ -530,6 +532,7 @@ rm -rf $RPM_BUILD_ROOT %changelog * Tue Dec 8 2009 Tim Waugh - 1:1.4.2-14 +- Use the text filter for text/css files (bug #545026, STR #3442). - Show conflicting option values in web UI (bug #544326, STR #3440). - Use upstream fix for adjustment of conflicting options (bug #533426, STR #3439). From f3531893f44d320da6018e25dfc10763ecaacf26 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Tue, 8 Dec 2009 10:57:19 +0000 Subject: [PATCH 033/110] - Use upstream fix for SNMP detection (bug #542857, STR #3413). --- cups-str3413.patch | 37 ++++++++++++++----------------------- cups.spec | 1 + 2 files changed, 15 insertions(+), 23 deletions(-) diff --git a/cups-str3413.patch b/cups-str3413.patch index ea2872a..a74e7ec 100644 --- a/cups-str3413.patch +++ b/cups-str3413.patch @@ -1,6 +1,6 @@ diff -up cups-1.4.2/backend/snmp.c.str3413 cups-1.4.2/backend/snmp.c --- cups-1.4.2/backend/snmp.c.str3413 2009-01-14 22:40:58.000000000 +0000 -+++ cups-1.4.2/backend/snmp.c 2009-12-03 10:01:27.933335209 +0000 ++++ cups-1.4.2/backend/snmp.c 2009-12-08 10:54:11.798515550 +0000 @@ -999,7 +999,7 @@ read_snmp_response(int fd) /* I - SNMP DEVICE_PRODUCT, LexmarkProductOID2); _cupsSNMPWrite(fd, &(packet.address), CUPS_SNMP_VERSION_1, @@ -10,33 +10,24 @@ diff -up cups-1.4.2/backend/snmp.c.str3413 cups-1.4.2/backend/snmp.c _cupsSNMPWrite(fd, &(packet.address), CUPS_SNMP_VERSION_1, packet.community, CUPS_ASN1_GET_REQUEST, DEVICE_PRODUCT, XeroxProductOID); -@@ -1064,7 +1064,19 @@ read_snmp_response(int fd) /* I - SNMP +@@ -1054,7 +1054,9 @@ read_snmp_response(int fd) /* I - SNMP + break; - - if (device->id) -+ { -+ if (strlen (device->id) > -+ strlen ((char *)packet.object_value.string.bytes)) -+ { -+ /* -+ * The Device ID we already saw was more complete. -+ */ -+ -+ break; -+ } -+ - free(device->id); -+ } - - device->id = strdup((char *)packet.object_value.string.bytes); - -@@ -1107,7 +1119,8 @@ read_snmp_response(int fd) /* I - SNMP + case DEVICE_ID : +- if (device && packet.object_type == CUPS_ASN1_OCTET_STRING) ++ if (device && packet.object_type == CUPS_ASN1_OCTET_STRING && ++ (!device->id || ++ strlen(device->id) < packet.object_value.string.num_bytes)) + { + /* + * Update an existing cache entry... +@@ -1107,7 +1109,7 @@ read_snmp_response(int fd) /* I - SNMP case DEVICE_URI : if (device && packet.object_type == CUPS_ASN1_OCTET_STRING && - !device->uri) -+ !device->uri && -+ (char *)packet.object_value.string.bytes[0] != '\0') ++ !device->uri && packet.object_value.string.num_bytes > 0) { /* * Update an existing cache entry... +diff -up cups-1.4.2/CHANGES-1.4.txt.str3413 cups-1.4.2/CHANGES-1.4.txt diff --git a/cups.spec b/cups.spec index d7d96ef..c76de20 100644 --- a/cups.spec +++ b/cups.spec @@ -532,6 +532,7 @@ rm -rf $RPM_BUILD_ROOT %changelog * Tue Dec 8 2009 Tim Waugh - 1:1.4.2-14 +- Use upstream fix for SNMP detection (bug #542857, STR #3413). - Use the text filter for text/css files (bug #545026, STR #3442). - Show conflicting option values in web UI (bug #544326, STR #3440). - Use upstream fix for adjustment of conflicting options From 5d76a896b2a1af97ddbfd22b3971d301b272143f Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Tue, 8 Dec 2009 11:05:54 +0000 Subject: [PATCH 034/110] - Use upstream patch to handle negative SNMP string lengths (rev 8896). --- cups-negative-snmp-string-length.patch | 19 +++++++++++++++++++ cups.spec | 3 +++ 2 files changed, 22 insertions(+) create mode 100644 cups-negative-snmp-string-length.patch diff --git a/cups-negative-snmp-string-length.patch b/cups-negative-snmp-string-length.patch new file mode 100644 index 0000000..053f246 --- /dev/null +++ b/cups-negative-snmp-string-length.patch @@ -0,0 +1,19 @@ +diff -up cups-1.4.2/backend/network.c.negative-snmp-string-length cups-1.4.2/backend/network.c +--- cups-1.4.2/backend/network.c.negative-snmp-string-length 2009-08-31 19:45:43.000000000 +0100 ++++ cups-1.4.2/backend/network.c 2009-12-08 11:03:05.728413423 +0000 +@@ -170,9 +170,13 @@ backendNetworkSideCB( + + case CUPS_ASN1_BIT_STRING : + case CUPS_ASN1_OCTET_STRING : +- i = (int)(sizeof(data) - (dataptr - data)); +- if (packet.object_value.string.num_bytes < i) ++ if (packet.object_value.string.num_bytes < 0) ++ i = 0; ++ else if (packet.object_value.string.num_bytes < ++ (sizeof(data) - (dataptr - data))) + i = packet.object_value.string.num_bytes; ++ else ++ i = (int)(sizeof(data) - (dataptr - data)); + + memcpy(dataptr, packet.object_value.string.bytes, i); + diff --git a/cups.spec b/cups.spec index c76de20..5a50ee1 100644 --- a/cups.spec +++ b/cups.spec @@ -64,6 +64,7 @@ Patch37: cups-str3413.patch Patch38: cups-str3439.patch Patch39: cups-str3440.patch Patch40: cups-str3442.patch +Patch41: cups-negative-snmp-string-length.patch Patch100: cups-lspp.patch @@ -233,6 +234,7 @@ module. %patch38 -p1 -b .str3439 %patch39 -p1 -b .str3440 %patch40 -p1 -b .str3442 +%patch41 -p1 -b .negative-snmp-string-length %if %lspp %patch100 -p1 -b .lspp @@ -532,6 +534,7 @@ rm -rf $RPM_BUILD_ROOT %changelog * Tue Dec 8 2009 Tim Waugh - 1:1.4.2-14 +- Use upstream patch to handle negative SNMP string lengths (rev 8896). - Use upstream fix for SNMP detection (bug #542857, STR #3413). - Use the text filter for text/css files (bug #545026, STR #3442). - Show conflicting option values in web UI (bug #544326, STR #3440). From 8de145d7649c27d3c405a7f767b1506dbf3c4223 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Tue, 8 Dec 2009 11:12:00 +0000 Subject: [PATCH 035/110] - Use upstream patch to fix interrupt handling in the side-channel APIs (rev 8896). --- cups-sidechannel-intrs.patch | 68 ++++++++++++++++++++++++++++++++++++ cups.spec | 4 +++ 2 files changed, 72 insertions(+) create mode 100644 cups-sidechannel-intrs.patch diff --git a/cups-sidechannel-intrs.patch b/cups-sidechannel-intrs.patch new file mode 100644 index 0000000..4a5420c --- /dev/null +++ b/cups-sidechannel-intrs.patch @@ -0,0 +1,68 @@ +diff -up cups-1.4.2/cups/sidechannel.c.sidechannel-intrs cups-1.4.2/cups/sidechannel.c +--- cups-1.4.2/cups/sidechannel.c.sidechannel-intrs 2009-09-23 00:20:35.000000000 +0100 ++++ cups-1.4.2/cups/sidechannel.c 2009-12-08 11:08:15.297539377 +0000 +@@ -116,6 +116,7 @@ cupsSideChannelRead( + char buffer[16388]; /* Message buffer */ + int bytes; /* Bytes read */ + int templen; /* Data length from message */ ++ int nfds; /* Number of file descriptors */ + #ifdef HAVE_POLL + struct pollfd pfd; /* Poll structure for poll() */ + #else /* select() */ +@@ -143,39 +144,31 @@ cupsSideChannelRead( + pfd.fd = CUPS_SC_FD; + pfd.events = POLLIN; + +- if (timeout < 0.0) +- { +- if (poll(&pfd, 1, -1) < 1) +- return (-1); +- } +- else if (poll(&pfd, 1, (long)(timeout * 1000)) < 1) +- return (-1); ++ while ((nfds = poll(&pfd, 1, ++ timeout < 0.0 ? -1 : (long)(timeout * 1000))) < 0 && ++ (errno == EINTR || errno == EAGAIN)) ++ ; + + #else /* select() */ + FD_ZERO(&input_set); + FD_SET(CUPS_SC_FD, &input_set); + +- if (timeout < 0.0) +- { +- if (select(CUPS_SC_FD + 1, &input_set, NULL, NULL, NULL) < 1) +- { +- DEBUG_printf(("1cupsSideChannelRead: Select error: %s", strerror(errno))); +- return (-1); +- } +- } +- else +- { +- stimeout.tv_sec = (int)timeout; +- stimeout.tv_usec = (int)(timeout * 1000000) % 1000000; ++ stimeout.tv_sec = (int)timeout; ++ stimeout.tv_usec = (int)(timeout * 1000000) % 1000000; ++ ++ while ((nfds = select(CUPS_SC_FD + 1, &input_set, NULL, NULL, ++ timeout < 0.0 ? NULL : &stimeout)) < 0 && ++ (errno == EINTR || errno == EAGAIN)) ++ ; + +- if (select(CUPS_SC_FD + 1, &input_set, NULL, NULL, &stimeout) < 1) +- { +- DEBUG_puts("1cupsSideChannelRead: Select timeout"); +- return (-1); +- } +- } + #endif /* HAVE_POLL */ + ++ if (nfds < 1) ++ { ++ *status = nfds==0 ? CUPS_SC_STATUS_TIMEOUT : CUPS_SC_STATUS_IO_ERROR; ++ return (-1); ++ } ++ + /* + * Read a side-channel message for the format: + * diff --git a/cups.spec b/cups.spec index 5a50ee1..8c6f48f 100644 --- a/cups.spec +++ b/cups.spec @@ -65,6 +65,7 @@ Patch38: cups-str3439.patch Patch39: cups-str3440.patch Patch40: cups-str3442.patch Patch41: cups-negative-snmp-string-length.patch +Patch42: cups-sidechannel-intrs.patch Patch100: cups-lspp.patch @@ -235,6 +236,7 @@ module. %patch39 -p1 -b .str3440 %patch40 -p1 -b .str3442 %patch41 -p1 -b .negative-snmp-string-length +%patch42 -p1 -b .sidechannel-intrs %if %lspp %patch100 -p1 -b .lspp @@ -534,6 +536,8 @@ rm -rf $RPM_BUILD_ROOT %changelog * Tue Dec 8 2009 Tim Waugh - 1:1.4.2-14 +- Use upstream patch to fix interrupt handling in the side-channel + APIs (rev 8896). - Use upstream patch to handle negative SNMP string lengths (rev 8896). - Use upstream fix for SNMP detection (bug #542857, STR #3413). - Use the text filter for text/css files (bug #545026, STR #3442). From ed13c7d4bc0ecfd98d39226144ebc8d5e180d6cf Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Tue, 8 Dec 2009 11:16:32 +0000 Subject: [PATCH 036/110] - Use upstream patch to handle negative SNMP string lengths (rev 8896). --- cups-negative-snmp-string-length.patch | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/cups-negative-snmp-string-length.patch b/cups-negative-snmp-string-length.patch index 053f246..5d94fbb 100644 --- a/cups-negative-snmp-string-length.patch +++ b/cups-negative-snmp-string-length.patch @@ -1,6 +1,6 @@ diff -up cups-1.4.2/backend/network.c.negative-snmp-string-length cups-1.4.2/backend/network.c --- cups-1.4.2/backend/network.c.negative-snmp-string-length 2009-08-31 19:45:43.000000000 +0100 -+++ cups-1.4.2/backend/network.c 2009-12-08 11:03:05.728413423 +0000 ++++ cups-1.4.2/backend/network.c 2009-12-08 11:14:45.010363459 +0000 @@ -170,9 +170,13 @@ backendNetworkSideCB( case CUPS_ASN1_BIT_STRING : @@ -17,3 +17,15 @@ diff -up cups-1.4.2/backend/network.c.negative-snmp-string-length cups-1.4.2/bac memcpy(dataptr, packet.object_value.string.bytes, i); +diff -up cups-1.4.2/backend/snmp-supplies.c.negative-snmp-string-length cups-1.4.2/backend/snmp-supplies.c +--- cups-1.4.2/backend/snmp-supplies.c.negative-snmp-string-length 2009-08-31 17:34:06.000000000 +0100 ++++ cups-1.4.2/backend/snmp-supplies.c 2009-12-08 11:15:05.505362685 +0000 +@@ -232,6 +232,8 @@ backendSNMPSupplies( + if (packet.object_value.string.num_bytes == 2) + new_state = (packet.object_value.string.bytes[0] << 8) | + packet.object_value.string.bytes[1]; ++ else if (packet.object_value.string.num_bytes == 1) ++ new_state = (packet.object_value.string.bytes[0] << 8); + else + new_state = 0; + From c11439789b87c27224500c8d8da7dee0b3438f63 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Tue, 8 Dec 2009 11:25:18 +0000 Subject: [PATCH 037/110] - Use upstream patch to stop the network backends incorrectly clearing the media-empty-warning state (rev 8896). --- cups-media-empty-warning.patch | 132 +++++++++++++++++++++++++++++++++ cups.spec | 4 + 2 files changed, 136 insertions(+) create mode 100644 cups-media-empty-warning.patch diff --git a/cups-media-empty-warning.patch b/cups-media-empty-warning.patch new file mode 100644 index 0000000..adf0ac2 --- /dev/null +++ b/cups-media-empty-warning.patch @@ -0,0 +1,132 @@ +diff -up cups-1.4.2/backend/backend-private.h.media-empty-warning cups-1.4.2/backend/backend-private.h +--- cups-1.4.2/backend/backend-private.h.media-empty-warning 2009-08-31 19:45:43.000000000 +0100 ++++ cups-1.4.2/backend/backend-private.h 2009-12-08 11:22:27.859488572 +0000 +@@ -280,7 +280,8 @@ extern int backendNetworkSideCB(int pri + int snmp_fd, http_addr_t *addr, + int use_bc); + extern ssize_t backendRunLoop(int print_fd, int device_fd, int snmp_fd, +- http_addr_t *addr, int use_bc, ++ http_addr_t *addr, int use_bc, ++ int update_state, + int (*side_cb)(int print_fd, + int device_fd, + int snmp_fd, +diff -up cups-1.4.2/backend/ipp.c.media-empty-warning cups-1.4.2/backend/ipp.c +--- cups-1.4.2/backend/ipp.c.media-empty-warning 2009-12-08 11:22:12.388488617 +0000 ++++ cups-1.4.2/backend/ipp.c 2009-12-08 11:22:27.860488582 +0000 +@@ -498,7 +498,7 @@ main(int argc, /* I - Number of comm + + _cupsLangPuts(stderr, _("INFO: Copying print data...\n")); + +- tbytes = backendRunLoop(-1, fd, snmp_fd, &(addrlist->addr), 0, ++ tbytes = backendRunLoop(-1, fd, snmp_fd, &(addrlist->addr), 0, 0, + backendNetworkSideCB); + + if (snmp_fd >= 0) +diff -up cups-1.4.2/backend/lpd.c.media-empty-warning cups-1.4.2/backend/lpd.c +--- cups-1.4.2/backend/lpd.c.media-empty-warning 2009-06-26 19:26:36.000000000 +0100 ++++ cups-1.4.2/backend/lpd.c 2009-12-08 11:22:27.861488697 +0000 +@@ -447,7 +447,8 @@ main(int argc, /* I - Number of comm + + _cupsLangPuts(stderr, _("INFO: Copying print data...\n")); + +- backendRunLoop(-1, fd, snmp_fd, &(addrlist->addr), 0, backendNetworkSideCB); ++ backendRunLoop(-1, fd, snmp_fd, &(addrlist->addr), 0, 0, ++ backendNetworkSideCB); + + if (snmp_fd >= 0) + _cupsSNMPClose(snmp_fd); +diff -up cups-1.4.2/backend/parallel.c.media-empty-warning cups-1.4.2/backend/parallel.c +--- cups-1.4.2/backend/parallel.c.media-empty-warning 2009-08-31 19:45:43.000000000 +0100 ++++ cups-1.4.2/backend/parallel.c 2009-12-08 11:22:27.862488185 +0000 +@@ -284,7 +284,7 @@ main(int argc, /* I - Number of comm + lseek(print_fd, 0, SEEK_SET); + } + +- tbytes = backendRunLoop(print_fd, device_fd, -1, NULL, use_bc, side_cb); ++ tbytes = backendRunLoop(print_fd, device_fd, -1, NULL, use_bc, 1, side_cb); + + if (print_fd != 0 && tbytes >= 0) + _cupsLangPrintf(stderr, +diff -up cups-1.4.2/backend/runloop.c.media-empty-warning cups-1.4.2/backend/runloop.c +--- cups-1.4.2/backend/runloop.c.media-empty-warning 2009-08-31 19:45:43.000000000 +0100 ++++ cups-1.4.2/backend/runloop.c 2009-12-08 11:22:27.862488185 +0000 +@@ -147,6 +147,7 @@ backendRunLoop( + int snmp_fd, /* I - SNMP socket or -1 if none */ + http_addr_t *addr, /* I - Address of device */ + int use_bc, /* I - Use back-channel? */ ++ int update_state, /* I - Update printer-state-reasons? */ + int (*side_cb)(int, int, int, http_addr_t *, int)) + /* I - Side-channel callback */ + { +@@ -245,7 +246,7 @@ backendRunLoop( + * Pause printing to clear any pending errors... + */ + +- if (errno == ENXIO && offline != 1) ++ if (errno == ENXIO && offline != 1 && update_state) + { + fputs("STATE: +offline-report\n", stderr); + _cupsLangPuts(stderr, _("INFO: Printer is currently offline.\n")); +@@ -351,7 +352,7 @@ backendRunLoop( + + if (errno == ENOSPC) + { +- if (paperout != 1) ++ if (paperout != 1 && update_state) + { + fputs("STATE: +media-empty-warning\n", stderr); + _cupsLangPuts(stderr, _("ERROR: Out of paper!\n")); +@@ -360,7 +361,7 @@ backendRunLoop( + } + else if (errno == ENXIO) + { +- if (offline != 1) ++ if (offline != 1 && update_state) + { + fputs("STATE: +offline-report\n", stderr); + _cupsLangPuts(stderr, _("INFO: Printer is currently off-line.\n")); +@@ -376,13 +377,13 @@ backendRunLoop( + } + else + { +- if (paperout) ++ if (paperout && update_state) + { + fputs("STATE: -media-empty-warning\n", stderr); + paperout = 0; + } + +- if (offline) ++ if (offline && update_state) + { + fputs("STATE: -offline-report\n", stderr); + _cupsLangPuts(stderr, _("INFO: Printer is now online.\n")); +diff -up cups-1.4.2/backend/socket.c.media-empty-warning cups-1.4.2/backend/socket.c +--- cups-1.4.2/backend/socket.c.media-empty-warning 2009-06-12 05:02:45.000000000 +0100 ++++ cups-1.4.2/backend/socket.c 2009-12-08 11:22:27.863488075 +0000 +@@ -393,7 +393,7 @@ main(int argc, /* I - Number of comm + lseek(print_fd, 0, SEEK_SET); + } + +- tbytes = backendRunLoop(print_fd, device_fd, snmp_fd, &(addr->addr), 1, ++ tbytes = backendRunLoop(print_fd, device_fd, snmp_fd, &(addr->addr), 1, 0, + backendNetworkSideCB); + + if (print_fd != 0 && tbytes >= 0) +diff -up cups-1.4.2/backend/usb-unix.c.media-empty-warning cups-1.4.2/backend/usb-unix.c +--- cups-1.4.2/backend/usb-unix.c.media-empty-warning 2009-12-08 11:22:12.445487428 +0000 ++++ cups-1.4.2/backend/usb-unix.c 2009-12-08 11:22:27.864488180 +0000 +@@ -218,10 +218,10 @@ print_device(const char *uri, /* I - De + * select() or poll(), so we can't support the sidechannel either... + */ + +- tbytes = backendRunLoop(print_fd, device_fd, -1, NULL, use_bc, NULL); ++ tbytes = backendRunLoop(print_fd, device_fd, -1, NULL, use_bc, 1, NULL); + + #else +- tbytes = backendRunLoop(print_fd, device_fd, -1, NULL, use_bc, side_cb); ++ tbytes = backendRunLoop(print_fd, device_fd, -1, NULL, use_bc, 1, side_cb); + #endif /* __sun */ + + if (print_fd != 0 && tbytes >= 0) diff --git a/cups.spec b/cups.spec index 8c6f48f..ff8993b 100644 --- a/cups.spec +++ b/cups.spec @@ -66,6 +66,7 @@ Patch39: cups-str3440.patch Patch40: cups-str3442.patch Patch41: cups-negative-snmp-string-length.patch Patch42: cups-sidechannel-intrs.patch +Patch43: cups-media-empty-warning.patch Patch100: cups-lspp.patch @@ -237,6 +238,7 @@ module. %patch40 -p1 -b .str3442 %patch41 -p1 -b .negative-snmp-string-length %patch42 -p1 -b .sidechannel-intrs +%patch43 -p1 -b .media-empty-warning %if %lspp %patch100 -p1 -b .lspp @@ -536,6 +538,8 @@ rm -rf $RPM_BUILD_ROOT %changelog * Tue Dec 8 2009 Tim Waugh - 1:1.4.2-14 +- Use upstream patch to stop the network backends incorrectly clearing + the media-empty-warning state (rev 8896). - Use upstream patch to fix interrupt handling in the side-channel APIs (rev 8896). - Use upstream patch to handle negative SNMP string lengths (rev 8896). From 3fff9e87cb504cc3fc5cb1b0d83129ecc282c9b9 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Tue, 8 Dec 2009 12:14:51 +0000 Subject: [PATCH 038/110] - Authenticated printing did not always work when printing directly to a remote server (STR #3435). --- cups-str3435.patch | 45 +++++++++++++++++++++++++++++++++++++++++++++ cups.spec | 4 ++++ 2 files changed, 49 insertions(+) create mode 100644 cups-str3435.patch diff --git a/cups-str3435.patch b/cups-str3435.patch new file mode 100644 index 0000000..1870abb --- /dev/null +++ b/cups-str3435.patch @@ -0,0 +1,45 @@ +diff -up cups-1.4.2/cups/util.c.str3435 cups-1.4.2/cups/util.c +--- cups-1.4.2/cups/util.c.str3435 2009-06-22 21:44:34.000000000 +0100 ++++ cups-1.4.2/cups/util.c 2009-12-08 12:11:38.647375446 +0000 +@@ -1511,12 +1511,36 @@ cupsPrintFiles2( + return (0); + } + +- status = cupsStartDocument(http, name, job_id, docname, format, +- i == (num_files - 1)); ++ do ++ { ++ cupsFileRewind(fp); ++ ++ status = cupsStartDocument(http, name, job_id, docname, format, ++ i == (num_files - 1)); ++ ++ while (status == HTTP_CONTINUE && ++ (bytes = cupsFileRead(fp, buffer, sizeof(buffer))) > 0) ++ status = cupsWriteRequestData(http, buffer, bytes); ++ ++ if (status == HTTP_UNAUTHORIZED) ++ { ++ char resource[1024]; /* Printer resource */ + +- while (status == HTTP_CONTINUE && +- (bytes = cupsFileRead(fp, buffer, sizeof(buffer))) > 0) +- status = cupsWriteRequestData(http, buffer, bytes); ++ snprintf(resource, sizeof(resource), "/printers/%s", name); ++ ++ if (!cupsDoAuthentication(http, "POST", resource)) ++ { ++ if (httpReconnect(http)) ++ { ++ _cupsSetError(IPP_SERVICE_UNAVAILABLE, NULL, 0); ++ return (0); ++ } ++ } ++ else ++ status = HTTP_AUTHORIZATION_CANCELED; ++ } ++ } ++ while (status == HTTP_UNAUTHORIZED); + + cupsFileClose(fp); + diff --git a/cups.spec b/cups.spec index ff8993b..55445bf 100644 --- a/cups.spec +++ b/cups.spec @@ -67,6 +67,7 @@ Patch40: cups-str3442.patch Patch41: cups-negative-snmp-string-length.patch Patch42: cups-sidechannel-intrs.patch Patch43: cups-media-empty-warning.patch +Patch44: cups-str3435.patch Patch100: cups-lspp.patch @@ -239,6 +240,7 @@ module. %patch41 -p1 -b .negative-snmp-string-length %patch42 -p1 -b .sidechannel-intrs %patch43 -p1 -b .media-empty-warning +%patch44 -p1 -b .str3435 %if %lspp %patch100 -p1 -b .lspp @@ -538,6 +540,8 @@ rm -rf $RPM_BUILD_ROOT %changelog * Tue Dec 8 2009 Tim Waugh - 1:1.4.2-14 +- Authenticated printing did not always work when printing directly to + a remote server (STR #3435). - Use upstream patch to stop the network backends incorrectly clearing the media-empty-warning state (rev 8896). - Use upstream patch to fix interrupt handling in the side-channel From 03bef5ab907b280b8178009d6eb3d004fb5656eb Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Tue, 8 Dec 2009 12:21:52 +0000 Subject: [PATCH 039/110] - The web interface did not show completed jobs (STR #3436). --- cups-str3436.patch | 33 +++++++++++++++++++++++++++++++++ cups.spec | 3 +++ 2 files changed, 36 insertions(+) create mode 100644 cups-str3436.patch diff --git a/cups-str3436.patch b/cups-str3436.patch new file mode 100644 index 0000000..910d15a --- /dev/null +++ b/cups-str3436.patch @@ -0,0 +1,33 @@ +diff -up cups-1.4.2/cgi-bin/ipp-var.c.str3436 cups-1.4.2/cgi-bin/ipp-var.c +--- cups-1.4.2/cgi-bin/ipp-var.c.str3436 2009-11-09 23:01:17.000000000 +0000 ++++ cups-1.4.2/cgi-bin/ipp-var.c 2009-12-08 12:19:01.988500453 +0000 +@@ -333,7 +333,7 @@ cgiMoveJobs(http_t *http, /* I - Co + NULL, job_uri); + ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD, + "requested-attributes", NULL, "job-printer-uri"); +- ++ + if ((response = cupsDoRequest(http, request, "/")) != NULL) + { + if ((attr = ippFindAttribute(response, "job-printer-uri", +@@ -926,7 +926,7 @@ cgiRewriteURL(const char *uri, /* I - C + ishttps ? "https" : "http", + userpass, hostname, port, resource); + else +- snprintf(url, urlsize, "%s://%s:%d%s", ++ snprintf(url, urlsize, "%s://%s:%d%s", + ishttps ? "https" : "http", + hostname, port, resource); + } +@@ -1518,7 +1518,11 @@ cgiShowJobs(http_t *http, /* I - Co + */ + + if (dest) ++ { + snprintf(val, sizeof(val), "/%s/%s", section, dest); ++ cgiSetVariable("PRINTER_NAME", dest); ++ cgiSetVariable("PRINTER_URI_SUPPORTED", val); ++ } + else + strlcpy(val, "/jobs/", sizeof(val)); + diff --git a/cups.spec b/cups.spec index 55445bf..4f8e519 100644 --- a/cups.spec +++ b/cups.spec @@ -68,6 +68,7 @@ Patch41: cups-negative-snmp-string-length.patch Patch42: cups-sidechannel-intrs.patch Patch43: cups-media-empty-warning.patch Patch44: cups-str3435.patch +Patch45: cups-str3436.patch Patch100: cups-lspp.patch @@ -241,6 +242,7 @@ module. %patch42 -p1 -b .sidechannel-intrs %patch43 -p1 -b .media-empty-warning %patch44 -p1 -b .str3435 +%patch45 -p1 -b .str3436 %if %lspp %patch100 -p1 -b .lspp @@ -540,6 +542,7 @@ rm -rf $RPM_BUILD_ROOT %changelog * Tue Dec 8 2009 Tim Waugh - 1:1.4.2-14 +- The web interface did not show completed jobs (STR #3436). - Authenticated printing did not always work when printing directly to a remote server (STR #3435). - Use upstream patch to stop the network backends incorrectly clearing From fd32ad0d444bb8e1bfd3c225ca03fabd848e4e5d Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Tue, 8 Dec 2009 12:26:22 +0000 Subject: [PATCH 040/110] - The scheduler did not clean out completed jobs when PreserveJobHistory was turned off (STR #3425). --- cups-str3425.patch | 100 +++++++++++++++++++++++++++++++++++++++++++++ cups.spec | 4 ++ 2 files changed, 104 insertions(+) create mode 100644 cups-str3425.patch diff --git a/cups-str3425.patch b/cups-str3425.patch new file mode 100644 index 0000000..076f9c6 --- /dev/null +++ b/cups-str3425.patch @@ -0,0 +1,100 @@ +diff -up cups-1.4.2/scheduler/job.c.str3425 cups-1.4.2/scheduler/job.c +--- cups-1.4.2/scheduler/job.c.str3425 2009-12-08 12:23:15.694500898 +0000 ++++ cups-1.4.2/scheduler/job.c 2009-12-08 12:23:35.005500733 +0000 +@@ -444,11 +444,11 @@ cupsdCleanJobs(void) + cupsd_job_t *job; /* Current job */ + + +- if (MaxJobs <= 0) ++ if (MaxJobs <= 0 && JobHistory) + return; + + for (job = (cupsd_job_t *)cupsArrayFirst(Jobs); +- job && cupsArrayCount(Jobs) >= MaxJobs; ++ job && (cupsArrayCount(Jobs) >= MaxJobs || !JobHistory); + job = (cupsd_job_t *)cupsArrayNext(Jobs)) + if (job->state_value >= IPP_JOB_CANCELED && !job->printer) + cupsdDeleteJob(job, CUPSD_JOB_PURGE); +@@ -2670,8 +2670,6 @@ cupsdSetJobState( + job->dirty = 1; + cupsdMarkDirty(CUPSD_DIRTY_JOBS); + } +- else if (!job->printer) +- cupsdDeleteJob(job, CUPSD_JOB_PURGE); + break; + } + +diff -up cups-1.4.2/scheduler/main.c.str3425 cups-1.4.2/scheduler/main.c +--- cups-1.4.2/scheduler/main.c.str3425 2009-12-08 12:23:15.695501397 +0000 ++++ cups-1.4.2/scheduler/main.c 2009-12-08 12:23:35.007501250 +0000 +@@ -397,7 +397,7 @@ main(int argc, /* I - Number of comm + * parent's file descriptors to be blocking. This is a workaround for a + * limitation of userland libpthread on OpenBSD. + */ +- ++ + _thread_sys_closefrom(0); + #endif /* __OpenBSD__ */ + +@@ -844,8 +844,8 @@ main(int argc, /* I - Number of comm + + if (timeout == 86400 && Launchd && LaunchdTimeout && !NumPolled && + !cupsArrayCount(ActiveJobs) && +- (!Browsing || +- (!BrowseRemoteProtocols && ++ (!Browsing || ++ (!BrowseRemoteProtocols && + (!NumBrowsers || !BrowseLocalProtocols || + cupsArrayCount(Printers) == 0)))) + { +@@ -1073,6 +1073,7 @@ main(int argc, /* I - Number of comm + if ((current_time - senddoc_time) >= 10) + { + cupsdCheckJobs(); ++ cupsdCleanJobs(); + senddoc_time = current_time; + } + +@@ -1231,8 +1232,8 @@ main(int argc, /* I - Number of comm + #endif /* HAVE_GSSAPI */ + + #if defined(__APPLE__) && defined(HAVE_DLFCN_H) +- /* +- * Unload Print Service quota enforcement library (X Server only) ++ /* ++ * Unload Print Service quota enforcement library (X Server only) + */ + + PSQUpdateQuotaProc = NULL; +@@ -1594,13 +1595,13 @@ launchd_checkin(void) + + if (lis) + { +- cupsdLogMessage(CUPSD_LOG_DEBUG, ++ cupsdLogMessage(CUPSD_LOG_DEBUG, + "launchd_checkin: Matched existing listener %s with fd %d...", + httpAddrString(&(lis->address), s, sizeof(s)), fd); + } + else + { +- cupsdLogMessage(CUPSD_LOG_DEBUG, ++ cupsdLogMessage(CUPSD_LOG_DEBUG, + "launchd_checkin: Adding new listener %s with fd %d...", + httpAddrString(&addr, s, sizeof(s)), fd); + +@@ -1654,12 +1655,12 @@ launchd_checkout(void) + + /* + * Create or remove the launchd KeepAlive file based on whether +- * there are active jobs, polling, browsing for remote printers or ++ * there are active jobs, polling, browsing for remote printers or + * shared printers to advertise... + */ + +- if ((cupsArrayCount(ActiveJobs) || NumPolled || +- (Browsing && ++ if ((cupsArrayCount(ActiveJobs) || NumPolled || ++ (Browsing && + (BrowseRemoteProtocols || + (BrowseLocalProtocols && NumBrowsers && cupsArrayCount(Printers)))))) + { diff --git a/cups.spec b/cups.spec index 4f8e519..8f0bd3d 100644 --- a/cups.spec +++ b/cups.spec @@ -69,6 +69,7 @@ Patch42: cups-sidechannel-intrs.patch Patch43: cups-media-empty-warning.patch Patch44: cups-str3435.patch Patch45: cups-str3436.patch +Patch46: cups-str3425.patch Patch100: cups-lspp.patch @@ -243,6 +244,7 @@ module. %patch43 -p1 -b .media-empty-warning %patch44 -p1 -b .str3435 %patch45 -p1 -b .str3436 +%patch46 -p1 -b .str3425 %if %lspp %patch100 -p1 -b .lspp @@ -542,6 +544,8 @@ rm -rf $RPM_BUILD_ROOT %changelog * Tue Dec 8 2009 Tim Waugh - 1:1.4.2-14 +- The scheduler did not clean out completed jobs when + PreserveJobHistory was turned off (STR #3425). - The web interface did not show completed jobs (STR #3436). - Authenticated printing did not always work when printing directly to a remote server (STR #3435). From 7f6e506a3f810e6c8b2ee906175ca811c3d8e30e Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Tue, 8 Dec 2009 12:31:05 +0000 Subject: [PATCH 041/110] - The scheduler added two job-name attributes to each job object (STR #3428). --- cups-str3428.patch | 57 ++++++++++++++++++++++++++++++++++++++++++++++ cups.spec | 4 ++++ 2 files changed, 61 insertions(+) create mode 100644 cups-str3428.patch diff --git a/cups-str3428.patch b/cups-str3428.patch new file mode 100644 index 0000000..1ed50d9 --- /dev/null +++ b/cups-str3428.patch @@ -0,0 +1,57 @@ +diff -up cups-1.4.2/scheduler/ipp.c.str3428 cups-1.4.2/scheduler/ipp.c +--- cups-1.4.2/scheduler/ipp.c.str3428 2009-12-08 12:24:31.177373309 +0000 ++++ cups-1.4.2/scheduler/ipp.c 2009-12-08 12:27:33.910498083 +0000 +@@ -1860,8 +1860,6 @@ add_job(cupsd_client_t *con, /* I - Cl + "job-media-sheets-completed", 0); + ippAddString(job->attrs, IPP_TAG_JOB, IPP_TAG_URI, "job-printer-uri", NULL, + printer->uri); +- ippAddString(job->attrs, IPP_TAG_JOB, IPP_TAG_NAME, "job-name", NULL, +- title); + + if ((attr = ippFindAttribute(job->attrs, "job-k-octets", + IPP_TAG_INTEGER)) != NULL) +@@ -3438,7 +3436,7 @@ apple_register_profiles( + num_profiles ++; + } + +- ++ + /* + * If we have profiles, add them... + */ +@@ -3484,7 +3482,7 @@ apple_register_profiles( + snprintf(q_keyword, sizeof(q_keyword), "Default%s", attr->value); + q2_attr = ppdFindAttr(ppd, q_keyword, NULL); + } +- else ++ else + q2_attr = ppdFindAttr(ppd, "DefaultMediaType", NULL); + + if (q2_attr && q2_attr->value && q2_attr->value[0]) +@@ -3498,7 +3496,7 @@ apple_register_profiles( + snprintf(q_keyword, sizeof(q_keyword), "Default%s", attr->value); + q3_attr = ppdFindAttr(ppd, q_keyword, NULL); + } +- else ++ else + q3_attr = ppdFindAttr(ppd, "DefaultResolution", NULL); + + if (q3_attr && q3_attr->value && q3_attr->value[0]) +@@ -3667,7 +3665,7 @@ apple_register_profiles( + attr = ppdFindAttr(ppd, "DefaultColorSpace", NULL); + + num_profiles = (attr && ppd->colorspace == PPD_CS_GRAY) ? 1 : 2; +- ++ + if ((profiles = calloc(num_profiles, sizeof(CMDeviceProfileArray))) == NULL) + { + cupsdLogMessage(CUPSD_LOG_ERROR, +@@ -4762,7 +4760,7 @@ check_quotas(cupsd_client_t *con, /* I + if (q->page_count == -4) /* special case: unlimited user */ + { + cupsdLogMessage(CUPSD_LOG_INFO, +- "User \"%s\" request approved for printer %s (%s): " ++ "User \"%s\" request approved for printer %s (%s): " + "unlimited quota.", + username, p->name, p->info); + q->page_count = 0; /* allow user to print */ diff --git a/cups.spec b/cups.spec index 8f0bd3d..3960a53 100644 --- a/cups.spec +++ b/cups.spec @@ -70,6 +70,7 @@ Patch43: cups-media-empty-warning.patch Patch44: cups-str3435.patch Patch45: cups-str3436.patch Patch46: cups-str3425.patch +Patch47: cups-str3428.patch Patch100: cups-lspp.patch @@ -245,6 +246,7 @@ module. %patch44 -p1 -b .str3435 %patch45 -p1 -b .str3436 %patch46 -p1 -b .str3425 +%patch47 -p1 -b .str3428 %if %lspp %patch100 -p1 -b .lspp @@ -544,6 +546,8 @@ rm -rf $RPM_BUILD_ROOT %changelog * Tue Dec 8 2009 Tim Waugh - 1:1.4.2-14 +- The scheduler added two job-name attributes to each job object + (STR #3428). - The scheduler did not clean out completed jobs when PreserveJobHistory was turned off (STR #3425). - The web interface did not show completed jobs (STR #3436). From ed27866c4a4e73395e1d7e7ec7101a29e3dcb1ec Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Tue, 8 Dec 2009 12:34:18 +0000 Subject: [PATCH 042/110] - The scheduler did not use the Get-Job-Attributes policy for a printer (STR #3431). --- cups-str3431.patch | 32 ++++++++++++++++++++++++++++++++ cups.spec | 4 ++++ 2 files changed, 36 insertions(+) create mode 100644 cups-str3431.patch diff --git a/cups-str3431.patch b/cups-str3431.patch new file mode 100644 index 0000000..636960d --- /dev/null +++ b/cups-str3431.patch @@ -0,0 +1,32 @@ +diff -up cups-1.4.2/scheduler/ipp.c.str3431 cups-1.4.2/scheduler/ipp.c +--- cups-1.4.2/scheduler/ipp.c.str3431 2009-12-08 12:28:21.095374048 +0000 ++++ cups-1.4.2/scheduler/ipp.c 2009-12-08 12:32:03.829498891 +0000 +@@ -7183,6 +7183,7 @@ get_job_attrs(cupsd_client_t *con, /* I + ipp_attribute_t *attr; /* Current attribute */ + int jobid; /* Job ID */ + cupsd_job_t *job; /* Current job */ ++ cupsd_printer_t *printer; /* Current printer */ + char scheme[HTTP_MAX_URI], /* Method portion of URI */ + username[HTTP_MAX_URI], /* Username portion of URI */ + host[HTTP_MAX_URI], /* Host portion of URI */ +@@ -7257,7 +7258,19 @@ get_job_attrs(cupsd_client_t *con, /* I + * Check policy... + */ + +- if ((status = cupsdCheckPolicy(DefaultPolicyPtr, con, NULL)) != HTTP_OK) ++ if ((printer = job->printer) == NULL) ++ printer = cupsdFindDest(job->dest); ++ ++ if (printer) ++ { ++ if ((status = cupsdCheckPolicy(printer->op_policy_ptr, con, ++ NULL)) != HTTP_OK) ++ { ++ send_http_error(con, status, printer); ++ return; ++ } ++ } ++ else if ((status = cupsdCheckPolicy(DefaultPolicyPtr, con, NULL)) != HTTP_OK) + { + send_http_error(con, status, NULL); + return; diff --git a/cups.spec b/cups.spec index 3960a53..25e11ec 100644 --- a/cups.spec +++ b/cups.spec @@ -71,6 +71,7 @@ Patch44: cups-str3435.patch Patch45: cups-str3436.patch Patch46: cups-str3425.patch Patch47: cups-str3428.patch +Patch48: cups-str3431.patch Patch100: cups-lspp.patch @@ -247,6 +248,7 @@ module. %patch45 -p1 -b .str3436 %patch46 -p1 -b .str3425 %patch47 -p1 -b .str3428 +%patch48 -p1 -b .str3431 %if %lspp %patch100 -p1 -b .lspp @@ -546,6 +548,8 @@ rm -rf $RPM_BUILD_ROOT %changelog * Tue Dec 8 2009 Tim Waugh - 1:1.4.2-14 +- The scheduler did not use the Get-Job-Attributes policy for a + printer (STR #3431). - The scheduler added two job-name attributes to each job object (STR #3428). - The scheduler did not clean out completed jobs when From 38c359c9280a8fc4591b37217bee077d6b531503 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Wed, 9 Dec 2009 11:32:55 +0000 Subject: [PATCH 043/110] - Use upstream patch to fix scheduler crash when an active printer was deleted (rev 8914). --- cups-delete-active-printer.patch | 110 +++++++++++++++++++++++++++++++ cups.spec | 8 ++- 2 files changed, 117 insertions(+), 1 deletion(-) create mode 100644 cups-delete-active-printer.patch diff --git a/cups-delete-active-printer.patch b/cups-delete-active-printer.patch new file mode 100644 index 0000000..5ea9f51 --- /dev/null +++ b/cups-delete-active-printer.patch @@ -0,0 +1,110 @@ +diff -up cups-1.4.2/CHANGES.txt.delete-active-printer cups-1.4.2/CHANGES.txt +diff -up cups-1.4.2/scheduler/job.c.delete-active-printer cups-1.4.2/scheduler/job.c +--- cups-1.4.2/scheduler/job.c.delete-active-printer 2009-12-09 11:24:50.946891977 +0000 ++++ cups-1.4.2/scheduler/job.c 2009-12-09 11:25:32.145892252 +0000 +@@ -168,7 +168,7 @@ static mime_filter_t gziptoany_filter = + static int compare_active_jobs(void *first, void *second, void *data); + static int compare_jobs(void *first, void *second, void *data); + static void dump_job_history(cupsd_job_t *job); +-static void finalize_job(cupsd_job_t *job); ++static void finalize_job(cupsd_job_t *job, int set_job_state); + static void free_job_history(cupsd_job_t *job); + static char *get_options(cupsd_job_t *job, int banner_page, char *copies, + size_t copies_size, char *title, +@@ -1297,7 +1297,7 @@ cupsdDeleteJob(cupsd_job_t *job, / + cupsd_jobaction_t action)/* I - Action */ + { + if (job->printer) +- finalize_job(job); ++ finalize_job(job, 1); + + if (action == CUPSD_JOB_PURGE) + { +@@ -2298,7 +2298,7 @@ cupsdSetJobState( + */ + + if (oldstate == IPP_JOB_PROCESSING) +- stop_job(job, action != CUPSD_JOB_DEFAULT); ++ stop_job(job, action); + + /* + * Set the new job state... +@@ -2505,8 +2505,8 @@ cupsdSetJobState( + * Finalize the job immediately if we forced things... + */ + +- if (action == CUPSD_JOB_FORCE) +- finalize_job(job); ++ if (action >= CUPSD_JOB_FORCE) ++ finalize_job(job, 0); + + /* + * Update the server "busy" state... +@@ -2741,7 +2741,8 @@ free_job_history(cupsd_job_t *job) /* I + */ + + static void +-finalize_job(cupsd_job_t *job) /* I - Job */ ++finalize_job(cupsd_job_t *job, /* I - Job */ ++ int set_job_state) /* I - 1 = set the job state */ + { + ipp_pstate_t printer_state; /* New printer state value */ + ipp_jstate_t job_state; /* New job state value */ +@@ -3027,7 +3028,9 @@ finalize_job(cupsd_job_t *job) /* I - J + * Update the printer and job state. + */ + +- cupsdSetJobState(job, job_state, CUPSD_JOB_DEFAULT, "%s", message); ++ if (job_state != job->state_value) ++ cupsdSetJobState(job, job_state, CUPSD_JOB_DEFAULT, "%s", message); ++ + cupsdSetPrinterState(job->printer, printer_state, + printer_state == IPP_PRINTER_STOPPED); + update_job_attrs(job, 0); +@@ -3995,15 +3998,34 @@ stop_job(cupsd_job_t *job, /* I - + + if (action == CUPSD_JOB_DEFAULT && !job->kill_time) + job->kill_time = time(NULL) + JobKillDelay; +- else if (action == CUPSD_JOB_FORCE) ++ else if (action >= CUPSD_JOB_FORCE) + job->kill_time = 0; + + for (i = 0; job->filters[i]; i ++) + if (job->filters[i] > 0) +- cupsdEndProcess(job->filters[i], action == CUPSD_JOB_FORCE); ++ { ++ cupsdEndProcess(job->filters[i], action >= CUPSD_JOB_FORCE); ++ ++ if (action >= CUPSD_JOB_FORCE) ++ job->filters[i] = -job->filters[i]; ++ } + + if (job->backend > 0) +- cupsdEndProcess(job->backend, action == CUPSD_JOB_FORCE); ++ { ++ cupsdEndProcess(job->backend, action >= CUPSD_JOB_FORCE); ++ ++ if (action >= CUPSD_JOB_FORCE) ++ job->backend = -job->backend; ++ } ++ ++ if (action >= CUPSD_JOB_FORCE) ++ { ++ /* ++ * Clear job status... ++ */ ++ ++ job->status = 0; ++ } + } + + +@@ -4393,7 +4415,7 @@ update_job(cupsd_job_t *job) /* I - Job + * Handle the end of job stuff... + */ + +- finalize_job(job); ++ finalize_job(job, 1); + + /* + * Check for new jobs... diff --git a/cups.spec b/cups.spec index 25e11ec..11fba43 100644 --- a/cups.spec +++ b/cups.spec @@ -9,7 +9,7 @@ Summary: Common Unix Printing System Name: cups Version: 1.4.2 -Release: 14%{?dist} +Release: 15%{?dist} License: GPLv2 Group: System Environment/Daemons Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2 @@ -72,6 +72,7 @@ Patch45: cups-str3436.patch Patch46: cups-str3425.patch Patch47: cups-str3428.patch Patch48: cups-str3431.patch +Patch49: cups-delete-active-printer.patch Patch100: cups-lspp.patch @@ -249,6 +250,7 @@ module. %patch46 -p1 -b .str3425 %patch47 -p1 -b .str3428 %patch48 -p1 -b .str3431 +%patch49 -p1 -b .delete-active-printer %if %lspp %patch100 -p1 -b .lspp @@ -547,6 +549,10 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog +* Wed Dec 9 2009 Tim Waugh - 1:1.4.2-15 +- Use upstream patch to fix scheduler crash when an active printer was + deleted (rev 8914). + * Tue Dec 8 2009 Tim Waugh - 1:1.4.2-14 - The scheduler did not use the Get-Job-Attributes policy for a printer (STR #3431). From 3844594064a6dbef6e2c1d67402035eee5669c05 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Thu, 10 Dec 2009 18:18:57 +0000 Subject: [PATCH 044/110] - Fixed invalid read in cupsAddDest (bug #547460). --- cups-str3448.patch | 16 ++++++++++++++++ cups.spec | 7 ++++++- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 cups-str3448.patch diff --git a/cups-str3448.patch b/cups-str3448.patch new file mode 100644 index 0000000..4233e7e --- /dev/null +++ b/cups-str3448.patch @@ -0,0 +1,16 @@ +diff -up cups-1.4.2/cups/dest.c.str3448 cups-1.4.2/cups/dest.c +--- cups-1.4.2/cups/dest.c.str3448 2009-08-28 23:54:34.000000000 +0100 ++++ cups-1.4.2/cups/dest.c 2009-12-10 18:15:50.910079549 +0000 +@@ -145,6 +145,12 @@ cupsAddDest(const char *name, /* I - + + dest = cups_add_dest(name, instance, &num_dests, dests); + ++ /* ++ * Find the base dest again now the array has been realloc'd. ++ */ ++ ++ parent = cupsGetDest(name, NULL, num_dests, *dests); ++ + if (instance && parent && parent->num_options > 0) + { + /* diff --git a/cups.spec b/cups.spec index 11fba43..fc45a1a 100644 --- a/cups.spec +++ b/cups.spec @@ -9,7 +9,7 @@ Summary: Common Unix Printing System Name: cups Version: 1.4.2 -Release: 15%{?dist} +Release: 16%{?dist} License: GPLv2 Group: System Environment/Daemons Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2 @@ -32,6 +32,7 @@ Patch4: cups-serial.patch Patch5: cups-banners.patch Patch6: cups-serverbin-compat.patch Patch7: cups-no-export-ssllibs.patch +Patch8: cups-str3448.patch Patch9: cups-direct-usb.patch Patch10: cups-lpr-help.patch Patch11: cups-peercred.patch @@ -210,6 +211,7 @@ module. %patch5 -p1 -b .banners %patch6 -p1 -b .serverbin-compat %patch7 -p1 -b .no-export-ssllibs +%patch8 -p1 -b .str3448 %patch9 -p1 -b .direct-usb %patch10 -p1 -b .lpr-help %patch11 -p1 -b .peercred @@ -549,6 +551,9 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog +* Thu Dec 10 2009 Tim Waugh - 1:1.4.2-16 +- Fixed invalid read in cupsAddDest (bug #547460). + * Wed Dec 9 2009 Tim Waugh - 1:1.4.2-15 - Use upstream patch to fix scheduler crash when an active printer was deleted (rev 8914). From c32b304c2bf81c7fce71baa3efc31921e9acaef4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Popelka?= Date: Fri, 11 Dec 2009 08:31:42 +0000 Subject: [PATCH 045/110] Bug number fixed --- cups.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cups.spec b/cups.spec index fc45a1a..4d63fc1 100644 --- a/cups.spec +++ b/cups.spec @@ -552,7 +552,7 @@ rm -rf $RPM_BUILD_ROOT %changelog * Thu Dec 10 2009 Tim Waugh - 1:1.4.2-16 -- Fixed invalid read in cupsAddDest (bug #547460). +- Fixed invalid read in cupsAddDest (bug #537460). * Wed Dec 9 2009 Tim Waugh - 1:1.4.2-15 - Use upstream patch to fix scheduler crash when an active printer was From afdd444a6da24fd1e37dfb047bd1defc4d6a791d Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Sat, 19 Dec 2009 13:03:30 +0000 Subject: [PATCH 046/110] - Fixed patch for STR #3425 by adding in back-ported change from svn revision 8936 (bug #548904). --- cups-str3425.patch | 33 +++++++++++++++++++++------------ cups.spec | 6 +++++- 2 files changed, 26 insertions(+), 13 deletions(-) diff --git a/cups-str3425.patch b/cups-str3425.patch index 076f9c6..9a331ab 100644 --- a/cups-str3425.patch +++ b/cups-str3425.patch @@ -1,7 +1,16 @@ diff -up cups-1.4.2/scheduler/job.c.str3425 cups-1.4.2/scheduler/job.c ---- cups-1.4.2/scheduler/job.c.str3425 2009-12-08 12:23:15.694500898 +0000 -+++ cups-1.4.2/scheduler/job.c 2009-12-08 12:23:35.005500733 +0000 -@@ -444,11 +444,11 @@ cupsdCleanJobs(void) +--- cups-1.4.2/scheduler/job.c.str3425 2009-12-19 12:12:18.346037032 +0000 ++++ cups-1.4.2/scheduler/job.c 2009-12-19 12:12:35.806163016 +0000 +@@ -253,7 +253,7 @@ cupsdCancelJobs(const char *dest, /* I - + if (purge) + cupsdSetJobState(job, IPP_JOB_CANCELED, CUPSD_JOB_PURGE, + "Job purged by user."); +- else ++ else if (job->state_value < IPP_JOB_CANCELED) + cupsdSetJobState(job, IPP_JOB_CANCELED, CUPSD_JOB_DEFAULT, + "Job canceled by user."); + } +@@ -433,11 +433,11 @@ cupsdCleanJobs(void) cupsd_job_t *job; /* Current job */ @@ -15,7 +24,7 @@ diff -up cups-1.4.2/scheduler/job.c.str3425 cups-1.4.2/scheduler/job.c job = (cupsd_job_t *)cupsArrayNext(Jobs)) if (job->state_value >= IPP_JOB_CANCELED && !job->printer) cupsdDeleteJob(job, CUPSD_JOB_PURGE); -@@ -2670,8 +2670,6 @@ cupsdSetJobState( +@@ -2498,8 +2498,6 @@ cupsdSetJobState( job->dirty = 1; cupsdMarkDirty(CUPSD_DIRTY_JOBS); } @@ -25,9 +34,9 @@ diff -up cups-1.4.2/scheduler/job.c.str3425 cups-1.4.2/scheduler/job.c } diff -up cups-1.4.2/scheduler/main.c.str3425 cups-1.4.2/scheduler/main.c ---- cups-1.4.2/scheduler/main.c.str3425 2009-12-08 12:23:15.695501397 +0000 -+++ cups-1.4.2/scheduler/main.c 2009-12-08 12:23:35.007501250 +0000 -@@ -397,7 +397,7 @@ main(int argc, /* I - Number of comm +--- cups-1.4.2/scheduler/main.c.str3425 2009-12-19 12:12:18.221037105 +0000 ++++ cups-1.4.2/scheduler/main.c 2009-12-19 12:12:18.434038283 +0000 +@@ -389,7 +389,7 @@ main(int argc, /* I - Number of comm * parent's file descriptors to be blocking. This is a workaround for a * limitation of userland libpthread on OpenBSD. */ @@ -36,7 +45,7 @@ diff -up cups-1.4.2/scheduler/main.c.str3425 cups-1.4.2/scheduler/main.c _thread_sys_closefrom(0); #endif /* __OpenBSD__ */ -@@ -844,8 +844,8 @@ main(int argc, /* I - Number of comm +@@ -817,8 +817,8 @@ main(int argc, /* I - Number of comm if (timeout == 86400 && Launchd && LaunchdTimeout && !NumPolled && !cupsArrayCount(ActiveJobs) && @@ -47,7 +56,7 @@ diff -up cups-1.4.2/scheduler/main.c.str3425 cups-1.4.2/scheduler/main.c (!NumBrowsers || !BrowseLocalProtocols || cupsArrayCount(Printers) == 0)))) { -@@ -1073,6 +1073,7 @@ main(int argc, /* I - Number of comm +@@ -1046,6 +1046,7 @@ main(int argc, /* I - Number of comm if ((current_time - senddoc_time) >= 10) { cupsdCheckJobs(); @@ -55,7 +64,7 @@ diff -up cups-1.4.2/scheduler/main.c.str3425 cups-1.4.2/scheduler/main.c senddoc_time = current_time; } -@@ -1231,8 +1232,8 @@ main(int argc, /* I - Number of comm +@@ -1204,8 +1205,8 @@ main(int argc, /* I - Number of comm #endif /* HAVE_GSSAPI */ #if defined(__APPLE__) && defined(HAVE_DLFCN_H) @@ -66,7 +75,7 @@ diff -up cups-1.4.2/scheduler/main.c.str3425 cups-1.4.2/scheduler/main.c */ PSQUpdateQuotaProc = NULL; -@@ -1594,13 +1595,13 @@ launchd_checkin(void) +@@ -1562,13 +1563,13 @@ launchd_checkin(void) if (lis) { @@ -82,7 +91,7 @@ diff -up cups-1.4.2/scheduler/main.c.str3425 cups-1.4.2/scheduler/main.c "launchd_checkin: Adding new listener %s with fd %d...", httpAddrString(&addr, s, sizeof(s)), fd); -@@ -1654,12 +1655,12 @@ launchd_checkout(void) +@@ -1622,12 +1623,12 @@ launchd_checkout(void) /* * Create or remove the launchd KeepAlive file based on whether diff --git a/cups.spec b/cups.spec index 4d63fc1..526aae8 100644 --- a/cups.spec +++ b/cups.spec @@ -9,7 +9,7 @@ Summary: Common Unix Printing System Name: cups Version: 1.4.2 -Release: 16%{?dist} +Release: 17%{?dist} License: GPLv2 Group: System Environment/Daemons Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2 @@ -551,6 +551,10 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog +* Sat Dec 19 2009 Tim Waugh - 1:1.4.2-17 +- Fixed patch for STR #3425 by adding in back-ported change from svn + revision 8936 (bug #548904). + * Thu Dec 10 2009 Tim Waugh - 1:1.4.2-16 - Fixed invalid read in cupsAddDest (bug #537460). From b5b3f9aa92d64a740b2b0376f755a54f09946e99 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Mon, 21 Dec 2009 17:07:05 +0000 Subject: [PATCH 047/110] - Ensure proper thread-safety in gnutls's use of libgcrypt (bug #544619). --- cups-gnutls-gcrypt-threads.patch | 56 ++++++++++++++++++++++++++++++++ cups.spec | 8 ++++- 2 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 cups-gnutls-gcrypt-threads.patch diff --git a/cups-gnutls-gcrypt-threads.patch b/cups-gnutls-gcrypt-threads.patch new file mode 100644 index 0000000..31f14dd --- /dev/null +++ b/cups-gnutls-gcrypt-threads.patch @@ -0,0 +1,56 @@ +diff -up cups-1.4.2/cups/http.c.gnutls-gcrypt-threads cups-1.4.2/cups/http.c +--- cups-1.4.2/cups/http.c.gnutls-gcrypt-threads 2009-12-21 16:50:58.931552118 +0000 ++++ cups-1.4.2/cups/http.c 2009-12-21 16:51:15.047552357 +0000 +@@ -1161,6 +1161,9 @@ httpHead(http_t *http, /* I - Conne + return (http_send(http, HTTP_HEAD, uri)); + } + ++#ifdef HAVE_GNUTLS ++GCRY_THREAD_OPTION_PTHREAD_IMPL; ++#endif + + /* + * 'httpInitialize()' - Initialize the HTTP interface library and set the +@@ -1205,6 +1208,7 @@ httpInitialize(void) + #endif /* WIN32 */ + + #ifdef HAVE_GNUTLS ++ gcry_control (GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread); + gnutls_global_init(); + #endif /* HAVE_GNUTLS */ + +diff -up cups-1.4.2/cups/http-private.h.gnutls-gcrypt-threads cups-1.4.2/cups/http-private.h +--- cups-1.4.2/cups/http-private.h.gnutls-gcrypt-threads 2009-04-07 16:48:14.000000000 +0100 ++++ cups-1.4.2/cups/http-private.h 2009-12-21 16:51:15.049552624 +0000 +@@ -98,6 +98,8 @@ extern BIO_METHOD *_httpBIOMethods(void) + * The GNU TLS library is more of a "bare metal" SSL/TLS library... + */ + # include ++# include ++# include + + typedef struct + { +diff -up cups-1.4.2/scheduler/server.c.gnutls-gcrypt-threads cups-1.4.2/scheduler/server.c +--- cups-1.4.2/scheduler/server.c.gnutls-gcrypt-threads 2008-09-10 23:05:29.000000000 +0100 ++++ cups-1.4.2/scheduler/server.c 2009-12-21 16:51:15.048553044 +0000 +@@ -35,7 +35,9 @@ + */ + + static int started = 0; +- ++#if !defined(HAVE_LIBSSL) && defined(HAVE_GNUTLS) ++GCRY_THREAD_OPTION_PTHREAD_IMPL; ++#endif + + /* + * 'cupsdStartServer()' - Start the server. +@@ -75,7 +77,7 @@ cupsdStartServer(void) + /* + * Initialize the encryption libraries... + */ +- ++ gcry_control (GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread); + gnutls_global_init(); + #endif /* HAVE_LIBSSL */ + diff --git a/cups.spec b/cups.spec index 526aae8..4c6c92d 100644 --- a/cups.spec +++ b/cups.spec @@ -9,7 +9,7 @@ Summary: Common Unix Printing System Name: cups Version: 1.4.2 -Release: 17%{?dist} +Release: 18%{?dist} License: GPLv2 Group: System Environment/Daemons Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2 @@ -74,6 +74,7 @@ Patch46: cups-str3425.patch Patch47: cups-str3428.patch Patch48: cups-str3431.patch Patch49: cups-delete-active-printer.patch +Patch50: cups-gnutls-gcrypt-threads.patch Patch100: cups-lspp.patch @@ -253,6 +254,7 @@ module. %patch47 -p1 -b .str3428 %patch48 -p1 -b .str3431 %patch49 -p1 -b .delete-active-printer +%patch50 -p1 -b .gnutls-gcrypt-threads %if %lspp %patch100 -p1 -b .lspp @@ -551,6 +553,10 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog +* Mon Dec 21 2009 Tim Waugh - 1:1.4.2-18 +- Ensure proper thread-safety in gnutls's use of libgcrypt + (bug #544619). + * Sat Dec 19 2009 Tim Waugh - 1:1.4.2-17 - Fixed patch for STR #3425 by adding in back-ported change from svn revision 8936 (bug #548904). From 52d8cca9e2ef34b558462f24c2c5d03d17673944 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Tue, 22 Dec 2009 17:05:44 +0000 Subject: [PATCH 048/110] - Fixed ipp authentication for servers requiring authentication for IPP-Get-Printer-Attributes (bug #548873, STR #3458). --- cups-str3458.patch | 19 +++++++++++++++++++ cups.spec | 8 +++++++- 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 cups-str3458.patch diff --git a/cups-str3458.patch b/cups-str3458.patch new file mode 100644 index 0000000..da43b76 --- /dev/null +++ b/cups-str3458.patch @@ -0,0 +1,19 @@ +diff -up cups-1.4.2/backend/ipp.c.str3458 cups-1.4.2/backend/ipp.c +--- cups-1.4.2/backend/ipp.c.str3458 2009-12-22 13:04:25.021208333 +0000 ++++ cups-1.4.2/backend/ipp.c 2009-12-22 13:04:26.570082893 +0000 +@@ -802,6 +802,15 @@ main(int argc, /* I - Number of comm + + return (CUPS_BACKEND_STOP); + } ++ else if (ipp_status == IPP_NOT_AUTHORIZED || ipp_status == IPP_FORBIDDEN) ++ { ++ if (!strncmp(httpGetField(http, HTTP_FIELD_WWW_AUTHENTICATE), ++ "Negotiate", 9)) ++ auth_info_required = "negotiate"; ++ ++ fprintf(stderr, "ATTR: auth-info-required=%s\n", auth_info_required); ++ return (CUPS_BACKEND_AUTH_REQUIRED); ++ } + else + { + _cupsLangPrintf(stderr, diff --git a/cups.spec b/cups.spec index 4c6c92d..efdb513 100644 --- a/cups.spec +++ b/cups.spec @@ -9,7 +9,7 @@ Summary: Common Unix Printing System Name: cups Version: 1.4.2 -Release: 18%{?dist} +Release: 19%{?dist} License: GPLv2 Group: System Environment/Daemons Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2 @@ -75,6 +75,7 @@ Patch47: cups-str3428.patch Patch48: cups-str3431.patch Patch49: cups-delete-active-printer.patch Patch50: cups-gnutls-gcrypt-threads.patch +Patch51: cups-str3458.patch Patch100: cups-lspp.patch @@ -255,6 +256,7 @@ module. %patch48 -p1 -b .str3431 %patch49 -p1 -b .delete-active-printer %patch50 -p1 -b .gnutls-gcrypt-threads +%patch51 -p1 -b .str3458 %if %lspp %patch100 -p1 -b .lspp @@ -553,6 +555,10 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog +* Tue Dec 22 2009 Tim Waugh - 1:1.4.2-19 +- Fixed ipp authentication for servers requiring authentication for + IPP-Get-Printer-Attributes (bug #548873, STR #3458). + * Mon Dec 21 2009 Tim Waugh - 1:1.4.2-18 - Ensure proper thread-safety in gnutls's use of libgcrypt (bug #544619). From e8c252a3a6770b04623282b8b3af5394975b2911 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Wed, 23 Dec 2009 11:11:36 +0000 Subject: [PATCH 049/110] - Fixed patch for STR #3425 again by adding in back-ported change from svn revision 8929 (bug #549899). No longer need delete-active-printer patch. --- cups-delete-active-printer.patch | 110 ------------------------------- cups-str3425.patch | 17 +++-- cups.spec | 17 +++-- 3 files changed, 23 insertions(+), 121 deletions(-) delete mode 100644 cups-delete-active-printer.patch diff --git a/cups-delete-active-printer.patch b/cups-delete-active-printer.patch deleted file mode 100644 index 5ea9f51..0000000 --- a/cups-delete-active-printer.patch +++ /dev/null @@ -1,110 +0,0 @@ -diff -up cups-1.4.2/CHANGES.txt.delete-active-printer cups-1.4.2/CHANGES.txt -diff -up cups-1.4.2/scheduler/job.c.delete-active-printer cups-1.4.2/scheduler/job.c ---- cups-1.4.2/scheduler/job.c.delete-active-printer 2009-12-09 11:24:50.946891977 +0000 -+++ cups-1.4.2/scheduler/job.c 2009-12-09 11:25:32.145892252 +0000 -@@ -168,7 +168,7 @@ static mime_filter_t gziptoany_filter = - static int compare_active_jobs(void *first, void *second, void *data); - static int compare_jobs(void *first, void *second, void *data); - static void dump_job_history(cupsd_job_t *job); --static void finalize_job(cupsd_job_t *job); -+static void finalize_job(cupsd_job_t *job, int set_job_state); - static void free_job_history(cupsd_job_t *job); - static char *get_options(cupsd_job_t *job, int banner_page, char *copies, - size_t copies_size, char *title, -@@ -1297,7 +1297,7 @@ cupsdDeleteJob(cupsd_job_t *job, / - cupsd_jobaction_t action)/* I - Action */ - { - if (job->printer) -- finalize_job(job); -+ finalize_job(job, 1); - - if (action == CUPSD_JOB_PURGE) - { -@@ -2298,7 +2298,7 @@ cupsdSetJobState( - */ - - if (oldstate == IPP_JOB_PROCESSING) -- stop_job(job, action != CUPSD_JOB_DEFAULT); -+ stop_job(job, action); - - /* - * Set the new job state... -@@ -2505,8 +2505,8 @@ cupsdSetJobState( - * Finalize the job immediately if we forced things... - */ - -- if (action == CUPSD_JOB_FORCE) -- finalize_job(job); -+ if (action >= CUPSD_JOB_FORCE) -+ finalize_job(job, 0); - - /* - * Update the server "busy" state... -@@ -2741,7 +2741,8 @@ free_job_history(cupsd_job_t *job) /* I - */ - - static void --finalize_job(cupsd_job_t *job) /* I - Job */ -+finalize_job(cupsd_job_t *job, /* I - Job */ -+ int set_job_state) /* I - 1 = set the job state */ - { - ipp_pstate_t printer_state; /* New printer state value */ - ipp_jstate_t job_state; /* New job state value */ -@@ -3027,7 +3028,9 @@ finalize_job(cupsd_job_t *job) /* I - J - * Update the printer and job state. - */ - -- cupsdSetJobState(job, job_state, CUPSD_JOB_DEFAULT, "%s", message); -+ if (job_state != job->state_value) -+ cupsdSetJobState(job, job_state, CUPSD_JOB_DEFAULT, "%s", message); -+ - cupsdSetPrinterState(job->printer, printer_state, - printer_state == IPP_PRINTER_STOPPED); - update_job_attrs(job, 0); -@@ -3995,15 +3998,34 @@ stop_job(cupsd_job_t *job, /* I - - - if (action == CUPSD_JOB_DEFAULT && !job->kill_time) - job->kill_time = time(NULL) + JobKillDelay; -- else if (action == CUPSD_JOB_FORCE) -+ else if (action >= CUPSD_JOB_FORCE) - job->kill_time = 0; - - for (i = 0; job->filters[i]; i ++) - if (job->filters[i] > 0) -- cupsdEndProcess(job->filters[i], action == CUPSD_JOB_FORCE); -+ { -+ cupsdEndProcess(job->filters[i], action >= CUPSD_JOB_FORCE); -+ -+ if (action >= CUPSD_JOB_FORCE) -+ job->filters[i] = -job->filters[i]; -+ } - - if (job->backend > 0) -- cupsdEndProcess(job->backend, action == CUPSD_JOB_FORCE); -+ { -+ cupsdEndProcess(job->backend, action >= CUPSD_JOB_FORCE); -+ -+ if (action >= CUPSD_JOB_FORCE) -+ job->backend = -job->backend; -+ } -+ -+ if (action >= CUPSD_JOB_FORCE) -+ { -+ /* -+ * Clear job status... -+ */ -+ -+ job->status = 0; -+ } - } - - -@@ -4393,7 +4415,7 @@ update_job(cupsd_job_t *job) /* I - Job - * Handle the end of job stuff... - */ - -- finalize_job(job); -+ finalize_job(job, 1); - - /* - * Check for new jobs... diff --git a/cups-str3425.patch b/cups-str3425.patch index 9a331ab..ac56d59 100644 --- a/cups-str3425.patch +++ b/cups-str3425.patch @@ -1,6 +1,6 @@ diff -up cups-1.4.2/scheduler/job.c.str3425 cups-1.4.2/scheduler/job.c ---- cups-1.4.2/scheduler/job.c.str3425 2009-12-19 12:12:18.346037032 +0000 -+++ cups-1.4.2/scheduler/job.c 2009-12-19 12:12:35.806163016 +0000 +--- cups-1.4.2/scheduler/job.c.str3425 2009-12-23 11:00:06.070056898 +0000 ++++ cups-1.4.2/scheduler/job.c 2009-12-23 11:02:22.889056232 +0000 @@ -253,7 +253,7 @@ cupsdCancelJobs(const char *dest, /* I - if (purge) cupsdSetJobState(job, IPP_JOB_CANCELED, CUPSD_JOB_PURGE, @@ -33,9 +33,18 @@ diff -up cups-1.4.2/scheduler/job.c.str3425 cups-1.4.2/scheduler/job.c break; } +@@ -2507,7 +2505,7 @@ cupsdSetJobState( + * Finalize the job immediately if we forced things... + */ + +- if (action == CUPSD_JOB_FORCE) ++ if (action >= CUPSD_JOB_FORCE && job->printer) + finalize_job(job); + + /* diff -up cups-1.4.2/scheduler/main.c.str3425 cups-1.4.2/scheduler/main.c ---- cups-1.4.2/scheduler/main.c.str3425 2009-12-19 12:12:18.221037105 +0000 -+++ cups-1.4.2/scheduler/main.c 2009-12-19 12:12:18.434038283 +0000 +--- cups-1.4.2/scheduler/main.c.str3425 2009-12-23 11:00:05.687056970 +0000 ++++ cups-1.4.2/scheduler/main.c 2009-12-23 11:00:06.156057773 +0000 @@ -389,7 +389,7 @@ main(int argc, /* I - Number of comm * parent's file descriptors to be blocking. This is a workaround for a * limitation of userland libpthread on OpenBSD. diff --git a/cups.spec b/cups.spec index efdb513..5676853 100644 --- a/cups.spec +++ b/cups.spec @@ -9,7 +9,7 @@ Summary: Common Unix Printing System Name: cups Version: 1.4.2 -Release: 19%{?dist} +Release: 20%{?dist} License: GPLv2 Group: System Environment/Daemons Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2 @@ -73,9 +73,8 @@ Patch45: cups-str3436.patch Patch46: cups-str3425.patch Patch47: cups-str3428.patch Patch48: cups-str3431.patch -Patch49: cups-delete-active-printer.patch -Patch50: cups-gnutls-gcrypt-threads.patch -Patch51: cups-str3458.patch +Patch49: cups-gnutls-gcrypt-threads.patch +Patch50: cups-str3458.patch Patch100: cups-lspp.patch @@ -254,9 +253,8 @@ module. %patch46 -p1 -b .str3425 %patch47 -p1 -b .str3428 %patch48 -p1 -b .str3431 -%patch49 -p1 -b .delete-active-printer -%patch50 -p1 -b .gnutls-gcrypt-threads -%patch51 -p1 -b .str3458 +%patch49 -p1 -b .gnutls-gcrypt-threads +%patch50 -p1 -b .str3458 %if %lspp %patch100 -p1 -b .lspp @@ -555,6 +553,11 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog +* Wed Dec 23 2009 Tim Waugh - 1:1.4.2-20 +- Fixed patch for STR #3425 again by adding in back-ported change from + svn revision 8929 (bug #549899). No longer need + delete-active-printer patch. + * Tue Dec 22 2009 Tim Waugh - 1:1.4.2-19 - Fixed ipp authentication for servers requiring authentication for IPP-Get-Printer-Attributes (bug #548873, STR #3458). From 15e970ec8d73cf7e5f155e70140b802a9fcb1c4e Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Thu, 14 Jan 2010 12:37:44 +0000 Subject: [PATCH 050/110] - Install udev rules in correct place (bug #530378). --- cups.spec | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/cups.spec b/cups.spec index 5676853..e235eea 100644 --- a/cups.spec +++ b/cups.spec @@ -9,7 +9,7 @@ Summary: Common Unix Printing System Name: cups Version: 1.4.2 -Release: 20%{?dist} +Release: 21%{?dist} License: GPLv2 Group: System Environment/Daemons Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2 @@ -378,9 +378,9 @@ extension=phpcups.so __EOF__ # Install the udev rules. -%{__mkdir_p} %{buildroot}%{_sysconfdir}/udev/rules.d +%{__mkdir_p} %{buildroot}/lib/udev/rules.d install -m644 %{SOURCE3} \ - %{buildroot}%{_sysconfdir}/udev/rules.d/70-cups-libusb.rules + %{buildroot}/lib/udev/rules.d/70-cups-libusb.rules %post /sbin/chkconfig --del cupsd 2>/dev/null || true # Make sure old versions aren't there anymore @@ -442,7 +442,7 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %doc LICENSE.txt README.txt CREDITS.txt CHANGES.txt -%{_sysconfdir}/udev/rules.d/70-cups-libusb.rules +/lib/udev/rules.d/70-cups-libusb.rules %dir %attr(0755,root,lp) /etc/cups %dir %attr(0755,root,lp) /var/run/cups %dir %attr(0511,lp,sys) /var/run/cups/certs @@ -553,6 +553,9 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog +* Thu Jan 14 2010 Tim Waugh - 1:1.4.2-21 +- Install udev rules in correct place (bug #530378). + * Wed Dec 23 2009 Tim Waugh - 1:1.4.2-20 - Fixed patch for STR #3425 again by adding in back-ported change from svn revision 8929 (bug #549899). No longer need From 991b829f32a8de892d74e6983426981bdb3b5ff3 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Fri, 15 Jan 2010 10:40:36 +0000 Subject: [PATCH 051/110] - Reset status after successful ipp job (bug #548219, STR #3460). --- cups-str3460.patch | 14 ++++++++++++++ cups.spec | 7 ++++++- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 cups-str3460.patch diff --git a/cups-str3460.patch b/cups-str3460.patch new file mode 100644 index 0000000..20b1b70 --- /dev/null +++ b/cups-str3460.patch @@ -0,0 +1,14 @@ +diff -up cups-1.4.2/backend/ipp.c.str3460 cups-1.4.2/backend/ipp.c +--- cups-1.4.2/backend/ipp.c.str3460 2010-01-15 10:25:14.720258721 +0000 ++++ cups-1.4.2/backend/ipp.c 2010-01-15 10:28:57.218384231 +0000 +@@ -1435,7 +1435,10 @@ main(int argc, /* I - Number of comm + else if (ipp_status > IPP_OK_CONFLICT) + return (CUPS_BACKEND_FAILED); + else ++ { ++ _cupsLangPuts(stderr, _("INFO: Ready to print.\n")); + return (CUPS_BACKEND_OK); ++ } + } + + diff --git a/cups.spec b/cups.spec index e235eea..b2f9803 100644 --- a/cups.spec +++ b/cups.spec @@ -9,7 +9,7 @@ Summary: Common Unix Printing System Name: cups Version: 1.4.2 -Release: 21%{?dist} +Release: 22%{?dist} License: GPLv2 Group: System Environment/Daemons Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2 @@ -75,6 +75,7 @@ Patch47: cups-str3428.patch Patch48: cups-str3431.patch Patch49: cups-gnutls-gcrypt-threads.patch Patch50: cups-str3458.patch +Patch51: cups-str3460.patch Patch100: cups-lspp.patch @@ -255,6 +256,7 @@ module. %patch48 -p1 -b .str3431 %patch49 -p1 -b .gnutls-gcrypt-threads %patch50 -p1 -b .str3458 +%patch51 -p1 -b .str3460 %if %lspp %patch100 -p1 -b .lspp @@ -553,6 +555,9 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog +* Fri Jan 15 2010 Tim Waugh - 1:1.4.2-22 +- Reset status after successful ipp job (bug #548219, STR #3460). + * Thu Jan 14 2010 Tim Waugh - 1:1.4.2-21 - Install udev rules in correct place (bug #530378). From 09e6eab959b923ef6579711d94a977b1b22fc247 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Fri, 15 Jan 2010 11:18:17 +0000 Subject: [PATCH 052/110] Fixes from package review. --- cups.spec | 84 ++++++++++++++++++++++++++++++------------------------- 1 file changed, 46 insertions(+), 38 deletions(-) diff --git a/cups.spec b/cups.spec index b2f9803..3f4078c 100644 --- a/cups.spec +++ b/cups.spec @@ -1,7 +1,6 @@ %define php_extdir %(php-config --extension-dir 2>/dev/null || echo %{_libdir}/php4) %global php_apiver %((echo 0; php -i 2>/dev/null | sed -n 's/^PHP API => //p') | tail -1) -%define initdir /etc/rc.d/init.d %define use_alternatives 1 %define lspp 1 %define cups_serverbin %{_exec_prefix}/lib/cups @@ -75,7 +74,8 @@ Patch47: cups-str3428.patch Patch48: cups-str3431.patch Patch49: cups-gnutls-gcrypt-threads.patch Patch50: cups-str3458.patch -Patch51: cups-str3460.patch +Patch51: cups-0755.patch +Patch52: cups-str3460.patch Patch100: cups-lspp.patch @@ -85,16 +85,16 @@ Patch100: cups-lspp.patch Epoch: 1 Url: http://www.cups.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -PreReq: /sbin/chkconfig /sbin/service +Requires: /sbin/chkconfig /sbin/service Requires: %{name}-libs = %{epoch}:%{version}-%{release} %if %use_alternatives Provides: /usr/bin/lpq /usr/bin/lpr /usr/bin/lp /usr/bin/cancel /usr/bin/lprm /usr/bin/lpstat -Prereq: /usr/sbin/alternatives +Requires: /usr/sbin/alternatives %endif # Unconditionally obsolete LPRng so that upgrades work properly. -Obsoletes: lpd lpr LPRng <= 3.8.15-3 -Provides: lpd lpr +Obsoletes: lpd <= 3.8.15-3, lpr <= 3.8.15-3, LPRng <= 3.8.15-3 +Provides: lpd = 3.8.15-4, lpr = 3.8.15-4 Obsoletes: cupsddk < 1.2.3-7 Provides: cupsddk = 1.2.3-7 @@ -104,8 +104,8 @@ Provides: cupsddk-drivers = 1.2.3-7 # kdelibs conflict for bug #192585. Conflicts: kdelibs < 6:3.5.2-6 -BuildPrereq: pam-devel pkgconfig -BuildPrereq: gnutls-devel libacl-devel +BuildRequires: pam-devel pkgconfig +BuildRequires: gnutls-devel libacl-devel BuildRequires: openldap-devel BuildRequires: make >= 1:3.80 BuildRequires: php-devel, pcre-devel @@ -117,14 +117,14 @@ BuildRequires: avahi-devel BuildRequires: poppler-utils %if %lspp -BuildPrereq: libselinux-devel >= 1.23 -BuildPrereq: audit-libs-devel >= 1.1 +BuildRequires: libselinux-devel >= 1.23 +BuildRequires: audit-libs-devel >= 1.1 %endif # -fstack-protector-all requires GCC 4.0.1 BuildRequires: gcc >= 4.0.1 -BuildPrereq: dbus-devel >= 0.90 +BuildRequires: dbus-devel >= 0.90 Requires: dbus >= 0.90 # Requires tmpwatch for the cron.daily script (bug #218901). @@ -256,7 +256,8 @@ module. %patch48 -p1 -b .str3431 %patch49 -p1 -b .gnutls-gcrypt-threads %patch50 -p1 -b .str3458 -%patch51 -p1 -b .str3460 +%patch51 -p1 -b .0755 +%patch52 -p1 -b .str3460 %if %lspp %patch100 -p1 -b .lspp @@ -294,7 +295,7 @@ export CFLAGS="$RPM_OPT_FLAGS -fstack-protector-all -DLDAP_DEPRECATED=1" localedir=%{_datadir}/locale # If we got this far, all prerequisite libraries must be here. -make +make %{?_smp_mflags} %install rm -rf $RPM_BUILD_ROOT @@ -304,13 +305,13 @@ make BUILDROOT=$RPM_BUILD_ROOT install # Serial backend needs to run as root (bug #212577). chmod 700 $RPM_BUILD_ROOT%{cups_serverbin}/backend/serial -rm -rf $RPM_BUILD_ROOT%{initdir} \ +rm -rf $RPM_BUILD_ROOT%{_initddir} \ $RPM_BUILD_ROOT%{_sysconfdir}/init.d \ $RPM_BUILD_ROOT%{_sysconfdir}/rc?.d -mkdir -p $RPM_BUILD_ROOT%{initdir} -install -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{initdir}/cups +mkdir -p $RPM_BUILD_ROOT%{_initddir} +install -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{_initddir}/cups -find $RPM_BUILD_ROOT/usr/share/cups/model -name "*.ppd" |xargs gzip -n9f +find $RPM_BUILD_ROOT%{_datadir}/cups/model -name "*.ppd" |xargs gzip -n9f %if %use_alternatives pushd $RPM_BUILD_ROOT%{_bindir} @@ -389,7 +390,7 @@ install -m644 %{SOURCE3} \ /sbin/chkconfig --add cups || true # Remove old-style certs directory; new-style is /var/run # (see bug #194581 for why this is necessary). -/bin/rm -rf /etc/cups/certs +/bin/rm -rf %{_sysconfdir}/cups/certs %if %use_alternatives /usr/sbin/alternatives --install %{_bindir}/lpr print %{_bindir}/lpr.cups 40 \ --slave %{_bindir}/lp print-lp %{_bindir}/lp.cups \ @@ -419,7 +420,7 @@ if [ "$1" = "0" ]; then /sbin/service cups stop > /dev/null 2>&1 /sbin/chkconfig --del cups %if %use_alternatives - /usr/sbin/alternatives --remove print %{_bindir}/lpr.cups + /usr/sbin/alternatives --remove print %{_bindir}/lpr.cups %endif fi exit 0 @@ -445,22 +446,22 @@ rm -rf $RPM_BUILD_ROOT %defattr(-,root,root) %doc LICENSE.txt README.txt CREDITS.txt CHANGES.txt /lib/udev/rules.d/70-cups-libusb.rules -%dir %attr(0755,root,lp) /etc/cups +%dir %attr(0755,root,lp) %{_sysconfdir}/cups %dir %attr(0755,root,lp) /var/run/cups %dir %attr(0511,lp,sys) /var/run/cups/certs -%verify(not md5 size mtime) %config(noreplace) %attr(0640,root,lp) /etc/cups/cupsd.conf -%attr(0640,root,lp) /etc/cups/cupsd.conf.default -%verify(not md5 size mtime) %config(noreplace) %attr(0644,root,lp) /etc/cups/client.conf -%verify(not md5 size mtime) %config(noreplace) %attr(0600,root,lp) /etc/cups/classes.conf -%verify(not md5 size mtime) %config(noreplace) %attr(0600,root,lp) /etc/cups/printers.conf -%verify(not md5 size mtime) %config(noreplace) %attr(0644,root,lp) /etc/cups/snmp.conf -%verify(not md5 size mtime) %config(noreplace) %attr(0644,root,lp) /etc/cups/subscriptions.conf -/etc/cups/interfaces -%verify(not md5 size mtime) %config(noreplace) %attr(0644,root,lp) /etc/cups/lpoptions -%dir %attr(0755,root,lp) /etc/cups/ppd -%dir %attr(0700,root,lp) /etc/cups/ssl -/etc/cups/pstoraster.convs -%config(noreplace) /etc/pam.d/cups +%verify(not md5 size mtime) %config(noreplace) %attr(0640,root,lp) %{_sysconfdir}/cups/cupsd.conf +%attr(0640,root,lp) %{_sysconfdir}/cups/cupsd.conf.default +%verify(not md5 size mtime) %config(noreplace) %attr(0644,root,lp) %{_sysconfdir}/cups/client.conf +%verify(not md5 size mtime) %config(noreplace) %attr(0600,root,lp) %{_sysconfdir}/cups/classes.conf +%verify(not md5 size mtime) %config(noreplace) %attr(0600,root,lp) %{_sysconfdir}/cups/printers.conf +%verify(not md5 size mtime) %config(noreplace) %attr(0644,root,lp) %{_sysconfdir}/cups/snmp.conf +%verify(not md5 size mtime) %config(noreplace) %attr(0644,root,lp) %{_sysconfdir}/cups/subscriptions.conf +%{_sysconfdir}/cups/interfaces +%verify(not md5 size mtime) %config(noreplace) %attr(0644,root,lp) %{_sysconfdir}/cups/lpoptions +%dir %attr(0755,root,lp) %{_sysconfdir}/cups/ppd +%dir %attr(0700,root,lp) %{_sysconfdir}/cups/ssl +%{_sysconfdir}/cups/pstoraster.convs +%config(noreplace) %{_sysconfdir}/pam.d/cups %config(noreplace) %{_sysconfdir}/logrotate.d/cups %config(noreplace) %{_sysconfdir}/portreserve/%{name} %dir %{_datadir}/%{name}/www @@ -480,7 +481,7 @@ rm -rf $RPM_BUILD_ROOT %config(noreplace) %doc %{_datadir}/%{name}/www/ja/index.html %config(noreplace) %doc %{_datadir}/%{name}/www/pl/index.html %config(noreplace) %doc %{_datadir}/%{name}/www/ru/index.html -%config(noreplace) %{initdir}/cups +%{_initddir}/cups %{_bindir}/cupstestppd %{_bindir}/cupstestdsc %{_bindir}/cancel* @@ -556,6 +557,13 @@ rm -rf $RPM_BUILD_ROOT %changelog * Fri Jan 15 2010 Tim Waugh - 1:1.4.2-22 +- Don't mark initscript as config file. +- Use %%{_initddir}, %%{_sysconfdir} and SMP make flags. +- Use mode 0755 for binaries and libraries where appropriate. +- Removed use of prereq and buildprereq. +- Fixed use of '%%' in changelog. +- Versioned explicit obsoletes/provides. +- Use tabs throughout. - Reset status after successful ipp job (bug #548219, STR #3460). * Thu Jan 14 2010 Tim Waugh - 1:1.4.2-21 @@ -2064,7 +2072,7 @@ rm -rf $RPM_BUILD_ROOT - Start cupsd before nfs server processes (bug #97767). * Tue Jun 17 2003 Tim Waugh 1:1.1.19-7 -- Add some %if %use_dbus / %endif's to make it compile without dbus +- Add some %%if %%use_dbus / %%endif's to make it compile without dbus (bug #97397). Patch from Jos Vos. * Mon Jun 16 2003 Tim Waugh 1:1.1.19-6 @@ -2283,8 +2291,8 @@ rm -rf $RPM_BUILD_ROOT * Thu Feb 28 2002 Bill Nottingham 1.1.14-7 - lpc man page is alternative too -- run ldconfig in -libs %post/%postun, not main -- remove alternatives in %preun +- run ldconfig in -libs %%post/%%postun, not main +- remove alternatives in %%preun * Wed Feb 27 2002 Bill Nottingham 1.1.14-6 - don't source /etc/sysconfig/network in cups.init, we don't use any @@ -2376,7 +2384,7 @@ rm -rf $RPM_BUILD_ROOT - rebuilt against libpng-1.0.8 * Tue Aug 01 2000 Than Ngo -- fix permission, add missing ldconfig in %post and %postun (Bug #14963) +- fix permission, add missing ldconfig in %%post and %%postun (Bug #14963) * Sat Jul 29 2000 Bernhard Rosenkraenzer - 1.1.1 (this has some major bugfixes) From aa6e14997dee8de5ad1ec80269f95c5e6da9c299 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Fri, 15 Jan 2010 11:18:58 +0000 Subject: [PATCH 053/110] Add the 0755 patch. --- cups-0755.patch | 20 ++++++++++++++++++++ cups.spec | 4 ++-- 2 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 cups-0755.patch diff --git a/cups-0755.patch b/cups-0755.patch new file mode 100644 index 0000000..d81993e --- /dev/null +++ b/cups-0755.patch @@ -0,0 +1,20 @@ +diff -up cups-1.4.2/Makedefs.in.0755 cups-1.4.2/Makedefs.in +--- cups-1.4.2/Makedefs.in.0755 2010-01-13 17:06:48.507913044 +0000 ++++ cups-1.4.2/Makedefs.in 2010-01-13 17:07:10.049912905 +0000 +@@ -41,13 +41,13 @@ SHELL = /bin/sh + # Installation programs... + # + +-INSTALL_BIN = $(LIBTOOL) $(INSTALL) -c -m 555 @INSTALL_STRIP@ ++INSTALL_BIN = $(LIBTOOL) $(INSTALL) -c -m 755 @INSTALL_STRIP@ + INSTALL_CONFIG = $(INSTALL) -c -m @CUPS_CONFIG_FILE_PERM@ + INSTALL_DATA = $(INSTALL) -c -m 444 + INSTALL_DIR = $(INSTALL) -d +-INSTALL_LIB = $(LIBTOOL) $(INSTALL) -c -m 555 @INSTALL_STRIP@ ++INSTALL_LIB = $(LIBTOOL) $(INSTALL) -c -m 755 @INSTALL_STRIP@ + INSTALL_MAN = $(INSTALL) -c -m 444 +-INSTALL_SCRIPT = $(INSTALL) -c -m 555 ++INSTALL_SCRIPT = $(INSTALL) -c -m 755 + + # + # Default user, group, and system groups for the scheduler... diff --git a/cups.spec b/cups.spec index 3f4078c..5514c63 100644 --- a/cups.spec +++ b/cups.spec @@ -8,7 +8,7 @@ Summary: Common Unix Printing System Name: cups Version: 1.4.2 -Release: 22%{?dist} +Release: 23%{?dist} License: GPLv2 Group: System Environment/Daemons Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2 @@ -556,7 +556,7 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog -* Fri Jan 15 2010 Tim Waugh - 1:1.4.2-22 +* Fri Jan 15 2010 Tim Waugh - 1:1.4.2-23 - Don't mark initscript as config file. - Use %%{_initddir}, %%{_sysconfdir} and SMP make flags. - Use mode 0755 for binaries and libraries where appropriate. From 4869f1b1cd5e929ae8c59bcd649505002b53732d Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Wed, 17 Feb 2010 01:07:59 +0000 Subject: [PATCH 054/110] Initialize branch F-13 for cups --- branch | 1 + 1 file changed, 1 insertion(+) create mode 100644 branch diff --git a/branch b/branch new file mode 100644 index 0000000..baa94ef --- /dev/null +++ b/branch @@ -0,0 +1 @@ +F-13 From 6297c85cf91a82634fb5be6227b053be890aaefe Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Tue, 23 Feb 2010 11:02:56 +0000 Subject: [PATCH 055/110] - Re-initialize the resolver if getnameinfo() returns EAI_AGAIN (bug #567353). --- cups-EAI_AGAIN.patch | 12 ++++++++++++ cups.spec | 8 +++++++- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 cups-EAI_AGAIN.patch diff --git a/cups-EAI_AGAIN.patch b/cups-EAI_AGAIN.patch new file mode 100644 index 0000000..878315a --- /dev/null +++ b/cups-EAI_AGAIN.patch @@ -0,0 +1,12 @@ +diff -up cups-1.4.2/cups/http-addr.c.EAI_AGAIN cups-1.4.2/cups/http-addr.c +--- cups-1.4.2/cups/http-addr.c.EAI_AGAIN 2010-02-23 10:39:35.038261623 +0000 ++++ cups-1.4.2/cups/http-addr.c 2010-02-23 10:41:14.684385991 +0000 +@@ -253,7 +253,7 @@ httpAddrLookup( + + if (error) + { +- if (error == EAI_FAIL) ++ if (error == EAI_FAIL || error == EAI_AGAIN) + cg->need_res_init = 1; + + return (httpAddrString(addr, name, namelen)); diff --git a/cups.spec b/cups.spec index 5514c63..72058d1 100644 --- a/cups.spec +++ b/cups.spec @@ -8,7 +8,7 @@ Summary: Common Unix Printing System Name: cups Version: 1.4.2 -Release: 23%{?dist} +Release: 24%{?dist} License: GPLv2 Group: System Environment/Daemons Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2 @@ -76,6 +76,7 @@ Patch49: cups-gnutls-gcrypt-threads.patch Patch50: cups-str3458.patch Patch51: cups-0755.patch Patch52: cups-str3460.patch +Patch53: cups-EAI_AGAIN.patch Patch100: cups-lspp.patch @@ -258,6 +259,7 @@ module. %patch50 -p1 -b .str3458 %patch51 -p1 -b .0755 %patch52 -p1 -b .str3460 +%patch53 -p1 -b .EAI_AGAIN %if %lspp %patch100 -p1 -b .lspp @@ -556,6 +558,10 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog +* Tue Feb 23 2010 Tim Waugh - 1:1.4.2-24 +- Re-initialize the resolver if getnameinfo() returns EAI_AGAIN + (bug #567353). + * Fri Jan 15 2010 Tim Waugh - 1:1.4.2-23 - Don't mark initscript as config file. - Use %%{_initddir}, %%{_sysconfdir} and SMP make flags. From da745e9fe4e065f51087e987cea1097c93f33fe5 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Tue, 23 Feb 2010 11:37:47 +0000 Subject: [PATCH 056/110] - Re-initialize the resolver if getnameinfo() returns EAI_AGAIN (bug #567353). --- cups-EAI_AGAIN.patch | 12 ++++++++++++ cups.spec | 8 +++++++- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 cups-EAI_AGAIN.patch diff --git a/cups-EAI_AGAIN.patch b/cups-EAI_AGAIN.patch new file mode 100644 index 0000000..878315a --- /dev/null +++ b/cups-EAI_AGAIN.patch @@ -0,0 +1,12 @@ +diff -up cups-1.4.2/cups/http-addr.c.EAI_AGAIN cups-1.4.2/cups/http-addr.c +--- cups-1.4.2/cups/http-addr.c.EAI_AGAIN 2010-02-23 10:39:35.038261623 +0000 ++++ cups-1.4.2/cups/http-addr.c 2010-02-23 10:41:14.684385991 +0000 +@@ -253,7 +253,7 @@ httpAddrLookup( + + if (error) + { +- if (error == EAI_FAIL) ++ if (error == EAI_FAIL || error == EAI_AGAIN) + cg->need_res_init = 1; + + return (httpAddrString(addr, name, namelen)); diff --git a/cups.spec b/cups.spec index 99ff26f..0203f39 100644 --- a/cups.spec +++ b/cups.spec @@ -8,7 +8,7 @@ Summary: Common Unix Printing System Name: cups Version: 1.4.2 -Release: 29%{?dist} +Release: 30%{?dist} License: GPLv2 Group: System Environment/Daemons Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2 @@ -74,6 +74,7 @@ Patch49: cups-gnutls-gcrypt-threads.patch Patch50: cups-str3458.patch Patch51: cups-0755.patch Patch52: cups-str3460.patch +Patch53: cups-EAI_AGAIN.patch Patch100: cups-lspp.patch @@ -262,6 +263,7 @@ module. %patch50 -p1 -b .str3458 %patch51 -p1 -b .0755 %patch52 -p1 -b .str3460 +%patch53 -p1 -b .EAI_AGAIN %if %lspp %patch100 -p1 -b .lspp @@ -552,6 +554,10 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog +* Tue Feb 23 2010 Tim Waugh - 1:1.4.2-30 +- Re-initialize the resolver if getnameinfo() returns EAI_AGAIN + (bug #567353). + * Mon Feb 15 2010 Jiri Popelka 1:1.4.2-29 - Improve cups-gnutls-gcrypt-threads.patch (#564841, STR #3461). From cc2070d9d21acd1daf5b9c0775e032e8d8cd6741 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Tue, 23 Feb 2010 12:25:16 +0000 Subject: [PATCH 057/110] - Update classes.conf when a class member printer is deleted (bug #565878, STR #3505). --- cups-str3505.patch | 158 +++++++++++++++++++++++++++++++++++++++++++++ cups.spec | 8 ++- 2 files changed, 165 insertions(+), 1 deletion(-) create mode 100644 cups-str3505.patch diff --git a/cups-str3505.patch b/cups-str3505.patch new file mode 100644 index 0000000..95b6918 --- /dev/null +++ b/cups-str3505.patch @@ -0,0 +1,158 @@ +diff -up cups-1.4.2/scheduler/classes.c.str3505 cups-1.4.2/scheduler/classes.c +--- cups-1.4.2/scheduler/classes.c.str3505 2009-10-07 19:16:09.000000000 +0100 ++++ cups-1.4.2/scheduler/classes.c 2010-02-23 11:43:06.033263862 +0000 +@@ -3,7 +3,7 @@ + * + * Printer class routines for the Common UNIX Printing System (CUPS). + * +- * Copyright 2007-2009 by Apple Inc. ++ * Copyright 2007-2010 by Apple Inc. + * Copyright 1997-2007 by Easy Software Products, all rights reserved. + * + * These coded instructions, statements, and computer programs are the +@@ -117,7 +117,7 @@ cupsdAddPrinterToClass( + * 'cupsdDeletePrinterFromClass()' - Delete a printer from a class. + */ + +-void ++int /* O - 1 if class changed, 0 otherwise */ + cupsdDeletePrinterFromClass( + cupsd_printer_t *c, /* I - Class to delete from */ + cupsd_printer_t *p) /* I - Printer to delete */ +@@ -149,13 +149,15 @@ cupsdDeletePrinterFromClass( + (c->num_printers - i) * sizeof(cupsd_printer_t *)); + } + else +- return; ++ return (0); + + /* + * Update the IPP attributes (have to do this for member-names)... + */ + + cupsdSetPrinterAttrs(c); ++ ++ return (1); + } + + +@@ -163,10 +165,11 @@ cupsdDeletePrinterFromClass( + * 'cupsdDeletePrinterFromClasses()' - Delete a printer from all classes. + */ + +-void ++int /* O - 1 if class changed, 0 otherwise */ + cupsdDeletePrinterFromClasses( + cupsd_printer_t *p) /* I - Printer to delete */ + { ++ int changed = 0; /* Any class changed? */ + cupsd_printer_t *c; /* Pointer to current class */ + + +@@ -179,7 +182,7 @@ cupsdDeletePrinterFromClasses( + c; + c = (cupsd_printer_t *)cupsArrayNext(Printers)) + if (c->type & (CUPS_PRINTER_CLASS | CUPS_PRINTER_IMPLICIT)) +- cupsdDeletePrinterFromClass(c, p); ++ changed |= cupsdDeletePrinterFromClass(c, p); + + /* + * Then clean out any empty implicit classes... +@@ -193,7 +196,10 @@ cupsdDeletePrinterFromClasses( + cupsdLogMessage(CUPSD_LOG_DEBUG, "Deleting implicit class \"%s\"...", + c->name); + cupsdDeletePrinter(c, 0); ++ changed = 1; + } ++ ++ return (changed); + } + + +diff -up cups-1.4.2/scheduler/classes.h.str3505 cups-1.4.2/scheduler/classes.h +--- cups-1.4.2/scheduler/classes.h.str3505 2008-09-19 21:03:36.000000000 +0100 ++++ cups-1.4.2/scheduler/classes.h 2010-02-23 11:43:06.012262825 +0000 +@@ -3,7 +3,7 @@ + * + * Printer class definitions for the Common UNIX Printing System (CUPS). + * +- * Copyright 2007-2008 by Apple Inc. ++ * Copyright 2007-2010 by Apple Inc. + * Copyright 1997-2005 by Easy Software Products, all rights reserved. + * + * These coded instructions, statements, and computer programs are the +@@ -21,9 +21,9 @@ + extern cupsd_printer_t *cupsdAddClass(const char *name); + extern void cupsdAddPrinterToClass(cupsd_printer_t *c, + cupsd_printer_t *p); +-extern void cupsdDeletePrinterFromClass(cupsd_printer_t *c, ++extern int cupsdDeletePrinterFromClass(cupsd_printer_t *c, + cupsd_printer_t *p); +-extern void cupsdDeletePrinterFromClasses(cupsd_printer_t *p); ++extern int cupsdDeletePrinterFromClasses(cupsd_printer_t *p); + extern cupsd_printer_t *cupsdFindAvailablePrinter(const char *name); + extern cupsd_printer_t *cupsdFindClass(const char *name); + extern void cupsdLoadAllClasses(void); +diff -up cups-1.4.2/scheduler/ipp.c.str3505 cups-1.4.2/scheduler/ipp.c +--- cups-1.4.2/scheduler/ipp.c.str3505 2010-02-23 11:42:12.713386792 +0000 ++++ cups-1.4.2/scheduler/ipp.c 2010-02-23 11:43:06.025262343 +0000 +@@ -6451,7 +6451,9 @@ delete_printer(cupsd_client_t *con, /* + cupsdLogMessage(CUPSD_LOG_INFO, "Printer \"%s\" deleted by \"%s\".", + printer->name, get_username(con)); + +- cupsdDeletePrinter(printer, 0); ++ if (cupsdDeletePrinter(printer, 0)) ++ cupsdMarkDirty(CUPSD_DIRTY_CLASSES); ++ + cupsdMarkDirty(CUPSD_DIRTY_PRINTERS); + } + +diff -up cups-1.4.2/scheduler/printers.c.str3505 cups-1.4.2/scheduler/printers.c +--- cups-1.4.2/scheduler/printers.c.str3505 2010-02-23 11:42:12.223386167 +0000 ++++ cups-1.4.2/scheduler/printers.c 2010-02-23 11:43:06.030262135 +0000 +@@ -657,12 +657,13 @@ cupsdDeleteAllPrinters(void) + * 'cupsdDeletePrinter()' - Delete a printer from the system. + */ + +-void ++int /* O - 1 if classes affected, 0 otherwise */ + cupsdDeletePrinter( + cupsd_printer_t *p, /* I - Printer to delete */ + int update) /* I - Update printers.conf? */ + { +- int i; /* Looping var */ ++ int i, /* Looping var */ ++ changed = 0; /* Class changed? */ + #ifdef __sgi + char filename[1024]; /* Interface script filename */ + #endif /* __sgi */ +@@ -773,7 +774,7 @@ cupsdDeletePrinter( + + if (!(p->type & CUPS_PRINTER_IMPLICIT)) + { +- cupsdDeletePrinterFromClasses(p); ++ changed = cupsdDeletePrinterFromClasses(p); + + /* + * Deregister from any browse protocols... +@@ -854,6 +855,8 @@ cupsdDeletePrinter( + */ + + cupsArrayRestore(Printers); ++ ++ return (changed); + } + + +diff -up cups-1.4.2/scheduler/printers.h.str3505 cups-1.4.2/scheduler/printers.h +--- cups-1.4.2/scheduler/printers.h.str3505 2009-06-25 18:07:26.000000000 +0100 ++++ cups-1.4.2/scheduler/printers.h 2010-02-23 11:43:06.032262357 +0000 +@@ -141,7 +141,7 @@ extern void cupsdAddPrinterUser(cupsd_p + const char *username); + extern void cupsdCreateCommonData(void); + extern void cupsdDeleteAllPrinters(void); +-extern void cupsdDeletePrinter(cupsd_printer_t *p, int update); ++extern int cupsdDeletePrinter(cupsd_printer_t *p, int update); + extern cupsd_printer_t *cupsdFindDest(const char *name); + extern cupsd_printer_t *cupsdFindPrinter(const char *name); + extern cupsd_quota_t *cupsdFindQuota(cupsd_printer_t *p, diff --git a/cups.spec b/cups.spec index 72058d1..0718fe3 100644 --- a/cups.spec +++ b/cups.spec @@ -8,7 +8,7 @@ Summary: Common Unix Printing System Name: cups Version: 1.4.2 -Release: 24%{?dist} +Release: 25%{?dist} License: GPLv2 Group: System Environment/Daemons Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2 @@ -77,6 +77,7 @@ Patch50: cups-str3458.patch Patch51: cups-0755.patch Patch52: cups-str3460.patch Patch53: cups-EAI_AGAIN.patch +Patch54: cups-str3505.patch Patch100: cups-lspp.patch @@ -260,6 +261,7 @@ module. %patch51 -p1 -b .0755 %patch52 -p1 -b .str3460 %patch53 -p1 -b .EAI_AGAIN +%patch54 -p1 -b .str3505 %if %lspp %patch100 -p1 -b .lspp @@ -558,6 +560,10 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog +* Tue Feb 23 2010 Tim Waugh - 1:1.4.2-25 +- Update classes.conf when a class member printer is deleted + (bug #565878, STR #3505). + * Tue Feb 23 2010 Tim Waugh - 1:1.4.2-24 - Re-initialize the resolver if getnameinfo() returns EAI_AGAIN (bug #567353). From cd761df616046dfdf300503ee9cf4958ac681c4f Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Tue, 23 Feb 2010 12:25:38 +0000 Subject: [PATCH 058/110] - Update classes.conf when a class member printer is deleted (bug #565878, STR #3505). --- cups-str3505.patch | 158 +++++++++++++++++++++++++++++++++++++++++++++ cups.spec | 8 ++- 2 files changed, 165 insertions(+), 1 deletion(-) create mode 100644 cups-str3505.patch diff --git a/cups-str3505.patch b/cups-str3505.patch new file mode 100644 index 0000000..95b6918 --- /dev/null +++ b/cups-str3505.patch @@ -0,0 +1,158 @@ +diff -up cups-1.4.2/scheduler/classes.c.str3505 cups-1.4.2/scheduler/classes.c +--- cups-1.4.2/scheduler/classes.c.str3505 2009-10-07 19:16:09.000000000 +0100 ++++ cups-1.4.2/scheduler/classes.c 2010-02-23 11:43:06.033263862 +0000 +@@ -3,7 +3,7 @@ + * + * Printer class routines for the Common UNIX Printing System (CUPS). + * +- * Copyright 2007-2009 by Apple Inc. ++ * Copyright 2007-2010 by Apple Inc. + * Copyright 1997-2007 by Easy Software Products, all rights reserved. + * + * These coded instructions, statements, and computer programs are the +@@ -117,7 +117,7 @@ cupsdAddPrinterToClass( + * 'cupsdDeletePrinterFromClass()' - Delete a printer from a class. + */ + +-void ++int /* O - 1 if class changed, 0 otherwise */ + cupsdDeletePrinterFromClass( + cupsd_printer_t *c, /* I - Class to delete from */ + cupsd_printer_t *p) /* I - Printer to delete */ +@@ -149,13 +149,15 @@ cupsdDeletePrinterFromClass( + (c->num_printers - i) * sizeof(cupsd_printer_t *)); + } + else +- return; ++ return (0); + + /* + * Update the IPP attributes (have to do this for member-names)... + */ + + cupsdSetPrinterAttrs(c); ++ ++ return (1); + } + + +@@ -163,10 +165,11 @@ cupsdDeletePrinterFromClass( + * 'cupsdDeletePrinterFromClasses()' - Delete a printer from all classes. + */ + +-void ++int /* O - 1 if class changed, 0 otherwise */ + cupsdDeletePrinterFromClasses( + cupsd_printer_t *p) /* I - Printer to delete */ + { ++ int changed = 0; /* Any class changed? */ + cupsd_printer_t *c; /* Pointer to current class */ + + +@@ -179,7 +182,7 @@ cupsdDeletePrinterFromClasses( + c; + c = (cupsd_printer_t *)cupsArrayNext(Printers)) + if (c->type & (CUPS_PRINTER_CLASS | CUPS_PRINTER_IMPLICIT)) +- cupsdDeletePrinterFromClass(c, p); ++ changed |= cupsdDeletePrinterFromClass(c, p); + + /* + * Then clean out any empty implicit classes... +@@ -193,7 +196,10 @@ cupsdDeletePrinterFromClasses( + cupsdLogMessage(CUPSD_LOG_DEBUG, "Deleting implicit class \"%s\"...", + c->name); + cupsdDeletePrinter(c, 0); ++ changed = 1; + } ++ ++ return (changed); + } + + +diff -up cups-1.4.2/scheduler/classes.h.str3505 cups-1.4.2/scheduler/classes.h +--- cups-1.4.2/scheduler/classes.h.str3505 2008-09-19 21:03:36.000000000 +0100 ++++ cups-1.4.2/scheduler/classes.h 2010-02-23 11:43:06.012262825 +0000 +@@ -3,7 +3,7 @@ + * + * Printer class definitions for the Common UNIX Printing System (CUPS). + * +- * Copyright 2007-2008 by Apple Inc. ++ * Copyright 2007-2010 by Apple Inc. + * Copyright 1997-2005 by Easy Software Products, all rights reserved. + * + * These coded instructions, statements, and computer programs are the +@@ -21,9 +21,9 @@ + extern cupsd_printer_t *cupsdAddClass(const char *name); + extern void cupsdAddPrinterToClass(cupsd_printer_t *c, + cupsd_printer_t *p); +-extern void cupsdDeletePrinterFromClass(cupsd_printer_t *c, ++extern int cupsdDeletePrinterFromClass(cupsd_printer_t *c, + cupsd_printer_t *p); +-extern void cupsdDeletePrinterFromClasses(cupsd_printer_t *p); ++extern int cupsdDeletePrinterFromClasses(cupsd_printer_t *p); + extern cupsd_printer_t *cupsdFindAvailablePrinter(const char *name); + extern cupsd_printer_t *cupsdFindClass(const char *name); + extern void cupsdLoadAllClasses(void); +diff -up cups-1.4.2/scheduler/ipp.c.str3505 cups-1.4.2/scheduler/ipp.c +--- cups-1.4.2/scheduler/ipp.c.str3505 2010-02-23 11:42:12.713386792 +0000 ++++ cups-1.4.2/scheduler/ipp.c 2010-02-23 11:43:06.025262343 +0000 +@@ -6451,7 +6451,9 @@ delete_printer(cupsd_client_t *con, /* + cupsdLogMessage(CUPSD_LOG_INFO, "Printer \"%s\" deleted by \"%s\".", + printer->name, get_username(con)); + +- cupsdDeletePrinter(printer, 0); ++ if (cupsdDeletePrinter(printer, 0)) ++ cupsdMarkDirty(CUPSD_DIRTY_CLASSES); ++ + cupsdMarkDirty(CUPSD_DIRTY_PRINTERS); + } + +diff -up cups-1.4.2/scheduler/printers.c.str3505 cups-1.4.2/scheduler/printers.c +--- cups-1.4.2/scheduler/printers.c.str3505 2010-02-23 11:42:12.223386167 +0000 ++++ cups-1.4.2/scheduler/printers.c 2010-02-23 11:43:06.030262135 +0000 +@@ -657,12 +657,13 @@ cupsdDeleteAllPrinters(void) + * 'cupsdDeletePrinter()' - Delete a printer from the system. + */ + +-void ++int /* O - 1 if classes affected, 0 otherwise */ + cupsdDeletePrinter( + cupsd_printer_t *p, /* I - Printer to delete */ + int update) /* I - Update printers.conf? */ + { +- int i; /* Looping var */ ++ int i, /* Looping var */ ++ changed = 0; /* Class changed? */ + #ifdef __sgi + char filename[1024]; /* Interface script filename */ + #endif /* __sgi */ +@@ -773,7 +774,7 @@ cupsdDeletePrinter( + + if (!(p->type & CUPS_PRINTER_IMPLICIT)) + { +- cupsdDeletePrinterFromClasses(p); ++ changed = cupsdDeletePrinterFromClasses(p); + + /* + * Deregister from any browse protocols... +@@ -854,6 +855,8 @@ cupsdDeletePrinter( + */ + + cupsArrayRestore(Printers); ++ ++ return (changed); + } + + +diff -up cups-1.4.2/scheduler/printers.h.str3505 cups-1.4.2/scheduler/printers.h +--- cups-1.4.2/scheduler/printers.h.str3505 2009-06-25 18:07:26.000000000 +0100 ++++ cups-1.4.2/scheduler/printers.h 2010-02-23 11:43:06.032262357 +0000 +@@ -141,7 +141,7 @@ extern void cupsdAddPrinterUser(cupsd_p + const char *username); + extern void cupsdCreateCommonData(void); + extern void cupsdDeleteAllPrinters(void); +-extern void cupsdDeletePrinter(cupsd_printer_t *p, int update); ++extern int cupsdDeletePrinter(cupsd_printer_t *p, int update); + extern cupsd_printer_t *cupsdFindDest(const char *name); + extern cupsd_printer_t *cupsdFindPrinter(const char *name); + extern cupsd_quota_t *cupsdFindQuota(cupsd_printer_t *p, diff --git a/cups.spec b/cups.spec index 0203f39..e0dc638 100644 --- a/cups.spec +++ b/cups.spec @@ -8,7 +8,7 @@ Summary: Common Unix Printing System Name: cups Version: 1.4.2 -Release: 30%{?dist} +Release: 31%{?dist} License: GPLv2 Group: System Environment/Daemons Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2 @@ -75,6 +75,7 @@ Patch50: cups-str3458.patch Patch51: cups-0755.patch Patch52: cups-str3460.patch Patch53: cups-EAI_AGAIN.patch +Patch54: cups-str3505.patch Patch100: cups-lspp.patch @@ -264,6 +265,7 @@ module. %patch51 -p1 -b .0755 %patch52 -p1 -b .str3460 %patch53 -p1 -b .EAI_AGAIN +%patch54 -p1 -b .str3505 %if %lspp %patch100 -p1 -b .lspp @@ -554,6 +556,10 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog +* Tue Feb 23 2010 Tim Waugh - 1:1.4.2-31 +- Update classes.conf when a class member printer is deleted + (bug #565878, STR #3505). + * Tue Feb 23 2010 Tim Waugh - 1:1.4.2-30 - Re-initialize the resolver if getnameinfo() returns EAI_AGAIN (bug #567353). From 31a27f2ac2b4a5bcb973abd9f0d8b14f4cd28c8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Popelka?= Date: Wed, 24 Feb 2010 11:10:34 +0000 Subject: [PATCH 059/110] - Fixed cupsGetNamedDest() so it falls back to the real default printer when a default from configuration file does not exist (bug #565569, STR #3503). --- cups-str3285_v2.patch => cups-str3285_v2-str3503.patch | 2 +- cups.spec | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) rename cups-str3285_v2.patch => cups-str3285_v2-str3503.patch (85%) diff --git a/cups-str3285_v2.patch b/cups-str3285_v2-str3503.patch similarity index 85% rename from cups-str3285_v2.patch rename to cups-str3285_v2-str3503.patch index d447e68..35b6002 100644 --- a/cups-str3285_v2.patch +++ b/cups-str3285_v2-str3503.patch @@ -6,7 +6,7 @@ diff -up cups-1.4.1/cups/dest.c.str3285 cups-1.4.1/cups/dest.c if (!cups_get_sdests(http, op, name, 0, &dest)) { - if (op == CUPS_GET_DEFAULT) -+ if (op == CUPS_GET_DEFAULT || name) ++ if (op == CUPS_GET_DEFAULT || (name && !set_as_default)) return (NULL); /* diff --git a/cups.spec b/cups.spec index e0dc638..fdf23e3 100644 --- a/cups.spec +++ b/cups.spec @@ -8,7 +8,7 @@ Summary: Common Unix Printing System Name: cups Version: 1.4.2 -Release: 31%{?dist} +Release: 32%{?dist} License: GPLv2 Group: System Environment/Daemons Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2 @@ -48,7 +48,7 @@ Patch23: cups-uri-compat.patch Patch24: cups-cups-get-classes.patch Patch25: cups-avahi.patch Patch26: cups-str3382.patch -Patch27: cups-str3285_v2.patch +Patch27: cups-str3285_v2-str3503.patch Patch28: cups-str3390.patch Patch29: cups-str3391.patch Patch30: cups-str3381.patch @@ -238,7 +238,7 @@ module. %patch24 -p1 -b .cups-get-classes %patch25 -p1 -b .avahi %patch26 -p1 -b .str3382 -%patch27 -p1 -b .str3285_v2 +%patch27 -p1 -b .str3285_v2-str3503 %patch28 -p1 -b .str3390 %patch29 -p1 -b .str3391 %patch30 -p1 -b .str3381 @@ -556,6 +556,10 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog +* Wed Feb 24 2010 Jiri Popelka 1:1.4.2-32 +- Fixed cupsGetNamedDest() so it falls back to the real default + printer when a default from configuration file does not exist (bug #565569, STR #3503). + * Tue Feb 23 2010 Tim Waugh - 1:1.4.2-31 - Update classes.conf when a class member printer is deleted (bug #565878, STR #3505). From 5bcbe0d10232add012408c99891518ac84014e19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Popelka?= Date: Wed, 24 Feb 2010 11:10:48 +0000 Subject: [PATCH 060/110] - Fixed cupsGetNamedDest() so it falls back to the real default printer when a default from configuration file does not exist (bug #565569, STR #3503). --- cups-str3285_v2.patch => cups-str3285_v2-str3503.patch | 2 +- cups.spec | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) rename cups-str3285_v2.patch => cups-str3285_v2-str3503.patch (85%) diff --git a/cups-str3285_v2.patch b/cups-str3285_v2-str3503.patch similarity index 85% rename from cups-str3285_v2.patch rename to cups-str3285_v2-str3503.patch index d447e68..35b6002 100644 --- a/cups-str3285_v2.patch +++ b/cups-str3285_v2-str3503.patch @@ -6,7 +6,7 @@ diff -up cups-1.4.1/cups/dest.c.str3285 cups-1.4.1/cups/dest.c if (!cups_get_sdests(http, op, name, 0, &dest)) { - if (op == CUPS_GET_DEFAULT) -+ if (op == CUPS_GET_DEFAULT || name) ++ if (op == CUPS_GET_DEFAULT || (name && !set_as_default)) return (NULL); /* diff --git a/cups.spec b/cups.spec index 0718fe3..91d33ed 100644 --- a/cups.spec +++ b/cups.spec @@ -8,7 +8,7 @@ Summary: Common Unix Printing System Name: cups Version: 1.4.2 -Release: 25%{?dist} +Release: 26%{?dist} License: GPLv2 Group: System Environment/Daemons Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2 @@ -50,7 +50,7 @@ Patch23: cups-uri-compat.patch Patch24: cups-cups-get-classes.patch Patch25: cups-avahi.patch Patch26: cups-str3382.patch -Patch27: cups-str3285_v2.patch +Patch27: cups-str3285_v2-str3503.patch Patch28: cups-str3390.patch Patch29: cups-str3391.patch Patch30: cups-str3381.patch @@ -234,7 +234,7 @@ module. %patch24 -p1 -b .cups-get-classes %patch25 -p1 -b .avahi %patch26 -p1 -b .str3382 -%patch27 -p1 -b .str3285_v2 +%patch27 -p1 -b .str3285_v2-str3503 %patch28 -p1 -b .str3390 %patch29 -p1 -b .str3391 %patch30 -p1 -b .str3381 @@ -560,6 +560,10 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog +* Wed Feb 24 2010 Jiri Popelka 1:1.4.2-26 +- Fixed cupsGetNamedDest() so it falls back to the real default + printer when a default from configuration file does not exist (bug #565569, STR #3503). + * Tue Feb 23 2010 Tim Waugh - 1:1.4.2-25 - Update classes.conf when a class member printer is deleted (bug #565878, STR #3505). From 318108a6c9b60a9298d163615e7e7b3a6e9276fe Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Tue, 2 Mar 2010 11:26:45 +0000 Subject: [PATCH 061/110] - Don't treat SIGPIPE as an error (bug #569770). --- cups-str3399.patch | 24 ++++++++++++++++++++++++ cups.spec | 5 ++++- 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/cups-str3399.patch b/cups-str3399.patch index 161942d..05552e4 100644 --- a/cups-str3399.patch +++ b/cups-str3399.patch @@ -22,3 +22,27 @@ diff -up cups-1.4.2/scheduler/process.c.str3399 cups-1.4.2/scheduler/process.c #endif /* HAVE_SIGSET */ cupsdReleaseSignals(); +--- cups-1.4.2/scheduler/main.c.str3399 2010-03-02 11:04:28.968100478 +0000 ++++ cups-1.4.2/scheduler/main.c 2010-03-02 11:04:47.442226409 +0000 +@@ -1733,7 +1733,7 @@ process_children(void) + job->backend = -pid; + + if (status && status != SIGTERM && status != SIGKILL && +- job->status >= 0) ++ status != SIGPIPE && job->status >= 0) + { + /* + * An error occurred; save the exit status so we know to stop +@@ -1829,6 +1829,12 @@ process_children(void) + "PID %d (%s) was terminated normally with signal %d.", + pid, name, status); + } ++ else if (status == SIGPIPE) ++ { ++ cupsdLogMessage(CUPSD_LOG_DEBUG, ++ "PID %d (%s) did not catch or ignore signal %d.", ++ pid, name, status); ++ } + else if (status) + { + if (WIFEXITED(status)) diff --git a/cups.spec b/cups.spec index 91d33ed..066831f 100644 --- a/cups.spec +++ b/cups.spec @@ -8,7 +8,7 @@ Summary: Common Unix Printing System Name: cups Version: 1.4.2 -Release: 26%{?dist} +Release: 27%{?dist} License: GPLv2 Group: System Environment/Daemons Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2 @@ -560,6 +560,9 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog +* Tue Mar 2 2010 Tim Waugh - 1:1.4.2-27 +- Don't treat SIGPIPE as an error (bug #569770). + * Wed Feb 24 2010 Jiri Popelka 1:1.4.2-26 - Fixed cupsGetNamedDest() so it falls back to the real default printer when a default from configuration file does not exist (bug #565569, STR #3503). From 15fb91a094d42fc05e25c8ab20dd6820b46d6c6f Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Tue, 2 Mar 2010 11:34:08 +0000 Subject: [PATCH 062/110] - Don't treat SIGPIPE as an error (bug #569770). --- cups-str3399.patch | 24 ++++++++++++++++++++++++ cups.spec | 5 ++++- 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/cups-str3399.patch b/cups-str3399.patch index 161942d..05552e4 100644 --- a/cups-str3399.patch +++ b/cups-str3399.patch @@ -22,3 +22,27 @@ diff -up cups-1.4.2/scheduler/process.c.str3399 cups-1.4.2/scheduler/process.c #endif /* HAVE_SIGSET */ cupsdReleaseSignals(); +--- cups-1.4.2/scheduler/main.c.str3399 2010-03-02 11:04:28.968100478 +0000 ++++ cups-1.4.2/scheduler/main.c 2010-03-02 11:04:47.442226409 +0000 +@@ -1733,7 +1733,7 @@ process_children(void) + job->backend = -pid; + + if (status && status != SIGTERM && status != SIGKILL && +- job->status >= 0) ++ status != SIGPIPE && job->status >= 0) + { + /* + * An error occurred; save the exit status so we know to stop +@@ -1829,6 +1829,12 @@ process_children(void) + "PID %d (%s) was terminated normally with signal %d.", + pid, name, status); + } ++ else if (status == SIGPIPE) ++ { ++ cupsdLogMessage(CUPSD_LOG_DEBUG, ++ "PID %d (%s) did not catch or ignore signal %d.", ++ pid, name, status); ++ } + else if (status) + { + if (WIFEXITED(status)) diff --git a/cups.spec b/cups.spec index fdf23e3..6bf3dbe 100644 --- a/cups.spec +++ b/cups.spec @@ -8,7 +8,7 @@ Summary: Common Unix Printing System Name: cups Version: 1.4.2 -Release: 32%{?dist} +Release: 33%{?dist} License: GPLv2 Group: System Environment/Daemons Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2 @@ -556,6 +556,9 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog +* Tue Mar 2 2010 Tim Waugh - 1:1.4.2-33 +- Don't treat SIGPIPE as an error (bug #569770). + * Wed Feb 24 2010 Jiri Popelka 1:1.4.2-32 - Fixed cupsGetNamedDest() so it falls back to the real default printer when a default from configuration file does not exist (bug #565569, STR #3503). From 1088f4c341962cec220cfbf89ebd638bc2f20b1e Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Tue, 2 Mar 2010 12:05:10 +0000 Subject: [PATCH 063/110] - Don't apply gcrypt threading patch (bug #553834). --- cups.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cups.spec b/cups.spec index 066831f..ec546f0 100644 --- a/cups.spec +++ b/cups.spec @@ -256,7 +256,7 @@ module. %patch46 -p1 -b .str3425 %patch47 -p1 -b .str3428 %patch48 -p1 -b .str3431 -%patch49 -p1 -b .gnutls-gcrypt-threads +#%patch49 -p1 -b .gnutls-gcrypt-threads %patch50 -p1 -b .str3458 %patch51 -p1 -b .0755 %patch52 -p1 -b .str3460 @@ -561,6 +561,7 @@ rm -rf $RPM_BUILD_ROOT %changelog * Tue Mar 2 2010 Tim Waugh - 1:1.4.2-27 +- Don't apply gcrypt threading patch (bug #553834). - Don't treat SIGPIPE as an error (bug #569770). * Wed Feb 24 2010 Jiri Popelka 1:1.4.2-26 From 8bd997d1d77cb09a6d75c4f963fc9d4cd5ba903f Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Tue, 2 Mar 2010 12:05:39 +0000 Subject: [PATCH 064/110] - Don't apply gcrypt threading patch (bug #553834). --- cups.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cups.spec b/cups.spec index 6bf3dbe..b668760 100644 --- a/cups.spec +++ b/cups.spec @@ -260,7 +260,7 @@ module. %patch46 -p1 -b .str3425 %patch47 -p1 -b .str3428 %patch48 -p1 -b .str3431 -%patch49 -p1 -b .gnutls-gcrypt-threads +#%patch49 -p1 -b .gnutls-gcrypt-threads %patch50 -p1 -b .str3458 %patch51 -p1 -b .0755 %patch52 -p1 -b .str3460 @@ -557,6 +557,7 @@ rm -rf $RPM_BUILD_ROOT %changelog * Tue Mar 2 2010 Tim Waugh - 1:1.4.2-33 +- Don't apply gcrypt threading patch (bug #553834). - Don't treat SIGPIPE as an error (bug #569770). * Wed Feb 24 2010 Jiri Popelka 1:1.4.2-32 From 1df432890ccb52d944b4ef8a6f4aff9b51fdbf76 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Tue, 2 Mar 2010 12:59:48 +0000 Subject: [PATCH 065/110] - Don't own filesystem locale directories (bug #569403). --- cups.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cups.spec b/cups.spec index ec546f0..ff07b71 100644 --- a/cups.spec +++ b/cups.spec @@ -520,7 +520,7 @@ rm -rf $RPM_BUILD_ROOT %config(noreplace) %{_datadir}/cups/templates/ja/*.tmpl %config(noreplace) %{_datadir}/cups/templates/pl/*.tmpl %config(noreplace) %{_datadir}/cups/templates/ru/*.tmpl -%{_datadir}/locale/* +%{_datadir}/locale/*/*.po %{_datadir}/ppd %dir %attr(1770,root,lp) /var/spool/cups/tmp %dir %attr(0710,root,lp) /var/spool/cups @@ -561,6 +561,7 @@ rm -rf $RPM_BUILD_ROOT %changelog * Tue Mar 2 2010 Tim Waugh - 1:1.4.2-27 +- Don't own filesystem locale directories (bug #569403). - Don't apply gcrypt threading patch (bug #553834). - Don't treat SIGPIPE as an error (bug #569770). From 54c6c8e3cf3e90a72cabbb431fb5e3b6efd70959 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Tue, 2 Mar 2010 13:00:03 +0000 Subject: [PATCH 066/110] - Don't own filesystem locale directories (bug #569403). --- cups.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cups.spec b/cups.spec index b668760..19dc944 100644 --- a/cups.spec +++ b/cups.spec @@ -516,7 +516,7 @@ rm -rf $RPM_BUILD_ROOT %config(noreplace) %{_datadir}/cups/templates/ja/*.tmpl %config(noreplace) %{_datadir}/cups/templates/pl/*.tmpl %config(noreplace) %{_datadir}/cups/templates/ru/*.tmpl -%{_datadir}/locale/* +%{_datadir}/locale/*/*.po %{_datadir}/ppd %dir %attr(1770,root,lp) /var/spool/cups/tmp %dir %attr(0710,root,lp) /var/spool/cups @@ -557,6 +557,7 @@ rm -rf $RPM_BUILD_ROOT %changelog * Tue Mar 2 2010 Tim Waugh - 1:1.4.2-33 +- Don't own filesystem locale directories (bug #569403). - Don't apply gcrypt threading patch (bug #553834). - Don't treat SIGPIPE as an error (bug #569770). From c5bb55a14b36c4eb97c11676130db3c95ddffb44 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Tue, 2 Mar 2010 16:45:28 +0000 Subject: [PATCH 067/110] - Added comments for all sources and patches. --- cups.spec | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/cups.spec b/cups.spec index 19dc944..5db275b 100644 --- a/cups.spec +++ b/cups.spec @@ -12,14 +12,23 @@ Release: 33%{?dist} License: GPLv2 Group: System Environment/Daemons Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2 +# Our initscript Source1: cups.init +# Pixmap for desktop file Source2: cupsprinter.png +# udev rules for libusb devices Source3: cups-libusb.rules +# LSPP-required ps->pdf filter Source4: pstopdf +# xinetd config file for cups-lpd service Source5: cups-lpd +# Logrotate configuration Source6: cups.logrotate +# Backend for NCP protocol Source7: ncp.backend +# Cron-based tmpwatch for /var/spool/cups/tmp Source8: cups.cron +# Filter and PPD for textonly printing Source9: textonly.filter Source10: textonly.ppd Patch1: cups-no-gzip-man.patch @@ -212,59 +221,113 @@ module. %prep %setup -q +# Don't gzip man pages in the Makefile, let rpmbuild do it. %patch1 -p1 -b .no-gzip-man +# Use the system pam configuration. %patch2 -p1 -b .system-auth +# Prevent multilib conflict in cups-config script. %patch3 -p1 -b .multilib +# Fix compilation of serial backend. %patch4 -p1 -b .serial +# Ignore rpm save/new files in the banners directory. %patch5 -p1 -b .banners +# Use compatibility fallback path for ServerBin. %patch6 -p1 -b .serverbin-compat +# Don't export SSLLIBS to cups-config. %patch7 -p1 -b .no-export-ssllibs +# Avoid use-after-free in cupsAddDest. %patch8 -p1 -b .str3448 +# Allow file-based usb device URIs. %patch9 -p1 -b .direct-usb +# Add --help option to lpr. %patch10 -p1 -b .lpr-help +# Fix compilation of peer credentials support. %patch11 -p1 -b .peercred +# Maintain a cupsd.pid file. %patch12 -p1 -b .pid +# Fix orientation of page labels. %patch13 -p1 -b .page-label +# Fix implementation of com.redhat.PrinterSpooler D-Bus object. %patch14 -p1 -b .eggcups +# More sophisticated implementation of cupsGetPassword than getpass. %patch15 -p1 -b .getpass +# Increase driverd timeout to 70s to accommodate foomatic. %patch16 -p1 -b .driverd-timeout +# Only enforce maximum PPD line length when in strict mode. %patch17 -p1 -b .strict-ppd-line-length +# Re-open the log if it has been logrotated under us. %patch18 -p1 -b .logrotate +# Support for errno==ENOSPACE-based USB paper-out reporting. %patch19 -p1 -b .usb-paperout +# Simplify the DNSSD parts so they can build using the compat library. %patch20 -p1 -b .build +# Re-initialise the resolver on failure in httpAddrGetList(). %patch21 -p1 -b .res_init +# Log extra debugging information if no filters are available. %patch22 -p1 -b .filter-debug +# Allow the usb backend to understand old-style URI formats. %patch23 -p1 -b .uri-compat +# Fix support for older CUPS servers in cupsGetDests. %patch24 -p1 -b .cups-get-classes +# Avahi support in the dnssd backend. %patch25 -p1 -b .avahi +# Fix temporary filename creation. %patch26 -p1 -b .str3382 +# Fix cupsGetNamedDest() when a name is specified. %patch27 -p1 -b .str3285_v2-str3503 +# Set the PRINTER_IS_SHARED CGI variable. %patch28 -p1 -b .str3390 +# Set the CGI variables required by the serial backend. %patch29 -p1 -b .str3391 +# Fix signal handling when using gnutls. %patch30 -p1 -b .str3381 +# Reset SIGPIPE handler before starting child processes. %patch31 -p1 -b .str3399 +# Fixed typo in Russian translation of admin CGI page. %patch32 -p1 -b .str3403 +# Handle out-of-memory more gracefully when loading jobs. %patch33 -p1 -b .str3407 +# Set PPD_MAKE CGI variable. %patch34 -p1 -b .str3418 +# Fix use-after-free in select.c. %patch35 -p1 -b .CVE-2009-3553 +# Fix Russian translations of CGI pages. %patch36 -p1 -b .str3422 +# Fix SNMP handling. %patch37 -p1 -b .str3413 +# Fix adjustment of conflicting options in web interface. %patch38 -p1 -b .str3439 +# Show which option conflicts in web interface. %patch39 -p1 -b .str3440 +# Provide filter path for text/css. %patch40 -p1 -b .str3442 +# Fix SNMP handling with negative string lengths. %patch41 -p1 -b .negative-snmp-string-length +# Fix signal handling in the sidechannel API. %patch42 -p1 -b .sidechannel-intrs +# Stop network backends incorrectly clearing media-empty-warning. %patch43 -p1 -b .media-empty-warning +# Fixed authentication bug in cupsPrintFiles2. %patch44 -p1 -b .str3435 +# Set PRINTER_NAME and PRINTER_URI_SUPPORTED CGI variables. %patch45 -p1 -b .str3436 +# Clean out completed jobs when PreserveJobHistory is off. %patch46 -p1 -b .str3425 +# Don't add two job-name attributes to each job object. %patch47 -p1 -b .str3428 +# Use the Get-Job-Attributes policy for a printer. %patch48 -p1 -b .str3431 #%patch49 -p1 -b .gnutls-gcrypt-threads +# Fix IPP authentication for servers requiring auth for +# IPP-Get-Printer-Attributes. %patch50 -p1 -b .str3458 +# Use mode 0755 for binaries and libraries where appropriate. %patch51 -p1 -b .0755 +# Clear printer status after successful IPP job. %patch52 -p1 -b .str3460 +# Re-initialise the resolver on failure in httpAddrLookup(). %patch53 -p1 -b .EAI_AGAIN +# Update classes.conf when a class member printer is deleted %patch54 -p1 -b .str3505 %if %lspp @@ -556,6 +619,9 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog +* Tue Mar 2 2010 Tim Waugh +- Added comments for all sources and patches. + * Tue Mar 2 2010 Tim Waugh - 1:1.4.2-33 - Don't own filesystem locale directories (bug #569403). - Don't apply gcrypt threading patch (bug #553834). From 038e4fc995d772dae99dfd75a4fcb4db9fdf662f Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Fri, 5 Mar 2010 10:53:16 +0000 Subject: [PATCH 068/110] - Applied patch for CVE-2010-0302 (incomplete fix for CVE-2009-3553, bug #557775). --- cups-CVE-2010-0302.patch | 24 ++++++++++++++++++++++++ cups.spec | 8 +++++++- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 cups-CVE-2010-0302.patch diff --git a/cups-CVE-2010-0302.patch b/cups-CVE-2010-0302.patch new file mode 100644 index 0000000..63d2081 --- /dev/null +++ b/cups-CVE-2010-0302.patch @@ -0,0 +1,24 @@ +diff -up cups-1.4.2/scheduler/select.c.CVE-2010-0302 cups-1.4.2/scheduler/select.c +--- cups-1.4.2/scheduler/select.c.CVE-2010-0302 2010-03-05 10:37:49.990476887 +0000 ++++ cups-1.4.2/scheduler/select.c 2010-03-05 10:38:01.803478081 +0000 +@@ -454,7 +454,8 @@ cupsdDoSelect(long timeout) /* I - Time + if (fdptr->read_cb && event->filter == EVFILT_READ) + (*(fdptr->read_cb))(fdptr->data); + +- if (fdptr->use > 1 && fdptr->write_cb && event->filter == EVFILT_WRITE) ++ if (fdptr->use > 1 && fdptr->write_cb && event->filter == EVFILT_WRITE && ++ !cupsArrayFind(cupsd_inactive_fds, fdptr)) + (*(fdptr->write_cb))(fdptr->data); + + release_fd(fdptr); +@@ -499,7 +500,9 @@ cupsdDoSelect(long timeout) /* I - Time + if (fdptr->read_cb && (event->events & (EPOLLIN | EPOLLERR | EPOLLHUP))) + (*(fdptr->read_cb))(fdptr->data); + +- if (fdptr->use > 1 && fdptr->write_cb && (event->events & (EPOLLOUT | EPOLLERR | EPOLLHUP))) ++ if (fdptr->use > 1 && fdptr->write_cb && ++ (event->events & (EPOLLOUT | EPOLLERR | EPOLLHUP)) && ++ !cupsArrayFind(cupsd_inactive_fds, fdptr)) + (*(fdptr->write_cb))(fdptr->data); + + release_fd(fdptr); diff --git a/cups.spec b/cups.spec index ff07b71..6410ca7 100644 --- a/cups.spec +++ b/cups.spec @@ -8,7 +8,7 @@ Summary: Common Unix Printing System Name: cups Version: 1.4.2 -Release: 27%{?dist} +Release: 28%{?dist} License: GPLv2 Group: System Environment/Daemons Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2 @@ -82,6 +82,7 @@ Patch54: cups-str3505.patch Patch100: cups-lspp.patch ## SECURITY PATCHES: +Patch200: cups-CVE-2010-0302.patch Epoch: 1 @@ -268,6 +269,7 @@ module. %endif # SECURITY PATCHES: +%patch200 -p1 -b .CVE-2010-0302 sed -i -e '1iMaxLogSize 0' conf/cupsd.conf.in @@ -560,6 +562,10 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog +* Fri Mar 5 2010 Tim Waugh - 1:1.4.2-28 +- Applied patch for CVE-2010-0302 (incomplete fix for CVE-2009-3553, + bug #557775). + * Tue Mar 2 2010 Tim Waugh - 1:1.4.2-27 - Don't own filesystem locale directories (bug #569403). - Don't apply gcrypt threading patch (bug #553834). From 0a206ac418359a9971f46ed3b9d9dfdc0b905cb3 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Fri, 5 Mar 2010 10:54:21 +0000 Subject: [PATCH 069/110] - Applied patch for CVE-2010-0302 (incomplete fix for CVE-2009-3553, bug #557775). - Added comments for all sources and patches. --- cups-CVE-2010-0302.patch | 24 ++++++++++++++++++++++++ cups.spec | 11 +++++++++-- 2 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 cups-CVE-2010-0302.patch diff --git a/cups-CVE-2010-0302.patch b/cups-CVE-2010-0302.patch new file mode 100644 index 0000000..63d2081 --- /dev/null +++ b/cups-CVE-2010-0302.patch @@ -0,0 +1,24 @@ +diff -up cups-1.4.2/scheduler/select.c.CVE-2010-0302 cups-1.4.2/scheduler/select.c +--- cups-1.4.2/scheduler/select.c.CVE-2010-0302 2010-03-05 10:37:49.990476887 +0000 ++++ cups-1.4.2/scheduler/select.c 2010-03-05 10:38:01.803478081 +0000 +@@ -454,7 +454,8 @@ cupsdDoSelect(long timeout) /* I - Time + if (fdptr->read_cb && event->filter == EVFILT_READ) + (*(fdptr->read_cb))(fdptr->data); + +- if (fdptr->use > 1 && fdptr->write_cb && event->filter == EVFILT_WRITE) ++ if (fdptr->use > 1 && fdptr->write_cb && event->filter == EVFILT_WRITE && ++ !cupsArrayFind(cupsd_inactive_fds, fdptr)) + (*(fdptr->write_cb))(fdptr->data); + + release_fd(fdptr); +@@ -499,7 +500,9 @@ cupsdDoSelect(long timeout) /* I - Time + if (fdptr->read_cb && (event->events & (EPOLLIN | EPOLLERR | EPOLLHUP))) + (*(fdptr->read_cb))(fdptr->data); + +- if (fdptr->use > 1 && fdptr->write_cb && (event->events & (EPOLLOUT | EPOLLERR | EPOLLHUP))) ++ if (fdptr->use > 1 && fdptr->write_cb && ++ (event->events & (EPOLLOUT | EPOLLERR | EPOLLHUP)) && ++ !cupsArrayFind(cupsd_inactive_fds, fdptr)) + (*(fdptr->write_cb))(fdptr->data); + + release_fd(fdptr); diff --git a/cups.spec b/cups.spec index 5db275b..0b48ee0 100644 --- a/cups.spec +++ b/cups.spec @@ -8,7 +8,7 @@ Summary: Common Unix Printing System Name: cups Version: 1.4.2 -Release: 33%{?dist} +Release: 34%{?dist} License: GPLv2 Group: System Environment/Daemons Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2 @@ -85,6 +85,7 @@ Patch51: cups-0755.patch Patch52: cups-str3460.patch Patch53: cups-EAI_AGAIN.patch Patch54: cups-str3505.patch +Patch55: cups-CVE-2010-0302.patch Patch100: cups-lspp.patch @@ -329,8 +330,12 @@ module. %patch53 -p1 -b .EAI_AGAIN # Update classes.conf when a class member printer is deleted %patch54 -p1 -b .str3505 +# Applied patch for CVE-2010-0302 (incomplete fix for CVE-2009-3553, +# bug #557775). +%patch55 -p1 -b .CVE-2010-0302 %if %lspp +# LSPP support. %patch100 -p1 -b .lspp %endif @@ -619,7 +624,9 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog -* Tue Mar 2 2010 Tim Waugh +* Fri Mar 5 2010 Tim Waugh - 1:1.4.2-34 +- Applied patch for CVE-2010-0302 (incomplete fix for CVE-2009-3553, + bug #557775). - Added comments for all sources and patches. * Tue Mar 2 2010 Tim Waugh - 1:1.4.2-33 From 8ad09f27ece3a92bcc0b535f3ffe06179aeb4c60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Popelka?= Date: Wed, 10 Mar 2010 11:07:48 +0000 Subject: [PATCH 070/110] - Fixed (for the third time) patch for STR #3425 to correctly remove job info files in /var/spool/cups (bug #571830). --- cups-str3425.patch | 47 ++++++++++++++++++++++++++++++++++++---------- cups.spec | 6 +++++- 2 files changed, 42 insertions(+), 11 deletions(-) diff --git a/cups-str3425.patch b/cups-str3425.patch index ac56d59..98d2e44 100644 --- a/cups-str3425.patch +++ b/cups-str3425.patch @@ -1,6 +1,6 @@ diff -up cups-1.4.2/scheduler/job.c.str3425 cups-1.4.2/scheduler/job.c ---- cups-1.4.2/scheduler/job.c.str3425 2009-12-23 11:00:06.070056898 +0000 -+++ cups-1.4.2/scheduler/job.c 2009-12-23 11:02:22.889056232 +0000 +--- cups-1.4.2/scheduler/job.c.str3425 2010-03-09 16:59:12.000000000 +0100 ++++ cups-1.4.2/scheduler/job.c 2010-03-09 17:02:57.000000000 +0100 @@ -253,7 +253,7 @@ cupsdCancelJobs(const char *dest, /* I - if (purge) cupsdSetJobState(job, IPP_JOB_CANCELED, CUPSD_JOB_PURGE, @@ -24,27 +24,54 @@ diff -up cups-1.4.2/scheduler/job.c.str3425 cups-1.4.2/scheduler/job.c job = (cupsd_job_t *)cupsArrayNext(Jobs)) if (job->state_value >= IPP_JOB_CANCELED && !job->printer) cupsdDeleteJob(job, CUPSD_JOB_PURGE); -@@ -2498,8 +2498,6 @@ cupsdSetJobState( - job->dirty = 1; +@@ -2286,12 +2286,14 @@ cupsdSetJobState( + if (!cupsdLoadJob(job)) + return; + +- /* +- * Don't do anything if the state is unchanged... +- */ +- +- if (newstate == (oldstate = job->state_value)) +- return; ++ /* ++ * Don't do anything if the state is unchanged and we aren't purging the ++ * job... ++ */ ++ ++ oldstate = job->state_value; ++ if (newstate == oldstate && action != CUPSD_JOB_PURGE) ++ return; + + /* + * Stop any processes that are working on the current job... +@@ -2499,7 +2501,14 @@ cupsdSetJobState( cupsdMarkDirty(CUPSD_DIRTY_JOBS); } -- else if (!job->printer) -- cupsdDeleteJob(job, CUPSD_JOB_PURGE); + else if (!job->printer) ++ { ++ /* ++ * Delete the job immediately if not actively printing... ++ */ ++ + cupsdDeleteJob(job, CUPSD_JOB_PURGE); ++ job = NULL; ++ } break; } -@@ -2507,7 +2505,7 @@ cupsdSetJobState( +@@ -2507,7 +2516,7 @@ cupsdSetJobState( * Finalize the job immediately if we forced things... */ - if (action == CUPSD_JOB_FORCE) -+ if (action >= CUPSD_JOB_FORCE && job->printer) ++ if (action >= CUPSD_JOB_FORCE && job && job->printer) finalize_job(job); /* diff -up cups-1.4.2/scheduler/main.c.str3425 cups-1.4.2/scheduler/main.c ---- cups-1.4.2/scheduler/main.c.str3425 2009-12-23 11:00:05.687056970 +0000 -+++ cups-1.4.2/scheduler/main.c 2009-12-23 11:00:06.156057773 +0000 +--- cups-1.4.2/scheduler/main.c.str3425 2010-03-09 16:59:12.000000000 +0100 ++++ cups-1.4.2/scheduler/main.c 2010-03-09 16:59:12.000000000 +0100 @@ -389,7 +389,7 @@ main(int argc, /* I - Number of comm * parent's file descriptors to be blocking. This is a workaround for a * limitation of userland libpthread on OpenBSD. diff --git a/cups.spec b/cups.spec index 6410ca7..71ab1cb 100644 --- a/cups.spec +++ b/cups.spec @@ -8,7 +8,7 @@ Summary: Common Unix Printing System Name: cups Version: 1.4.2 -Release: 28%{?dist} +Release: 29%{?dist} License: GPLv2 Group: System Environment/Daemons Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2 @@ -562,6 +562,10 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog +* Wed Mar 10 2010 Jiri Popelka 1:1.4.2-29 +- Fixed (for the third time) patch for STR #3425 to correctly + remove job info files in /var/spool/cups (bug #571830). + * Fri Mar 5 2010 Tim Waugh - 1:1.4.2-28 - Applied patch for CVE-2010-0302 (incomplete fix for CVE-2009-3553, bug #557775). From 6484bf8fdee2a408adb43b0d25f4fede3102096f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Popelka?= Date: Wed, 10 Mar 2010 11:08:02 +0000 Subject: [PATCH 071/110] - Fixed (for the third time) patch for STR #3425 to correctly remove job info files in /var/spool/cups (bug #571830). --- cups-str3425.patch | 47 ++++++++++++++++++++++++++++++++++++---------- cups.spec | 6 +++++- 2 files changed, 42 insertions(+), 11 deletions(-) diff --git a/cups-str3425.patch b/cups-str3425.patch index ac56d59..98d2e44 100644 --- a/cups-str3425.patch +++ b/cups-str3425.patch @@ -1,6 +1,6 @@ diff -up cups-1.4.2/scheduler/job.c.str3425 cups-1.4.2/scheduler/job.c ---- cups-1.4.2/scheduler/job.c.str3425 2009-12-23 11:00:06.070056898 +0000 -+++ cups-1.4.2/scheduler/job.c 2009-12-23 11:02:22.889056232 +0000 +--- cups-1.4.2/scheduler/job.c.str3425 2010-03-09 16:59:12.000000000 +0100 ++++ cups-1.4.2/scheduler/job.c 2010-03-09 17:02:57.000000000 +0100 @@ -253,7 +253,7 @@ cupsdCancelJobs(const char *dest, /* I - if (purge) cupsdSetJobState(job, IPP_JOB_CANCELED, CUPSD_JOB_PURGE, @@ -24,27 +24,54 @@ diff -up cups-1.4.2/scheduler/job.c.str3425 cups-1.4.2/scheduler/job.c job = (cupsd_job_t *)cupsArrayNext(Jobs)) if (job->state_value >= IPP_JOB_CANCELED && !job->printer) cupsdDeleteJob(job, CUPSD_JOB_PURGE); -@@ -2498,8 +2498,6 @@ cupsdSetJobState( - job->dirty = 1; +@@ -2286,12 +2286,14 @@ cupsdSetJobState( + if (!cupsdLoadJob(job)) + return; + +- /* +- * Don't do anything if the state is unchanged... +- */ +- +- if (newstate == (oldstate = job->state_value)) +- return; ++ /* ++ * Don't do anything if the state is unchanged and we aren't purging the ++ * job... ++ */ ++ ++ oldstate = job->state_value; ++ if (newstate == oldstate && action != CUPSD_JOB_PURGE) ++ return; + + /* + * Stop any processes that are working on the current job... +@@ -2499,7 +2501,14 @@ cupsdSetJobState( cupsdMarkDirty(CUPSD_DIRTY_JOBS); } -- else if (!job->printer) -- cupsdDeleteJob(job, CUPSD_JOB_PURGE); + else if (!job->printer) ++ { ++ /* ++ * Delete the job immediately if not actively printing... ++ */ ++ + cupsdDeleteJob(job, CUPSD_JOB_PURGE); ++ job = NULL; ++ } break; } -@@ -2507,7 +2505,7 @@ cupsdSetJobState( +@@ -2507,7 +2516,7 @@ cupsdSetJobState( * Finalize the job immediately if we forced things... */ - if (action == CUPSD_JOB_FORCE) -+ if (action >= CUPSD_JOB_FORCE && job->printer) ++ if (action >= CUPSD_JOB_FORCE && job && job->printer) finalize_job(job); /* diff -up cups-1.4.2/scheduler/main.c.str3425 cups-1.4.2/scheduler/main.c ---- cups-1.4.2/scheduler/main.c.str3425 2009-12-23 11:00:05.687056970 +0000 -+++ cups-1.4.2/scheduler/main.c 2009-12-23 11:00:06.156057773 +0000 +--- cups-1.4.2/scheduler/main.c.str3425 2010-03-09 16:59:12.000000000 +0100 ++++ cups-1.4.2/scheduler/main.c 2010-03-09 16:59:12.000000000 +0100 @@ -389,7 +389,7 @@ main(int argc, /* I - Number of comm * parent's file descriptors to be blocking. This is a workaround for a * limitation of userland libpthread on OpenBSD. diff --git a/cups.spec b/cups.spec index 0b48ee0..8a04a88 100644 --- a/cups.spec +++ b/cups.spec @@ -8,7 +8,7 @@ Summary: Common Unix Printing System Name: cups Version: 1.4.2 -Release: 34%{?dist} +Release: 35%{?dist} License: GPLv2 Group: System Environment/Daemons Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2 @@ -624,6 +624,10 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog +* Wed Mar 10 2010 Jiri Popelka 1:1.4.2-35 +- Fixed (for the third time) patch for STR #3425 to correctly + remove job info files in /var/spool/cups (bug #571830). + * Fri Mar 5 2010 Tim Waugh - 1:1.4.2-34 - Applied patch for CVE-2010-0302 (incomplete fix for CVE-2009-3553, bug #557775). From 64dde71a307efd82c54752e0990fa61eec2354da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Popelka?= Date: Tue, 30 Mar 2010 16:39:21 +0000 Subject: [PATCH 072/110] - Fixed lpstat to adhere to -o option (bug #577901, STR #3541). --- cups-str3541.patch | 17 +++++++++++++++++ cups.spec | 7 ++++++- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 cups-str3541.patch diff --git a/cups-str3541.patch b/cups-str3541.patch new file mode 100644 index 0000000..49ed2e6 --- /dev/null +++ b/cups-str3541.patch @@ -0,0 +1,17 @@ +diff -up cups-1.4.2/systemv/lpstat.c.str3541 cups-1.4.2/systemv/lpstat.c +--- cups-1.4.2/systemv/lpstat.c.str3541 2009-02-04 23:54:22.000000000 +0100 ++++ cups-1.4.2/systemv/lpstat.c 2010-03-30 17:38:09.000000000 +0200 +@@ -581,11 +581,11 @@ match_list(const char *list, /* I - Lis + + + /* +- * An empty list always matches... ++ * An empty list never matches... + */ + + if (!list || !*list) +- return (1); ++ return (0); + + while (*list) + { diff --git a/cups.spec b/cups.spec index 71ab1cb..fa77965 100644 --- a/cups.spec +++ b/cups.spec @@ -8,7 +8,7 @@ Summary: Common Unix Printing System Name: cups Version: 1.4.2 -Release: 29%{?dist} +Release: 30%{?dist} License: GPLv2 Group: System Environment/Daemons Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2 @@ -78,6 +78,7 @@ Patch51: cups-0755.patch Patch52: cups-str3460.patch Patch53: cups-EAI_AGAIN.patch Patch54: cups-str3505.patch +Patch55: cups-str3541.patch Patch100: cups-lspp.patch @@ -263,6 +264,7 @@ module. %patch52 -p1 -b .str3460 %patch53 -p1 -b .EAI_AGAIN %patch54 -p1 -b .str3505 +%patch55 -p1 -b .str3541 %if %lspp %patch100 -p1 -b .lspp @@ -562,6 +564,9 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog +* Tue Mar 30 2010 Jiri Popelka 1:1.4.2-30 +- Fixed lpstat to adhere to -o option (bug #577901, STR #3541). + * Wed Mar 10 2010 Jiri Popelka 1:1.4.2-29 - Fixed (for the third time) patch for STR #3425 to correctly remove job info files in /var/spool/cups (bug #571830). From 35bec1783c540139012a0eacf062c90594e65bf5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Popelka?= Date: Tue, 30 Mar 2010 16:39:51 +0000 Subject: [PATCH 073/110] - Fixed lpstat to adhere to -o option (bug #577901, STR #3541). --- cups-str3541.patch | 17 +++++++++++++++++ cups.spec | 8 +++++++- 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 cups-str3541.patch diff --git a/cups-str3541.patch b/cups-str3541.patch new file mode 100644 index 0000000..49ed2e6 --- /dev/null +++ b/cups-str3541.patch @@ -0,0 +1,17 @@ +diff -up cups-1.4.2/systemv/lpstat.c.str3541 cups-1.4.2/systemv/lpstat.c +--- cups-1.4.2/systemv/lpstat.c.str3541 2009-02-04 23:54:22.000000000 +0100 ++++ cups-1.4.2/systemv/lpstat.c 2010-03-30 17:38:09.000000000 +0200 +@@ -581,11 +581,11 @@ match_list(const char *list, /* I - Lis + + + /* +- * An empty list always matches... ++ * An empty list never matches... + */ + + if (!list || !*list) +- return (1); ++ return (0); + + while (*list) + { diff --git a/cups.spec b/cups.spec index 8a04a88..1cd9b11 100644 --- a/cups.spec +++ b/cups.spec @@ -8,7 +8,7 @@ Summary: Common Unix Printing System Name: cups Version: 1.4.2 -Release: 35%{?dist} +Release: 36%{?dist} License: GPLv2 Group: System Environment/Daemons Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2 @@ -86,6 +86,7 @@ Patch52: cups-str3460.patch Patch53: cups-EAI_AGAIN.patch Patch54: cups-str3505.patch Patch55: cups-CVE-2010-0302.patch +Patch56: cups-str3541.patch Patch100: cups-lspp.patch @@ -333,6 +334,8 @@ module. # Applied patch for CVE-2010-0302 (incomplete fix for CVE-2009-3553, # bug #557775). %patch55 -p1 -b .CVE-2010-0302 +# Fix lpstat to adhere to -o option. +%patch56 -p1 -b .str3541 %if %lspp # LSPP support. @@ -624,6 +627,9 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog +* Tue Mar 30 2010 Jiri Popelka 1:1.4.2-36 +- Fixed lpstat to adhere to -o option (bug #577901, STR #3541). + * Wed Mar 10 2010 Jiri Popelka 1:1.4.2-35 - Fixed (for the third time) patch for STR #3425 to correctly remove job info files in /var/spool/cups (bug #571830). From d5844a19e298c6ea945ed0f5c4608ec5551715a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Popelka?= Date: Wed, 31 Mar 2010 13:10:46 +0000 Subject: [PATCH 074/110] - 1.4.3. - No longer need CVE-2009-3553, str3381, str3390, str3391, str3403, str3407, str3413, str3418, str3422, str3425, str3428, str3431, str3435, str3436, str3439, str3440, str3442, str3448, str3458, str3460, cups-sidechannel-intrs, negative-snmp-string-length, cups-media-empty-warning patches. --- .cvsignore | 1 + cups-CVE-2009-3553.patch | 39 ----- cups-CVE-2010-0302.patch | 13 +- cups-lspp.patch | 172 ++++++++++---------- cups-media-empty-warning.patch | 132 ---------------- cups-negative-snmp-string-length.patch | 31 ---- cups-sidechannel-intrs.patch | 68 -------- cups-str3285_v2-str3503.patch | 12 -- cups-str3381.patch | 208 ------------------------- cups-str3382.patch | 10 +- cups-str3390.patch | 15 -- cups-str3391.patch | 196 ----------------------- cups-str3399.patch | 25 +-- cups-str3403.patch | 84 ---------- cups-str3407.patch | 67 -------- cups-str3413.patch | 33 ---- cups-str3418.patch | 90 ----------- cups-str3422.patch | 22 --- cups-str3425.patch | 145 ----------------- cups-str3428.patch | 57 ------- cups-str3431.patch | 32 ---- cups-str3435.patch | 45 ------ cups-str3436.patch | 33 ---- cups-str3439.patch | 126 --------------- cups-str3440.patch | 104 ------------- cups-str3442.patch | 11 -- cups-str3448.patch | 16 -- cups-str3458.patch | 19 --- cups-str3460.patch | 14 -- cups-str3503.patch | 12 ++ cups.spec | 163 ++++++++----------- sources | 2 +- 32 files changed, 176 insertions(+), 1821 deletions(-) delete mode 100644 cups-CVE-2009-3553.patch delete mode 100644 cups-media-empty-warning.patch delete mode 100644 cups-negative-snmp-string-length.patch delete mode 100644 cups-sidechannel-intrs.patch delete mode 100644 cups-str3285_v2-str3503.patch delete mode 100644 cups-str3381.patch delete mode 100644 cups-str3390.patch delete mode 100644 cups-str3391.patch delete mode 100644 cups-str3403.patch delete mode 100644 cups-str3407.patch delete mode 100644 cups-str3413.patch delete mode 100644 cups-str3418.patch delete mode 100644 cups-str3422.patch delete mode 100644 cups-str3425.patch delete mode 100644 cups-str3428.patch delete mode 100644 cups-str3431.patch delete mode 100644 cups-str3435.patch delete mode 100644 cups-str3436.patch delete mode 100644 cups-str3439.patch delete mode 100644 cups-str3440.patch delete mode 100644 cups-str3442.patch delete mode 100644 cups-str3448.patch delete mode 100644 cups-str3458.patch delete mode 100644 cups-str3460.patch create mode 100644 cups-str3503.patch diff --git a/.cvsignore b/.cvsignore index 91ce906..9569859 100644 --- a/.cvsignore +++ b/.cvsignore @@ -41,3 +41,4 @@ cups-1.4rc1-source.tar.bz2 cups-1.4.0-source.tar.bz2 cups-1.4b2-source.tar.bz2 cups-1.4b2-svn8404-source.tar.bz2 +cups-1.4.3-source.tar.bz2 diff --git a/cups-CVE-2009-3553.patch b/cups-CVE-2009-3553.patch deleted file mode 100644 index 6aadfe4..0000000 --- a/cups-CVE-2009-3553.patch +++ /dev/null @@ -1,39 +0,0 @@ -diff -up cups-1.4.2/scheduler/select.c.CVE-2009-3553 cups-1.4.2/scheduler/select.c ---- cups-1.4.2/scheduler/select.c.CVE-2009-3553 2009-07-15 00:07:52.000000000 +0100 -+++ cups-1.4.2/scheduler/select.c 2009-11-19 12:30:39.672976150 +0000 -@@ -454,7 +454,7 @@ cupsdDoSelect(long timeout) /* I - Time - if (fdptr->read_cb && event->filter == EVFILT_READ) - (*(fdptr->read_cb))(fdptr->data); - -- if (fdptr->write_cb && event->filter == EVFILT_WRITE) -+ if (fdptr->use > 1 && fdptr->write_cb && event->filter == EVFILT_WRITE) - (*(fdptr->write_cb))(fdptr->data); - - release_fd(fdptr); -@@ -499,7 +499,7 @@ cupsdDoSelect(long timeout) /* I - Time - if (fdptr->read_cb && (event->events & (EPOLLIN | EPOLLERR | EPOLLHUP))) - (*(fdptr->read_cb))(fdptr->data); - -- if (fdptr->write_cb && (event->events & (EPOLLOUT | EPOLLERR | EPOLLHUP))) -+ if (fdptr->use > 1 && fdptr->write_cb && (event->events & (EPOLLOUT | EPOLLERR | EPOLLHUP))) - (*(fdptr->write_cb))(fdptr->data); - - release_fd(fdptr); -@@ -590,7 +590,7 @@ cupsdDoSelect(long timeout) /* I - Time - if (fdptr->read_cb && (pfd->revents & (POLLIN | POLLERR | POLLHUP))) - (*(fdptr->read_cb))(fdptr->data); - -- if (fdptr->write_cb && (pfd->revents & (POLLOUT | POLLERR | POLLHUP))) -+ if (fdptr->use > 1 && fdptr->write_cb && (pfd->revents & (POLLOUT | POLLERR | POLLHUP))) - (*(fdptr->write_cb))(fdptr->data); - - release_fd(fdptr); -@@ -645,7 +645,7 @@ cupsdDoSelect(long timeout) /* I - Time - if (fdptr->read_cb && FD_ISSET(fdptr->fd, &cupsd_current_input)) - (*(fdptr->read_cb))(fdptr->data); - -- if (fdptr->write_cb && FD_ISSET(fdptr->fd, &cupsd_current_output)) -+ if (fdptr->use > 1 && fdptr->write_cb && FD_ISSET(fdptr->fd, &cupsd_current_output)) - (*(fdptr->write_cb))(fdptr->data); - - release_fd(fdptr); diff --git a/cups-CVE-2010-0302.patch b/cups-CVE-2010-0302.patch index 63d2081..da108e1 100644 --- a/cups-CVE-2010-0302.patch +++ b/cups-CVE-2010-0302.patch @@ -1,6 +1,6 @@ -diff -up cups-1.4.2/scheduler/select.c.CVE-2010-0302 cups-1.4.2/scheduler/select.c ---- cups-1.4.2/scheduler/select.c.CVE-2010-0302 2010-03-05 10:37:49.990476887 +0000 -+++ cups-1.4.2/scheduler/select.c 2010-03-05 10:38:01.803478081 +0000 +diff -up cups-1.4.3/scheduler/select.c.CVE-2010-0302 cups-1.4.3/scheduler/select.c +--- cups-1.4.3/scheduler/select.c.CVE-2010-0302 2010-01-14 23:40:19.000000000 +0100 ++++ cups-1.4.3/scheduler/select.c 2010-03-31 13:54:30.000000000 +0200 @@ -454,7 +454,8 @@ cupsdDoSelect(long timeout) /* I - Time if (fdptr->read_cb && event->filter == EVFILT_READ) (*(fdptr->read_cb))(fdptr->data); @@ -11,12 +11,11 @@ diff -up cups-1.4.2/scheduler/select.c.CVE-2010-0302 cups-1.4.2/scheduler/select (*(fdptr->write_cb))(fdptr->data); release_fd(fdptr); -@@ -499,7 +500,9 @@ cupsdDoSelect(long timeout) /* I - Time - if (fdptr->read_cb && (event->events & (EPOLLIN | EPOLLERR | EPOLLHUP))) +@@ -500,7 +501,8 @@ cupsdDoSelect(long timeout) /* I - Time (*(fdptr->read_cb))(fdptr->data); -- if (fdptr->use > 1 && fdptr->write_cb && (event->events & (EPOLLOUT | EPOLLERR | EPOLLHUP))) -+ if (fdptr->use > 1 && fdptr->write_cb && + if (fdptr->use > 1 && fdptr->write_cb && +- (event->events & (EPOLLOUT | EPOLLERR | EPOLLHUP))) + (event->events & (EPOLLOUT | EPOLLERR | EPOLLHUP)) && + !cupsArrayFind(cupsd_inactive_fds, fdptr)) (*(fdptr->write_cb))(fdptr->data); diff --git a/cups-lspp.patch b/cups-lspp.patch index 90f20ad..3e7a00f 100644 --- a/cups-lspp.patch +++ b/cups-lspp.patch @@ -1,7 +1,7 @@ -diff -up cups-1.4.1/config.h.in.lspp cups-1.4.1/config.h.in ---- cups-1.4.1/config.h.in.lspp 2009-09-14 16:59:30.108873598 +0100 -+++ cups-1.4.1/config.h.in 2009-09-14 16:59:30.122873526 +0100 -@@ -619,6 +619,13 @@ +diff -up cups-1.4.3/config.h.in.lspp cups-1.4.3/config.h.in +--- cups-1.4.3/config.h.in.lspp 2010-03-31 14:08:57.000000000 +0200 ++++ cups-1.4.3/config.h.in 2010-03-31 14:08:57.000000000 +0200 +@@ -633,6 +633,13 @@ #undef HAVE_TCPD_H @@ -15,9 +15,9 @@ diff -up cups-1.4.1/config.h.in.lspp cups-1.4.1/config.h.in #endif /* !_CUPS_CONFIG_H_ */ /* -diff -up /dev/null cups-1.4.1/config-scripts/cups-lspp.m4 ---- /dev/null 2009-09-14 09:02:25.290577766 +0100 -+++ cups-1.4.1/config-scripts/cups-lspp.m4 2009-09-14 16:59:30.124872629 +0100 +diff -up cups-1.4.3/config-scripts/cups-lspp.m4.lspp cups-1.4.3/config-scripts/cups-lspp.m4 +--- cups-1.4.3/config-scripts/cups-lspp.m4.lspp 2010-03-31 14:08:57.000000000 +0200 ++++ cups-1.4.3/config-scripts/cups-lspp.m4 2010-03-31 14:08:57.000000000 +0200 @@ -0,0 +1,36 @@ +dnl +dnl LSPP code for the Common UNIX Printing System (CUPS). @@ -55,9 +55,9 @@ diff -up /dev/null cups-1.4.1/config-scripts/cups-lspp.m4 + ;; + esac +fi -diff -up cups-1.4.1/configure.in.lspp cups-1.4.1/configure.in ---- cups-1.4.1/configure.in.lspp 2008-11-14 19:32:22.000000000 +0000 -+++ cups-1.4.1/configure.in 2009-09-14 16:59:30.125879233 +0100 +diff -up cups-1.4.3/configure.in.lspp cups-1.4.3/configure.in +--- cups-1.4.3/configure.in.lspp 2008-11-14 20:32:22.000000000 +0100 ++++ cups-1.4.3/configure.in 2010-03-31 14:08:57.000000000 +0200 @@ -42,6 +42,8 @@ sinclude(config-scripts/cups-pap.m4) sinclude(config-scripts/cups-pdf.m4) sinclude(config-scripts/cups-scripting.m4) @@ -67,9 +67,9 @@ diff -up cups-1.4.1/configure.in.lspp cups-1.4.1/configure.in INSTALL_LANGUAGES="" UNINSTALL_LANGUAGES="" LANGFILES="" -diff -up cups-1.4.1/cups/cups.h.lspp cups-1.4.1/cups/cups.h ---- cups-1.4.1/cups/cups.h.lspp 2009-08-28 18:51:05.000000000 +0100 -+++ cups-1.4.1/cups/cups.h 2009-09-14 16:59:30.127873074 +0100 +diff -up cups-1.4.3/cups/cups.h.lspp cups-1.4.3/cups/cups.h +--- cups-1.4.3/cups/cups.h.lspp 2009-11-16 18:11:56.000000000 +0100 ++++ cups-1.4.3/cups/cups.h 2010-03-31 14:08:57.000000000 +0200 @@ -15,6 +15,9 @@ * This file is subject to the Apple OS-Developed Software exception. */ @@ -93,9 +93,9 @@ diff -up cups-1.4.1/cups/cups.h.lspp cups-1.4.1/cups/cups.h /* * Types and structures... */ -diff -up cups-1.4.1/data/Makefile.lspp cups-1.4.1/data/Makefile ---- cups-1.4.1/data/Makefile.lspp 2008-11-12 19:30:57.000000000 +0000 -+++ cups-1.4.1/data/Makefile 2009-09-14 16:59:30.129874067 +0100 +diff -up cups-1.4.3/data/Makefile.lspp cups-1.4.3/data/Makefile +--- cups-1.4.3/data/Makefile.lspp 2008-11-12 20:30:57.000000000 +0100 ++++ cups-1.4.3/data/Makefile 2010-03-31 14:08:57.000000000 +0200 @@ -25,7 +25,10 @@ BANNERS = \ secret \ standard \ @@ -108,9 +108,9 @@ diff -up cups-1.4.1/data/Makefile.lspp cups-1.4.1/data/Makefile CHARMAPS = \ euc-cn.txt \ -diff -up /dev/null cups-1.4.1/data/mls ---- /dev/null 2009-09-14 09:02:25.290577766 +0100 -+++ cups-1.4.1/data/mls 2009-09-14 16:59:30.131873095 +0100 +diff -up cups-1.4.3/data/mls.lspp cups-1.4.3/data/mls +--- cups-1.4.3/data/mls.lspp 2010-03-31 14:08:57.000000000 +0200 ++++ cups-1.4.3/data/mls 2010-03-31 14:08:57.000000000 +0200 @@ -0,0 +1,261 @@ +%!PS-Adobe-3.0 +%%BoundingBox: 0 0 612 792 @@ -373,9 +373,9 @@ diff -up /dev/null cups-1.4.1/data/mls +% End of "$Id: mls_template,v 1.1 2005/06/27 18:44:46 colmo Exp $". +% +%%EOF -diff -up /dev/null cups-1.4.1/data/selinux ---- /dev/null 2009-09-14 09:02:25.290577766 +0100 -+++ cups-1.4.1/data/selinux 2009-09-14 16:59:30.133872489 +0100 +diff -up cups-1.4.3/data/selinux.lspp cups-1.4.3/data/selinux +--- cups-1.4.3/data/selinux.lspp 2010-03-31 14:08:57.000000000 +0200 ++++ cups-1.4.3/data/selinux 2010-03-31 14:08:57.000000000 +0200 @@ -0,0 +1,261 @@ +%!PS-Adobe-3.0 +%%BoundingBox: 0 0 612 792 @@ -638,9 +638,9 @@ diff -up /dev/null cups-1.4.1/data/selinux +% End of "$Id: mls_template,v 1.1 2005/06/27 18:44:46 colmo Exp $". +% +%%EOF -diff -up /dev/null cups-1.4.1/data/te ---- /dev/null 2009-09-14 09:02:25.290577766 +0100 -+++ cups-1.4.1/data/te 2009-09-14 16:59:30.135873116 +0100 +diff -up cups-1.4.3/data/te.lspp cups-1.4.3/data/te +--- cups-1.4.3/data/te.lspp 2010-03-31 14:08:57.000000000 +0200 ++++ cups-1.4.3/data/te 2010-03-31 14:08:57.000000000 +0200 @@ -0,0 +1,261 @@ +%!PS-Adobe-3.0 +%%BoundingBox: 0 0 612 792 @@ -903,9 +903,9 @@ diff -up /dev/null cups-1.4.1/data/te +% End of "$Id: mls_template,v 1.1 2005/06/27 18:44:46 colmo Exp $". +% +%%EOF -diff -up cups-1.4.1/filter/common.c.lspp cups-1.4.1/filter/common.c ---- cups-1.4.1/filter/common.c.lspp 2007-07-11 22:46:42.000000000 +0100 -+++ cups-1.4.1/filter/common.c 2009-09-14 16:59:30.137872500 +0100 +diff -up cups-1.4.3/filter/common.c.lspp cups-1.4.3/filter/common.c +--- cups-1.4.3/filter/common.c.lspp 2007-07-11 23:46:42.000000000 +0200 ++++ cups-1.4.3/filter/common.c 2010-03-31 14:08:57.000000000 +0200 @@ -30,6 +30,12 @@ * Include necessary headers... */ @@ -1074,10 +1074,10 @@ diff -up cups-1.4.1/filter/common.c.lspp cups-1.4.1/filter/common.c /* -diff -up cups-1.4.1/filter/pstops.c.lspp cups-1.4.1/filter/pstops.c ---- cups-1.4.1/filter/pstops.c.lspp 2009-09-14 16:59:29.803998275 +0100 -+++ cups-1.4.1/filter/pstops.c 2009-09-14 16:59:30.141872862 +0100 -@@ -3242,6 +3242,18 @@ write_label_prolog(pstops_doc_t *doc, /* +diff -up cups-1.4.3/filter/pstops.c.lspp cups-1.4.3/filter/pstops.c +--- cups-1.4.3/filter/pstops.c.lspp 2010-03-31 14:08:57.000000000 +0200 ++++ cups-1.4.3/filter/pstops.c 2010-03-31 14:08:57.000000000 +0200 +@@ -3275,6 +3275,18 @@ write_label_prolog(pstops_doc_t *doc, /* { const char *classification; /* CLASSIFICATION environment variable */ const char *ptr; /* Temporary string pointer */ @@ -1096,7 +1096,7 @@ diff -up cups-1.4.1/filter/pstops.c.lspp cups-1.4.1/filter/pstops.c /* -@@ -3264,6 +3276,124 @@ write_label_prolog(pstops_doc_t *doc, /* +@@ -3297,6 +3309,124 @@ write_label_prolog(pstops_doc_t *doc, /* return; } @@ -1221,7 +1221,7 @@ diff -up cups-1.4.1/filter/pstops.c.lspp cups-1.4.1/filter/pstops.c /* * Set the classification + page label string... */ -@@ -3342,7 +3472,10 @@ write_label_prolog(pstops_doc_t *doc, /* +@@ -3375,7 +3505,10 @@ write_label_prolog(pstops_doc_t *doc, /* doc_printf(doc, " %.0f moveto ESPpl show\n", top - 14.0); doc_puts(doc, "pop\n"); doc_puts(doc, "}bind put\n"); @@ -1232,9 +1232,9 @@ diff -up cups-1.4.1/filter/pstops.c.lspp cups-1.4.1/filter/pstops.c /* -diff -up cups-1.4.1/Makedefs.in.lspp cups-1.4.1/Makedefs.in ---- cups-1.4.1/Makedefs.in.lspp 2009-09-14 16:59:30.024872775 +0100 -+++ cups-1.4.1/Makedefs.in 2009-09-14 16:59:30.143872406 +0100 +diff -up cups-1.4.3/Makedefs.in.lspp cups-1.4.3/Makedefs.in +--- cups-1.4.3/Makedefs.in.lspp 2010-03-31 14:08:57.000000000 +0200 ++++ cups-1.4.3/Makedefs.in 2010-03-31 14:08:57.000000000 +0200 @@ -146,7 +146,7 @@ LIBCUPSORDER = @LIBCUPSORDER@ LIBCUPSIMAGEORDER = @LIBCUPSIMAGEORDER@ LINKCUPS = @LINKCUPS@ $(SSLLIBS) $(DNSSDLIBS) @@ -1253,9 +1253,9 @@ diff -up cups-1.4.1/Makedefs.in.lspp cups-1.4.1/Makedefs.in .SUFFIXES: .1 .1.gz .1m .1m.gz .3 .3.gz .5 .5.gz .7 .7.gz .8 .8.gz .a .c .cxx .h .man .o .32.o .64.o .gz .c.o: -diff -up cups-1.4.1/scheduler/client.c.lspp cups-1.4.1/scheduler/client.c ---- cups-1.4.1/scheduler/client.c.lspp 2009-07-15 00:02:05.000000000 +0100 -+++ cups-1.4.1/scheduler/client.c 2009-09-14 16:59:30.148872510 +0100 +diff -up cups-1.4.3/scheduler/client.c.lspp cups-1.4.3/scheduler/client.c +--- cups-1.4.3/scheduler/client.c.lspp 2009-07-15 01:02:05.000000000 +0200 ++++ cups-1.4.3/scheduler/client.c 2010-03-31 14:08:57.000000000 +0200 @@ -44,6 +44,7 @@ * valid_host() - Is the Host: field valid? * write_file() - Send a file via HTTP. @@ -1476,9 +1476,9 @@ diff -up cups-1.4.1/scheduler/client.c.lspp cups-1.4.1/scheduler/client.c /* * 'pipe_command()' - Pipe the output of a command to the remote client. */ -diff -up cups-1.4.1/scheduler/client.h.lspp cups-1.4.1/scheduler/client.h ---- cups-1.4.1/scheduler/client.h.lspp 2009-05-26 23:01:23.000000000 +0100 -+++ cups-1.4.1/scheduler/client.h 2009-09-14 16:59:30.150872942 +0100 +diff -up cups-1.4.3/scheduler/client.h.lspp cups-1.4.3/scheduler/client.h +--- cups-1.4.3/scheduler/client.h.lspp 2009-05-27 00:01:23.000000000 +0200 ++++ cups-1.4.3/scheduler/client.h 2010-03-31 14:08:57.000000000 +0200 @@ -18,6 +18,13 @@ #endif /* HAVE_AUTHORIZATION_H */ @@ -1514,9 +1514,9 @@ diff -up cups-1.4.1/scheduler/client.h.lspp cups-1.4.1/scheduler/client.h /* -diff -up cups-1.4.1/scheduler/conf.c.lspp cups-1.4.1/scheduler/conf.c ---- cups-1.4.1/scheduler/conf.c.lspp 2009-09-14 16:59:29.837998036 +0100 -+++ cups-1.4.1/scheduler/conf.c 2009-09-14 16:59:30.155872264 +0100 +diff -up cups-1.4.3/scheduler/conf.c.lspp cups-1.4.3/scheduler/conf.c +--- cups-1.4.3/scheduler/conf.c.lspp 2010-03-31 14:08:57.000000000 +0200 ++++ cups-1.4.3/scheduler/conf.c 2010-03-31 14:08:57.000000000 +0200 @@ -29,6 +29,7 @@ * read_configuration() - Read a configuration file. * read_location() - Read a definition. @@ -1626,9 +1626,9 @@ diff -up cups-1.4.1/scheduler/conf.c.lspp cups-1.4.1/scheduler/conf.c /* * 'read_policy()' - Read a definition. -diff -up cups-1.4.1/scheduler/conf.h.lspp cups-1.4.1/scheduler/conf.h ---- cups-1.4.1/scheduler/conf.h.lspp 2009-09-14 16:59:29.839997456 +0100 -+++ cups-1.4.1/scheduler/conf.h 2009-09-14 16:59:30.157872484 +0100 +diff -up cups-1.4.3/scheduler/conf.h.lspp cups-1.4.3/scheduler/conf.h +--- cups-1.4.3/scheduler/conf.h.lspp 2010-03-31 14:08:57.000000000 +0200 ++++ cups-1.4.3/scheduler/conf.h 2010-03-31 14:08:57.000000000 +0200 @@ -253,6 +253,12 @@ VAR char *ServerKey VALUE(NULL); VAR int SSLOptions VALUE(CUPSD_SSL_NONE); /* SSL/TLS options */ @@ -1652,9 +1652,9 @@ diff -up cups-1.4.1/scheduler/conf.h.lspp cups-1.4.1/scheduler/conf.h /* * Prototypes... -diff -up cups-1.4.1/scheduler/ipp.c.lspp cups-1.4.1/scheduler/ipp.c ---- cups-1.4.1/scheduler/ipp.c.lspp 2009-09-14 16:59:29.974871379 +0100 -+++ cups-1.4.1/scheduler/ipp.c 2009-09-14 16:59:30.168872218 +0100 +diff -up cups-1.4.3/scheduler/ipp.c.lspp cups-1.4.3/scheduler/ipp.c +--- cups-1.4.3/scheduler/ipp.c.lspp 2010-03-31 14:08:57.000000000 +0200 ++++ cups-1.4.3/scheduler/ipp.c 2010-03-31 14:11:37.000000000 +0200 @@ -41,6 +41,7 @@ * cancel_all_jobs() - Cancel all print jobs. * cancel_job() - Cancel a print job. @@ -1698,7 +1698,7 @@ diff -up cups-1.4.1/scheduler/ipp.c.lspp cups-1.4.1/scheduler/ipp.c static int check_quotas(cupsd_client_t *con, cupsd_printer_t *p); static ipp_attribute_t *copy_attribute(ipp_t *to, ipp_attribute_t *attr, int quickcopy); -@@ -1338,6 +1353,21 @@ add_job(cupsd_client_t *con, /* I - Cl +@@ -1337,6 +1352,21 @@ add_job(cupsd_client_t *con, /* I - Cl int kbytes; /* Size of print file */ int i; /* Looping var */ int lowerpagerange; /* Page range bound */ @@ -1720,9 +1720,9 @@ diff -up cups-1.4.1/scheduler/ipp.c.lspp cups-1.4.1/scheduler/ipp.c cupsdLogMessage(CUPSD_LOG_DEBUG2, "add_job(%p[%d], %p(%s), %p(%s/%s))", -@@ -1554,6 +1584,104 @@ add_job(cupsd_client_t *con, /* I - Cl +@@ -1550,6 +1580,104 @@ add_job(cupsd_client_t *con, /* I - Cl ippAddString(con->request, IPP_TAG_JOB, IPP_TAG_NAME, "job-name", NULL, - title = "Untitled"); + "Untitled"); +#ifdef WITH_LSPP + if (is_lspp_config()) @@ -1825,7 +1825,7 @@ diff -up cups-1.4.1/scheduler/ipp.c.lspp cups-1.4.1/scheduler/ipp.c if ((job = cupsdAddJob(priority, printer->name)) == NULL) { send_ipp_status(con, IPP_INTERNAL_ERROR, -@@ -1562,6 +1690,32 @@ add_job(cupsd_client_t *con, /* I - Cl +@@ -1558,6 +1686,32 @@ add_job(cupsd_client_t *con, /* I - Cl return (NULL); } @@ -1858,7 +1858,7 @@ diff -up cups-1.4.1/scheduler/ipp.c.lspp cups-1.4.1/scheduler/ipp.c job->dtype = printer->type & (CUPS_PRINTER_CLASS | CUPS_PRINTER_IMPLICIT | CUPS_PRINTER_REMOTE); job->attrs = con->request; -@@ -1769,6 +1923,29 @@ add_job(cupsd_client_t *con, /* I - Cl +@@ -1763,6 +1917,29 @@ add_job(cupsd_client_t *con, /* I - Cl attr->values[0].string.text = _cupsStrRetain(printer->job_sheets[0]); attr->values[1].string.text = _cupsStrRetain(printer->job_sheets[1]); } @@ -1888,7 +1888,7 @@ diff -up cups-1.4.1/scheduler/ipp.c.lspp cups-1.4.1/scheduler/ipp.c job->job_sheets = attr; -@@ -1799,6 +1976,9 @@ add_job(cupsd_client_t *con, /* I - Cl +@@ -1793,6 +1970,9 @@ add_job(cupsd_client_t *con, /* I - Cl "job-sheets=\"%s,none\", " "job-originating-user-name=\"%s\"", Classification, job->username); @@ -1898,7 +1898,7 @@ diff -up cups-1.4.1/scheduler/ipp.c.lspp cups-1.4.1/scheduler/ipp.c } else if (attr->num_values == 2 && strcmp(attr->values[0].string.text, -@@ -1817,6 +1997,9 @@ add_job(cupsd_client_t *con, /* I - Cl +@@ -1811,6 +1991,9 @@ add_job(cupsd_client_t *con, /* I - Cl "job-originating-user-name=\"%s\"", attr->values[0].string.text, attr->values[1].string.text, job->username); @@ -1908,7 +1908,7 @@ diff -up cups-1.4.1/scheduler/ipp.c.lspp cups-1.4.1/scheduler/ipp.c } else if (strcmp(attr->values[0].string.text, Classification) && strcmp(attr->values[0].string.text, "none") && -@@ -1837,6 +2020,9 @@ add_job(cupsd_client_t *con, /* I - Cl +@@ -1831,6 +2014,9 @@ add_job(cupsd_client_t *con, /* I - Cl "job-originating-user-name=\"%s\"", attr->values[0].string.text, attr->values[1].string.text, job->username); @@ -1918,7 +1918,7 @@ diff -up cups-1.4.1/scheduler/ipp.c.lspp cups-1.4.1/scheduler/ipp.c } } else if (strcmp(attr->values[0].string.text, Classification) && -@@ -1877,8 +2063,52 @@ add_job(cupsd_client_t *con, /* I - Cl +@@ -1871,8 +2057,52 @@ add_job(cupsd_client_t *con, /* I - Cl "job-sheets=\"%s\", " "job-originating-user-name=\"%s\"", Classification, job->username); @@ -2199,7 +2199,7 @@ diff -up cups-1.4.1/scheduler/ipp.c.lspp cups-1.4.1/scheduler/ipp.c if (!strcmp(s, "printer-name")) { cupsFilePuts(out, job->dest); -@@ -6829,6 +7259,22 @@ get_job_attrs(cupsd_client_t *con, /* I +@@ -6844,6 +7274,22 @@ get_job_attrs(cupsd_client_t *con, /* I return; } @@ -2222,7 +2222,7 @@ diff -up cups-1.4.1/scheduler/ipp.c.lspp cups-1.4.1/scheduler/ipp.c /* * Copy attributes... */ -@@ -7048,6 +7494,11 @@ get_jobs(cupsd_client_t *con, /* I - C +@@ -7074,6 +7520,11 @@ get_jobs(cupsd_client_t *con, /* I - C if (username[0] && strcasecmp(username, job->username)) continue; @@ -2234,7 +2234,7 @@ diff -up cups-1.4.1/scheduler/ipp.c.lspp cups-1.4.1/scheduler/ipp.c if (count > 0) ippAddSeparator(con->response); -@@ -11430,6 +11881,11 @@ validate_user(cupsd_job_t *job, /* I +@@ -11460,6 +11911,11 @@ validate_user(cupsd_job_t *job, /* I strlcpy(username, get_username(con), userlen); @@ -2246,9 +2246,9 @@ diff -up cups-1.4.1/scheduler/ipp.c.lspp cups-1.4.1/scheduler/ipp.c /* * Check the username against the owner... */ -diff -up cups-1.4.1/scheduler/job.c.lspp cups-1.4.1/scheduler/job.c ---- cups-1.4.1/scheduler/job.c.lspp 2009-09-14 16:59:30.058872907 +0100 -+++ cups-1.4.1/scheduler/job.c 2009-09-14 17:00:42.616998003 +0100 +diff -up cups-1.4.3/scheduler/job.c.lspp cups-1.4.3/scheduler/job.c +--- cups-1.4.3/scheduler/job.c.lspp 2010-03-31 14:08:57.000000000 +0200 ++++ cups-1.4.3/scheduler/job.c 2010-03-31 14:08:57.000000000 +0200 @@ -66,6 +66,9 @@ * update_job_attrs() - Update the job-printer-* attributes. */ @@ -2403,7 +2403,7 @@ diff -up cups-1.4.1/scheduler/job.c.lspp cups-1.4.1/scheduler/job.c job->sheets = ippFindAttribute(job->attrs, "job-media-sheets-completed", IPP_TAG_INTEGER); job->job_sheets = ippFindAttribute(job->attrs, "job-sheets", IPP_TAG_NAME); -@@ -1975,6 +2069,14 @@ cupsdSaveJob(cupsd_job_t *job) /* I - J +@@ -2013,6 +2107,14 @@ cupsdSaveJob(cupsd_job_t *job) /* I - J { char filename[1024]; /* Job control filename */ cups_file_t *fp; /* Job file */ @@ -2418,7 +2418,7 @@ diff -up cups-1.4.1/scheduler/job.c.lspp cups-1.4.1/scheduler/job.c cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdSaveJob(job=%p(%d)): job->attrs=%p", -@@ -1993,6 +2095,76 @@ cupsdSaveJob(cupsd_job_t *job) /* I - J +@@ -2031,6 +2133,76 @@ cupsdSaveJob(cupsd_job_t *job) /* I - J fchmod(cupsFileNumber(fp), 0600); fchown(cupsFileNumber(fp), RunUser, Group); @@ -2495,7 +2495,7 @@ diff -up cups-1.4.1/scheduler/job.c.lspp cups-1.4.1/scheduler/job.c job->attrs->state = IPP_IDLE; if (ippWriteIO(fp, (ipp_iocb_t)cupsFileWrite, 1, NULL, -@@ -3138,6 +3310,18 @@ get_options(cupsd_job_t *job, /* I - Jo +@@ -3177,6 +3349,18 @@ get_options(cupsd_job_t *job, /* I - Jo banner_page) continue; @@ -2514,7 +2514,7 @@ diff -up cups-1.4.1/scheduler/job.c.lspp cups-1.4.1/scheduler/job.c /* * Otherwise add them to the list... */ -@@ -3810,6 +3994,19 @@ static void +@@ -3849,6 +4033,19 @@ static void start_job(cupsd_job_t *job, /* I - Job ID */ cupsd_printer_t *printer) /* I - Printer to print job */ { @@ -2534,7 +2534,7 @@ diff -up cups-1.4.1/scheduler/job.c.lspp cups-1.4.1/scheduler/job.c cupsdLogMessage(CUPSD_LOG_DEBUG2, "start_job(job=%p(%d), printer=%p(%s))", job, job->id, printer, printer->name); -@@ -3932,6 +4129,106 @@ start_job(cupsd_job_t *job, /* I - +@@ -3971,6 +4168,106 @@ start_job(cupsd_job_t *job, /* I - fcntl(job->side_pipes[1], F_SETFD, fcntl(job->side_pipes[1], F_GETFD) | FD_CLOEXEC); @@ -2641,9 +2641,9 @@ diff -up cups-1.4.1/scheduler/job.c.lspp cups-1.4.1/scheduler/job.c /* * Now start the first file in the job... */ -diff -up cups-1.4.1/scheduler/job.h.lspp cups-1.4.1/scheduler/job.h ---- cups-1.4.1/scheduler/job.h.lspp 2009-05-11 23:46:01.000000000 +0100 -+++ cups-1.4.1/scheduler/job.h 2009-09-14 16:59:30.177872674 +0100 +diff -up cups-1.4.3/scheduler/job.h.lspp cups-1.4.3/scheduler/job.h +--- cups-1.4.3/scheduler/job.h.lspp 2009-05-12 00:46:01.000000000 +0200 ++++ cups-1.4.3/scheduler/job.h 2010-03-31 14:08:57.000000000 +0200 @@ -13,6 +13,13 @@ * file is missing or damaged, see the license at "http://www.cups.org/". */ @@ -2669,9 +2669,9 @@ diff -up cups-1.4.1/scheduler/job.h.lspp cups-1.4.1/scheduler/job.h }; typedef struct cupsd_joblog_s /**** Job log message ****/ -diff -up cups-1.4.1/scheduler/main.c.lspp cups-1.4.1/scheduler/main.c ---- cups-1.4.1/scheduler/main.c.lspp 2009-09-14 16:59:29.925872130 +0100 -+++ cups-1.4.1/scheduler/main.c 2009-09-14 16:59:30.180872667 +0100 +diff -up cups-1.4.3/scheduler/main.c.lspp cups-1.4.3/scheduler/main.c +--- cups-1.4.3/scheduler/main.c.lspp 2010-03-31 14:08:57.000000000 +0200 ++++ cups-1.4.3/scheduler/main.c 2010-03-31 14:08:57.000000000 +0200 @@ -35,6 +35,8 @@ * usage() - Show scheduler usage. */ @@ -2701,7 +2701,7 @@ diff -up cups-1.4.1/scheduler/main.c.lspp cups-1.4.1/scheduler/main.c #ifdef HAVE_GETEUID -@@ -462,6 +470,25 @@ main(int argc, /* I - Number of comm +@@ -465,6 +473,25 @@ main(int argc, /* I - Number of comm #endif /* DEBUG */ } @@ -2727,7 +2727,7 @@ diff -up cups-1.4.1/scheduler/main.c.lspp cups-1.4.1/scheduler/main.c /* * Set the timezone info... */ -@@ -1230,6 +1257,11 @@ main(int argc, /* I - Number of comm +@@ -1235,6 +1262,11 @@ main(int argc, /* I - Number of comm cupsdStopSelect(); @@ -2739,9 +2739,9 @@ diff -up cups-1.4.1/scheduler/main.c.lspp cups-1.4.1/scheduler/main.c return (!stop_scheduler); } -diff -up cups-1.4.1/scheduler/printers.c.lspp cups-1.4.1/scheduler/printers.c ---- cups-1.4.1/scheduler/printers.c.lspp 2009-09-14 16:59:29.866997809 +0100 -+++ cups-1.4.1/scheduler/printers.c 2009-09-14 16:59:30.185871787 +0100 +diff -up cups-1.4.3/scheduler/printers.c.lspp cups-1.4.3/scheduler/printers.c +--- cups-1.4.3/scheduler/printers.c.lspp 2010-03-31 14:08:57.000000000 +0200 ++++ cups-1.4.3/scheduler/printers.c 2010-03-31 14:08:57.000000000 +0200 @@ -58,6 +58,8 @@ * write_xml_string() - Write a string with XML escaping. */ @@ -2762,7 +2762,7 @@ diff -up cups-1.4.1/scheduler/printers.c.lspp cups-1.4.1/scheduler/printers.c /* * 'cupsdAddPrinter()' - Add a printer to the system. -@@ -2166,6 +2172,13 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p) +@@ -2173,6 +2179,13 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p) "username", "password" }; @@ -2776,7 +2776,7 @@ diff -up cups-1.4.1/scheduler/printers.c.lspp cups-1.4.1/scheduler/printers.c DEBUG_printf(("cupsdSetPrinterAttrs: entering name = %s, type = %x\n", p->name, -@@ -2296,6 +2309,45 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p) +@@ -2303,6 +2316,45 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p) attr->values[1].string.text = _cupsStrAlloc(Classification ? Classification : p->job_sheets[1]); } @@ -2822,7 +2822,7 @@ diff -up cups-1.4.1/scheduler/printers.c.lspp cups-1.4.1/scheduler/printers.c } p->raw = 0; -@@ -4827,7 +4876,6 @@ write_irix_state(cupsd_printer_t *p) /* +@@ -4834,7 +4886,6 @@ write_irix_state(cupsd_printer_t *p) /* } #endif /* __sgi */ diff --git a/cups-media-empty-warning.patch b/cups-media-empty-warning.patch deleted file mode 100644 index adf0ac2..0000000 --- a/cups-media-empty-warning.patch +++ /dev/null @@ -1,132 +0,0 @@ -diff -up cups-1.4.2/backend/backend-private.h.media-empty-warning cups-1.4.2/backend/backend-private.h ---- cups-1.4.2/backend/backend-private.h.media-empty-warning 2009-08-31 19:45:43.000000000 +0100 -+++ cups-1.4.2/backend/backend-private.h 2009-12-08 11:22:27.859488572 +0000 -@@ -280,7 +280,8 @@ extern int backendNetworkSideCB(int pri - int snmp_fd, http_addr_t *addr, - int use_bc); - extern ssize_t backendRunLoop(int print_fd, int device_fd, int snmp_fd, -- http_addr_t *addr, int use_bc, -+ http_addr_t *addr, int use_bc, -+ int update_state, - int (*side_cb)(int print_fd, - int device_fd, - int snmp_fd, -diff -up cups-1.4.2/backend/ipp.c.media-empty-warning cups-1.4.2/backend/ipp.c ---- cups-1.4.2/backend/ipp.c.media-empty-warning 2009-12-08 11:22:12.388488617 +0000 -+++ cups-1.4.2/backend/ipp.c 2009-12-08 11:22:27.860488582 +0000 -@@ -498,7 +498,7 @@ main(int argc, /* I - Number of comm - - _cupsLangPuts(stderr, _("INFO: Copying print data...\n")); - -- tbytes = backendRunLoop(-1, fd, snmp_fd, &(addrlist->addr), 0, -+ tbytes = backendRunLoop(-1, fd, snmp_fd, &(addrlist->addr), 0, 0, - backendNetworkSideCB); - - if (snmp_fd >= 0) -diff -up cups-1.4.2/backend/lpd.c.media-empty-warning cups-1.4.2/backend/lpd.c ---- cups-1.4.2/backend/lpd.c.media-empty-warning 2009-06-26 19:26:36.000000000 +0100 -+++ cups-1.4.2/backend/lpd.c 2009-12-08 11:22:27.861488697 +0000 -@@ -447,7 +447,8 @@ main(int argc, /* I - Number of comm - - _cupsLangPuts(stderr, _("INFO: Copying print data...\n")); - -- backendRunLoop(-1, fd, snmp_fd, &(addrlist->addr), 0, backendNetworkSideCB); -+ backendRunLoop(-1, fd, snmp_fd, &(addrlist->addr), 0, 0, -+ backendNetworkSideCB); - - if (snmp_fd >= 0) - _cupsSNMPClose(snmp_fd); -diff -up cups-1.4.2/backend/parallel.c.media-empty-warning cups-1.4.2/backend/parallel.c ---- cups-1.4.2/backend/parallel.c.media-empty-warning 2009-08-31 19:45:43.000000000 +0100 -+++ cups-1.4.2/backend/parallel.c 2009-12-08 11:22:27.862488185 +0000 -@@ -284,7 +284,7 @@ main(int argc, /* I - Number of comm - lseek(print_fd, 0, SEEK_SET); - } - -- tbytes = backendRunLoop(print_fd, device_fd, -1, NULL, use_bc, side_cb); -+ tbytes = backendRunLoop(print_fd, device_fd, -1, NULL, use_bc, 1, side_cb); - - if (print_fd != 0 && tbytes >= 0) - _cupsLangPrintf(stderr, -diff -up cups-1.4.2/backend/runloop.c.media-empty-warning cups-1.4.2/backend/runloop.c ---- cups-1.4.2/backend/runloop.c.media-empty-warning 2009-08-31 19:45:43.000000000 +0100 -+++ cups-1.4.2/backend/runloop.c 2009-12-08 11:22:27.862488185 +0000 -@@ -147,6 +147,7 @@ backendRunLoop( - int snmp_fd, /* I - SNMP socket or -1 if none */ - http_addr_t *addr, /* I - Address of device */ - int use_bc, /* I - Use back-channel? */ -+ int update_state, /* I - Update printer-state-reasons? */ - int (*side_cb)(int, int, int, http_addr_t *, int)) - /* I - Side-channel callback */ - { -@@ -245,7 +246,7 @@ backendRunLoop( - * Pause printing to clear any pending errors... - */ - -- if (errno == ENXIO && offline != 1) -+ if (errno == ENXIO && offline != 1 && update_state) - { - fputs("STATE: +offline-report\n", stderr); - _cupsLangPuts(stderr, _("INFO: Printer is currently offline.\n")); -@@ -351,7 +352,7 @@ backendRunLoop( - - if (errno == ENOSPC) - { -- if (paperout != 1) -+ if (paperout != 1 && update_state) - { - fputs("STATE: +media-empty-warning\n", stderr); - _cupsLangPuts(stderr, _("ERROR: Out of paper!\n")); -@@ -360,7 +361,7 @@ backendRunLoop( - } - else if (errno == ENXIO) - { -- if (offline != 1) -+ if (offline != 1 && update_state) - { - fputs("STATE: +offline-report\n", stderr); - _cupsLangPuts(stderr, _("INFO: Printer is currently off-line.\n")); -@@ -376,13 +377,13 @@ backendRunLoop( - } - else - { -- if (paperout) -+ if (paperout && update_state) - { - fputs("STATE: -media-empty-warning\n", stderr); - paperout = 0; - } - -- if (offline) -+ if (offline && update_state) - { - fputs("STATE: -offline-report\n", stderr); - _cupsLangPuts(stderr, _("INFO: Printer is now online.\n")); -diff -up cups-1.4.2/backend/socket.c.media-empty-warning cups-1.4.2/backend/socket.c ---- cups-1.4.2/backend/socket.c.media-empty-warning 2009-06-12 05:02:45.000000000 +0100 -+++ cups-1.4.2/backend/socket.c 2009-12-08 11:22:27.863488075 +0000 -@@ -393,7 +393,7 @@ main(int argc, /* I - Number of comm - lseek(print_fd, 0, SEEK_SET); - } - -- tbytes = backendRunLoop(print_fd, device_fd, snmp_fd, &(addr->addr), 1, -+ tbytes = backendRunLoop(print_fd, device_fd, snmp_fd, &(addr->addr), 1, 0, - backendNetworkSideCB); - - if (print_fd != 0 && tbytes >= 0) -diff -up cups-1.4.2/backend/usb-unix.c.media-empty-warning cups-1.4.2/backend/usb-unix.c ---- cups-1.4.2/backend/usb-unix.c.media-empty-warning 2009-12-08 11:22:12.445487428 +0000 -+++ cups-1.4.2/backend/usb-unix.c 2009-12-08 11:22:27.864488180 +0000 -@@ -218,10 +218,10 @@ print_device(const char *uri, /* I - De - * select() or poll(), so we can't support the sidechannel either... - */ - -- tbytes = backendRunLoop(print_fd, device_fd, -1, NULL, use_bc, NULL); -+ tbytes = backendRunLoop(print_fd, device_fd, -1, NULL, use_bc, 1, NULL); - - #else -- tbytes = backendRunLoop(print_fd, device_fd, -1, NULL, use_bc, side_cb); -+ tbytes = backendRunLoop(print_fd, device_fd, -1, NULL, use_bc, 1, side_cb); - #endif /* __sun */ - - if (print_fd != 0 && tbytes >= 0) diff --git a/cups-negative-snmp-string-length.patch b/cups-negative-snmp-string-length.patch deleted file mode 100644 index 5d94fbb..0000000 --- a/cups-negative-snmp-string-length.patch +++ /dev/null @@ -1,31 +0,0 @@ -diff -up cups-1.4.2/backend/network.c.negative-snmp-string-length cups-1.4.2/backend/network.c ---- cups-1.4.2/backend/network.c.negative-snmp-string-length 2009-08-31 19:45:43.000000000 +0100 -+++ cups-1.4.2/backend/network.c 2009-12-08 11:14:45.010363459 +0000 -@@ -170,9 +170,13 @@ backendNetworkSideCB( - - case CUPS_ASN1_BIT_STRING : - case CUPS_ASN1_OCTET_STRING : -- i = (int)(sizeof(data) - (dataptr - data)); -- if (packet.object_value.string.num_bytes < i) -+ if (packet.object_value.string.num_bytes < 0) -+ i = 0; -+ else if (packet.object_value.string.num_bytes < -+ (sizeof(data) - (dataptr - data))) - i = packet.object_value.string.num_bytes; -+ else -+ i = (int)(sizeof(data) - (dataptr - data)); - - memcpy(dataptr, packet.object_value.string.bytes, i); - -diff -up cups-1.4.2/backend/snmp-supplies.c.negative-snmp-string-length cups-1.4.2/backend/snmp-supplies.c ---- cups-1.4.2/backend/snmp-supplies.c.negative-snmp-string-length 2009-08-31 17:34:06.000000000 +0100 -+++ cups-1.4.2/backend/snmp-supplies.c 2009-12-08 11:15:05.505362685 +0000 -@@ -232,6 +232,8 @@ backendSNMPSupplies( - if (packet.object_value.string.num_bytes == 2) - new_state = (packet.object_value.string.bytes[0] << 8) | - packet.object_value.string.bytes[1]; -+ else if (packet.object_value.string.num_bytes == 1) -+ new_state = (packet.object_value.string.bytes[0] << 8); - else - new_state = 0; - diff --git a/cups-sidechannel-intrs.patch b/cups-sidechannel-intrs.patch deleted file mode 100644 index 4a5420c..0000000 --- a/cups-sidechannel-intrs.patch +++ /dev/null @@ -1,68 +0,0 @@ -diff -up cups-1.4.2/cups/sidechannel.c.sidechannel-intrs cups-1.4.2/cups/sidechannel.c ---- cups-1.4.2/cups/sidechannel.c.sidechannel-intrs 2009-09-23 00:20:35.000000000 +0100 -+++ cups-1.4.2/cups/sidechannel.c 2009-12-08 11:08:15.297539377 +0000 -@@ -116,6 +116,7 @@ cupsSideChannelRead( - char buffer[16388]; /* Message buffer */ - int bytes; /* Bytes read */ - int templen; /* Data length from message */ -+ int nfds; /* Number of file descriptors */ - #ifdef HAVE_POLL - struct pollfd pfd; /* Poll structure for poll() */ - #else /* select() */ -@@ -143,39 +144,31 @@ cupsSideChannelRead( - pfd.fd = CUPS_SC_FD; - pfd.events = POLLIN; - -- if (timeout < 0.0) -- { -- if (poll(&pfd, 1, -1) < 1) -- return (-1); -- } -- else if (poll(&pfd, 1, (long)(timeout * 1000)) < 1) -- return (-1); -+ while ((nfds = poll(&pfd, 1, -+ timeout < 0.0 ? -1 : (long)(timeout * 1000))) < 0 && -+ (errno == EINTR || errno == EAGAIN)) -+ ; - - #else /* select() */ - FD_ZERO(&input_set); - FD_SET(CUPS_SC_FD, &input_set); - -- if (timeout < 0.0) -- { -- if (select(CUPS_SC_FD + 1, &input_set, NULL, NULL, NULL) < 1) -- { -- DEBUG_printf(("1cupsSideChannelRead: Select error: %s", strerror(errno))); -- return (-1); -- } -- } -- else -- { -- stimeout.tv_sec = (int)timeout; -- stimeout.tv_usec = (int)(timeout * 1000000) % 1000000; -+ stimeout.tv_sec = (int)timeout; -+ stimeout.tv_usec = (int)(timeout * 1000000) % 1000000; -+ -+ while ((nfds = select(CUPS_SC_FD + 1, &input_set, NULL, NULL, -+ timeout < 0.0 ? NULL : &stimeout)) < 0 && -+ (errno == EINTR || errno == EAGAIN)) -+ ; - -- if (select(CUPS_SC_FD + 1, &input_set, NULL, NULL, &stimeout) < 1) -- { -- DEBUG_puts("1cupsSideChannelRead: Select timeout"); -- return (-1); -- } -- } - #endif /* HAVE_POLL */ - -+ if (nfds < 1) -+ { -+ *status = nfds==0 ? CUPS_SC_STATUS_TIMEOUT : CUPS_SC_STATUS_IO_ERROR; -+ return (-1); -+ } -+ - /* - * Read a side-channel message for the format: - * diff --git a/cups-str3285_v2-str3503.patch b/cups-str3285_v2-str3503.patch deleted file mode 100644 index 35b6002..0000000 --- a/cups-str3285_v2-str3503.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up cups-1.4.1/cups/dest.c.str3285 cups-1.4.1/cups/dest.c ---- cups-1.4.1/cups/dest.c.str3285 2009-10-27 12:50:04.560012076 +0000 -+++ cups-1.4.1/cups/dest.c 2009-10-27 12:50:23.814012173 +0000 -@@ -549,7 +549,7 @@ cupsGetNamedDest(http_t *http, /* I - - if (!cups_get_sdests(http, op, name, 0, &dest)) - { -- if (op == CUPS_GET_DEFAULT) -+ if (op == CUPS_GET_DEFAULT || (name && !set_as_default)) - return (NULL); - - /* diff --git a/cups-str3381.patch b/cups-str3381.patch deleted file mode 100644 index 88a007c..0000000 --- a/cups-str3381.patch +++ /dev/null @@ -1,208 +0,0 @@ -diff -up cups-1.4.2/CHANGES.txt.str3381 cups-1.4.2/CHANGES.txt ---- cups-1.4.2/CHANGES.txt.str3381 2009-11-09 23:01:17.000000000 +0000 -+++ cups-1.4.2/CHANGES.txt 2009-11-16 10:55:21.518666538 +0000 -@@ -1,6 +1,11 @@ --CHANGES.txt - 2009-11-09 -+CHANGES.txt - 2009-11-13 - ------------------------ - -+CHANGES IN CUPS V1.4.3 -+ -+ - Fixed a GNU TLS error handling bug (STR #3381) -+ -+ - CHANGES IN CUPS V1.4.2 - - - SECURITY: The CUPS web interface was vulnerable to several XSS and -diff -up cups-1.4.2/cups/http.c.str3381 cups-1.4.2/cups/http.c ---- cups-1.4.2/cups/http.c.str3381 2009-07-01 16:23:28.000000000 +0100 -+++ cups-1.4.2/cups/http.c 2009-11-16 10:55:21.520666380 +0000 -@@ -26,7 +26,6 @@ - * httpClearCookie() - Clear the cookie value(s). - * httpClearFields() - Clear HTTP request fields. - * httpClose() - Close an HTTP connection... -- * httpConnect() - Connect to a HTTP server. - * httpConnectEncrypt() - Connect to a HTTP server using encryption. - * _httpCreate() - Create an unconnected HTTP connection. - * httpDelete() - Send a DELETE request to the server. -@@ -721,7 +720,7 @@ httpGetField(http_t *http, /* I - - { - if (!http || field <= HTTP_FIELD_UNKNOWN || field >= HTTP_FIELD_MAX) - return (NULL); -- else if (field == HTTP_FIELD_AUTHORIZATION && -+ else if (field == HTTP_FIELD_AUTHORIZATION && - http->field_authorization) - { - /* -@@ -1137,7 +1136,7 @@ httpGets(char *line, /* I - Line to - http->activity = time(NULL); - - *lineptr = '\0'; -- -+ - DEBUG_printf(("3httpGets: Returning \"%s\"", line)); - - return (line); -@@ -2283,7 +2282,7 @@ httpWait(http_t *http, /* I - Connecti - * - * @deprecated@ - */ -- -+ - int /* O - Number of bytes written */ - httpWrite(http_t *http, /* I - Connection to server */ - const char *buffer, /* I - Buffer for data */ -@@ -2298,7 +2297,7 @@ httpWrite(http_t *http, /* I - Conn - * - * @since CUPS 1.2/Mac OS X 10.5@ - */ -- -+ - ssize_t /* O - Number of bytes written */ - httpWrite2(http_t *http, /* I - Connection to server */ - const char *buffer, /* I - Buffer for data */ -@@ -2456,7 +2455,7 @@ _httpWriteCDSA( - else - { - *dataLength = 0; -- -+ - if (errno == EAGAIN) - result = errSSLWouldBlock; - else -@@ -2517,7 +2516,7 @@ http_bio_ctrl(BIO *h, /* I - BIO data - } - else - return (0); -- -+ - case BIO_CTRL_DUP : - case BIO_CTRL_FLUSH : - return (1); -@@ -2719,7 +2718,36 @@ http_read_ssl(http_t *http, /* I - Conn - return (SSL_read((SSL *)(http->tls), buf, len)); - - # elif defined(HAVE_GNUTLS) -- return (gnutls_record_recv(((http_tls_t *)(http->tls))->session, buf, len)); -+ ssize_t result; /* Return value */ -+ -+ -+ result = gnutls_record_recv(((http_tls_t *)(http->tls))->session, buf, len); -+ -+ if (result < 0 && !errno) -+ { -+ /* -+ * Convert GNU TLS error to errno value... -+ */ -+ -+ switch (result) -+ { -+ case GNUTLS_E_INTERRUPTED : -+ errno = EINTR; -+ break; -+ -+ case GNUTLS_E_AGAIN : -+ errno = EAGAIN; -+ break; -+ -+ default : -+ errno = EPIPE; -+ break; -+ } -+ -+ result = -1; -+ } -+ -+ return ((int)result); - - # elif defined(HAVE_CDSASSL) - int result; /* Return value */ -@@ -2857,7 +2885,7 @@ http_send(http_t *http, /* I - Con - DEBUG_printf(("9http_send: %s: %s", http_fields[i], - httpGetField(http, i))); - -- if (httpPrintf(http, "%s: %s\r\n", http_fields[i], -+ if (httpPrintf(http, "%s: %s\r\n", http_fields[i], - httpGetField(http, i)) < 1) - { - http->status = HTTP_ERROR; -@@ -2896,15 +2924,15 @@ http_send(http_t *http, /* I - Con - * The Kerberos and AuthRef authentication strings can only be used once... - */ - -- if (http->field_authorization && http->authstring && -- (!strncmp(http->authstring, "Negotiate", 9) || -+ if (http->field_authorization && http->authstring && -+ (!strncmp(http->authstring, "Negotiate", 9) || - !strncmp(http->authstring, "AuthRef", 7))) - { - http->_authstring[0] = '\0'; - - if (http->authstring != http->_authstring) - free(http->authstring); -- -+ - http->authstring = http->_authstring; - } - -@@ -3220,7 +3248,7 @@ http_upgrade(http_t *http) /* I - Conne - /* - * 'http_write()' - Write a buffer to a HTTP connection. - */ -- -+ - static int /* O - Number of bytes written */ - http_write(http_t *http, /* I - Connection to server */ - const char *buffer, /* I - Buffer for data */ -@@ -3335,7 +3363,36 @@ http_write_ssl(http_t *http, /* I - - return (SSL_write((SSL *)(http->tls), buf, len)); - - # elif defined(HAVE_GNUTLS) -- return (gnutls_record_send(((http_tls_t *)(http->tls))->session, buf, len)); -+ ssize_t result; /* Return value */ -+ -+ result = gnutls_record_send(((http_tls_t *)(http->tls))->session, buf, len); -+ -+ if (result < 0 && !errno) -+ { -+ /* -+ * Convert GNU TLS error to errno value... -+ */ -+ -+ switch (result) -+ { -+ case GNUTLS_E_INTERRUPTED : -+ errno = EINTR; -+ break; -+ -+ case GNUTLS_E_AGAIN : -+ errno = EAGAIN; -+ break; -+ -+ default : -+ errno = EPIPE; -+ break; -+ } -+ -+ result = -1; -+ } -+ -+ return ((int)result); -+ - # elif defined(HAVE_CDSASSL) - int result; /* Return value */ - OSStatus error; /* Error info */ -@@ -3358,11 +3415,11 @@ http_write_ssl(http_t *http, /* I - - else - { - result = -1; -- errno = EINTR; -+ errno = EINTR; - } - break; - default : -- errno = EPIPE; -+ errno = EPIPE; - result = -1; - break; - } diff --git a/cups-str3382.patch b/cups-str3382.patch index 2999c79..14e9b27 100644 --- a/cups-str3382.patch +++ b/cups-str3382.patch @@ -1,6 +1,6 @@ -diff -up cups-1.4.1/cups/tempfile.c.str3382 cups-1.4.1/cups/tempfile.c ---- cups-1.4.1/cups/tempfile.c.str3382 2008-12-10 06:03:11.000000000 +0100 -+++ cups-1.4.1/cups/tempfile.c 2009-10-20 15:08:39.000000000 +0200 +diff -up cups-1.4.3/cups/tempfile.c.str3382 cups-1.4.3/cups/tempfile.c +--- cups-1.4.3/cups/tempfile.c.str3382 2010-01-18 19:47:12.000000000 +0100 ++++ cups-1.4.3/cups/tempfile.c 2010-03-31 13:26:52.000000000 +0200 @@ -35,6 +35,7 @@ # include #else @@ -33,8 +33,8 @@ diff -up cups-1.4.1/cups/tempfile.c.str3382 cups-1.4.1/cups/tempfile.c - * Format a string using the hex time values... - */ - -- snprintf(filename, len - 1, "%s/%08lx%05lx", tmpdir, -- (unsigned long)curtime.tv_sec, (unsigned long)curtime.tv_usec); +- snprintf(filename, len - 1, "%s/%05x%08x", tmpdir, (unsigned)getpid(), +- (unsigned)(curtime.tv_sec + curtime.tv_usec + tries)); -#endif /* WIN32 */ /* diff --git a/cups-str3390.patch b/cups-str3390.patch deleted file mode 100644 index a9d958d..0000000 --- a/cups-str3390.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff -up cups-1.4.1/cgi-bin/admin.c.str3390 cups-1.4.1/cgi-bin/admin.c ---- cups-1.4.1/cgi-bin/admin.c.str3390 2009-08-29 08:05:14.000000000 +0200 -+++ cups-1.4.1/cgi-bin/admin.c 2009-10-27 14:44:53.000000000 +0100 -@@ -1044,6 +1044,11 @@ do_am_printer(http_t *http, /* I - HTTP - if ((attr = ippFindAttribute(oldinfo, "printer-location", - IPP_TAG_TEXT)) != NULL) - cgiSetVariable("PRINTER_LOCATION", attr->values[0].string.text); -+ -+ if ((attr = ippFindAttribute(oldinfo, "printer-is-shared", -+ IPP_TAG_BOOLEAN)) != NULL) -+ cgiSetVariable("PRINTER_IS_SHARED", -+ attr->values[0].boolean ? "1" : "0"); - } - - cgiCopyTemplateLang("modify-printer.tmpl"); diff --git a/cups-str3391.patch b/cups-str3391.patch deleted file mode 100644 index 4e6cc7b..0000000 --- a/cups-str3391.patch +++ /dev/null @@ -1,196 +0,0 @@ -diff -up cups-1.4.1/templates/add-printer.tmpl.str3391 cups-1.4.1/templates/add-printer.tmpl ---- cups-1.4.1/templates/add-printer.tmpl.str3391 2009-06-18 19:23:21.000000000 +0200 -+++ cups-1.4.1/templates/add-printer.tmpl 2009-10-27 15:08:45.000000000 +0100 -@@ -4,6 +4,10 @@ - -
- -+ -+ -+ -+ - {?current_make!?:} - {?current_make_and_model!?:} - -diff -up cups-1.4.1/templates/de/add-printer.tmpl.str3391 cups-1.4.1/templates/de/add-printer.tmpl ---- cups-1.4.1/templates/de/add-printer.tmpl.str3391 2009-06-18 19:23:21.000000000 +0200 -+++ cups-1.4.1/templates/de/add-printer.tmpl 2009-10-27 15:08:56.000000000 +0100 -@@ -4,6 +4,10 @@ - - - -+ -+ -+ -+ - {?current_make!?:} - {?current_make_and_model!?:} - -diff -up cups-1.4.1/templates/de/modify-printer.tmpl.str3391 cups-1.4.1/templates/de/modify-printer.tmpl ---- cups-1.4.1/templates/de/modify-printer.tmpl.str3391 2009-06-18 19:23:21.000000000 +0200 -+++ cups-1.4.1/templates/de/modify-printer.tmpl 2009-10-27 15:10:28.000000000 +0100 -@@ -4,6 +4,10 @@ - - - -+ -+ -+ -+ - - - -diff -up cups-1.4.1/templates/es/add-printer.tmpl.str3391 cups-1.4.1/templates/es/add-printer.tmpl ---- cups-1.4.1/templates/es/add-printer.tmpl.str3391 2009-06-18 19:23:21.000000000 +0200 -+++ cups-1.4.1/templates/es/add-printer.tmpl 2009-10-27 15:09:02.000000000 +0100 -@@ -4,6 +4,10 @@ - - - -+ -+ -+ -+ - {?current_make!?:} - {?current_make_and_model!?:} - -diff -up cups-1.4.1/templates/es/modify-printer.tmpl.str3391 cups-1.4.1/templates/es/modify-printer.tmpl ---- cups-1.4.1/templates/es/modify-printer.tmpl.str3391 2009-06-18 19:23:21.000000000 +0200 -+++ cups-1.4.1/templates/es/modify-printer.tmpl 2009-10-27 15:10:32.000000000 +0100 -@@ -4,6 +4,10 @@ - - - -+ -+ -+ -+ - - -
-diff -up cups-1.4.1/templates/eu/add-printer.tmpl.str3391 cups-1.4.1/templates/eu/add-printer.tmpl ---- cups-1.4.1/templates/eu/add-printer.tmpl.str3391 2009-07-07 18:52:34.000000000 +0200 -+++ cups-1.4.1/templates/eu/add-printer.tmpl 2009-10-27 15:09:08.000000000 +0100 -@@ -4,6 +4,10 @@ - - - -+ -+ -+ -+ - {?current_make!?:} - {?current_make_and_model!?:} - -diff -up cups-1.4.1/templates/eu/modify-printer.tmpl.str3391 cups-1.4.1/templates/eu/modify-printer.tmpl ---- cups-1.4.1/templates/eu/modify-printer.tmpl.str3391 2009-07-07 18:52:34.000000000 +0200 -+++ cups-1.4.1/templates/eu/modify-printer.tmpl 2009-10-27 15:10:37.000000000 +0100 -@@ -4,6 +4,10 @@ - - - -+ -+ -+ -+ - - -
-diff -up cups-1.4.1/templates/ja/add-printer.tmpl.str3391 cups-1.4.1/templates/ja/add-printer.tmpl ---- cups-1.4.1/templates/ja/add-printer.tmpl.str3391 2009-06-18 19:23:21.000000000 +0200 -+++ cups-1.4.1/templates/ja/add-printer.tmpl 2009-10-27 15:09:15.000000000 +0100 -@@ -4,6 +4,10 @@ - - - -+ -+ -+ -+ - {?current_make!?:} - {?current_make_and_model!?:} - -diff -up cups-1.4.1/templates/ja/modify-printer.tmpl.str3391 cups-1.4.1/templates/ja/modify-printer.tmpl ---- cups-1.4.1/templates/ja/modify-printer.tmpl.str3391 2009-06-18 19:23:21.000000000 +0200 -+++ cups-1.4.1/templates/ja/modify-printer.tmpl 2009-10-27 15:10:40.000000000 +0100 -@@ -4,6 +4,10 @@ - - - -+ -+ -+ -+ - - -
-diff -up cups-1.4.1/templates/modify-printer.tmpl.str3391 cups-1.4.1/templates/modify-printer.tmpl ---- cups-1.4.1/templates/modify-printer.tmpl.str3391 2009-06-18 19:23:21.000000000 +0200 -+++ cups-1.4.1/templates/modify-printer.tmpl 2009-10-27 15:10:23.000000000 +0100 -@@ -4,6 +4,10 @@ - - - -+ -+ -+ -+ - - -
-diff -up cups-1.4.1/templates/pl/add-printer.tmpl.str3391 cups-1.4.1/templates/pl/add-printer.tmpl ---- cups-1.4.1/templates/pl/add-printer.tmpl.str3391 2009-06-18 19:23:21.000000000 +0200 -+++ cups-1.4.1/templates/pl/add-printer.tmpl 2009-10-27 15:09:20.000000000 +0100 -@@ -4,6 +4,10 @@ - - - -+ -+ -+ -+ - {?current_make!?:} - {?current_make_and_model!?:} - -diff -up cups-1.4.1/templates/pl/modify-printer.tmpl.str3391 cups-1.4.1/templates/pl/modify-printer.tmpl ---- cups-1.4.1/templates/pl/modify-printer.tmpl.str3391 2009-06-18 19:23:21.000000000 +0200 -+++ cups-1.4.1/templates/pl/modify-printer.tmpl 2009-10-27 15:10:44.000000000 +0100 -@@ -4,6 +4,10 @@ - - - -+ -+ -+ -+ - - -
-diff -up cups-1.4.1/templates/ru/add-printer.tmpl.str3391 cups-1.4.1/templates/ru/add-printer.tmpl ---- cups-1.4.1/templates/ru/add-printer.tmpl.str3391 2009-06-18 19:23:21.000000000 +0200 -+++ cups-1.4.1/templates/ru/add-printer.tmpl 2009-10-27 15:09:24.000000000 +0100 -@@ -4,6 +4,10 @@ - - - -+ -+ -+ -+ - {?current_make!?:} - {?current_make_and_model!?:} - -diff -up cups-1.4.1/templates/ru/modify-printer.tmpl.str3391 cups-1.4.1/templates/ru/modify-printer.tmpl ---- cups-1.4.1/templates/ru/modify-printer.tmpl.str3391 2009-06-18 19:23:21.000000000 +0200 -+++ cups-1.4.1/templates/ru/modify-printer.tmpl 2009-10-27 15:10:48.000000000 +0100 -@@ -4,6 +4,10 @@ - - - -+ -+ -+ -+ - - -
diff --git a/cups-str3399.patch b/cups-str3399.patch index 05552e4..e5b2000 100644 --- a/cups-str3399.patch +++ b/cups-str3399.patch @@ -1,27 +1,4 @@ -diff -up cups-1.4.2/CHANGES-1.4.txt.str3399 cups-1.4.2/CHANGES-1.4.txt -diff -up cups-1.4.2/scheduler/process.c.str3399 cups-1.4.2/scheduler/process.c ---- cups-1.4.2/scheduler/process.c.str3399 2009-05-16 04:04:48.000000000 +0100 -+++ cups-1.4.2/scheduler/process.c 2009-11-16 17:15:26.104542409 +0000 -@@ -505,6 +505,7 @@ cupsdStartProcess( - #ifdef HAVE_SIGSET - sigset(SIGTERM, SIG_DFL); - sigset(SIGCHLD, SIG_DFL); -+ sigset(SIGPIPE, SIG_DFL); - #elif defined(HAVE_SIGACTION) - memset(&action, 0, sizeof(action)); - -@@ -513,9 +514,11 @@ cupsdStartProcess( - - sigaction(SIGTERM, &action, NULL); - sigaction(SIGCHLD, &action, NULL); -+ sigaction(SIGPIPE, &action, NULL); - #else - signal(SIGTERM, SIG_DFL); - signal(SIGCHLD, SIG_DFL); -+ signal(SIGPIPE, SIG_DFL); - #endif /* HAVE_SIGSET */ - - cupsdReleaseSignals(); +diff -up cups-1.4.2/scheduler/main.c.str3399 cups-1.4.2/scheduler/main.c --- cups-1.4.2/scheduler/main.c.str3399 2010-03-02 11:04:28.968100478 +0000 +++ cups-1.4.2/scheduler/main.c 2010-03-02 11:04:47.442226409 +0000 @@ -1733,7 +1733,7 @@ process_children(void) diff --git a/cups-str3403.patch b/cups-str3403.patch deleted file mode 100644 index d66d163..0000000 --- a/cups-str3403.patch +++ /dev/null @@ -1,84 +0,0 @@ -diff -up cups-1.4.2/templates/admin.tmpl.str3403 cups-1.4.2/templates/admin.tmpl ---- cups-1.4.2/templates/admin.tmpl.str3403 2008-09-26 16:52:03.000000000 +0100 -+++ cups-1.4.2/templates/admin.tmpl 2009-11-16 17:21:56.108541688 +0000 -@@ -20,7 +20,7 @@ -

Jobs

- -

-- -+
-

- -
          -diff -up cups-1.4.2/templates/de/admin.tmpl.str3403 cups-1.4.2/templates/de/admin.tmpl ---- cups-1.4.2/templates/de/admin.tmpl.str3403 2009-04-03 16:55:28.000000000 +0100 -+++ cups-1.4.2/templates/de/admin.tmpl 2009-11-16 17:21:56.109542590 +0000 -@@ -20,7 +20,7 @@ -

Druckaufträge

- -

--

-+
-

- -
          -diff -up cups-1.4.2/templates/es/admin.tmpl.str3403 cups-1.4.2/templates/es/admin.tmpl ---- cups-1.4.2/templates/es/admin.tmpl.str3403 2009-01-10 00:26:04.000000000 +0000 -+++ cups-1.4.2/templates/es/admin.tmpl 2009-11-16 17:21:56.120542504 +0000 -@@ -20,7 +20,7 @@ -

Trabajos

- -

--

-+
-

- -
          -diff -up cups-1.4.2/templates/eu/admin.tmpl.str3403 cups-1.4.2/templates/eu/admin.tmpl ---- cups-1.4.2/templates/eu/admin.tmpl.str3403 2009-07-07 17:52:34.000000000 +0100 -+++ cups-1.4.2/templates/eu/admin.tmpl 2009-11-16 17:21:56.120542504 +0000 -@@ -20,7 +20,7 @@ -

Lanak

- -

--

-+
-

- -
          -diff -up cups-1.4.2/templates/ja/admin.tmpl.str3403 cups-1.4.2/templates/ja/admin.tmpl ---- cups-1.4.2/templates/ja/admin.tmpl.str3403 2009-02-17 19:04:25.000000000 +0000 -+++ cups-1.4.2/templates/ja/admin.tmpl 2009-11-16 17:21:56.120542504 +0000 -@@ -20,7 +20,7 @@ -

ジョブ

- -

--

-+
-

- -
          -diff -up cups-1.4.2/templates/pl/admin.tmpl.str3403 cups-1.4.2/templates/pl/admin.tmpl ---- cups-1.4.2/templates/pl/admin.tmpl.str3403 2009-02-25 16:48:35.000000000 +0000 -+++ cups-1.4.2/templates/pl/admin.tmpl 2009-11-16 17:21:56.121542314 +0000 -@@ -20,7 +20,7 @@ -

Zadania

- -

--

-+
-

- -
          -diff -up cups-1.4.2/templates/ru/admin.tmpl.str3403 cups-1.4.2/templates/ru/admin.tmpl ---- cups-1.4.2/templates/ru/admin.tmpl.str3403 2009-10-26 16:01:08.000000000 +0000 -+++ cups-1.4.2/templates/ru/admin.tmpl 2009-11-16 17:21:56.121542314 +0000 -@@ -20,7 +20,7 @@ -

Задания

- -

--

-+
-

- -
          diff --git a/cups-str3407.patch b/cups-str3407.patch deleted file mode 100644 index 4d8c6dc..0000000 --- a/cups-str3407.patch +++ /dev/null @@ -1,67 +0,0 @@ -diff -up cups-1.4.2/CHANGES-1.4.txt.str3407 cups-1.4.2/CHANGES-1.4.txt -diff -up cups-1.4.2/scheduler/job.c.str3407 cups-1.4.2/scheduler/job.c ---- cups-1.4.2/scheduler/job.c.str3407 2009-11-17 12:18:38.518084476 +0000 -+++ cups-1.4.2/scheduler/job.c 2009-11-17 13:00:46.204083691 +0000 -@@ -1721,7 +1721,30 @@ cupsdLoadJob(cupsd_job_t *job) /* I - J - cupsdLogMessage(CUPSD_LOG_ERROR, - "[Job %d] Ran out of memory for job file types!", - job->id); -- return (1); -+ -+ ippDelete(job->attrs); -+ job->attrs = NULL; -+ -+ if (compressions) -+ free(compressions); -+ -+ if (filetypes) -+ free(filetypes); -+ -+ if (job->compressions) -+ { -+ free(job->compressions); -+ job->compressions = NULL; -+ } -+ -+ if (job->filetypes) -+ { -+ free(job->filetypes); -+ job->filetypes = NULL; -+ } -+ -+ job->num_files = 0; -+ return (0); - } - - job->compressions = compressions; -@@ -1789,6 +1812,21 @@ cupsdLoadJob(cupsd_job_t *job) /* I - J - - ippDelete(job->attrs); - job->attrs = NULL; -+ -+ if (job->compressions) -+ { -+ free(job->compressions); -+ job->compressions = NULL; -+ } -+ -+ if (job->filetypes) -+ { -+ free(job->filetypes); -+ job->filetypes = NULL; -+ } -+ -+ job->num_files = 0; -+ - unlink(jobfile); - - return (0); -@@ -4411,7 +4449,7 @@ update_job_attrs(cupsd_job_t *job, /* I - else if (job->printer->state_message[0] && do_message) - cupsdSetString(&(job->printer_message->values[0].string.text), - job->printer->state_message); -- -+ - /* - * ... and the printer-state-reasons value... - */ diff --git a/cups-str3413.patch b/cups-str3413.patch deleted file mode 100644 index a74e7ec..0000000 --- a/cups-str3413.patch +++ /dev/null @@ -1,33 +0,0 @@ -diff -up cups-1.4.2/backend/snmp.c.str3413 cups-1.4.2/backend/snmp.c ---- cups-1.4.2/backend/snmp.c.str3413 2009-01-14 22:40:58.000000000 +0000 -+++ cups-1.4.2/backend/snmp.c 2009-12-08 10:54:11.798515550 +0000 -@@ -999,7 +999,7 @@ read_snmp_response(int fd) /* I - SNMP - DEVICE_PRODUCT, LexmarkProductOID2); - _cupsSNMPWrite(fd, &(packet.address), CUPS_SNMP_VERSION_1, - packet.community, CUPS_ASN1_GET_REQUEST, -- DEVICE_URI, LexmarkDeviceIdOID); -+ DEVICE_ID, LexmarkDeviceIdOID); - _cupsSNMPWrite(fd, &(packet.address), CUPS_SNMP_VERSION_1, - packet.community, CUPS_ASN1_GET_REQUEST, - DEVICE_PRODUCT, XeroxProductOID); -@@ -1054,7 +1054,9 @@ read_snmp_response(int fd) /* I - SNMP - break; - - case DEVICE_ID : -- if (device && packet.object_type == CUPS_ASN1_OCTET_STRING) -+ if (device && packet.object_type == CUPS_ASN1_OCTET_STRING && -+ (!device->id || -+ strlen(device->id) < packet.object_value.string.num_bytes)) - { - /* - * Update an existing cache entry... -@@ -1107,7 +1109,7 @@ read_snmp_response(int fd) /* I - SNMP - - case DEVICE_URI : - if (device && packet.object_type == CUPS_ASN1_OCTET_STRING && -- !device->uri) -+ !device->uri && packet.object_value.string.num_bytes > 0) - { - /* - * Update an existing cache entry... -diff -up cups-1.4.2/CHANGES-1.4.txt.str3413 cups-1.4.2/CHANGES-1.4.txt diff --git a/cups-str3418.patch b/cups-str3418.patch deleted file mode 100644 index 3bb4e3e..0000000 --- a/cups-str3418.patch +++ /dev/null @@ -1,90 +0,0 @@ -diff -up cups-1.4.2/cgi-bin/admin.c.str3418 cups-1.4.2/cgi-bin/admin.c ---- cups-1.4.2/cgi-bin/admin.c.str3418 2009-11-17 13:23:51.130084685 +0000 -+++ cups-1.4.2/cgi-bin/admin.c 2009-11-17 13:23:56.773209143 +0000 -@@ -1261,7 +1261,7 @@ do_am_printer(http_t *http, /* I - HTTP - * Got the list of PPDs, see if the user has selected a make... - */ - -- if (cgiSetIPPVars(response, NULL, NULL, NULL, 0) == 0) -+ if (cgiSetIPPVars(response, NULL, NULL, NULL, 0) == 0 && !modify) - { - /* - * No PPD files with this make, try again with all makes... -@@ -1297,8 +1297,11 @@ do_am_printer(http_t *http, /* I - HTTP - */ - - cgiStartHTML(title); -- cgiSetVariable("CURRENT_MAKE_AND_MODEL", -- cgiGetArray("PPD_MAKE_AND_MODEL", 0)); -+ if (!cgiGetVariable("PPD_MAKE")) -+ cgiSetVariable("PPD_MAKE", cgiGetVariable("CURRENT_MAKE")); -+ if (!modify) -+ cgiSetVariable("CURRENT_MAKE_AND_MODEL", -+ cgiGetArray("PPD_MAKE_AND_MODEL", 0)); - cgiCopyTemplateLang("choose-model.tmpl"); - cgiEndHTML(); - } -@@ -1590,7 +1593,7 @@ do_config_server(http_t *http) /* I - H - #ifdef HAVE_GSSAPI - char default_auth_type[255]; - /* DefaultAuthType value */ -- const char *val; /* Setting value */ -+ const char *val; /* Setting value */ - #endif /* HAVE_GSSAPI */ - - -@@ -1662,7 +1665,7 @@ do_config_server(http_t *http) /* I - H - strcat(local_protocols, "slp"); - } - #endif /* HAVE_SLP */ -- -+ - if (cgiGetVariable("BROWSE_REMOTE_CUPS")) - strcpy(remote_protocols, "cups"); - else -@@ -1915,7 +1918,7 @@ do_config_server(http_t *http) /* I - H - cgiSetVariable("ERROR", strerror(errno)); - cgiCopyTemplateLang("error.tmpl"); - cgiEndHTML(); -- -+ - perror(tempfile); - return; - } -@@ -1927,7 +1930,7 @@ do_config_server(http_t *http) /* I - H - cgiSetVariable("ERROR", strerror(errno)); - cgiCopyTemplateLang("error.tmpl"); - cgiEndHTML(); -- -+ - perror(tempfile); - close(tempfd); - unlink(tempfile); -@@ -3342,7 +3345,7 @@ do_set_options(http_t *http, /* I - HTT - ((ppdattr = ppdFindAttr(ppd, "cupsCommands", NULL)) != NULL && - ppdattr->value && strstr(ppdattr->value, "AutoConfigure"))) - cgiSetVariable("HAVE_AUTOCONFIGURE", "YES"); -- else -+ else - { - for (i = 0; i < ppd->num_filters; i ++) - if (!strncmp(ppd->filters[i], "application/vnd.cups-postscript", 31)) -@@ -3446,7 +3449,7 @@ do_set_options(http_t *http, /* I - HTT - cgiSetVariable("GROUP", group->text); - - cgiCopyTemplateLang("option-header.tmpl"); -- -+ - for (j = group->num_options, option = group->options; - j > 0; - j --, option ++) -@@ -4090,7 +4093,7 @@ get_option_value( - - snprintf(buffer, bufsize, "Custom.%gx%g%s", width, length, uval); - } -- else if (cupsArrayCount(coption->params) == 1) -+ else if (cupsArrayCount(coption->params) == 1) - { - cparam = ppdFirstCustomParam(coption); - snprintf(keyword, sizeof(keyword), "%s.%s", coption->keyword, cparam->name); -diff -up cups-1.4.2/CHANGES-1.4.txt.str3418 cups-1.4.2/CHANGES-1.4.txt diff --git a/cups-str3422.patch b/cups-str3422.patch deleted file mode 100644 index a0ac1bf..0000000 --- a/cups-str3422.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff -up cups-1.4.2/templates/pl/jobs-header.tmpl.localize cups-1.4.2/templates/pl/jobs-header.tmpl ---- cups-1.4.2/templates/pl/jobs-header.tmpl.localize 2009-02-25 17:48:35.000000000 +0100 -+++ cups-1.4.2/templates/pl/jobs-header.tmpl 2009-11-20 13:56:58.000000000 +0100 -@@ -2,4 +2,4 @@ - {?which_jobs=completed?:
} - {?which_jobs=all?:
} - --

{total=0?Brak zadań:Wyświetlanie {#job_id} z {total} {?which_jobs=?aktywnych:{which_jobs=wszystkich?:zakończonych}} zadań{total=1?:s}}.

-+

{total=0?Brak zadań:Wyświetlanie {#job_id} z {total} {?which_jobs=?aktywnych:{which_jobs=all?:zakończonych}} zadań{total=1?:s}}.

-diff -up cups-1.4.2/templates/ru/jobs-header.tmpl.localize cups-1.4.2/templates/ru/jobs-header.tmpl ---- cups-1.4.2/templates/ru/jobs-header.tmpl.localize 2009-02-17 20:04:25.000000000 +0100 -+++ cups-1.4.2/templates/ru/jobs-header.tmpl 2009-11-20 13:53:54.000000000 +0100 -@@ -1,5 +1,6 @@ -
{?which_jobs=?:
} --{?which_jobs=completed?:
} --{?which_jobs=all?:
}
-+{?which_jobs=completed?:
} -+{?which_jobs=all?:
} -+ -+

{total=0?Нет заданий:Задание {#job_id} из {total} {?which_jobs=?активных:{which_jobs=all?:завершенных}}.

- --

{total=0?Нет заданий:Задание {#job_id} из {total} {?which_jobs=?активных:{which_jobs=всех?:завершенных}}.

diff --git a/cups-str3425.patch b/cups-str3425.patch deleted file mode 100644 index 98d2e44..0000000 --- a/cups-str3425.patch +++ /dev/null @@ -1,145 +0,0 @@ -diff -up cups-1.4.2/scheduler/job.c.str3425 cups-1.4.2/scheduler/job.c ---- cups-1.4.2/scheduler/job.c.str3425 2010-03-09 16:59:12.000000000 +0100 -+++ cups-1.4.2/scheduler/job.c 2010-03-09 17:02:57.000000000 +0100 -@@ -253,7 +253,7 @@ cupsdCancelJobs(const char *dest, /* I - - if (purge) - cupsdSetJobState(job, IPP_JOB_CANCELED, CUPSD_JOB_PURGE, - "Job purged by user."); -- else -+ else if (job->state_value < IPP_JOB_CANCELED) - cupsdSetJobState(job, IPP_JOB_CANCELED, CUPSD_JOB_DEFAULT, - "Job canceled by user."); - } -@@ -433,11 +433,11 @@ cupsdCleanJobs(void) - cupsd_job_t *job; /* Current job */ - - -- if (MaxJobs <= 0) -+ if (MaxJobs <= 0 && JobHistory) - return; - - for (job = (cupsd_job_t *)cupsArrayFirst(Jobs); -- job && cupsArrayCount(Jobs) >= MaxJobs; -+ job && (cupsArrayCount(Jobs) >= MaxJobs || !JobHistory); - job = (cupsd_job_t *)cupsArrayNext(Jobs)) - if (job->state_value >= IPP_JOB_CANCELED && !job->printer) - cupsdDeleteJob(job, CUPSD_JOB_PURGE); -@@ -2286,12 +2286,14 @@ cupsdSetJobState( - if (!cupsdLoadJob(job)) - return; - -- /* -- * Don't do anything if the state is unchanged... -- */ -- -- if (newstate == (oldstate = job->state_value)) -- return; -+ /* -+ * Don't do anything if the state is unchanged and we aren't purging the -+ * job... -+ */ -+ -+ oldstate = job->state_value; -+ if (newstate == oldstate && action != CUPSD_JOB_PURGE) -+ return; - - /* - * Stop any processes that are working on the current job... -@@ -2499,7 +2501,14 @@ cupsdSetJobState( - cupsdMarkDirty(CUPSD_DIRTY_JOBS); - } - else if (!job->printer) -+ { -+ /* -+ * Delete the job immediately if not actively printing... -+ */ -+ - cupsdDeleteJob(job, CUPSD_JOB_PURGE); -+ job = NULL; -+ } - break; - } - -@@ -2507,7 +2516,7 @@ cupsdSetJobState( - * Finalize the job immediately if we forced things... - */ - -- if (action == CUPSD_JOB_FORCE) -+ if (action >= CUPSD_JOB_FORCE && job && job->printer) - finalize_job(job); - - /* -diff -up cups-1.4.2/scheduler/main.c.str3425 cups-1.4.2/scheduler/main.c ---- cups-1.4.2/scheduler/main.c.str3425 2010-03-09 16:59:12.000000000 +0100 -+++ cups-1.4.2/scheduler/main.c 2010-03-09 16:59:12.000000000 +0100 -@@ -389,7 +389,7 @@ main(int argc, /* I - Number of comm - * parent's file descriptors to be blocking. This is a workaround for a - * limitation of userland libpthread on OpenBSD. - */ -- -+ - _thread_sys_closefrom(0); - #endif /* __OpenBSD__ */ - -@@ -817,8 +817,8 @@ main(int argc, /* I - Number of comm - - if (timeout == 86400 && Launchd && LaunchdTimeout && !NumPolled && - !cupsArrayCount(ActiveJobs) && -- (!Browsing || -- (!BrowseRemoteProtocols && -+ (!Browsing || -+ (!BrowseRemoteProtocols && - (!NumBrowsers || !BrowseLocalProtocols || - cupsArrayCount(Printers) == 0)))) - { -@@ -1046,6 +1046,7 @@ main(int argc, /* I - Number of comm - if ((current_time - senddoc_time) >= 10) - { - cupsdCheckJobs(); -+ cupsdCleanJobs(); - senddoc_time = current_time; - } - -@@ -1204,8 +1205,8 @@ main(int argc, /* I - Number of comm - #endif /* HAVE_GSSAPI */ - - #if defined(__APPLE__) && defined(HAVE_DLFCN_H) -- /* -- * Unload Print Service quota enforcement library (X Server only) -+ /* -+ * Unload Print Service quota enforcement library (X Server only) - */ - - PSQUpdateQuotaProc = NULL; -@@ -1562,13 +1563,13 @@ launchd_checkin(void) - - if (lis) - { -- cupsdLogMessage(CUPSD_LOG_DEBUG, -+ cupsdLogMessage(CUPSD_LOG_DEBUG, - "launchd_checkin: Matched existing listener %s with fd %d...", - httpAddrString(&(lis->address), s, sizeof(s)), fd); - } - else - { -- cupsdLogMessage(CUPSD_LOG_DEBUG, -+ cupsdLogMessage(CUPSD_LOG_DEBUG, - "launchd_checkin: Adding new listener %s with fd %d...", - httpAddrString(&addr, s, sizeof(s)), fd); - -@@ -1622,12 +1623,12 @@ launchd_checkout(void) - - /* - * Create or remove the launchd KeepAlive file based on whether -- * there are active jobs, polling, browsing for remote printers or -+ * there are active jobs, polling, browsing for remote printers or - * shared printers to advertise... - */ - -- if ((cupsArrayCount(ActiveJobs) || NumPolled || -- (Browsing && -+ if ((cupsArrayCount(ActiveJobs) || NumPolled || -+ (Browsing && - (BrowseRemoteProtocols || - (BrowseLocalProtocols && NumBrowsers && cupsArrayCount(Printers)))))) - { diff --git a/cups-str3428.patch b/cups-str3428.patch deleted file mode 100644 index 1ed50d9..0000000 --- a/cups-str3428.patch +++ /dev/null @@ -1,57 +0,0 @@ -diff -up cups-1.4.2/scheduler/ipp.c.str3428 cups-1.4.2/scheduler/ipp.c ---- cups-1.4.2/scheduler/ipp.c.str3428 2009-12-08 12:24:31.177373309 +0000 -+++ cups-1.4.2/scheduler/ipp.c 2009-12-08 12:27:33.910498083 +0000 -@@ -1860,8 +1860,6 @@ add_job(cupsd_client_t *con, /* I - Cl - "job-media-sheets-completed", 0); - ippAddString(job->attrs, IPP_TAG_JOB, IPP_TAG_URI, "job-printer-uri", NULL, - printer->uri); -- ippAddString(job->attrs, IPP_TAG_JOB, IPP_TAG_NAME, "job-name", NULL, -- title); - - if ((attr = ippFindAttribute(job->attrs, "job-k-octets", - IPP_TAG_INTEGER)) != NULL) -@@ -3438,7 +3436,7 @@ apple_register_profiles( - num_profiles ++; - } - -- -+ - /* - * If we have profiles, add them... - */ -@@ -3484,7 +3482,7 @@ apple_register_profiles( - snprintf(q_keyword, sizeof(q_keyword), "Default%s", attr->value); - q2_attr = ppdFindAttr(ppd, q_keyword, NULL); - } -- else -+ else - q2_attr = ppdFindAttr(ppd, "DefaultMediaType", NULL); - - if (q2_attr && q2_attr->value && q2_attr->value[0]) -@@ -3498,7 +3496,7 @@ apple_register_profiles( - snprintf(q_keyword, sizeof(q_keyword), "Default%s", attr->value); - q3_attr = ppdFindAttr(ppd, q_keyword, NULL); - } -- else -+ else - q3_attr = ppdFindAttr(ppd, "DefaultResolution", NULL); - - if (q3_attr && q3_attr->value && q3_attr->value[0]) -@@ -3667,7 +3665,7 @@ apple_register_profiles( - attr = ppdFindAttr(ppd, "DefaultColorSpace", NULL); - - num_profiles = (attr && ppd->colorspace == PPD_CS_GRAY) ? 1 : 2; -- -+ - if ((profiles = calloc(num_profiles, sizeof(CMDeviceProfileArray))) == NULL) - { - cupsdLogMessage(CUPSD_LOG_ERROR, -@@ -4762,7 +4760,7 @@ check_quotas(cupsd_client_t *con, /* I - if (q->page_count == -4) /* special case: unlimited user */ - { - cupsdLogMessage(CUPSD_LOG_INFO, -- "User \"%s\" request approved for printer %s (%s): " -+ "User \"%s\" request approved for printer %s (%s): " - "unlimited quota.", - username, p->name, p->info); - q->page_count = 0; /* allow user to print */ diff --git a/cups-str3431.patch b/cups-str3431.patch deleted file mode 100644 index 636960d..0000000 --- a/cups-str3431.patch +++ /dev/null @@ -1,32 +0,0 @@ -diff -up cups-1.4.2/scheduler/ipp.c.str3431 cups-1.4.2/scheduler/ipp.c ---- cups-1.4.2/scheduler/ipp.c.str3431 2009-12-08 12:28:21.095374048 +0000 -+++ cups-1.4.2/scheduler/ipp.c 2009-12-08 12:32:03.829498891 +0000 -@@ -7183,6 +7183,7 @@ get_job_attrs(cupsd_client_t *con, /* I - ipp_attribute_t *attr; /* Current attribute */ - int jobid; /* Job ID */ - cupsd_job_t *job; /* Current job */ -+ cupsd_printer_t *printer; /* Current printer */ - char scheme[HTTP_MAX_URI], /* Method portion of URI */ - username[HTTP_MAX_URI], /* Username portion of URI */ - host[HTTP_MAX_URI], /* Host portion of URI */ -@@ -7257,7 +7258,19 @@ get_job_attrs(cupsd_client_t *con, /* I - * Check policy... - */ - -- if ((status = cupsdCheckPolicy(DefaultPolicyPtr, con, NULL)) != HTTP_OK) -+ if ((printer = job->printer) == NULL) -+ printer = cupsdFindDest(job->dest); -+ -+ if (printer) -+ { -+ if ((status = cupsdCheckPolicy(printer->op_policy_ptr, con, -+ NULL)) != HTTP_OK) -+ { -+ send_http_error(con, status, printer); -+ return; -+ } -+ } -+ else if ((status = cupsdCheckPolicy(DefaultPolicyPtr, con, NULL)) != HTTP_OK) - { - send_http_error(con, status, NULL); - return; diff --git a/cups-str3435.patch b/cups-str3435.patch deleted file mode 100644 index 1870abb..0000000 --- a/cups-str3435.patch +++ /dev/null @@ -1,45 +0,0 @@ -diff -up cups-1.4.2/cups/util.c.str3435 cups-1.4.2/cups/util.c ---- cups-1.4.2/cups/util.c.str3435 2009-06-22 21:44:34.000000000 +0100 -+++ cups-1.4.2/cups/util.c 2009-12-08 12:11:38.647375446 +0000 -@@ -1511,12 +1511,36 @@ cupsPrintFiles2( - return (0); - } - -- status = cupsStartDocument(http, name, job_id, docname, format, -- i == (num_files - 1)); -+ do -+ { -+ cupsFileRewind(fp); -+ -+ status = cupsStartDocument(http, name, job_id, docname, format, -+ i == (num_files - 1)); -+ -+ while (status == HTTP_CONTINUE && -+ (bytes = cupsFileRead(fp, buffer, sizeof(buffer))) > 0) -+ status = cupsWriteRequestData(http, buffer, bytes); -+ -+ if (status == HTTP_UNAUTHORIZED) -+ { -+ char resource[1024]; /* Printer resource */ - -- while (status == HTTP_CONTINUE && -- (bytes = cupsFileRead(fp, buffer, sizeof(buffer))) > 0) -- status = cupsWriteRequestData(http, buffer, bytes); -+ snprintf(resource, sizeof(resource), "/printers/%s", name); -+ -+ if (!cupsDoAuthentication(http, "POST", resource)) -+ { -+ if (httpReconnect(http)) -+ { -+ _cupsSetError(IPP_SERVICE_UNAVAILABLE, NULL, 0); -+ return (0); -+ } -+ } -+ else -+ status = HTTP_AUTHORIZATION_CANCELED; -+ } -+ } -+ while (status == HTTP_UNAUTHORIZED); - - cupsFileClose(fp); - diff --git a/cups-str3436.patch b/cups-str3436.patch deleted file mode 100644 index 910d15a..0000000 --- a/cups-str3436.patch +++ /dev/null @@ -1,33 +0,0 @@ -diff -up cups-1.4.2/cgi-bin/ipp-var.c.str3436 cups-1.4.2/cgi-bin/ipp-var.c ---- cups-1.4.2/cgi-bin/ipp-var.c.str3436 2009-11-09 23:01:17.000000000 +0000 -+++ cups-1.4.2/cgi-bin/ipp-var.c 2009-12-08 12:19:01.988500453 +0000 -@@ -333,7 +333,7 @@ cgiMoveJobs(http_t *http, /* I - Co - NULL, job_uri); - ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD, - "requested-attributes", NULL, "job-printer-uri"); -- -+ - if ((response = cupsDoRequest(http, request, "/")) != NULL) - { - if ((attr = ippFindAttribute(response, "job-printer-uri", -@@ -926,7 +926,7 @@ cgiRewriteURL(const char *uri, /* I - C - ishttps ? "https" : "http", - userpass, hostname, port, resource); - else -- snprintf(url, urlsize, "%s://%s:%d%s", -+ snprintf(url, urlsize, "%s://%s:%d%s", - ishttps ? "https" : "http", - hostname, port, resource); - } -@@ -1518,7 +1518,11 @@ cgiShowJobs(http_t *http, /* I - Co - */ - - if (dest) -+ { - snprintf(val, sizeof(val), "/%s/%s", section, dest); -+ cgiSetVariable("PRINTER_NAME", dest); -+ cgiSetVariable("PRINTER_URI_SUPPORTED", val); -+ } - else - strlcpy(val, "/jobs/", sizeof(val)); - diff --git a/cups-str3439.patch b/cups-str3439.patch deleted file mode 100644 index e5b2e2e..0000000 --- a/cups-str3439.patch +++ /dev/null @@ -1,126 +0,0 @@ -diff -up cups-1.4.2/cgi-bin/admin.c.str3439 cups-1.4.2/cgi-bin/admin.c ---- cups-1.4.2/cgi-bin/admin.c.str3439 2009-12-08 10:03:36.412157983 +0000 -+++ cups-1.4.2/cgi-bin/admin.c 2009-12-08 10:03:41.659157246 +0000 -@@ -3320,11 +3320,16 @@ do_set_options(http_t *http, /* I - HTT - for (option = ppdFirstOption(ppd); - option; - option = ppdNextOption(ppd)) -+ { - if ((var = cgiGetVariable(option->keyword)) != NULL) - { - have_options = 1; - ppdMarkOption(ppd, option->keyword, var); -+ fprintf(stderr, "DEBUG: Set %s to %s...\n", option->keyword, var); - } -+ else -+ fprintf(stderr, "DEBUG: Didn't find %s...\n", option->keyword); -+ } - } - - if (!have_options || ppdConflicts(ppd)) -diff -up cups-1.4.2/cups/conflicts.c.str3439 cups-1.4.2/cups/conflicts.c ---- cups-1.4.2/cups/conflicts.c.str3439 2009-05-18 23:55:15.000000000 +0100 -+++ cups-1.4.2/cups/conflicts.c 2009-12-08 10:03:41.657157719 +0000 -@@ -583,9 +583,13 @@ ppdConflicts(ppd_file_t *ppd) /* I - PP - * Clear all conflicts... - */ - -+ cupsArraySave(ppd->options); -+ - for (o = ppdFirstOption(ppd); o; o = ppdNextOption(ppd)) - o->conflicted = 0; - -+ cupsArrayRestore(ppd->options); -+ - /* - * Test for conflicts... - */ -diff -up cups-1.4.2/cups/mark.c.str3439 cups-1.4.2/cups/mark.c ---- cups-1.4.2/cups/mark.c.str3439 2009-04-20 22:37:14.000000000 +0100 -+++ cups-1.4.2/cups/mark.c 2009-12-08 10:03:41.656157620 +0000 -@@ -842,6 +842,8 @@ ppd_mark_option(ppd_file_t *ppd, /* I - - - if (!strcasecmp(option, "AP_D_InputSlot")) - { -+ cupsArraySave(ppd->options); -+ - if ((o = ppdFindOption(ppd, "InputSlot")) != NULL) - { - key.option = o; -@@ -851,13 +853,21 @@ ppd_mark_option(ppd_file_t *ppd, /* I - - cupsArrayRemove(ppd->marked, oldc); - } - } -+ -+ cupsArrayRestore(ppd->options); - } - - /* - * Check for custom options... - */ - -- if ((o = ppdFindOption(ppd, option)) == NULL) -+ cupsArraySave(ppd->options); -+ -+ o = ppdFindOption(ppd, option); -+ -+ cupsArrayRestore(ppd->options); -+ -+ if (!o) - return; - - loc = localeconv(); -@@ -1060,6 +1070,8 @@ ppd_mark_option(ppd_file_t *ppd, /* I - - * appropriate... - */ - -+ cupsArraySave(ppd->options); -+ - if (!strcasecmp(option, "PageSize")) - { - if ((o = ppdFindOption(ppd, "PageRegion")) != NULL) -@@ -1084,6 +1096,8 @@ ppd_mark_option(ppd_file_t *ppd, /* I - - } - } - } -+ -+ cupsArrayRestore(ppd->options); - } - else if (!strcasecmp(option, "InputSlot")) - { -@@ -1091,6 +1105,8 @@ ppd_mark_option(ppd_file_t *ppd, /* I - - * Unmark ManualFeed option... - */ - -+ cupsArraySave(ppd->options); -+ - if ((o = ppdFindOption(ppd, "ManualFeed")) != NULL) - { - key.option = o; -@@ -1100,6 +1116,8 @@ ppd_mark_option(ppd_file_t *ppd, /* I - - cupsArrayRemove(ppd->marked, oldc); - } - } -+ -+ cupsArrayRestore(ppd->options); - } - else if (!strcasecmp(option, "ManualFeed") && - !strcasecmp(choice, "True")) -@@ -1108,6 +1126,8 @@ ppd_mark_option(ppd_file_t *ppd, /* I - - * Unmark InputSlot option... - */ - -+ cupsArraySave(ppd->options); -+ - if ((o = ppdFindOption(ppd, "InputSlot")) != NULL) - { - key.option = o; -@@ -1117,6 +1137,8 @@ ppd_mark_option(ppd_file_t *ppd, /* I - - cupsArrayRemove(ppd->marked, oldc); - } - } -+ -+ cupsArrayRestore(ppd->options); - } - } - diff --git a/cups-str3440.patch b/cups-str3440.patch deleted file mode 100644 index 9dfd56b..0000000 --- a/cups-str3440.patch +++ /dev/null @@ -1,104 +0,0 @@ -diff -up cups-1.4.2/cgi-bin/admin.c.str3440 cups-1.4.2/cgi-bin/admin.c ---- cups-1.4.2/cgi-bin/admin.c.str3440 2009-12-08 10:10:05.529157178 +0000 -+++ cups-1.4.2/cgi-bin/admin.c 2009-12-08 10:10:12.571033051 +0000 -@@ -3436,6 +3436,16 @@ do_set_options(http_t *http, /* I - HTT - { - cgiSetArray("ckeyword", k, option->keyword); - cgiSetArray("ckeytext", k, option->text); -+ -+ for (m = 0; m < option->num_choices; m ++) -+ { -+ if (option->choices[m].marked) -+ { -+ cgiSetArray("cchoice", k, option->choices[m].text); -+ break; -+ } -+ } -+ - k ++; - } - -diff -up cups-1.4.2/templates/de/option-conflict.tmpl.str3440 cups-1.4.2/templates/de/option-conflict.tmpl ---- cups-1.4.2/templates/de/option-conflict.tmpl.str3440 2009-04-03 16:55:28.000000000 +0100 -+++ cups-1.4.2/templates/de/option-conflict.tmpl 2009-12-08 10:10:12.567157789 +0000 -@@ -1,7 +1,7 @@ -

Error: The following options are conflicting:

- - - -

Bitte ändern sie eine oder mehrere Einstellungen um die Konflikte zu lösen.

-diff -up cups-1.4.2/templates/es/option-conflict.tmpl.str3440 cups-1.4.2/templates/es/option-conflict.tmpl ---- cups-1.4.2/templates/es/option-conflict.tmpl.str3440 2008-12-08 21:20:06.000000000 +0000 -+++ cups-1.4.2/templates/es/option-conflict.tmpl 2009-12-08 10:10:12.568157603 +0000 -@@ -1,7 +1,7 @@ -

Error: Las siguientes opciones están en conflicto:

- - - -

Cambie una o más de las opciones para resolver el problema.

-diff -up cups-1.4.2/templates/eu/option-conflict.tmpl.str3440 cups-1.4.2/templates/eu/option-conflict.tmpl ---- cups-1.4.2/templates/eu/option-conflict.tmpl.str3440 2009-07-07 17:52:34.000000000 +0100 -+++ cups-1.4.2/templates/eu/option-conflict.tmpl 2009-12-08 10:10:12.569157261 +0000 -@@ -1,7 +1,7 @@ -

Errorea: honako aukerak gatazkan daude:

- - - -

Aldatu aukera bat edo gehiago gatazkak ebazteko.

-diff -up cups-1.4.2/templates/ja/option-conflict.tmpl.str3440 cups-1.4.2/templates/ja/option-conflict.tmpl ---- cups-1.4.2/templates/ja/option-conflict.tmpl.str3440 2009-02-17 19:04:25.000000000 +0000 -+++ cups-1.4.2/templates/ja/option-conflict.tmpl 2009-12-08 10:10:12.566157419 +0000 -@@ -1,7 +1,7 @@ -

エラー: 以下のオプションは競合します:

- - - -

競合を解決するために、1 つ以上のオプションを変更してください。

-diff -up cups-1.4.2/templates/option-conflict.tmpl.str3440 cups-1.4.2/templates/option-conflict.tmpl ---- cups-1.4.2/templates/option-conflict.tmpl.str3440 2005-08-24 20:25:49.000000000 +0100 -+++ cups-1.4.2/templates/option-conflict.tmpl 2009-12-08 10:10:12.566157419 +0000 -@@ -1,7 +1,7 @@ -

Error: The following options are conflicting:

- - - -

Please change one or more of the options to resolve the conflicts.

-diff -up cups-1.4.2/templates/pl/option-conflict.tmpl.str3440 cups-1.4.2/templates/pl/option-conflict.tmpl ---- cups-1.4.2/templates/pl/option-conflict.tmpl.str3440 2009-02-25 16:48:35.000000000 +0000 -+++ cups-1.4.2/templates/pl/option-conflict.tmpl 2009-12-08 10:10:12.567157789 +0000 -@@ -1,7 +1,7 @@ -

Błąd: następujące opcje są w konflikcie ze sobą:

- - - -

Proszę zmienić jedną lub więcej opcji, aby rozwiązać konflikt.

-diff -up cups-1.4.2/templates/ru/option-conflict.tmpl.str3440 cups-1.4.2/templates/ru/option-conflict.tmpl ---- cups-1.4.2/templates/ru/option-conflict.tmpl.str3440 2009-02-17 19:04:25.000000000 +0000 -+++ cups-1.4.2/templates/ru/option-conflict.tmpl 2009-12-08 10:10:12.567157789 +0000 -@@ -1,7 +1,7 @@ -

Ошибка: следующие параметры конфликтуют:

- - - -

Измените один или несколько параметров для того, чтобы избежать конфликта.

diff --git a/cups-str3442.patch b/cups-str3442.patch deleted file mode 100644 index af57fd4..0000000 --- a/cups-str3442.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -up cups-1.4.2/conf/mime.convs.in.str3442 cups-1.4.2/conf/mime.convs.in ---- cups-1.4.2/conf/mime.convs.in.str3442 2009-05-22 20:30:39.000000000 +0100 -+++ cups-1.4.2/conf/mime.convs.in 2009-12-08 10:19:40.044329553 +0000 -@@ -47,6 +47,7 @@ application/x-perl application/postscri - application/x-shell application/postscript 33 texttops - text/plain application/postscript 33 texttops - text/html application/postscript 33 texttops -+text/css application/postscript 33 texttops - image/gif application/vnd.cups-postscript 66 imagetops - image/png application/vnd.cups-postscript 66 imagetops - image/jpeg application/vnd.cups-postscript 66 imagetops diff --git a/cups-str3448.patch b/cups-str3448.patch deleted file mode 100644 index 4233e7e..0000000 --- a/cups-str3448.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff -up cups-1.4.2/cups/dest.c.str3448 cups-1.4.2/cups/dest.c ---- cups-1.4.2/cups/dest.c.str3448 2009-08-28 23:54:34.000000000 +0100 -+++ cups-1.4.2/cups/dest.c 2009-12-10 18:15:50.910079549 +0000 -@@ -145,6 +145,12 @@ cupsAddDest(const char *name, /* I - - - dest = cups_add_dest(name, instance, &num_dests, dests); - -+ /* -+ * Find the base dest again now the array has been realloc'd. -+ */ -+ -+ parent = cupsGetDest(name, NULL, num_dests, *dests); -+ - if (instance && parent && parent->num_options > 0) - { - /* diff --git a/cups-str3458.patch b/cups-str3458.patch deleted file mode 100644 index da43b76..0000000 --- a/cups-str3458.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff -up cups-1.4.2/backend/ipp.c.str3458 cups-1.4.2/backend/ipp.c ---- cups-1.4.2/backend/ipp.c.str3458 2009-12-22 13:04:25.021208333 +0000 -+++ cups-1.4.2/backend/ipp.c 2009-12-22 13:04:26.570082893 +0000 -@@ -802,6 +802,15 @@ main(int argc, /* I - Number of comm - - return (CUPS_BACKEND_STOP); - } -+ else if (ipp_status == IPP_NOT_AUTHORIZED || ipp_status == IPP_FORBIDDEN) -+ { -+ if (!strncmp(httpGetField(http, HTTP_FIELD_WWW_AUTHENTICATE), -+ "Negotiate", 9)) -+ auth_info_required = "negotiate"; -+ -+ fprintf(stderr, "ATTR: auth-info-required=%s\n", auth_info_required); -+ return (CUPS_BACKEND_AUTH_REQUIRED); -+ } - else - { - _cupsLangPrintf(stderr, diff --git a/cups-str3460.patch b/cups-str3460.patch deleted file mode 100644 index 20b1b70..0000000 --- a/cups-str3460.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -up cups-1.4.2/backend/ipp.c.str3460 cups-1.4.2/backend/ipp.c ---- cups-1.4.2/backend/ipp.c.str3460 2010-01-15 10:25:14.720258721 +0000 -+++ cups-1.4.2/backend/ipp.c 2010-01-15 10:28:57.218384231 +0000 -@@ -1435,7 +1435,10 @@ main(int argc, /* I - Number of comm - else if (ipp_status > IPP_OK_CONFLICT) - return (CUPS_BACKEND_FAILED); - else -+ { -+ _cupsLangPuts(stderr, _("INFO: Ready to print.\n")); - return (CUPS_BACKEND_OK); -+ } - } - - diff --git a/cups-str3503.patch b/cups-str3503.patch new file mode 100644 index 0000000..334f483 --- /dev/null +++ b/cups-str3503.patch @@ -0,0 +1,12 @@ +diff -up cups-1.4.3/cups/dest.c.str3503 cups-1.4.3/cups/dest.c +--- cups-1.4.3/cups/dest.c.str3503 2010-03-31 13:31:42.000000000 +0200 ++++ cups-1.4.3/cups/dest.c 2010-03-31 13:32:52.000000000 +0200 +@@ -553,7 +553,7 @@ cupsGetNamedDest(http_t *http, /* I + + if (!cups_get_sdests(http, op, name, 0, &dest)) + { +- if (op == CUPS_GET_DEFAULT || name) ++ if (op == CUPS_GET_DEFAULT || (name && !set_as_default)) + return (NULL); + + /* diff --git a/cups.spec b/cups.spec index fa77965..469c8eb 100644 --- a/cups.spec +++ b/cups.spec @@ -7,8 +7,8 @@ Summary: Common Unix Printing System Name: cups -Version: 1.4.2 -Release: 30%{?dist} +Version: 1.4.3 +Release: 1%{?dist} License: GPLv2 Group: System Environment/Daemons Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2 @@ -31,61 +31,37 @@ Patch4: cups-serial.patch Patch5: cups-banners.patch Patch6: cups-serverbin-compat.patch Patch7: cups-no-export-ssllibs.patch -Patch8: cups-str3448.patch -Patch9: cups-direct-usb.patch -Patch10: cups-lpr-help.patch -Patch11: cups-peercred.patch -Patch12: cups-pid.patch -Patch13: cups-page-label.patch -Patch14: cups-eggcups.patch -Patch15: cups-getpass.patch -Patch16: cups-driverd-timeout.patch -Patch17: cups-strict-ppd-line-length.patch -Patch18: cups-logrotate.patch -Patch19: cups-usb-paperout.patch -Patch20: cups-build.patch -Patch21: cups-res_init.patch -Patch22: cups-filter-debug.patch -Patch23: cups-uri-compat.patch -Patch24: cups-cups-get-classes.patch -Patch25: cups-avahi.patch -Patch26: cups-str3382.patch -Patch27: cups-str3285_v2-str3503.patch -Patch28: cups-str3390.patch -Patch29: cups-str3391.patch -Patch30: cups-str3381.patch -Patch31: cups-str3399.patch -Patch32: cups-str3403.patch -Patch33: cups-str3407.patch -Patch34: cups-str3418.patch -Patch35: cups-CVE-2009-3553.patch -Patch36: cups-str3422.patch -Patch37: cups-str3413.patch -Patch38: cups-str3439.patch -Patch39: cups-str3440.patch -Patch40: cups-str3442.patch -Patch41: cups-negative-snmp-string-length.patch -Patch42: cups-sidechannel-intrs.patch -Patch43: cups-media-empty-warning.patch -Patch44: cups-str3435.patch -Patch45: cups-str3436.patch -Patch46: cups-str3425.patch -Patch47: cups-str3428.patch -Patch48: cups-str3431.patch -Patch49: cups-gnutls-gcrypt-threads.patch -Patch50: cups-str3458.patch -Patch51: cups-0755.patch -Patch52: cups-str3460.patch -Patch53: cups-EAI_AGAIN.patch -Patch54: cups-str3505.patch -Patch55: cups-str3541.patch +Patch8: cups-direct-usb.patch +Patch9: cups-lpr-help.patch +Patch10: cups-peercred.patch +Patch11: cups-pid.patch +Patch12: cups-page-label.patch +Patch13: cups-eggcups.patch +Patch14: cups-getpass.patch +Patch15: cups-driverd-timeout.patch +Patch16: cups-strict-ppd-line-length.patch +Patch17: cups-logrotate.patch +Patch18: cups-usb-paperout.patch +Patch19: cups-build.patch +Patch20: cups-res_init.patch +Patch21: cups-filter-debug.patch +Patch22: cups-uri-compat.patch +Patch23: cups-cups-get-classes.patch +Patch24: cups-avahi.patch +Patch25: cups-str3382.patch +Patch26: cups-str3503.patch +Patch27: cups-str3399.patch +Patch28: cups-gnutls-gcrypt-threads.patch +Patch29: cups-0755.patch +Patch30: cups-EAI_AGAIN.patch +Patch31: cups-str3505.patch +Patch32: cups-str3541.patch Patch100: cups-lspp.patch ## SECURITY PATCHES: Patch200: cups-CVE-2010-0302.patch - Epoch: 1 Url: http://www.cups.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -217,54 +193,31 @@ module. %patch5 -p1 -b .banners %patch6 -p1 -b .serverbin-compat %patch7 -p1 -b .no-export-ssllibs -%patch8 -p1 -b .str3448 -%patch9 -p1 -b .direct-usb -%patch10 -p1 -b .lpr-help -%patch11 -p1 -b .peercred -%patch12 -p1 -b .pid -%patch13 -p1 -b .page-label -%patch14 -p1 -b .eggcups -%patch15 -p1 -b .getpass -%patch16 -p1 -b .driverd-timeout -%patch17 -p1 -b .strict-ppd-line-length -%patch18 -p1 -b .logrotate -%patch19 -p1 -b .usb-paperout -%patch20 -p1 -b .build -%patch21 -p1 -b .res_init -%patch22 -p1 -b .filter-debug -%patch23 -p1 -b .uri-compat -%patch24 -p1 -b .cups-get-classes -%patch25 -p1 -b .avahi -%patch26 -p1 -b .str3382 -%patch27 -p1 -b .str3285_v2-str3503 -%patch28 -p1 -b .str3390 -%patch29 -p1 -b .str3391 -%patch30 -p1 -b .str3381 -%patch31 -p1 -b .str3399 -%patch32 -p1 -b .str3403 -%patch33 -p1 -b .str3407 -%patch34 -p1 -b .str3418 -%patch35 -p1 -b .CVE-2009-3553 -%patch36 -p1 -b .str3422 -%patch37 -p1 -b .str3413 -%patch38 -p1 -b .str3439 -%patch39 -p1 -b .str3440 -%patch40 -p1 -b .str3442 -%patch41 -p1 -b .negative-snmp-string-length -%patch42 -p1 -b .sidechannel-intrs -%patch43 -p1 -b .media-empty-warning -%patch44 -p1 -b .str3435 -%patch45 -p1 -b .str3436 -%patch46 -p1 -b .str3425 -%patch47 -p1 -b .str3428 -%patch48 -p1 -b .str3431 -#%patch49 -p1 -b .gnutls-gcrypt-threads -%patch50 -p1 -b .str3458 -%patch51 -p1 -b .0755 -%patch52 -p1 -b .str3460 -%patch53 -p1 -b .EAI_AGAIN -%patch54 -p1 -b .str3505 -%patch55 -p1 -b .str3541 +%patch8 -p1 -b .direct-usb +%patch9 -p1 -b .lpr-help +%patch10 -p1 -b .peercred +%patch11 -p1 -b .pid +%patch12 -p1 -b .page-label +%patch13 -p1 -b .eggcups +%patch14 -p1 -b .getpass +%patch15 -p1 -b .driverd-timeout +%patch16 -p1 -b .strict-ppd-line-length +%patch17 -p1 -b .logrotate +%patch18 -p1 -b .usb-paperout +%patch19 -p1 -b .build +%patch20 -p1 -b .res_init +%patch21 -p1 -b .filter-debug +%patch22 -p1 -b .uri-compat +%patch23 -p1 -b .cups-get-classes +%patch24 -p1 -b .avahi +%patch25 -p1 -b .str3382 +%patch26 -p1 -b .str3503 +%patch27 -p1 -b .str3399 +#%patch28 -p1 -b .gnutls-gcrypt-threads +%patch29 -p1 -b .0755 +%patch30 -p1 -b .EAI_AGAIN +%patch31 -p1 -b .str3505 +%patch32 -p1 -b .str3541 %if %lspp %patch100 -p1 -b .lspp @@ -486,6 +439,8 @@ rm -rf $RPM_BUILD_ROOT %config(noreplace) %doc %{_datadir}/%{name}/www/de/index.html %config(noreplace) %doc %{_datadir}/%{name}/www/es/index.html %config(noreplace) %doc %{_datadir}/%{name}/www/eu/index.html +%config(noreplace) %doc %{_datadir}/%{name}/www/id/index.html +%config(noreplace) %doc %{_datadir}/%{name}/www/it/index.html %config(noreplace) %doc %{_datadir}/%{name}/www/ja/index.html %config(noreplace) %doc %{_datadir}/%{name}/www/pl/index.html %config(noreplace) %doc %{_datadir}/%{name}/www/ru/index.html @@ -521,6 +476,8 @@ rm -rf $RPM_BUILD_ROOT %config(noreplace) %{_datadir}/cups/templates/de/*.tmpl %config(noreplace) %{_datadir}/cups/templates/es/*.tmpl %config(noreplace) %{_datadir}/cups/templates/eu/*.tmpl +%config(noreplace) %{_datadir}/cups/templates/id/*.tmpl +%config(noreplace) %{_datadir}/cups/templates/it/*.tmpl %config(noreplace) %{_datadir}/cups/templates/ja/*.tmpl %config(noreplace) %{_datadir}/cups/templates/pl/*.tmpl %config(noreplace) %{_datadir}/cups/templates/ru/*.tmpl @@ -564,6 +521,14 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog +* Wed Mar 31 2010 Jiri Popelka 1:1.4.3-1 +- 1.4.3. +- No longer need CVE-2009-3553, str3381, str3390, str3391, + str3403, str3407, str3413, str3418, str3422, str3425, + str3428, str3431, str3435, str3436, str3439, str3440, + str3442, str3448, str3458, str3460, cups-sidechannel-intrs, + negative-snmp-string-length, cups-media-empty-warning patches. + * Tue Mar 30 2010 Jiri Popelka 1:1.4.2-30 - Fixed lpstat to adhere to -o option (bug #577901, STR #3541). diff --git a/sources b/sources index 73d408c..4448a10 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -d95e2d588e3d36e563027a963b117b1b cups-1.4.2-source.tar.bz2 +e70b1c3f60143d7310c1d74c111a21ab cups-1.4.3-source.tar.bz2 From 6100ed17959fe936ea122cd2b32a0969df1bc5cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Popelka?= Date: Wed, 31 Mar 2010 13:11:00 +0000 Subject: [PATCH 075/110] - 1.4.3. - No longer need CVE-2009-3553, str3381, str3390, str3391, str3403, str3407, str3413, str3418, str3422, str3425, str3428, str3431, str3435, str3436, str3439, str3440, str3442, str3448, str3458, str3460, cups-sidechannel-intrs, negative-snmp-string-length, cups-media-empty-warning patches. --- .cvsignore | 1 + cups-CVE-2009-3553.patch | 39 ----- cups-CVE-2010-0302.patch | 13 +- cups-lspp.patch | 172 ++++++++++---------- cups-media-empty-warning.patch | 132 ---------------- cups-negative-snmp-string-length.patch | 31 ---- cups-sidechannel-intrs.patch | 68 -------- cups-str3285_v2-str3503.patch | 12 -- cups-str3381.patch | 208 ------------------------- cups-str3382.patch | 10 +- cups-str3390.patch | 15 -- cups-str3391.patch | 196 ----------------------- cups-str3399.patch | 25 +-- cups-str3403.patch | 84 ---------- cups-str3407.patch | 67 -------- cups-str3413.patch | 33 ---- cups-str3418.patch | 90 ----------- cups-str3422.patch | 22 --- cups-str3425.patch | 145 ----------------- cups-str3428.patch | 57 ------- cups-str3431.patch | 32 ---- cups-str3435.patch | 45 ------ cups-str3436.patch | 33 ---- cups-str3439.patch | 126 --------------- cups-str3440.patch | 104 ------------- cups-str3442.patch | 11 -- cups-str3448.patch | 16 -- cups-str3458.patch | 19 --- cups-str3460.patch | 14 -- cups-str3503.patch | 12 ++ cups.spec | 199 +++++++++-------------- sources | 2 +- 32 files changed, 183 insertions(+), 1850 deletions(-) delete mode 100644 cups-CVE-2009-3553.patch delete mode 100644 cups-media-empty-warning.patch delete mode 100644 cups-negative-snmp-string-length.patch delete mode 100644 cups-sidechannel-intrs.patch delete mode 100644 cups-str3285_v2-str3503.patch delete mode 100644 cups-str3381.patch delete mode 100644 cups-str3390.patch delete mode 100644 cups-str3391.patch delete mode 100644 cups-str3403.patch delete mode 100644 cups-str3407.patch delete mode 100644 cups-str3413.patch delete mode 100644 cups-str3418.patch delete mode 100644 cups-str3422.patch delete mode 100644 cups-str3425.patch delete mode 100644 cups-str3428.patch delete mode 100644 cups-str3431.patch delete mode 100644 cups-str3435.patch delete mode 100644 cups-str3436.patch delete mode 100644 cups-str3439.patch delete mode 100644 cups-str3440.patch delete mode 100644 cups-str3442.patch delete mode 100644 cups-str3448.patch delete mode 100644 cups-str3458.patch delete mode 100644 cups-str3460.patch create mode 100644 cups-str3503.patch diff --git a/.cvsignore b/.cvsignore index 168a39e..f3cee3a 100644 --- a/.cvsignore +++ b/.cvsignore @@ -39,3 +39,4 @@ cups-1.4b2-source.tar.bz2 cups-1.4b2-svn8404-source.tar.bz2 cups-1.4rc1-source.tar.bz2 cups-1.4.0-source.tar.bz2 +cups-1.4.3-source.tar.bz2 diff --git a/cups-CVE-2009-3553.patch b/cups-CVE-2009-3553.patch deleted file mode 100644 index 6aadfe4..0000000 --- a/cups-CVE-2009-3553.patch +++ /dev/null @@ -1,39 +0,0 @@ -diff -up cups-1.4.2/scheduler/select.c.CVE-2009-3553 cups-1.4.2/scheduler/select.c ---- cups-1.4.2/scheduler/select.c.CVE-2009-3553 2009-07-15 00:07:52.000000000 +0100 -+++ cups-1.4.2/scheduler/select.c 2009-11-19 12:30:39.672976150 +0000 -@@ -454,7 +454,7 @@ cupsdDoSelect(long timeout) /* I - Time - if (fdptr->read_cb && event->filter == EVFILT_READ) - (*(fdptr->read_cb))(fdptr->data); - -- if (fdptr->write_cb && event->filter == EVFILT_WRITE) -+ if (fdptr->use > 1 && fdptr->write_cb && event->filter == EVFILT_WRITE) - (*(fdptr->write_cb))(fdptr->data); - - release_fd(fdptr); -@@ -499,7 +499,7 @@ cupsdDoSelect(long timeout) /* I - Time - if (fdptr->read_cb && (event->events & (EPOLLIN | EPOLLERR | EPOLLHUP))) - (*(fdptr->read_cb))(fdptr->data); - -- if (fdptr->write_cb && (event->events & (EPOLLOUT | EPOLLERR | EPOLLHUP))) -+ if (fdptr->use > 1 && fdptr->write_cb && (event->events & (EPOLLOUT | EPOLLERR | EPOLLHUP))) - (*(fdptr->write_cb))(fdptr->data); - - release_fd(fdptr); -@@ -590,7 +590,7 @@ cupsdDoSelect(long timeout) /* I - Time - if (fdptr->read_cb && (pfd->revents & (POLLIN | POLLERR | POLLHUP))) - (*(fdptr->read_cb))(fdptr->data); - -- if (fdptr->write_cb && (pfd->revents & (POLLOUT | POLLERR | POLLHUP))) -+ if (fdptr->use > 1 && fdptr->write_cb && (pfd->revents & (POLLOUT | POLLERR | POLLHUP))) - (*(fdptr->write_cb))(fdptr->data); - - release_fd(fdptr); -@@ -645,7 +645,7 @@ cupsdDoSelect(long timeout) /* I - Time - if (fdptr->read_cb && FD_ISSET(fdptr->fd, &cupsd_current_input)) - (*(fdptr->read_cb))(fdptr->data); - -- if (fdptr->write_cb && FD_ISSET(fdptr->fd, &cupsd_current_output)) -+ if (fdptr->use > 1 && fdptr->write_cb && FD_ISSET(fdptr->fd, &cupsd_current_output)) - (*(fdptr->write_cb))(fdptr->data); - - release_fd(fdptr); diff --git a/cups-CVE-2010-0302.patch b/cups-CVE-2010-0302.patch index 63d2081..da108e1 100644 --- a/cups-CVE-2010-0302.patch +++ b/cups-CVE-2010-0302.patch @@ -1,6 +1,6 @@ -diff -up cups-1.4.2/scheduler/select.c.CVE-2010-0302 cups-1.4.2/scheduler/select.c ---- cups-1.4.2/scheduler/select.c.CVE-2010-0302 2010-03-05 10:37:49.990476887 +0000 -+++ cups-1.4.2/scheduler/select.c 2010-03-05 10:38:01.803478081 +0000 +diff -up cups-1.4.3/scheduler/select.c.CVE-2010-0302 cups-1.4.3/scheduler/select.c +--- cups-1.4.3/scheduler/select.c.CVE-2010-0302 2010-01-14 23:40:19.000000000 +0100 ++++ cups-1.4.3/scheduler/select.c 2010-03-31 13:54:30.000000000 +0200 @@ -454,7 +454,8 @@ cupsdDoSelect(long timeout) /* I - Time if (fdptr->read_cb && event->filter == EVFILT_READ) (*(fdptr->read_cb))(fdptr->data); @@ -11,12 +11,11 @@ diff -up cups-1.4.2/scheduler/select.c.CVE-2010-0302 cups-1.4.2/scheduler/select (*(fdptr->write_cb))(fdptr->data); release_fd(fdptr); -@@ -499,7 +500,9 @@ cupsdDoSelect(long timeout) /* I - Time - if (fdptr->read_cb && (event->events & (EPOLLIN | EPOLLERR | EPOLLHUP))) +@@ -500,7 +501,8 @@ cupsdDoSelect(long timeout) /* I - Time (*(fdptr->read_cb))(fdptr->data); -- if (fdptr->use > 1 && fdptr->write_cb && (event->events & (EPOLLOUT | EPOLLERR | EPOLLHUP))) -+ if (fdptr->use > 1 && fdptr->write_cb && + if (fdptr->use > 1 && fdptr->write_cb && +- (event->events & (EPOLLOUT | EPOLLERR | EPOLLHUP))) + (event->events & (EPOLLOUT | EPOLLERR | EPOLLHUP)) && + !cupsArrayFind(cupsd_inactive_fds, fdptr)) (*(fdptr->write_cb))(fdptr->data); diff --git a/cups-lspp.patch b/cups-lspp.patch index 90f20ad..3e7a00f 100644 --- a/cups-lspp.patch +++ b/cups-lspp.patch @@ -1,7 +1,7 @@ -diff -up cups-1.4.1/config.h.in.lspp cups-1.4.1/config.h.in ---- cups-1.4.1/config.h.in.lspp 2009-09-14 16:59:30.108873598 +0100 -+++ cups-1.4.1/config.h.in 2009-09-14 16:59:30.122873526 +0100 -@@ -619,6 +619,13 @@ +diff -up cups-1.4.3/config.h.in.lspp cups-1.4.3/config.h.in +--- cups-1.4.3/config.h.in.lspp 2010-03-31 14:08:57.000000000 +0200 ++++ cups-1.4.3/config.h.in 2010-03-31 14:08:57.000000000 +0200 +@@ -633,6 +633,13 @@ #undef HAVE_TCPD_H @@ -15,9 +15,9 @@ diff -up cups-1.4.1/config.h.in.lspp cups-1.4.1/config.h.in #endif /* !_CUPS_CONFIG_H_ */ /* -diff -up /dev/null cups-1.4.1/config-scripts/cups-lspp.m4 ---- /dev/null 2009-09-14 09:02:25.290577766 +0100 -+++ cups-1.4.1/config-scripts/cups-lspp.m4 2009-09-14 16:59:30.124872629 +0100 +diff -up cups-1.4.3/config-scripts/cups-lspp.m4.lspp cups-1.4.3/config-scripts/cups-lspp.m4 +--- cups-1.4.3/config-scripts/cups-lspp.m4.lspp 2010-03-31 14:08:57.000000000 +0200 ++++ cups-1.4.3/config-scripts/cups-lspp.m4 2010-03-31 14:08:57.000000000 +0200 @@ -0,0 +1,36 @@ +dnl +dnl LSPP code for the Common UNIX Printing System (CUPS). @@ -55,9 +55,9 @@ diff -up /dev/null cups-1.4.1/config-scripts/cups-lspp.m4 + ;; + esac +fi -diff -up cups-1.4.1/configure.in.lspp cups-1.4.1/configure.in ---- cups-1.4.1/configure.in.lspp 2008-11-14 19:32:22.000000000 +0000 -+++ cups-1.4.1/configure.in 2009-09-14 16:59:30.125879233 +0100 +diff -up cups-1.4.3/configure.in.lspp cups-1.4.3/configure.in +--- cups-1.4.3/configure.in.lspp 2008-11-14 20:32:22.000000000 +0100 ++++ cups-1.4.3/configure.in 2010-03-31 14:08:57.000000000 +0200 @@ -42,6 +42,8 @@ sinclude(config-scripts/cups-pap.m4) sinclude(config-scripts/cups-pdf.m4) sinclude(config-scripts/cups-scripting.m4) @@ -67,9 +67,9 @@ diff -up cups-1.4.1/configure.in.lspp cups-1.4.1/configure.in INSTALL_LANGUAGES="" UNINSTALL_LANGUAGES="" LANGFILES="" -diff -up cups-1.4.1/cups/cups.h.lspp cups-1.4.1/cups/cups.h ---- cups-1.4.1/cups/cups.h.lspp 2009-08-28 18:51:05.000000000 +0100 -+++ cups-1.4.1/cups/cups.h 2009-09-14 16:59:30.127873074 +0100 +diff -up cups-1.4.3/cups/cups.h.lspp cups-1.4.3/cups/cups.h +--- cups-1.4.3/cups/cups.h.lspp 2009-11-16 18:11:56.000000000 +0100 ++++ cups-1.4.3/cups/cups.h 2010-03-31 14:08:57.000000000 +0200 @@ -15,6 +15,9 @@ * This file is subject to the Apple OS-Developed Software exception. */ @@ -93,9 +93,9 @@ diff -up cups-1.4.1/cups/cups.h.lspp cups-1.4.1/cups/cups.h /* * Types and structures... */ -diff -up cups-1.4.1/data/Makefile.lspp cups-1.4.1/data/Makefile ---- cups-1.4.1/data/Makefile.lspp 2008-11-12 19:30:57.000000000 +0000 -+++ cups-1.4.1/data/Makefile 2009-09-14 16:59:30.129874067 +0100 +diff -up cups-1.4.3/data/Makefile.lspp cups-1.4.3/data/Makefile +--- cups-1.4.3/data/Makefile.lspp 2008-11-12 20:30:57.000000000 +0100 ++++ cups-1.4.3/data/Makefile 2010-03-31 14:08:57.000000000 +0200 @@ -25,7 +25,10 @@ BANNERS = \ secret \ standard \ @@ -108,9 +108,9 @@ diff -up cups-1.4.1/data/Makefile.lspp cups-1.4.1/data/Makefile CHARMAPS = \ euc-cn.txt \ -diff -up /dev/null cups-1.4.1/data/mls ---- /dev/null 2009-09-14 09:02:25.290577766 +0100 -+++ cups-1.4.1/data/mls 2009-09-14 16:59:30.131873095 +0100 +diff -up cups-1.4.3/data/mls.lspp cups-1.4.3/data/mls +--- cups-1.4.3/data/mls.lspp 2010-03-31 14:08:57.000000000 +0200 ++++ cups-1.4.3/data/mls 2010-03-31 14:08:57.000000000 +0200 @@ -0,0 +1,261 @@ +%!PS-Adobe-3.0 +%%BoundingBox: 0 0 612 792 @@ -373,9 +373,9 @@ diff -up /dev/null cups-1.4.1/data/mls +% End of "$Id: mls_template,v 1.1 2005/06/27 18:44:46 colmo Exp $". +% +%%EOF -diff -up /dev/null cups-1.4.1/data/selinux ---- /dev/null 2009-09-14 09:02:25.290577766 +0100 -+++ cups-1.4.1/data/selinux 2009-09-14 16:59:30.133872489 +0100 +diff -up cups-1.4.3/data/selinux.lspp cups-1.4.3/data/selinux +--- cups-1.4.3/data/selinux.lspp 2010-03-31 14:08:57.000000000 +0200 ++++ cups-1.4.3/data/selinux 2010-03-31 14:08:57.000000000 +0200 @@ -0,0 +1,261 @@ +%!PS-Adobe-3.0 +%%BoundingBox: 0 0 612 792 @@ -638,9 +638,9 @@ diff -up /dev/null cups-1.4.1/data/selinux +% End of "$Id: mls_template,v 1.1 2005/06/27 18:44:46 colmo Exp $". +% +%%EOF -diff -up /dev/null cups-1.4.1/data/te ---- /dev/null 2009-09-14 09:02:25.290577766 +0100 -+++ cups-1.4.1/data/te 2009-09-14 16:59:30.135873116 +0100 +diff -up cups-1.4.3/data/te.lspp cups-1.4.3/data/te +--- cups-1.4.3/data/te.lspp 2010-03-31 14:08:57.000000000 +0200 ++++ cups-1.4.3/data/te 2010-03-31 14:08:57.000000000 +0200 @@ -0,0 +1,261 @@ +%!PS-Adobe-3.0 +%%BoundingBox: 0 0 612 792 @@ -903,9 +903,9 @@ diff -up /dev/null cups-1.4.1/data/te +% End of "$Id: mls_template,v 1.1 2005/06/27 18:44:46 colmo Exp $". +% +%%EOF -diff -up cups-1.4.1/filter/common.c.lspp cups-1.4.1/filter/common.c ---- cups-1.4.1/filter/common.c.lspp 2007-07-11 22:46:42.000000000 +0100 -+++ cups-1.4.1/filter/common.c 2009-09-14 16:59:30.137872500 +0100 +diff -up cups-1.4.3/filter/common.c.lspp cups-1.4.3/filter/common.c +--- cups-1.4.3/filter/common.c.lspp 2007-07-11 23:46:42.000000000 +0200 ++++ cups-1.4.3/filter/common.c 2010-03-31 14:08:57.000000000 +0200 @@ -30,6 +30,12 @@ * Include necessary headers... */ @@ -1074,10 +1074,10 @@ diff -up cups-1.4.1/filter/common.c.lspp cups-1.4.1/filter/common.c /* -diff -up cups-1.4.1/filter/pstops.c.lspp cups-1.4.1/filter/pstops.c ---- cups-1.4.1/filter/pstops.c.lspp 2009-09-14 16:59:29.803998275 +0100 -+++ cups-1.4.1/filter/pstops.c 2009-09-14 16:59:30.141872862 +0100 -@@ -3242,6 +3242,18 @@ write_label_prolog(pstops_doc_t *doc, /* +diff -up cups-1.4.3/filter/pstops.c.lspp cups-1.4.3/filter/pstops.c +--- cups-1.4.3/filter/pstops.c.lspp 2010-03-31 14:08:57.000000000 +0200 ++++ cups-1.4.3/filter/pstops.c 2010-03-31 14:08:57.000000000 +0200 +@@ -3275,6 +3275,18 @@ write_label_prolog(pstops_doc_t *doc, /* { const char *classification; /* CLASSIFICATION environment variable */ const char *ptr; /* Temporary string pointer */ @@ -1096,7 +1096,7 @@ diff -up cups-1.4.1/filter/pstops.c.lspp cups-1.4.1/filter/pstops.c /* -@@ -3264,6 +3276,124 @@ write_label_prolog(pstops_doc_t *doc, /* +@@ -3297,6 +3309,124 @@ write_label_prolog(pstops_doc_t *doc, /* return; } @@ -1221,7 +1221,7 @@ diff -up cups-1.4.1/filter/pstops.c.lspp cups-1.4.1/filter/pstops.c /* * Set the classification + page label string... */ -@@ -3342,7 +3472,10 @@ write_label_prolog(pstops_doc_t *doc, /* +@@ -3375,7 +3505,10 @@ write_label_prolog(pstops_doc_t *doc, /* doc_printf(doc, " %.0f moveto ESPpl show\n", top - 14.0); doc_puts(doc, "pop\n"); doc_puts(doc, "}bind put\n"); @@ -1232,9 +1232,9 @@ diff -up cups-1.4.1/filter/pstops.c.lspp cups-1.4.1/filter/pstops.c /* -diff -up cups-1.4.1/Makedefs.in.lspp cups-1.4.1/Makedefs.in ---- cups-1.4.1/Makedefs.in.lspp 2009-09-14 16:59:30.024872775 +0100 -+++ cups-1.4.1/Makedefs.in 2009-09-14 16:59:30.143872406 +0100 +diff -up cups-1.4.3/Makedefs.in.lspp cups-1.4.3/Makedefs.in +--- cups-1.4.3/Makedefs.in.lspp 2010-03-31 14:08:57.000000000 +0200 ++++ cups-1.4.3/Makedefs.in 2010-03-31 14:08:57.000000000 +0200 @@ -146,7 +146,7 @@ LIBCUPSORDER = @LIBCUPSORDER@ LIBCUPSIMAGEORDER = @LIBCUPSIMAGEORDER@ LINKCUPS = @LINKCUPS@ $(SSLLIBS) $(DNSSDLIBS) @@ -1253,9 +1253,9 @@ diff -up cups-1.4.1/Makedefs.in.lspp cups-1.4.1/Makedefs.in .SUFFIXES: .1 .1.gz .1m .1m.gz .3 .3.gz .5 .5.gz .7 .7.gz .8 .8.gz .a .c .cxx .h .man .o .32.o .64.o .gz .c.o: -diff -up cups-1.4.1/scheduler/client.c.lspp cups-1.4.1/scheduler/client.c ---- cups-1.4.1/scheduler/client.c.lspp 2009-07-15 00:02:05.000000000 +0100 -+++ cups-1.4.1/scheduler/client.c 2009-09-14 16:59:30.148872510 +0100 +diff -up cups-1.4.3/scheduler/client.c.lspp cups-1.4.3/scheduler/client.c +--- cups-1.4.3/scheduler/client.c.lspp 2009-07-15 01:02:05.000000000 +0200 ++++ cups-1.4.3/scheduler/client.c 2010-03-31 14:08:57.000000000 +0200 @@ -44,6 +44,7 @@ * valid_host() - Is the Host: field valid? * write_file() - Send a file via HTTP. @@ -1476,9 +1476,9 @@ diff -up cups-1.4.1/scheduler/client.c.lspp cups-1.4.1/scheduler/client.c /* * 'pipe_command()' - Pipe the output of a command to the remote client. */ -diff -up cups-1.4.1/scheduler/client.h.lspp cups-1.4.1/scheduler/client.h ---- cups-1.4.1/scheduler/client.h.lspp 2009-05-26 23:01:23.000000000 +0100 -+++ cups-1.4.1/scheduler/client.h 2009-09-14 16:59:30.150872942 +0100 +diff -up cups-1.4.3/scheduler/client.h.lspp cups-1.4.3/scheduler/client.h +--- cups-1.4.3/scheduler/client.h.lspp 2009-05-27 00:01:23.000000000 +0200 ++++ cups-1.4.3/scheduler/client.h 2010-03-31 14:08:57.000000000 +0200 @@ -18,6 +18,13 @@ #endif /* HAVE_AUTHORIZATION_H */ @@ -1514,9 +1514,9 @@ diff -up cups-1.4.1/scheduler/client.h.lspp cups-1.4.1/scheduler/client.h /* -diff -up cups-1.4.1/scheduler/conf.c.lspp cups-1.4.1/scheduler/conf.c ---- cups-1.4.1/scheduler/conf.c.lspp 2009-09-14 16:59:29.837998036 +0100 -+++ cups-1.4.1/scheduler/conf.c 2009-09-14 16:59:30.155872264 +0100 +diff -up cups-1.4.3/scheduler/conf.c.lspp cups-1.4.3/scheduler/conf.c +--- cups-1.4.3/scheduler/conf.c.lspp 2010-03-31 14:08:57.000000000 +0200 ++++ cups-1.4.3/scheduler/conf.c 2010-03-31 14:08:57.000000000 +0200 @@ -29,6 +29,7 @@ * read_configuration() - Read a configuration file. * read_location() - Read a definition. @@ -1626,9 +1626,9 @@ diff -up cups-1.4.1/scheduler/conf.c.lspp cups-1.4.1/scheduler/conf.c /* * 'read_policy()' - Read a definition. -diff -up cups-1.4.1/scheduler/conf.h.lspp cups-1.4.1/scheduler/conf.h ---- cups-1.4.1/scheduler/conf.h.lspp 2009-09-14 16:59:29.839997456 +0100 -+++ cups-1.4.1/scheduler/conf.h 2009-09-14 16:59:30.157872484 +0100 +diff -up cups-1.4.3/scheduler/conf.h.lspp cups-1.4.3/scheduler/conf.h +--- cups-1.4.3/scheduler/conf.h.lspp 2010-03-31 14:08:57.000000000 +0200 ++++ cups-1.4.3/scheduler/conf.h 2010-03-31 14:08:57.000000000 +0200 @@ -253,6 +253,12 @@ VAR char *ServerKey VALUE(NULL); VAR int SSLOptions VALUE(CUPSD_SSL_NONE); /* SSL/TLS options */ @@ -1652,9 +1652,9 @@ diff -up cups-1.4.1/scheduler/conf.h.lspp cups-1.4.1/scheduler/conf.h /* * Prototypes... -diff -up cups-1.4.1/scheduler/ipp.c.lspp cups-1.4.1/scheduler/ipp.c ---- cups-1.4.1/scheduler/ipp.c.lspp 2009-09-14 16:59:29.974871379 +0100 -+++ cups-1.4.1/scheduler/ipp.c 2009-09-14 16:59:30.168872218 +0100 +diff -up cups-1.4.3/scheduler/ipp.c.lspp cups-1.4.3/scheduler/ipp.c +--- cups-1.4.3/scheduler/ipp.c.lspp 2010-03-31 14:08:57.000000000 +0200 ++++ cups-1.4.3/scheduler/ipp.c 2010-03-31 14:11:37.000000000 +0200 @@ -41,6 +41,7 @@ * cancel_all_jobs() - Cancel all print jobs. * cancel_job() - Cancel a print job. @@ -1698,7 +1698,7 @@ diff -up cups-1.4.1/scheduler/ipp.c.lspp cups-1.4.1/scheduler/ipp.c static int check_quotas(cupsd_client_t *con, cupsd_printer_t *p); static ipp_attribute_t *copy_attribute(ipp_t *to, ipp_attribute_t *attr, int quickcopy); -@@ -1338,6 +1353,21 @@ add_job(cupsd_client_t *con, /* I - Cl +@@ -1337,6 +1352,21 @@ add_job(cupsd_client_t *con, /* I - Cl int kbytes; /* Size of print file */ int i; /* Looping var */ int lowerpagerange; /* Page range bound */ @@ -1720,9 +1720,9 @@ diff -up cups-1.4.1/scheduler/ipp.c.lspp cups-1.4.1/scheduler/ipp.c cupsdLogMessage(CUPSD_LOG_DEBUG2, "add_job(%p[%d], %p(%s), %p(%s/%s))", -@@ -1554,6 +1584,104 @@ add_job(cupsd_client_t *con, /* I - Cl +@@ -1550,6 +1580,104 @@ add_job(cupsd_client_t *con, /* I - Cl ippAddString(con->request, IPP_TAG_JOB, IPP_TAG_NAME, "job-name", NULL, - title = "Untitled"); + "Untitled"); +#ifdef WITH_LSPP + if (is_lspp_config()) @@ -1825,7 +1825,7 @@ diff -up cups-1.4.1/scheduler/ipp.c.lspp cups-1.4.1/scheduler/ipp.c if ((job = cupsdAddJob(priority, printer->name)) == NULL) { send_ipp_status(con, IPP_INTERNAL_ERROR, -@@ -1562,6 +1690,32 @@ add_job(cupsd_client_t *con, /* I - Cl +@@ -1558,6 +1686,32 @@ add_job(cupsd_client_t *con, /* I - Cl return (NULL); } @@ -1858,7 +1858,7 @@ diff -up cups-1.4.1/scheduler/ipp.c.lspp cups-1.4.1/scheduler/ipp.c job->dtype = printer->type & (CUPS_PRINTER_CLASS | CUPS_PRINTER_IMPLICIT | CUPS_PRINTER_REMOTE); job->attrs = con->request; -@@ -1769,6 +1923,29 @@ add_job(cupsd_client_t *con, /* I - Cl +@@ -1763,6 +1917,29 @@ add_job(cupsd_client_t *con, /* I - Cl attr->values[0].string.text = _cupsStrRetain(printer->job_sheets[0]); attr->values[1].string.text = _cupsStrRetain(printer->job_sheets[1]); } @@ -1888,7 +1888,7 @@ diff -up cups-1.4.1/scheduler/ipp.c.lspp cups-1.4.1/scheduler/ipp.c job->job_sheets = attr; -@@ -1799,6 +1976,9 @@ add_job(cupsd_client_t *con, /* I - Cl +@@ -1793,6 +1970,9 @@ add_job(cupsd_client_t *con, /* I - Cl "job-sheets=\"%s,none\", " "job-originating-user-name=\"%s\"", Classification, job->username); @@ -1898,7 +1898,7 @@ diff -up cups-1.4.1/scheduler/ipp.c.lspp cups-1.4.1/scheduler/ipp.c } else if (attr->num_values == 2 && strcmp(attr->values[0].string.text, -@@ -1817,6 +1997,9 @@ add_job(cupsd_client_t *con, /* I - Cl +@@ -1811,6 +1991,9 @@ add_job(cupsd_client_t *con, /* I - Cl "job-originating-user-name=\"%s\"", attr->values[0].string.text, attr->values[1].string.text, job->username); @@ -1908,7 +1908,7 @@ diff -up cups-1.4.1/scheduler/ipp.c.lspp cups-1.4.1/scheduler/ipp.c } else if (strcmp(attr->values[0].string.text, Classification) && strcmp(attr->values[0].string.text, "none") && -@@ -1837,6 +2020,9 @@ add_job(cupsd_client_t *con, /* I - Cl +@@ -1831,6 +2014,9 @@ add_job(cupsd_client_t *con, /* I - Cl "job-originating-user-name=\"%s\"", attr->values[0].string.text, attr->values[1].string.text, job->username); @@ -1918,7 +1918,7 @@ diff -up cups-1.4.1/scheduler/ipp.c.lspp cups-1.4.1/scheduler/ipp.c } } else if (strcmp(attr->values[0].string.text, Classification) && -@@ -1877,8 +2063,52 @@ add_job(cupsd_client_t *con, /* I - Cl +@@ -1871,8 +2057,52 @@ add_job(cupsd_client_t *con, /* I - Cl "job-sheets=\"%s\", " "job-originating-user-name=\"%s\"", Classification, job->username); @@ -2199,7 +2199,7 @@ diff -up cups-1.4.1/scheduler/ipp.c.lspp cups-1.4.1/scheduler/ipp.c if (!strcmp(s, "printer-name")) { cupsFilePuts(out, job->dest); -@@ -6829,6 +7259,22 @@ get_job_attrs(cupsd_client_t *con, /* I +@@ -6844,6 +7274,22 @@ get_job_attrs(cupsd_client_t *con, /* I return; } @@ -2222,7 +2222,7 @@ diff -up cups-1.4.1/scheduler/ipp.c.lspp cups-1.4.1/scheduler/ipp.c /* * Copy attributes... */ -@@ -7048,6 +7494,11 @@ get_jobs(cupsd_client_t *con, /* I - C +@@ -7074,6 +7520,11 @@ get_jobs(cupsd_client_t *con, /* I - C if (username[0] && strcasecmp(username, job->username)) continue; @@ -2234,7 +2234,7 @@ diff -up cups-1.4.1/scheduler/ipp.c.lspp cups-1.4.1/scheduler/ipp.c if (count > 0) ippAddSeparator(con->response); -@@ -11430,6 +11881,11 @@ validate_user(cupsd_job_t *job, /* I +@@ -11460,6 +11911,11 @@ validate_user(cupsd_job_t *job, /* I strlcpy(username, get_username(con), userlen); @@ -2246,9 +2246,9 @@ diff -up cups-1.4.1/scheduler/ipp.c.lspp cups-1.4.1/scheduler/ipp.c /* * Check the username against the owner... */ -diff -up cups-1.4.1/scheduler/job.c.lspp cups-1.4.1/scheduler/job.c ---- cups-1.4.1/scheduler/job.c.lspp 2009-09-14 16:59:30.058872907 +0100 -+++ cups-1.4.1/scheduler/job.c 2009-09-14 17:00:42.616998003 +0100 +diff -up cups-1.4.3/scheduler/job.c.lspp cups-1.4.3/scheduler/job.c +--- cups-1.4.3/scheduler/job.c.lspp 2010-03-31 14:08:57.000000000 +0200 ++++ cups-1.4.3/scheduler/job.c 2010-03-31 14:08:57.000000000 +0200 @@ -66,6 +66,9 @@ * update_job_attrs() - Update the job-printer-* attributes. */ @@ -2403,7 +2403,7 @@ diff -up cups-1.4.1/scheduler/job.c.lspp cups-1.4.1/scheduler/job.c job->sheets = ippFindAttribute(job->attrs, "job-media-sheets-completed", IPP_TAG_INTEGER); job->job_sheets = ippFindAttribute(job->attrs, "job-sheets", IPP_TAG_NAME); -@@ -1975,6 +2069,14 @@ cupsdSaveJob(cupsd_job_t *job) /* I - J +@@ -2013,6 +2107,14 @@ cupsdSaveJob(cupsd_job_t *job) /* I - J { char filename[1024]; /* Job control filename */ cups_file_t *fp; /* Job file */ @@ -2418,7 +2418,7 @@ diff -up cups-1.4.1/scheduler/job.c.lspp cups-1.4.1/scheduler/job.c cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdSaveJob(job=%p(%d)): job->attrs=%p", -@@ -1993,6 +2095,76 @@ cupsdSaveJob(cupsd_job_t *job) /* I - J +@@ -2031,6 +2133,76 @@ cupsdSaveJob(cupsd_job_t *job) /* I - J fchmod(cupsFileNumber(fp), 0600); fchown(cupsFileNumber(fp), RunUser, Group); @@ -2495,7 +2495,7 @@ diff -up cups-1.4.1/scheduler/job.c.lspp cups-1.4.1/scheduler/job.c job->attrs->state = IPP_IDLE; if (ippWriteIO(fp, (ipp_iocb_t)cupsFileWrite, 1, NULL, -@@ -3138,6 +3310,18 @@ get_options(cupsd_job_t *job, /* I - Jo +@@ -3177,6 +3349,18 @@ get_options(cupsd_job_t *job, /* I - Jo banner_page) continue; @@ -2514,7 +2514,7 @@ diff -up cups-1.4.1/scheduler/job.c.lspp cups-1.4.1/scheduler/job.c /* * Otherwise add them to the list... */ -@@ -3810,6 +3994,19 @@ static void +@@ -3849,6 +4033,19 @@ static void start_job(cupsd_job_t *job, /* I - Job ID */ cupsd_printer_t *printer) /* I - Printer to print job */ { @@ -2534,7 +2534,7 @@ diff -up cups-1.4.1/scheduler/job.c.lspp cups-1.4.1/scheduler/job.c cupsdLogMessage(CUPSD_LOG_DEBUG2, "start_job(job=%p(%d), printer=%p(%s))", job, job->id, printer, printer->name); -@@ -3932,6 +4129,106 @@ start_job(cupsd_job_t *job, /* I - +@@ -3971,6 +4168,106 @@ start_job(cupsd_job_t *job, /* I - fcntl(job->side_pipes[1], F_SETFD, fcntl(job->side_pipes[1], F_GETFD) | FD_CLOEXEC); @@ -2641,9 +2641,9 @@ diff -up cups-1.4.1/scheduler/job.c.lspp cups-1.4.1/scheduler/job.c /* * Now start the first file in the job... */ -diff -up cups-1.4.1/scheduler/job.h.lspp cups-1.4.1/scheduler/job.h ---- cups-1.4.1/scheduler/job.h.lspp 2009-05-11 23:46:01.000000000 +0100 -+++ cups-1.4.1/scheduler/job.h 2009-09-14 16:59:30.177872674 +0100 +diff -up cups-1.4.3/scheduler/job.h.lspp cups-1.4.3/scheduler/job.h +--- cups-1.4.3/scheduler/job.h.lspp 2009-05-12 00:46:01.000000000 +0200 ++++ cups-1.4.3/scheduler/job.h 2010-03-31 14:08:57.000000000 +0200 @@ -13,6 +13,13 @@ * file is missing or damaged, see the license at "http://www.cups.org/". */ @@ -2669,9 +2669,9 @@ diff -up cups-1.4.1/scheduler/job.h.lspp cups-1.4.1/scheduler/job.h }; typedef struct cupsd_joblog_s /**** Job log message ****/ -diff -up cups-1.4.1/scheduler/main.c.lspp cups-1.4.1/scheduler/main.c ---- cups-1.4.1/scheduler/main.c.lspp 2009-09-14 16:59:29.925872130 +0100 -+++ cups-1.4.1/scheduler/main.c 2009-09-14 16:59:30.180872667 +0100 +diff -up cups-1.4.3/scheduler/main.c.lspp cups-1.4.3/scheduler/main.c +--- cups-1.4.3/scheduler/main.c.lspp 2010-03-31 14:08:57.000000000 +0200 ++++ cups-1.4.3/scheduler/main.c 2010-03-31 14:08:57.000000000 +0200 @@ -35,6 +35,8 @@ * usage() - Show scheduler usage. */ @@ -2701,7 +2701,7 @@ diff -up cups-1.4.1/scheduler/main.c.lspp cups-1.4.1/scheduler/main.c #ifdef HAVE_GETEUID -@@ -462,6 +470,25 @@ main(int argc, /* I - Number of comm +@@ -465,6 +473,25 @@ main(int argc, /* I - Number of comm #endif /* DEBUG */ } @@ -2727,7 +2727,7 @@ diff -up cups-1.4.1/scheduler/main.c.lspp cups-1.4.1/scheduler/main.c /* * Set the timezone info... */ -@@ -1230,6 +1257,11 @@ main(int argc, /* I - Number of comm +@@ -1235,6 +1262,11 @@ main(int argc, /* I - Number of comm cupsdStopSelect(); @@ -2739,9 +2739,9 @@ diff -up cups-1.4.1/scheduler/main.c.lspp cups-1.4.1/scheduler/main.c return (!stop_scheduler); } -diff -up cups-1.4.1/scheduler/printers.c.lspp cups-1.4.1/scheduler/printers.c ---- cups-1.4.1/scheduler/printers.c.lspp 2009-09-14 16:59:29.866997809 +0100 -+++ cups-1.4.1/scheduler/printers.c 2009-09-14 16:59:30.185871787 +0100 +diff -up cups-1.4.3/scheduler/printers.c.lspp cups-1.4.3/scheduler/printers.c +--- cups-1.4.3/scheduler/printers.c.lspp 2010-03-31 14:08:57.000000000 +0200 ++++ cups-1.4.3/scheduler/printers.c 2010-03-31 14:08:57.000000000 +0200 @@ -58,6 +58,8 @@ * write_xml_string() - Write a string with XML escaping. */ @@ -2762,7 +2762,7 @@ diff -up cups-1.4.1/scheduler/printers.c.lspp cups-1.4.1/scheduler/printers.c /* * 'cupsdAddPrinter()' - Add a printer to the system. -@@ -2166,6 +2172,13 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p) +@@ -2173,6 +2179,13 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p) "username", "password" }; @@ -2776,7 +2776,7 @@ diff -up cups-1.4.1/scheduler/printers.c.lspp cups-1.4.1/scheduler/printers.c DEBUG_printf(("cupsdSetPrinterAttrs: entering name = %s, type = %x\n", p->name, -@@ -2296,6 +2309,45 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p) +@@ -2303,6 +2316,45 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p) attr->values[1].string.text = _cupsStrAlloc(Classification ? Classification : p->job_sheets[1]); } @@ -2822,7 +2822,7 @@ diff -up cups-1.4.1/scheduler/printers.c.lspp cups-1.4.1/scheduler/printers.c } p->raw = 0; -@@ -4827,7 +4876,6 @@ write_irix_state(cupsd_printer_t *p) /* +@@ -4834,7 +4886,6 @@ write_irix_state(cupsd_printer_t *p) /* } #endif /* __sgi */ diff --git a/cups-media-empty-warning.patch b/cups-media-empty-warning.patch deleted file mode 100644 index adf0ac2..0000000 --- a/cups-media-empty-warning.patch +++ /dev/null @@ -1,132 +0,0 @@ -diff -up cups-1.4.2/backend/backend-private.h.media-empty-warning cups-1.4.2/backend/backend-private.h ---- cups-1.4.2/backend/backend-private.h.media-empty-warning 2009-08-31 19:45:43.000000000 +0100 -+++ cups-1.4.2/backend/backend-private.h 2009-12-08 11:22:27.859488572 +0000 -@@ -280,7 +280,8 @@ extern int backendNetworkSideCB(int pri - int snmp_fd, http_addr_t *addr, - int use_bc); - extern ssize_t backendRunLoop(int print_fd, int device_fd, int snmp_fd, -- http_addr_t *addr, int use_bc, -+ http_addr_t *addr, int use_bc, -+ int update_state, - int (*side_cb)(int print_fd, - int device_fd, - int snmp_fd, -diff -up cups-1.4.2/backend/ipp.c.media-empty-warning cups-1.4.2/backend/ipp.c ---- cups-1.4.2/backend/ipp.c.media-empty-warning 2009-12-08 11:22:12.388488617 +0000 -+++ cups-1.4.2/backend/ipp.c 2009-12-08 11:22:27.860488582 +0000 -@@ -498,7 +498,7 @@ main(int argc, /* I - Number of comm - - _cupsLangPuts(stderr, _("INFO: Copying print data...\n")); - -- tbytes = backendRunLoop(-1, fd, snmp_fd, &(addrlist->addr), 0, -+ tbytes = backendRunLoop(-1, fd, snmp_fd, &(addrlist->addr), 0, 0, - backendNetworkSideCB); - - if (snmp_fd >= 0) -diff -up cups-1.4.2/backend/lpd.c.media-empty-warning cups-1.4.2/backend/lpd.c ---- cups-1.4.2/backend/lpd.c.media-empty-warning 2009-06-26 19:26:36.000000000 +0100 -+++ cups-1.4.2/backend/lpd.c 2009-12-08 11:22:27.861488697 +0000 -@@ -447,7 +447,8 @@ main(int argc, /* I - Number of comm - - _cupsLangPuts(stderr, _("INFO: Copying print data...\n")); - -- backendRunLoop(-1, fd, snmp_fd, &(addrlist->addr), 0, backendNetworkSideCB); -+ backendRunLoop(-1, fd, snmp_fd, &(addrlist->addr), 0, 0, -+ backendNetworkSideCB); - - if (snmp_fd >= 0) - _cupsSNMPClose(snmp_fd); -diff -up cups-1.4.2/backend/parallel.c.media-empty-warning cups-1.4.2/backend/parallel.c ---- cups-1.4.2/backend/parallel.c.media-empty-warning 2009-08-31 19:45:43.000000000 +0100 -+++ cups-1.4.2/backend/parallel.c 2009-12-08 11:22:27.862488185 +0000 -@@ -284,7 +284,7 @@ main(int argc, /* I - Number of comm - lseek(print_fd, 0, SEEK_SET); - } - -- tbytes = backendRunLoop(print_fd, device_fd, -1, NULL, use_bc, side_cb); -+ tbytes = backendRunLoop(print_fd, device_fd, -1, NULL, use_bc, 1, side_cb); - - if (print_fd != 0 && tbytes >= 0) - _cupsLangPrintf(stderr, -diff -up cups-1.4.2/backend/runloop.c.media-empty-warning cups-1.4.2/backend/runloop.c ---- cups-1.4.2/backend/runloop.c.media-empty-warning 2009-08-31 19:45:43.000000000 +0100 -+++ cups-1.4.2/backend/runloop.c 2009-12-08 11:22:27.862488185 +0000 -@@ -147,6 +147,7 @@ backendRunLoop( - int snmp_fd, /* I - SNMP socket or -1 if none */ - http_addr_t *addr, /* I - Address of device */ - int use_bc, /* I - Use back-channel? */ -+ int update_state, /* I - Update printer-state-reasons? */ - int (*side_cb)(int, int, int, http_addr_t *, int)) - /* I - Side-channel callback */ - { -@@ -245,7 +246,7 @@ backendRunLoop( - * Pause printing to clear any pending errors... - */ - -- if (errno == ENXIO && offline != 1) -+ if (errno == ENXIO && offline != 1 && update_state) - { - fputs("STATE: +offline-report\n", stderr); - _cupsLangPuts(stderr, _("INFO: Printer is currently offline.\n")); -@@ -351,7 +352,7 @@ backendRunLoop( - - if (errno == ENOSPC) - { -- if (paperout != 1) -+ if (paperout != 1 && update_state) - { - fputs("STATE: +media-empty-warning\n", stderr); - _cupsLangPuts(stderr, _("ERROR: Out of paper!\n")); -@@ -360,7 +361,7 @@ backendRunLoop( - } - else if (errno == ENXIO) - { -- if (offline != 1) -+ if (offline != 1 && update_state) - { - fputs("STATE: +offline-report\n", stderr); - _cupsLangPuts(stderr, _("INFO: Printer is currently off-line.\n")); -@@ -376,13 +377,13 @@ backendRunLoop( - } - else - { -- if (paperout) -+ if (paperout && update_state) - { - fputs("STATE: -media-empty-warning\n", stderr); - paperout = 0; - } - -- if (offline) -+ if (offline && update_state) - { - fputs("STATE: -offline-report\n", stderr); - _cupsLangPuts(stderr, _("INFO: Printer is now online.\n")); -diff -up cups-1.4.2/backend/socket.c.media-empty-warning cups-1.4.2/backend/socket.c ---- cups-1.4.2/backend/socket.c.media-empty-warning 2009-06-12 05:02:45.000000000 +0100 -+++ cups-1.4.2/backend/socket.c 2009-12-08 11:22:27.863488075 +0000 -@@ -393,7 +393,7 @@ main(int argc, /* I - Number of comm - lseek(print_fd, 0, SEEK_SET); - } - -- tbytes = backendRunLoop(print_fd, device_fd, snmp_fd, &(addr->addr), 1, -+ tbytes = backendRunLoop(print_fd, device_fd, snmp_fd, &(addr->addr), 1, 0, - backendNetworkSideCB); - - if (print_fd != 0 && tbytes >= 0) -diff -up cups-1.4.2/backend/usb-unix.c.media-empty-warning cups-1.4.2/backend/usb-unix.c ---- cups-1.4.2/backend/usb-unix.c.media-empty-warning 2009-12-08 11:22:12.445487428 +0000 -+++ cups-1.4.2/backend/usb-unix.c 2009-12-08 11:22:27.864488180 +0000 -@@ -218,10 +218,10 @@ print_device(const char *uri, /* I - De - * select() or poll(), so we can't support the sidechannel either... - */ - -- tbytes = backendRunLoop(print_fd, device_fd, -1, NULL, use_bc, NULL); -+ tbytes = backendRunLoop(print_fd, device_fd, -1, NULL, use_bc, 1, NULL); - - #else -- tbytes = backendRunLoop(print_fd, device_fd, -1, NULL, use_bc, side_cb); -+ tbytes = backendRunLoop(print_fd, device_fd, -1, NULL, use_bc, 1, side_cb); - #endif /* __sun */ - - if (print_fd != 0 && tbytes >= 0) diff --git a/cups-negative-snmp-string-length.patch b/cups-negative-snmp-string-length.patch deleted file mode 100644 index 5d94fbb..0000000 --- a/cups-negative-snmp-string-length.patch +++ /dev/null @@ -1,31 +0,0 @@ -diff -up cups-1.4.2/backend/network.c.negative-snmp-string-length cups-1.4.2/backend/network.c ---- cups-1.4.2/backend/network.c.negative-snmp-string-length 2009-08-31 19:45:43.000000000 +0100 -+++ cups-1.4.2/backend/network.c 2009-12-08 11:14:45.010363459 +0000 -@@ -170,9 +170,13 @@ backendNetworkSideCB( - - case CUPS_ASN1_BIT_STRING : - case CUPS_ASN1_OCTET_STRING : -- i = (int)(sizeof(data) - (dataptr - data)); -- if (packet.object_value.string.num_bytes < i) -+ if (packet.object_value.string.num_bytes < 0) -+ i = 0; -+ else if (packet.object_value.string.num_bytes < -+ (sizeof(data) - (dataptr - data))) - i = packet.object_value.string.num_bytes; -+ else -+ i = (int)(sizeof(data) - (dataptr - data)); - - memcpy(dataptr, packet.object_value.string.bytes, i); - -diff -up cups-1.4.2/backend/snmp-supplies.c.negative-snmp-string-length cups-1.4.2/backend/snmp-supplies.c ---- cups-1.4.2/backend/snmp-supplies.c.negative-snmp-string-length 2009-08-31 17:34:06.000000000 +0100 -+++ cups-1.4.2/backend/snmp-supplies.c 2009-12-08 11:15:05.505362685 +0000 -@@ -232,6 +232,8 @@ backendSNMPSupplies( - if (packet.object_value.string.num_bytes == 2) - new_state = (packet.object_value.string.bytes[0] << 8) | - packet.object_value.string.bytes[1]; -+ else if (packet.object_value.string.num_bytes == 1) -+ new_state = (packet.object_value.string.bytes[0] << 8); - else - new_state = 0; - diff --git a/cups-sidechannel-intrs.patch b/cups-sidechannel-intrs.patch deleted file mode 100644 index 4a5420c..0000000 --- a/cups-sidechannel-intrs.patch +++ /dev/null @@ -1,68 +0,0 @@ -diff -up cups-1.4.2/cups/sidechannel.c.sidechannel-intrs cups-1.4.2/cups/sidechannel.c ---- cups-1.4.2/cups/sidechannel.c.sidechannel-intrs 2009-09-23 00:20:35.000000000 +0100 -+++ cups-1.4.2/cups/sidechannel.c 2009-12-08 11:08:15.297539377 +0000 -@@ -116,6 +116,7 @@ cupsSideChannelRead( - char buffer[16388]; /* Message buffer */ - int bytes; /* Bytes read */ - int templen; /* Data length from message */ -+ int nfds; /* Number of file descriptors */ - #ifdef HAVE_POLL - struct pollfd pfd; /* Poll structure for poll() */ - #else /* select() */ -@@ -143,39 +144,31 @@ cupsSideChannelRead( - pfd.fd = CUPS_SC_FD; - pfd.events = POLLIN; - -- if (timeout < 0.0) -- { -- if (poll(&pfd, 1, -1) < 1) -- return (-1); -- } -- else if (poll(&pfd, 1, (long)(timeout * 1000)) < 1) -- return (-1); -+ while ((nfds = poll(&pfd, 1, -+ timeout < 0.0 ? -1 : (long)(timeout * 1000))) < 0 && -+ (errno == EINTR || errno == EAGAIN)) -+ ; - - #else /* select() */ - FD_ZERO(&input_set); - FD_SET(CUPS_SC_FD, &input_set); - -- if (timeout < 0.0) -- { -- if (select(CUPS_SC_FD + 1, &input_set, NULL, NULL, NULL) < 1) -- { -- DEBUG_printf(("1cupsSideChannelRead: Select error: %s", strerror(errno))); -- return (-1); -- } -- } -- else -- { -- stimeout.tv_sec = (int)timeout; -- stimeout.tv_usec = (int)(timeout * 1000000) % 1000000; -+ stimeout.tv_sec = (int)timeout; -+ stimeout.tv_usec = (int)(timeout * 1000000) % 1000000; -+ -+ while ((nfds = select(CUPS_SC_FD + 1, &input_set, NULL, NULL, -+ timeout < 0.0 ? NULL : &stimeout)) < 0 && -+ (errno == EINTR || errno == EAGAIN)) -+ ; - -- if (select(CUPS_SC_FD + 1, &input_set, NULL, NULL, &stimeout) < 1) -- { -- DEBUG_puts("1cupsSideChannelRead: Select timeout"); -- return (-1); -- } -- } - #endif /* HAVE_POLL */ - -+ if (nfds < 1) -+ { -+ *status = nfds==0 ? CUPS_SC_STATUS_TIMEOUT : CUPS_SC_STATUS_IO_ERROR; -+ return (-1); -+ } -+ - /* - * Read a side-channel message for the format: - * diff --git a/cups-str3285_v2-str3503.patch b/cups-str3285_v2-str3503.patch deleted file mode 100644 index 35b6002..0000000 --- a/cups-str3285_v2-str3503.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up cups-1.4.1/cups/dest.c.str3285 cups-1.4.1/cups/dest.c ---- cups-1.4.1/cups/dest.c.str3285 2009-10-27 12:50:04.560012076 +0000 -+++ cups-1.4.1/cups/dest.c 2009-10-27 12:50:23.814012173 +0000 -@@ -549,7 +549,7 @@ cupsGetNamedDest(http_t *http, /* I - - if (!cups_get_sdests(http, op, name, 0, &dest)) - { -- if (op == CUPS_GET_DEFAULT) -+ if (op == CUPS_GET_DEFAULT || (name && !set_as_default)) - return (NULL); - - /* diff --git a/cups-str3381.patch b/cups-str3381.patch deleted file mode 100644 index 88a007c..0000000 --- a/cups-str3381.patch +++ /dev/null @@ -1,208 +0,0 @@ -diff -up cups-1.4.2/CHANGES.txt.str3381 cups-1.4.2/CHANGES.txt ---- cups-1.4.2/CHANGES.txt.str3381 2009-11-09 23:01:17.000000000 +0000 -+++ cups-1.4.2/CHANGES.txt 2009-11-16 10:55:21.518666538 +0000 -@@ -1,6 +1,11 @@ --CHANGES.txt - 2009-11-09 -+CHANGES.txt - 2009-11-13 - ------------------------ - -+CHANGES IN CUPS V1.4.3 -+ -+ - Fixed a GNU TLS error handling bug (STR #3381) -+ -+ - CHANGES IN CUPS V1.4.2 - - - SECURITY: The CUPS web interface was vulnerable to several XSS and -diff -up cups-1.4.2/cups/http.c.str3381 cups-1.4.2/cups/http.c ---- cups-1.4.2/cups/http.c.str3381 2009-07-01 16:23:28.000000000 +0100 -+++ cups-1.4.2/cups/http.c 2009-11-16 10:55:21.520666380 +0000 -@@ -26,7 +26,6 @@ - * httpClearCookie() - Clear the cookie value(s). - * httpClearFields() - Clear HTTP request fields. - * httpClose() - Close an HTTP connection... -- * httpConnect() - Connect to a HTTP server. - * httpConnectEncrypt() - Connect to a HTTP server using encryption. - * _httpCreate() - Create an unconnected HTTP connection. - * httpDelete() - Send a DELETE request to the server. -@@ -721,7 +720,7 @@ httpGetField(http_t *http, /* I - - { - if (!http || field <= HTTP_FIELD_UNKNOWN || field >= HTTP_FIELD_MAX) - return (NULL); -- else if (field == HTTP_FIELD_AUTHORIZATION && -+ else if (field == HTTP_FIELD_AUTHORIZATION && - http->field_authorization) - { - /* -@@ -1137,7 +1136,7 @@ httpGets(char *line, /* I - Line to - http->activity = time(NULL); - - *lineptr = '\0'; -- -+ - DEBUG_printf(("3httpGets: Returning \"%s\"", line)); - - return (line); -@@ -2283,7 +2282,7 @@ httpWait(http_t *http, /* I - Connecti - * - * @deprecated@ - */ -- -+ - int /* O - Number of bytes written */ - httpWrite(http_t *http, /* I - Connection to server */ - const char *buffer, /* I - Buffer for data */ -@@ -2298,7 +2297,7 @@ httpWrite(http_t *http, /* I - Conn - * - * @since CUPS 1.2/Mac OS X 10.5@ - */ -- -+ - ssize_t /* O - Number of bytes written */ - httpWrite2(http_t *http, /* I - Connection to server */ - const char *buffer, /* I - Buffer for data */ -@@ -2456,7 +2455,7 @@ _httpWriteCDSA( - else - { - *dataLength = 0; -- -+ - if (errno == EAGAIN) - result = errSSLWouldBlock; - else -@@ -2517,7 +2516,7 @@ http_bio_ctrl(BIO *h, /* I - BIO data - } - else - return (0); -- -+ - case BIO_CTRL_DUP : - case BIO_CTRL_FLUSH : - return (1); -@@ -2719,7 +2718,36 @@ http_read_ssl(http_t *http, /* I - Conn - return (SSL_read((SSL *)(http->tls), buf, len)); - - # elif defined(HAVE_GNUTLS) -- return (gnutls_record_recv(((http_tls_t *)(http->tls))->session, buf, len)); -+ ssize_t result; /* Return value */ -+ -+ -+ result = gnutls_record_recv(((http_tls_t *)(http->tls))->session, buf, len); -+ -+ if (result < 0 && !errno) -+ { -+ /* -+ * Convert GNU TLS error to errno value... -+ */ -+ -+ switch (result) -+ { -+ case GNUTLS_E_INTERRUPTED : -+ errno = EINTR; -+ break; -+ -+ case GNUTLS_E_AGAIN : -+ errno = EAGAIN; -+ break; -+ -+ default : -+ errno = EPIPE; -+ break; -+ } -+ -+ result = -1; -+ } -+ -+ return ((int)result); - - # elif defined(HAVE_CDSASSL) - int result; /* Return value */ -@@ -2857,7 +2885,7 @@ http_send(http_t *http, /* I - Con - DEBUG_printf(("9http_send: %s: %s", http_fields[i], - httpGetField(http, i))); - -- if (httpPrintf(http, "%s: %s\r\n", http_fields[i], -+ if (httpPrintf(http, "%s: %s\r\n", http_fields[i], - httpGetField(http, i)) < 1) - { - http->status = HTTP_ERROR; -@@ -2896,15 +2924,15 @@ http_send(http_t *http, /* I - Con - * The Kerberos and AuthRef authentication strings can only be used once... - */ - -- if (http->field_authorization && http->authstring && -- (!strncmp(http->authstring, "Negotiate", 9) || -+ if (http->field_authorization && http->authstring && -+ (!strncmp(http->authstring, "Negotiate", 9) || - !strncmp(http->authstring, "AuthRef", 7))) - { - http->_authstring[0] = '\0'; - - if (http->authstring != http->_authstring) - free(http->authstring); -- -+ - http->authstring = http->_authstring; - } - -@@ -3220,7 +3248,7 @@ http_upgrade(http_t *http) /* I - Conne - /* - * 'http_write()' - Write a buffer to a HTTP connection. - */ -- -+ - static int /* O - Number of bytes written */ - http_write(http_t *http, /* I - Connection to server */ - const char *buffer, /* I - Buffer for data */ -@@ -3335,7 +3363,36 @@ http_write_ssl(http_t *http, /* I - - return (SSL_write((SSL *)(http->tls), buf, len)); - - # elif defined(HAVE_GNUTLS) -- return (gnutls_record_send(((http_tls_t *)(http->tls))->session, buf, len)); -+ ssize_t result; /* Return value */ -+ -+ result = gnutls_record_send(((http_tls_t *)(http->tls))->session, buf, len); -+ -+ if (result < 0 && !errno) -+ { -+ /* -+ * Convert GNU TLS error to errno value... -+ */ -+ -+ switch (result) -+ { -+ case GNUTLS_E_INTERRUPTED : -+ errno = EINTR; -+ break; -+ -+ case GNUTLS_E_AGAIN : -+ errno = EAGAIN; -+ break; -+ -+ default : -+ errno = EPIPE; -+ break; -+ } -+ -+ result = -1; -+ } -+ -+ return ((int)result); -+ - # elif defined(HAVE_CDSASSL) - int result; /* Return value */ - OSStatus error; /* Error info */ -@@ -3358,11 +3415,11 @@ http_write_ssl(http_t *http, /* I - - else - { - result = -1; -- errno = EINTR; -+ errno = EINTR; - } - break; - default : -- errno = EPIPE; -+ errno = EPIPE; - result = -1; - break; - } diff --git a/cups-str3382.patch b/cups-str3382.patch index 2999c79..14e9b27 100644 --- a/cups-str3382.patch +++ b/cups-str3382.patch @@ -1,6 +1,6 @@ -diff -up cups-1.4.1/cups/tempfile.c.str3382 cups-1.4.1/cups/tempfile.c ---- cups-1.4.1/cups/tempfile.c.str3382 2008-12-10 06:03:11.000000000 +0100 -+++ cups-1.4.1/cups/tempfile.c 2009-10-20 15:08:39.000000000 +0200 +diff -up cups-1.4.3/cups/tempfile.c.str3382 cups-1.4.3/cups/tempfile.c +--- cups-1.4.3/cups/tempfile.c.str3382 2010-01-18 19:47:12.000000000 +0100 ++++ cups-1.4.3/cups/tempfile.c 2010-03-31 13:26:52.000000000 +0200 @@ -35,6 +35,7 @@ # include #else @@ -33,8 +33,8 @@ diff -up cups-1.4.1/cups/tempfile.c.str3382 cups-1.4.1/cups/tempfile.c - * Format a string using the hex time values... - */ - -- snprintf(filename, len - 1, "%s/%08lx%05lx", tmpdir, -- (unsigned long)curtime.tv_sec, (unsigned long)curtime.tv_usec); +- snprintf(filename, len - 1, "%s/%05x%08x", tmpdir, (unsigned)getpid(), +- (unsigned)(curtime.tv_sec + curtime.tv_usec + tries)); -#endif /* WIN32 */ /* diff --git a/cups-str3390.patch b/cups-str3390.patch deleted file mode 100644 index a9d958d..0000000 --- a/cups-str3390.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff -up cups-1.4.1/cgi-bin/admin.c.str3390 cups-1.4.1/cgi-bin/admin.c ---- cups-1.4.1/cgi-bin/admin.c.str3390 2009-08-29 08:05:14.000000000 +0200 -+++ cups-1.4.1/cgi-bin/admin.c 2009-10-27 14:44:53.000000000 +0100 -@@ -1044,6 +1044,11 @@ do_am_printer(http_t *http, /* I - HTTP - if ((attr = ippFindAttribute(oldinfo, "printer-location", - IPP_TAG_TEXT)) != NULL) - cgiSetVariable("PRINTER_LOCATION", attr->values[0].string.text); -+ -+ if ((attr = ippFindAttribute(oldinfo, "printer-is-shared", -+ IPP_TAG_BOOLEAN)) != NULL) -+ cgiSetVariable("PRINTER_IS_SHARED", -+ attr->values[0].boolean ? "1" : "0"); - } - - cgiCopyTemplateLang("modify-printer.tmpl"); diff --git a/cups-str3391.patch b/cups-str3391.patch deleted file mode 100644 index 4e6cc7b..0000000 --- a/cups-str3391.patch +++ /dev/null @@ -1,196 +0,0 @@ -diff -up cups-1.4.1/templates/add-printer.tmpl.str3391 cups-1.4.1/templates/add-printer.tmpl ---- cups-1.4.1/templates/add-printer.tmpl.str3391 2009-06-18 19:23:21.000000000 +0200 -+++ cups-1.4.1/templates/add-printer.tmpl 2009-10-27 15:08:45.000000000 +0100 -@@ -4,6 +4,10 @@ - -
- -+ -+ -+ -+ - {?current_make!?:} - {?current_make_and_model!?:} - -diff -up cups-1.4.1/templates/de/add-printer.tmpl.str3391 cups-1.4.1/templates/de/add-printer.tmpl ---- cups-1.4.1/templates/de/add-printer.tmpl.str3391 2009-06-18 19:23:21.000000000 +0200 -+++ cups-1.4.1/templates/de/add-printer.tmpl 2009-10-27 15:08:56.000000000 +0100 -@@ -4,6 +4,10 @@ - - - -+ -+ -+ -+ - {?current_make!?:} - {?current_make_and_model!?:} - -diff -up cups-1.4.1/templates/de/modify-printer.tmpl.str3391 cups-1.4.1/templates/de/modify-printer.tmpl ---- cups-1.4.1/templates/de/modify-printer.tmpl.str3391 2009-06-18 19:23:21.000000000 +0200 -+++ cups-1.4.1/templates/de/modify-printer.tmpl 2009-10-27 15:10:28.000000000 +0100 -@@ -4,6 +4,10 @@ - - - -+ -+ -+ -+ - - - -diff -up cups-1.4.1/templates/es/add-printer.tmpl.str3391 cups-1.4.1/templates/es/add-printer.tmpl ---- cups-1.4.1/templates/es/add-printer.tmpl.str3391 2009-06-18 19:23:21.000000000 +0200 -+++ cups-1.4.1/templates/es/add-printer.tmpl 2009-10-27 15:09:02.000000000 +0100 -@@ -4,6 +4,10 @@ - - - -+ -+ -+ -+ - {?current_make!?:} - {?current_make_and_model!?:} - -diff -up cups-1.4.1/templates/es/modify-printer.tmpl.str3391 cups-1.4.1/templates/es/modify-printer.tmpl ---- cups-1.4.1/templates/es/modify-printer.tmpl.str3391 2009-06-18 19:23:21.000000000 +0200 -+++ cups-1.4.1/templates/es/modify-printer.tmpl 2009-10-27 15:10:32.000000000 +0100 -@@ -4,6 +4,10 @@ - - - -+ -+ -+ -+ - - -
-diff -up cups-1.4.1/templates/eu/add-printer.tmpl.str3391 cups-1.4.1/templates/eu/add-printer.tmpl ---- cups-1.4.1/templates/eu/add-printer.tmpl.str3391 2009-07-07 18:52:34.000000000 +0200 -+++ cups-1.4.1/templates/eu/add-printer.tmpl 2009-10-27 15:09:08.000000000 +0100 -@@ -4,6 +4,10 @@ - - - -+ -+ -+ -+ - {?current_make!?:} - {?current_make_and_model!?:} - -diff -up cups-1.4.1/templates/eu/modify-printer.tmpl.str3391 cups-1.4.1/templates/eu/modify-printer.tmpl ---- cups-1.4.1/templates/eu/modify-printer.tmpl.str3391 2009-07-07 18:52:34.000000000 +0200 -+++ cups-1.4.1/templates/eu/modify-printer.tmpl 2009-10-27 15:10:37.000000000 +0100 -@@ -4,6 +4,10 @@ - - - -+ -+ -+ -+ - - -
-diff -up cups-1.4.1/templates/ja/add-printer.tmpl.str3391 cups-1.4.1/templates/ja/add-printer.tmpl ---- cups-1.4.1/templates/ja/add-printer.tmpl.str3391 2009-06-18 19:23:21.000000000 +0200 -+++ cups-1.4.1/templates/ja/add-printer.tmpl 2009-10-27 15:09:15.000000000 +0100 -@@ -4,6 +4,10 @@ - - - -+ -+ -+ -+ - {?current_make!?:} - {?current_make_and_model!?:} - -diff -up cups-1.4.1/templates/ja/modify-printer.tmpl.str3391 cups-1.4.1/templates/ja/modify-printer.tmpl ---- cups-1.4.1/templates/ja/modify-printer.tmpl.str3391 2009-06-18 19:23:21.000000000 +0200 -+++ cups-1.4.1/templates/ja/modify-printer.tmpl 2009-10-27 15:10:40.000000000 +0100 -@@ -4,6 +4,10 @@ - - - -+ -+ -+ -+ - - -
-diff -up cups-1.4.1/templates/modify-printer.tmpl.str3391 cups-1.4.1/templates/modify-printer.tmpl ---- cups-1.4.1/templates/modify-printer.tmpl.str3391 2009-06-18 19:23:21.000000000 +0200 -+++ cups-1.4.1/templates/modify-printer.tmpl 2009-10-27 15:10:23.000000000 +0100 -@@ -4,6 +4,10 @@ - - - -+ -+ -+ -+ - - -
-diff -up cups-1.4.1/templates/pl/add-printer.tmpl.str3391 cups-1.4.1/templates/pl/add-printer.tmpl ---- cups-1.4.1/templates/pl/add-printer.tmpl.str3391 2009-06-18 19:23:21.000000000 +0200 -+++ cups-1.4.1/templates/pl/add-printer.tmpl 2009-10-27 15:09:20.000000000 +0100 -@@ -4,6 +4,10 @@ - - - -+ -+ -+ -+ - {?current_make!?:} - {?current_make_and_model!?:} - -diff -up cups-1.4.1/templates/pl/modify-printer.tmpl.str3391 cups-1.4.1/templates/pl/modify-printer.tmpl ---- cups-1.4.1/templates/pl/modify-printer.tmpl.str3391 2009-06-18 19:23:21.000000000 +0200 -+++ cups-1.4.1/templates/pl/modify-printer.tmpl 2009-10-27 15:10:44.000000000 +0100 -@@ -4,6 +4,10 @@ - - - -+ -+ -+ -+ - - -
-diff -up cups-1.4.1/templates/ru/add-printer.tmpl.str3391 cups-1.4.1/templates/ru/add-printer.tmpl ---- cups-1.4.1/templates/ru/add-printer.tmpl.str3391 2009-06-18 19:23:21.000000000 +0200 -+++ cups-1.4.1/templates/ru/add-printer.tmpl 2009-10-27 15:09:24.000000000 +0100 -@@ -4,6 +4,10 @@ - - - -+ -+ -+ -+ - {?current_make!?:} - {?current_make_and_model!?:} - -diff -up cups-1.4.1/templates/ru/modify-printer.tmpl.str3391 cups-1.4.1/templates/ru/modify-printer.tmpl ---- cups-1.4.1/templates/ru/modify-printer.tmpl.str3391 2009-06-18 19:23:21.000000000 +0200 -+++ cups-1.4.1/templates/ru/modify-printer.tmpl 2009-10-27 15:10:48.000000000 +0100 -@@ -4,6 +4,10 @@ - - - -+ -+ -+ -+ - - -
diff --git a/cups-str3399.patch b/cups-str3399.patch index 05552e4..e5b2000 100644 --- a/cups-str3399.patch +++ b/cups-str3399.patch @@ -1,27 +1,4 @@ -diff -up cups-1.4.2/CHANGES-1.4.txt.str3399 cups-1.4.2/CHANGES-1.4.txt -diff -up cups-1.4.2/scheduler/process.c.str3399 cups-1.4.2/scheduler/process.c ---- cups-1.4.2/scheduler/process.c.str3399 2009-05-16 04:04:48.000000000 +0100 -+++ cups-1.4.2/scheduler/process.c 2009-11-16 17:15:26.104542409 +0000 -@@ -505,6 +505,7 @@ cupsdStartProcess( - #ifdef HAVE_SIGSET - sigset(SIGTERM, SIG_DFL); - sigset(SIGCHLD, SIG_DFL); -+ sigset(SIGPIPE, SIG_DFL); - #elif defined(HAVE_SIGACTION) - memset(&action, 0, sizeof(action)); - -@@ -513,9 +514,11 @@ cupsdStartProcess( - - sigaction(SIGTERM, &action, NULL); - sigaction(SIGCHLD, &action, NULL); -+ sigaction(SIGPIPE, &action, NULL); - #else - signal(SIGTERM, SIG_DFL); - signal(SIGCHLD, SIG_DFL); -+ signal(SIGPIPE, SIG_DFL); - #endif /* HAVE_SIGSET */ - - cupsdReleaseSignals(); +diff -up cups-1.4.2/scheduler/main.c.str3399 cups-1.4.2/scheduler/main.c --- cups-1.4.2/scheduler/main.c.str3399 2010-03-02 11:04:28.968100478 +0000 +++ cups-1.4.2/scheduler/main.c 2010-03-02 11:04:47.442226409 +0000 @@ -1733,7 +1733,7 @@ process_children(void) diff --git a/cups-str3403.patch b/cups-str3403.patch deleted file mode 100644 index d66d163..0000000 --- a/cups-str3403.patch +++ /dev/null @@ -1,84 +0,0 @@ -diff -up cups-1.4.2/templates/admin.tmpl.str3403 cups-1.4.2/templates/admin.tmpl ---- cups-1.4.2/templates/admin.tmpl.str3403 2008-09-26 16:52:03.000000000 +0100 -+++ cups-1.4.2/templates/admin.tmpl 2009-11-16 17:21:56.108541688 +0000 -@@ -20,7 +20,7 @@ -

Jobs

- -

-- -+
-

- -
          -diff -up cups-1.4.2/templates/de/admin.tmpl.str3403 cups-1.4.2/templates/de/admin.tmpl ---- cups-1.4.2/templates/de/admin.tmpl.str3403 2009-04-03 16:55:28.000000000 +0100 -+++ cups-1.4.2/templates/de/admin.tmpl 2009-11-16 17:21:56.109542590 +0000 -@@ -20,7 +20,7 @@ -

Druckaufträge

- -

--

-+
-

- -
          -diff -up cups-1.4.2/templates/es/admin.tmpl.str3403 cups-1.4.2/templates/es/admin.tmpl ---- cups-1.4.2/templates/es/admin.tmpl.str3403 2009-01-10 00:26:04.000000000 +0000 -+++ cups-1.4.2/templates/es/admin.tmpl 2009-11-16 17:21:56.120542504 +0000 -@@ -20,7 +20,7 @@ -

Trabajos

- -

--

-+
-

- -
          -diff -up cups-1.4.2/templates/eu/admin.tmpl.str3403 cups-1.4.2/templates/eu/admin.tmpl ---- cups-1.4.2/templates/eu/admin.tmpl.str3403 2009-07-07 17:52:34.000000000 +0100 -+++ cups-1.4.2/templates/eu/admin.tmpl 2009-11-16 17:21:56.120542504 +0000 -@@ -20,7 +20,7 @@ -

Lanak

- -

--

-+
-

- -
          -diff -up cups-1.4.2/templates/ja/admin.tmpl.str3403 cups-1.4.2/templates/ja/admin.tmpl ---- cups-1.4.2/templates/ja/admin.tmpl.str3403 2009-02-17 19:04:25.000000000 +0000 -+++ cups-1.4.2/templates/ja/admin.tmpl 2009-11-16 17:21:56.120542504 +0000 -@@ -20,7 +20,7 @@ -

ジョブ

- -

--

-+
-

- -
          -diff -up cups-1.4.2/templates/pl/admin.tmpl.str3403 cups-1.4.2/templates/pl/admin.tmpl ---- cups-1.4.2/templates/pl/admin.tmpl.str3403 2009-02-25 16:48:35.000000000 +0000 -+++ cups-1.4.2/templates/pl/admin.tmpl 2009-11-16 17:21:56.121542314 +0000 -@@ -20,7 +20,7 @@ -

Zadania

- -

--

-+
-

- -
          -diff -up cups-1.4.2/templates/ru/admin.tmpl.str3403 cups-1.4.2/templates/ru/admin.tmpl ---- cups-1.4.2/templates/ru/admin.tmpl.str3403 2009-10-26 16:01:08.000000000 +0000 -+++ cups-1.4.2/templates/ru/admin.tmpl 2009-11-16 17:21:56.121542314 +0000 -@@ -20,7 +20,7 @@ -

Задания

- -

--

-+
-

- -
          diff --git a/cups-str3407.patch b/cups-str3407.patch deleted file mode 100644 index 4d8c6dc..0000000 --- a/cups-str3407.patch +++ /dev/null @@ -1,67 +0,0 @@ -diff -up cups-1.4.2/CHANGES-1.4.txt.str3407 cups-1.4.2/CHANGES-1.4.txt -diff -up cups-1.4.2/scheduler/job.c.str3407 cups-1.4.2/scheduler/job.c ---- cups-1.4.2/scheduler/job.c.str3407 2009-11-17 12:18:38.518084476 +0000 -+++ cups-1.4.2/scheduler/job.c 2009-11-17 13:00:46.204083691 +0000 -@@ -1721,7 +1721,30 @@ cupsdLoadJob(cupsd_job_t *job) /* I - J - cupsdLogMessage(CUPSD_LOG_ERROR, - "[Job %d] Ran out of memory for job file types!", - job->id); -- return (1); -+ -+ ippDelete(job->attrs); -+ job->attrs = NULL; -+ -+ if (compressions) -+ free(compressions); -+ -+ if (filetypes) -+ free(filetypes); -+ -+ if (job->compressions) -+ { -+ free(job->compressions); -+ job->compressions = NULL; -+ } -+ -+ if (job->filetypes) -+ { -+ free(job->filetypes); -+ job->filetypes = NULL; -+ } -+ -+ job->num_files = 0; -+ return (0); - } - - job->compressions = compressions; -@@ -1789,6 +1812,21 @@ cupsdLoadJob(cupsd_job_t *job) /* I - J - - ippDelete(job->attrs); - job->attrs = NULL; -+ -+ if (job->compressions) -+ { -+ free(job->compressions); -+ job->compressions = NULL; -+ } -+ -+ if (job->filetypes) -+ { -+ free(job->filetypes); -+ job->filetypes = NULL; -+ } -+ -+ job->num_files = 0; -+ - unlink(jobfile); - - return (0); -@@ -4411,7 +4449,7 @@ update_job_attrs(cupsd_job_t *job, /* I - else if (job->printer->state_message[0] && do_message) - cupsdSetString(&(job->printer_message->values[0].string.text), - job->printer->state_message); -- -+ - /* - * ... and the printer-state-reasons value... - */ diff --git a/cups-str3413.patch b/cups-str3413.patch deleted file mode 100644 index a74e7ec..0000000 --- a/cups-str3413.patch +++ /dev/null @@ -1,33 +0,0 @@ -diff -up cups-1.4.2/backend/snmp.c.str3413 cups-1.4.2/backend/snmp.c ---- cups-1.4.2/backend/snmp.c.str3413 2009-01-14 22:40:58.000000000 +0000 -+++ cups-1.4.2/backend/snmp.c 2009-12-08 10:54:11.798515550 +0000 -@@ -999,7 +999,7 @@ read_snmp_response(int fd) /* I - SNMP - DEVICE_PRODUCT, LexmarkProductOID2); - _cupsSNMPWrite(fd, &(packet.address), CUPS_SNMP_VERSION_1, - packet.community, CUPS_ASN1_GET_REQUEST, -- DEVICE_URI, LexmarkDeviceIdOID); -+ DEVICE_ID, LexmarkDeviceIdOID); - _cupsSNMPWrite(fd, &(packet.address), CUPS_SNMP_VERSION_1, - packet.community, CUPS_ASN1_GET_REQUEST, - DEVICE_PRODUCT, XeroxProductOID); -@@ -1054,7 +1054,9 @@ read_snmp_response(int fd) /* I - SNMP - break; - - case DEVICE_ID : -- if (device && packet.object_type == CUPS_ASN1_OCTET_STRING) -+ if (device && packet.object_type == CUPS_ASN1_OCTET_STRING && -+ (!device->id || -+ strlen(device->id) < packet.object_value.string.num_bytes)) - { - /* - * Update an existing cache entry... -@@ -1107,7 +1109,7 @@ read_snmp_response(int fd) /* I - SNMP - - case DEVICE_URI : - if (device && packet.object_type == CUPS_ASN1_OCTET_STRING && -- !device->uri) -+ !device->uri && packet.object_value.string.num_bytes > 0) - { - /* - * Update an existing cache entry... -diff -up cups-1.4.2/CHANGES-1.4.txt.str3413 cups-1.4.2/CHANGES-1.4.txt diff --git a/cups-str3418.patch b/cups-str3418.patch deleted file mode 100644 index 3bb4e3e..0000000 --- a/cups-str3418.patch +++ /dev/null @@ -1,90 +0,0 @@ -diff -up cups-1.4.2/cgi-bin/admin.c.str3418 cups-1.4.2/cgi-bin/admin.c ---- cups-1.4.2/cgi-bin/admin.c.str3418 2009-11-17 13:23:51.130084685 +0000 -+++ cups-1.4.2/cgi-bin/admin.c 2009-11-17 13:23:56.773209143 +0000 -@@ -1261,7 +1261,7 @@ do_am_printer(http_t *http, /* I - HTTP - * Got the list of PPDs, see if the user has selected a make... - */ - -- if (cgiSetIPPVars(response, NULL, NULL, NULL, 0) == 0) -+ if (cgiSetIPPVars(response, NULL, NULL, NULL, 0) == 0 && !modify) - { - /* - * No PPD files with this make, try again with all makes... -@@ -1297,8 +1297,11 @@ do_am_printer(http_t *http, /* I - HTTP - */ - - cgiStartHTML(title); -- cgiSetVariable("CURRENT_MAKE_AND_MODEL", -- cgiGetArray("PPD_MAKE_AND_MODEL", 0)); -+ if (!cgiGetVariable("PPD_MAKE")) -+ cgiSetVariable("PPD_MAKE", cgiGetVariable("CURRENT_MAKE")); -+ if (!modify) -+ cgiSetVariable("CURRENT_MAKE_AND_MODEL", -+ cgiGetArray("PPD_MAKE_AND_MODEL", 0)); - cgiCopyTemplateLang("choose-model.tmpl"); - cgiEndHTML(); - } -@@ -1590,7 +1593,7 @@ do_config_server(http_t *http) /* I - H - #ifdef HAVE_GSSAPI - char default_auth_type[255]; - /* DefaultAuthType value */ -- const char *val; /* Setting value */ -+ const char *val; /* Setting value */ - #endif /* HAVE_GSSAPI */ - - -@@ -1662,7 +1665,7 @@ do_config_server(http_t *http) /* I - H - strcat(local_protocols, "slp"); - } - #endif /* HAVE_SLP */ -- -+ - if (cgiGetVariable("BROWSE_REMOTE_CUPS")) - strcpy(remote_protocols, "cups"); - else -@@ -1915,7 +1918,7 @@ do_config_server(http_t *http) /* I - H - cgiSetVariable("ERROR", strerror(errno)); - cgiCopyTemplateLang("error.tmpl"); - cgiEndHTML(); -- -+ - perror(tempfile); - return; - } -@@ -1927,7 +1930,7 @@ do_config_server(http_t *http) /* I - H - cgiSetVariable("ERROR", strerror(errno)); - cgiCopyTemplateLang("error.tmpl"); - cgiEndHTML(); -- -+ - perror(tempfile); - close(tempfd); - unlink(tempfile); -@@ -3342,7 +3345,7 @@ do_set_options(http_t *http, /* I - HTT - ((ppdattr = ppdFindAttr(ppd, "cupsCommands", NULL)) != NULL && - ppdattr->value && strstr(ppdattr->value, "AutoConfigure"))) - cgiSetVariable("HAVE_AUTOCONFIGURE", "YES"); -- else -+ else - { - for (i = 0; i < ppd->num_filters; i ++) - if (!strncmp(ppd->filters[i], "application/vnd.cups-postscript", 31)) -@@ -3446,7 +3449,7 @@ do_set_options(http_t *http, /* I - HTT - cgiSetVariable("GROUP", group->text); - - cgiCopyTemplateLang("option-header.tmpl"); -- -+ - for (j = group->num_options, option = group->options; - j > 0; - j --, option ++) -@@ -4090,7 +4093,7 @@ get_option_value( - - snprintf(buffer, bufsize, "Custom.%gx%g%s", width, length, uval); - } -- else if (cupsArrayCount(coption->params) == 1) -+ else if (cupsArrayCount(coption->params) == 1) - { - cparam = ppdFirstCustomParam(coption); - snprintf(keyword, sizeof(keyword), "%s.%s", coption->keyword, cparam->name); -diff -up cups-1.4.2/CHANGES-1.4.txt.str3418 cups-1.4.2/CHANGES-1.4.txt diff --git a/cups-str3422.patch b/cups-str3422.patch deleted file mode 100644 index a0ac1bf..0000000 --- a/cups-str3422.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff -up cups-1.4.2/templates/pl/jobs-header.tmpl.localize cups-1.4.2/templates/pl/jobs-header.tmpl ---- cups-1.4.2/templates/pl/jobs-header.tmpl.localize 2009-02-25 17:48:35.000000000 +0100 -+++ cups-1.4.2/templates/pl/jobs-header.tmpl 2009-11-20 13:56:58.000000000 +0100 -@@ -2,4 +2,4 @@ - {?which_jobs=completed?:
} - {?which_jobs=all?:
} - --

{total=0?Brak zadań:Wyświetlanie {#job_id} z {total} {?which_jobs=?aktywnych:{which_jobs=wszystkich?:zakończonych}} zadań{total=1?:s}}.

-+

{total=0?Brak zadań:Wyświetlanie {#job_id} z {total} {?which_jobs=?aktywnych:{which_jobs=all?:zakończonych}} zadań{total=1?:s}}.

-diff -up cups-1.4.2/templates/ru/jobs-header.tmpl.localize cups-1.4.2/templates/ru/jobs-header.tmpl ---- cups-1.4.2/templates/ru/jobs-header.tmpl.localize 2009-02-17 20:04:25.000000000 +0100 -+++ cups-1.4.2/templates/ru/jobs-header.tmpl 2009-11-20 13:53:54.000000000 +0100 -@@ -1,5 +1,6 @@ -
{?which_jobs=?:
} --{?which_jobs=completed?:
} --{?which_jobs=all?:
}
-+{?which_jobs=completed?:
} -+{?which_jobs=all?:
} -+ -+

{total=0?Нет заданий:Задание {#job_id} из {total} {?which_jobs=?активных:{which_jobs=all?:завершенных}}.

- --

{total=0?Нет заданий:Задание {#job_id} из {total} {?which_jobs=?активных:{which_jobs=всех?:завершенных}}.

diff --git a/cups-str3425.patch b/cups-str3425.patch deleted file mode 100644 index 98d2e44..0000000 --- a/cups-str3425.patch +++ /dev/null @@ -1,145 +0,0 @@ -diff -up cups-1.4.2/scheduler/job.c.str3425 cups-1.4.2/scheduler/job.c ---- cups-1.4.2/scheduler/job.c.str3425 2010-03-09 16:59:12.000000000 +0100 -+++ cups-1.4.2/scheduler/job.c 2010-03-09 17:02:57.000000000 +0100 -@@ -253,7 +253,7 @@ cupsdCancelJobs(const char *dest, /* I - - if (purge) - cupsdSetJobState(job, IPP_JOB_CANCELED, CUPSD_JOB_PURGE, - "Job purged by user."); -- else -+ else if (job->state_value < IPP_JOB_CANCELED) - cupsdSetJobState(job, IPP_JOB_CANCELED, CUPSD_JOB_DEFAULT, - "Job canceled by user."); - } -@@ -433,11 +433,11 @@ cupsdCleanJobs(void) - cupsd_job_t *job; /* Current job */ - - -- if (MaxJobs <= 0) -+ if (MaxJobs <= 0 && JobHistory) - return; - - for (job = (cupsd_job_t *)cupsArrayFirst(Jobs); -- job && cupsArrayCount(Jobs) >= MaxJobs; -+ job && (cupsArrayCount(Jobs) >= MaxJobs || !JobHistory); - job = (cupsd_job_t *)cupsArrayNext(Jobs)) - if (job->state_value >= IPP_JOB_CANCELED && !job->printer) - cupsdDeleteJob(job, CUPSD_JOB_PURGE); -@@ -2286,12 +2286,14 @@ cupsdSetJobState( - if (!cupsdLoadJob(job)) - return; - -- /* -- * Don't do anything if the state is unchanged... -- */ -- -- if (newstate == (oldstate = job->state_value)) -- return; -+ /* -+ * Don't do anything if the state is unchanged and we aren't purging the -+ * job... -+ */ -+ -+ oldstate = job->state_value; -+ if (newstate == oldstate && action != CUPSD_JOB_PURGE) -+ return; - - /* - * Stop any processes that are working on the current job... -@@ -2499,7 +2501,14 @@ cupsdSetJobState( - cupsdMarkDirty(CUPSD_DIRTY_JOBS); - } - else if (!job->printer) -+ { -+ /* -+ * Delete the job immediately if not actively printing... -+ */ -+ - cupsdDeleteJob(job, CUPSD_JOB_PURGE); -+ job = NULL; -+ } - break; - } - -@@ -2507,7 +2516,7 @@ cupsdSetJobState( - * Finalize the job immediately if we forced things... - */ - -- if (action == CUPSD_JOB_FORCE) -+ if (action >= CUPSD_JOB_FORCE && job && job->printer) - finalize_job(job); - - /* -diff -up cups-1.4.2/scheduler/main.c.str3425 cups-1.4.2/scheduler/main.c ---- cups-1.4.2/scheduler/main.c.str3425 2010-03-09 16:59:12.000000000 +0100 -+++ cups-1.4.2/scheduler/main.c 2010-03-09 16:59:12.000000000 +0100 -@@ -389,7 +389,7 @@ main(int argc, /* I - Number of comm - * parent's file descriptors to be blocking. This is a workaround for a - * limitation of userland libpthread on OpenBSD. - */ -- -+ - _thread_sys_closefrom(0); - #endif /* __OpenBSD__ */ - -@@ -817,8 +817,8 @@ main(int argc, /* I - Number of comm - - if (timeout == 86400 && Launchd && LaunchdTimeout && !NumPolled && - !cupsArrayCount(ActiveJobs) && -- (!Browsing || -- (!BrowseRemoteProtocols && -+ (!Browsing || -+ (!BrowseRemoteProtocols && - (!NumBrowsers || !BrowseLocalProtocols || - cupsArrayCount(Printers) == 0)))) - { -@@ -1046,6 +1046,7 @@ main(int argc, /* I - Number of comm - if ((current_time - senddoc_time) >= 10) - { - cupsdCheckJobs(); -+ cupsdCleanJobs(); - senddoc_time = current_time; - } - -@@ -1204,8 +1205,8 @@ main(int argc, /* I - Number of comm - #endif /* HAVE_GSSAPI */ - - #if defined(__APPLE__) && defined(HAVE_DLFCN_H) -- /* -- * Unload Print Service quota enforcement library (X Server only) -+ /* -+ * Unload Print Service quota enforcement library (X Server only) - */ - - PSQUpdateQuotaProc = NULL; -@@ -1562,13 +1563,13 @@ launchd_checkin(void) - - if (lis) - { -- cupsdLogMessage(CUPSD_LOG_DEBUG, -+ cupsdLogMessage(CUPSD_LOG_DEBUG, - "launchd_checkin: Matched existing listener %s with fd %d...", - httpAddrString(&(lis->address), s, sizeof(s)), fd); - } - else - { -- cupsdLogMessage(CUPSD_LOG_DEBUG, -+ cupsdLogMessage(CUPSD_LOG_DEBUG, - "launchd_checkin: Adding new listener %s with fd %d...", - httpAddrString(&addr, s, sizeof(s)), fd); - -@@ -1622,12 +1623,12 @@ launchd_checkout(void) - - /* - * Create or remove the launchd KeepAlive file based on whether -- * there are active jobs, polling, browsing for remote printers or -+ * there are active jobs, polling, browsing for remote printers or - * shared printers to advertise... - */ - -- if ((cupsArrayCount(ActiveJobs) || NumPolled || -- (Browsing && -+ if ((cupsArrayCount(ActiveJobs) || NumPolled || -+ (Browsing && - (BrowseRemoteProtocols || - (BrowseLocalProtocols && NumBrowsers && cupsArrayCount(Printers)))))) - { diff --git a/cups-str3428.patch b/cups-str3428.patch deleted file mode 100644 index 1ed50d9..0000000 --- a/cups-str3428.patch +++ /dev/null @@ -1,57 +0,0 @@ -diff -up cups-1.4.2/scheduler/ipp.c.str3428 cups-1.4.2/scheduler/ipp.c ---- cups-1.4.2/scheduler/ipp.c.str3428 2009-12-08 12:24:31.177373309 +0000 -+++ cups-1.4.2/scheduler/ipp.c 2009-12-08 12:27:33.910498083 +0000 -@@ -1860,8 +1860,6 @@ add_job(cupsd_client_t *con, /* I - Cl - "job-media-sheets-completed", 0); - ippAddString(job->attrs, IPP_TAG_JOB, IPP_TAG_URI, "job-printer-uri", NULL, - printer->uri); -- ippAddString(job->attrs, IPP_TAG_JOB, IPP_TAG_NAME, "job-name", NULL, -- title); - - if ((attr = ippFindAttribute(job->attrs, "job-k-octets", - IPP_TAG_INTEGER)) != NULL) -@@ -3438,7 +3436,7 @@ apple_register_profiles( - num_profiles ++; - } - -- -+ - /* - * If we have profiles, add them... - */ -@@ -3484,7 +3482,7 @@ apple_register_profiles( - snprintf(q_keyword, sizeof(q_keyword), "Default%s", attr->value); - q2_attr = ppdFindAttr(ppd, q_keyword, NULL); - } -- else -+ else - q2_attr = ppdFindAttr(ppd, "DefaultMediaType", NULL); - - if (q2_attr && q2_attr->value && q2_attr->value[0]) -@@ -3498,7 +3496,7 @@ apple_register_profiles( - snprintf(q_keyword, sizeof(q_keyword), "Default%s", attr->value); - q3_attr = ppdFindAttr(ppd, q_keyword, NULL); - } -- else -+ else - q3_attr = ppdFindAttr(ppd, "DefaultResolution", NULL); - - if (q3_attr && q3_attr->value && q3_attr->value[0]) -@@ -3667,7 +3665,7 @@ apple_register_profiles( - attr = ppdFindAttr(ppd, "DefaultColorSpace", NULL); - - num_profiles = (attr && ppd->colorspace == PPD_CS_GRAY) ? 1 : 2; -- -+ - if ((profiles = calloc(num_profiles, sizeof(CMDeviceProfileArray))) == NULL) - { - cupsdLogMessage(CUPSD_LOG_ERROR, -@@ -4762,7 +4760,7 @@ check_quotas(cupsd_client_t *con, /* I - if (q->page_count == -4) /* special case: unlimited user */ - { - cupsdLogMessage(CUPSD_LOG_INFO, -- "User \"%s\" request approved for printer %s (%s): " -+ "User \"%s\" request approved for printer %s (%s): " - "unlimited quota.", - username, p->name, p->info); - q->page_count = 0; /* allow user to print */ diff --git a/cups-str3431.patch b/cups-str3431.patch deleted file mode 100644 index 636960d..0000000 --- a/cups-str3431.patch +++ /dev/null @@ -1,32 +0,0 @@ -diff -up cups-1.4.2/scheduler/ipp.c.str3431 cups-1.4.2/scheduler/ipp.c ---- cups-1.4.2/scheduler/ipp.c.str3431 2009-12-08 12:28:21.095374048 +0000 -+++ cups-1.4.2/scheduler/ipp.c 2009-12-08 12:32:03.829498891 +0000 -@@ -7183,6 +7183,7 @@ get_job_attrs(cupsd_client_t *con, /* I - ipp_attribute_t *attr; /* Current attribute */ - int jobid; /* Job ID */ - cupsd_job_t *job; /* Current job */ -+ cupsd_printer_t *printer; /* Current printer */ - char scheme[HTTP_MAX_URI], /* Method portion of URI */ - username[HTTP_MAX_URI], /* Username portion of URI */ - host[HTTP_MAX_URI], /* Host portion of URI */ -@@ -7257,7 +7258,19 @@ get_job_attrs(cupsd_client_t *con, /* I - * Check policy... - */ - -- if ((status = cupsdCheckPolicy(DefaultPolicyPtr, con, NULL)) != HTTP_OK) -+ if ((printer = job->printer) == NULL) -+ printer = cupsdFindDest(job->dest); -+ -+ if (printer) -+ { -+ if ((status = cupsdCheckPolicy(printer->op_policy_ptr, con, -+ NULL)) != HTTP_OK) -+ { -+ send_http_error(con, status, printer); -+ return; -+ } -+ } -+ else if ((status = cupsdCheckPolicy(DefaultPolicyPtr, con, NULL)) != HTTP_OK) - { - send_http_error(con, status, NULL); - return; diff --git a/cups-str3435.patch b/cups-str3435.patch deleted file mode 100644 index 1870abb..0000000 --- a/cups-str3435.patch +++ /dev/null @@ -1,45 +0,0 @@ -diff -up cups-1.4.2/cups/util.c.str3435 cups-1.4.2/cups/util.c ---- cups-1.4.2/cups/util.c.str3435 2009-06-22 21:44:34.000000000 +0100 -+++ cups-1.4.2/cups/util.c 2009-12-08 12:11:38.647375446 +0000 -@@ -1511,12 +1511,36 @@ cupsPrintFiles2( - return (0); - } - -- status = cupsStartDocument(http, name, job_id, docname, format, -- i == (num_files - 1)); -+ do -+ { -+ cupsFileRewind(fp); -+ -+ status = cupsStartDocument(http, name, job_id, docname, format, -+ i == (num_files - 1)); -+ -+ while (status == HTTP_CONTINUE && -+ (bytes = cupsFileRead(fp, buffer, sizeof(buffer))) > 0) -+ status = cupsWriteRequestData(http, buffer, bytes); -+ -+ if (status == HTTP_UNAUTHORIZED) -+ { -+ char resource[1024]; /* Printer resource */ - -- while (status == HTTP_CONTINUE && -- (bytes = cupsFileRead(fp, buffer, sizeof(buffer))) > 0) -- status = cupsWriteRequestData(http, buffer, bytes); -+ snprintf(resource, sizeof(resource), "/printers/%s", name); -+ -+ if (!cupsDoAuthentication(http, "POST", resource)) -+ { -+ if (httpReconnect(http)) -+ { -+ _cupsSetError(IPP_SERVICE_UNAVAILABLE, NULL, 0); -+ return (0); -+ } -+ } -+ else -+ status = HTTP_AUTHORIZATION_CANCELED; -+ } -+ } -+ while (status == HTTP_UNAUTHORIZED); - - cupsFileClose(fp); - diff --git a/cups-str3436.patch b/cups-str3436.patch deleted file mode 100644 index 910d15a..0000000 --- a/cups-str3436.patch +++ /dev/null @@ -1,33 +0,0 @@ -diff -up cups-1.4.2/cgi-bin/ipp-var.c.str3436 cups-1.4.2/cgi-bin/ipp-var.c ---- cups-1.4.2/cgi-bin/ipp-var.c.str3436 2009-11-09 23:01:17.000000000 +0000 -+++ cups-1.4.2/cgi-bin/ipp-var.c 2009-12-08 12:19:01.988500453 +0000 -@@ -333,7 +333,7 @@ cgiMoveJobs(http_t *http, /* I - Co - NULL, job_uri); - ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD, - "requested-attributes", NULL, "job-printer-uri"); -- -+ - if ((response = cupsDoRequest(http, request, "/")) != NULL) - { - if ((attr = ippFindAttribute(response, "job-printer-uri", -@@ -926,7 +926,7 @@ cgiRewriteURL(const char *uri, /* I - C - ishttps ? "https" : "http", - userpass, hostname, port, resource); - else -- snprintf(url, urlsize, "%s://%s:%d%s", -+ snprintf(url, urlsize, "%s://%s:%d%s", - ishttps ? "https" : "http", - hostname, port, resource); - } -@@ -1518,7 +1518,11 @@ cgiShowJobs(http_t *http, /* I - Co - */ - - if (dest) -+ { - snprintf(val, sizeof(val), "/%s/%s", section, dest); -+ cgiSetVariable("PRINTER_NAME", dest); -+ cgiSetVariable("PRINTER_URI_SUPPORTED", val); -+ } - else - strlcpy(val, "/jobs/", sizeof(val)); - diff --git a/cups-str3439.patch b/cups-str3439.patch deleted file mode 100644 index e5b2e2e..0000000 --- a/cups-str3439.patch +++ /dev/null @@ -1,126 +0,0 @@ -diff -up cups-1.4.2/cgi-bin/admin.c.str3439 cups-1.4.2/cgi-bin/admin.c ---- cups-1.4.2/cgi-bin/admin.c.str3439 2009-12-08 10:03:36.412157983 +0000 -+++ cups-1.4.2/cgi-bin/admin.c 2009-12-08 10:03:41.659157246 +0000 -@@ -3320,11 +3320,16 @@ do_set_options(http_t *http, /* I - HTT - for (option = ppdFirstOption(ppd); - option; - option = ppdNextOption(ppd)) -+ { - if ((var = cgiGetVariable(option->keyword)) != NULL) - { - have_options = 1; - ppdMarkOption(ppd, option->keyword, var); -+ fprintf(stderr, "DEBUG: Set %s to %s...\n", option->keyword, var); - } -+ else -+ fprintf(stderr, "DEBUG: Didn't find %s...\n", option->keyword); -+ } - } - - if (!have_options || ppdConflicts(ppd)) -diff -up cups-1.4.2/cups/conflicts.c.str3439 cups-1.4.2/cups/conflicts.c ---- cups-1.4.2/cups/conflicts.c.str3439 2009-05-18 23:55:15.000000000 +0100 -+++ cups-1.4.2/cups/conflicts.c 2009-12-08 10:03:41.657157719 +0000 -@@ -583,9 +583,13 @@ ppdConflicts(ppd_file_t *ppd) /* I - PP - * Clear all conflicts... - */ - -+ cupsArraySave(ppd->options); -+ - for (o = ppdFirstOption(ppd); o; o = ppdNextOption(ppd)) - o->conflicted = 0; - -+ cupsArrayRestore(ppd->options); -+ - /* - * Test for conflicts... - */ -diff -up cups-1.4.2/cups/mark.c.str3439 cups-1.4.2/cups/mark.c ---- cups-1.4.2/cups/mark.c.str3439 2009-04-20 22:37:14.000000000 +0100 -+++ cups-1.4.2/cups/mark.c 2009-12-08 10:03:41.656157620 +0000 -@@ -842,6 +842,8 @@ ppd_mark_option(ppd_file_t *ppd, /* I - - - if (!strcasecmp(option, "AP_D_InputSlot")) - { -+ cupsArraySave(ppd->options); -+ - if ((o = ppdFindOption(ppd, "InputSlot")) != NULL) - { - key.option = o; -@@ -851,13 +853,21 @@ ppd_mark_option(ppd_file_t *ppd, /* I - - cupsArrayRemove(ppd->marked, oldc); - } - } -+ -+ cupsArrayRestore(ppd->options); - } - - /* - * Check for custom options... - */ - -- if ((o = ppdFindOption(ppd, option)) == NULL) -+ cupsArraySave(ppd->options); -+ -+ o = ppdFindOption(ppd, option); -+ -+ cupsArrayRestore(ppd->options); -+ -+ if (!o) - return; - - loc = localeconv(); -@@ -1060,6 +1070,8 @@ ppd_mark_option(ppd_file_t *ppd, /* I - - * appropriate... - */ - -+ cupsArraySave(ppd->options); -+ - if (!strcasecmp(option, "PageSize")) - { - if ((o = ppdFindOption(ppd, "PageRegion")) != NULL) -@@ -1084,6 +1096,8 @@ ppd_mark_option(ppd_file_t *ppd, /* I - - } - } - } -+ -+ cupsArrayRestore(ppd->options); - } - else if (!strcasecmp(option, "InputSlot")) - { -@@ -1091,6 +1105,8 @@ ppd_mark_option(ppd_file_t *ppd, /* I - - * Unmark ManualFeed option... - */ - -+ cupsArraySave(ppd->options); -+ - if ((o = ppdFindOption(ppd, "ManualFeed")) != NULL) - { - key.option = o; -@@ -1100,6 +1116,8 @@ ppd_mark_option(ppd_file_t *ppd, /* I - - cupsArrayRemove(ppd->marked, oldc); - } - } -+ -+ cupsArrayRestore(ppd->options); - } - else if (!strcasecmp(option, "ManualFeed") && - !strcasecmp(choice, "True")) -@@ -1108,6 +1126,8 @@ ppd_mark_option(ppd_file_t *ppd, /* I - - * Unmark InputSlot option... - */ - -+ cupsArraySave(ppd->options); -+ - if ((o = ppdFindOption(ppd, "InputSlot")) != NULL) - { - key.option = o; -@@ -1117,6 +1137,8 @@ ppd_mark_option(ppd_file_t *ppd, /* I - - cupsArrayRemove(ppd->marked, oldc); - } - } -+ -+ cupsArrayRestore(ppd->options); - } - } - diff --git a/cups-str3440.patch b/cups-str3440.patch deleted file mode 100644 index 9dfd56b..0000000 --- a/cups-str3440.patch +++ /dev/null @@ -1,104 +0,0 @@ -diff -up cups-1.4.2/cgi-bin/admin.c.str3440 cups-1.4.2/cgi-bin/admin.c ---- cups-1.4.2/cgi-bin/admin.c.str3440 2009-12-08 10:10:05.529157178 +0000 -+++ cups-1.4.2/cgi-bin/admin.c 2009-12-08 10:10:12.571033051 +0000 -@@ -3436,6 +3436,16 @@ do_set_options(http_t *http, /* I - HTT - { - cgiSetArray("ckeyword", k, option->keyword); - cgiSetArray("ckeytext", k, option->text); -+ -+ for (m = 0; m < option->num_choices; m ++) -+ { -+ if (option->choices[m].marked) -+ { -+ cgiSetArray("cchoice", k, option->choices[m].text); -+ break; -+ } -+ } -+ - k ++; - } - -diff -up cups-1.4.2/templates/de/option-conflict.tmpl.str3440 cups-1.4.2/templates/de/option-conflict.tmpl ---- cups-1.4.2/templates/de/option-conflict.tmpl.str3440 2009-04-03 16:55:28.000000000 +0100 -+++ cups-1.4.2/templates/de/option-conflict.tmpl 2009-12-08 10:10:12.567157789 +0000 -@@ -1,7 +1,7 @@ -

Error: The following options are conflicting:

- - - -

Bitte ändern sie eine oder mehrere Einstellungen um die Konflikte zu lösen.

-diff -up cups-1.4.2/templates/es/option-conflict.tmpl.str3440 cups-1.4.2/templates/es/option-conflict.tmpl ---- cups-1.4.2/templates/es/option-conflict.tmpl.str3440 2008-12-08 21:20:06.000000000 +0000 -+++ cups-1.4.2/templates/es/option-conflict.tmpl 2009-12-08 10:10:12.568157603 +0000 -@@ -1,7 +1,7 @@ -

Error: Las siguientes opciones están en conflicto:

- - - -

Cambie una o más de las opciones para resolver el problema.

-diff -up cups-1.4.2/templates/eu/option-conflict.tmpl.str3440 cups-1.4.2/templates/eu/option-conflict.tmpl ---- cups-1.4.2/templates/eu/option-conflict.tmpl.str3440 2009-07-07 17:52:34.000000000 +0100 -+++ cups-1.4.2/templates/eu/option-conflict.tmpl 2009-12-08 10:10:12.569157261 +0000 -@@ -1,7 +1,7 @@ -

Errorea: honako aukerak gatazkan daude:

- - - -

Aldatu aukera bat edo gehiago gatazkak ebazteko.

-diff -up cups-1.4.2/templates/ja/option-conflict.tmpl.str3440 cups-1.4.2/templates/ja/option-conflict.tmpl ---- cups-1.4.2/templates/ja/option-conflict.tmpl.str3440 2009-02-17 19:04:25.000000000 +0000 -+++ cups-1.4.2/templates/ja/option-conflict.tmpl 2009-12-08 10:10:12.566157419 +0000 -@@ -1,7 +1,7 @@ -

エラー: 以下のオプションは競合します:

- - - -

競合を解決するために、1 つ以上のオプションを変更してください。

-diff -up cups-1.4.2/templates/option-conflict.tmpl.str3440 cups-1.4.2/templates/option-conflict.tmpl ---- cups-1.4.2/templates/option-conflict.tmpl.str3440 2005-08-24 20:25:49.000000000 +0100 -+++ cups-1.4.2/templates/option-conflict.tmpl 2009-12-08 10:10:12.566157419 +0000 -@@ -1,7 +1,7 @@ -

Error: The following options are conflicting:

- - - -

Please change one or more of the options to resolve the conflicts.

-diff -up cups-1.4.2/templates/pl/option-conflict.tmpl.str3440 cups-1.4.2/templates/pl/option-conflict.tmpl ---- cups-1.4.2/templates/pl/option-conflict.tmpl.str3440 2009-02-25 16:48:35.000000000 +0000 -+++ cups-1.4.2/templates/pl/option-conflict.tmpl 2009-12-08 10:10:12.567157789 +0000 -@@ -1,7 +1,7 @@ -

Błąd: następujące opcje są w konflikcie ze sobą:

- - - -

Proszę zmienić jedną lub więcej opcji, aby rozwiązać konflikt.

-diff -up cups-1.4.2/templates/ru/option-conflict.tmpl.str3440 cups-1.4.2/templates/ru/option-conflict.tmpl ---- cups-1.4.2/templates/ru/option-conflict.tmpl.str3440 2009-02-17 19:04:25.000000000 +0000 -+++ cups-1.4.2/templates/ru/option-conflict.tmpl 2009-12-08 10:10:12.567157789 +0000 -@@ -1,7 +1,7 @@ -

Ошибка: следующие параметры конфликтуют:

- - - -

Измените один или несколько параметров для того, чтобы избежать конфликта.

diff --git a/cups-str3442.patch b/cups-str3442.patch deleted file mode 100644 index af57fd4..0000000 --- a/cups-str3442.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -up cups-1.4.2/conf/mime.convs.in.str3442 cups-1.4.2/conf/mime.convs.in ---- cups-1.4.2/conf/mime.convs.in.str3442 2009-05-22 20:30:39.000000000 +0100 -+++ cups-1.4.2/conf/mime.convs.in 2009-12-08 10:19:40.044329553 +0000 -@@ -47,6 +47,7 @@ application/x-perl application/postscri - application/x-shell application/postscript 33 texttops - text/plain application/postscript 33 texttops - text/html application/postscript 33 texttops -+text/css application/postscript 33 texttops - image/gif application/vnd.cups-postscript 66 imagetops - image/png application/vnd.cups-postscript 66 imagetops - image/jpeg application/vnd.cups-postscript 66 imagetops diff --git a/cups-str3448.patch b/cups-str3448.patch deleted file mode 100644 index 4233e7e..0000000 --- a/cups-str3448.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff -up cups-1.4.2/cups/dest.c.str3448 cups-1.4.2/cups/dest.c ---- cups-1.4.2/cups/dest.c.str3448 2009-08-28 23:54:34.000000000 +0100 -+++ cups-1.4.2/cups/dest.c 2009-12-10 18:15:50.910079549 +0000 -@@ -145,6 +145,12 @@ cupsAddDest(const char *name, /* I - - - dest = cups_add_dest(name, instance, &num_dests, dests); - -+ /* -+ * Find the base dest again now the array has been realloc'd. -+ */ -+ -+ parent = cupsGetDest(name, NULL, num_dests, *dests); -+ - if (instance && parent && parent->num_options > 0) - { - /* diff --git a/cups-str3458.patch b/cups-str3458.patch deleted file mode 100644 index da43b76..0000000 --- a/cups-str3458.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff -up cups-1.4.2/backend/ipp.c.str3458 cups-1.4.2/backend/ipp.c ---- cups-1.4.2/backend/ipp.c.str3458 2009-12-22 13:04:25.021208333 +0000 -+++ cups-1.4.2/backend/ipp.c 2009-12-22 13:04:26.570082893 +0000 -@@ -802,6 +802,15 @@ main(int argc, /* I - Number of comm - - return (CUPS_BACKEND_STOP); - } -+ else if (ipp_status == IPP_NOT_AUTHORIZED || ipp_status == IPP_FORBIDDEN) -+ { -+ if (!strncmp(httpGetField(http, HTTP_FIELD_WWW_AUTHENTICATE), -+ "Negotiate", 9)) -+ auth_info_required = "negotiate"; -+ -+ fprintf(stderr, "ATTR: auth-info-required=%s\n", auth_info_required); -+ return (CUPS_BACKEND_AUTH_REQUIRED); -+ } - else - { - _cupsLangPrintf(stderr, diff --git a/cups-str3460.patch b/cups-str3460.patch deleted file mode 100644 index 20b1b70..0000000 --- a/cups-str3460.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -up cups-1.4.2/backend/ipp.c.str3460 cups-1.4.2/backend/ipp.c ---- cups-1.4.2/backend/ipp.c.str3460 2010-01-15 10:25:14.720258721 +0000 -+++ cups-1.4.2/backend/ipp.c 2010-01-15 10:28:57.218384231 +0000 -@@ -1435,7 +1435,10 @@ main(int argc, /* I - Number of comm - else if (ipp_status > IPP_OK_CONFLICT) - return (CUPS_BACKEND_FAILED); - else -+ { -+ _cupsLangPuts(stderr, _("INFO: Ready to print.\n")); - return (CUPS_BACKEND_OK); -+ } - } - - diff --git a/cups-str3503.patch b/cups-str3503.patch new file mode 100644 index 0000000..334f483 --- /dev/null +++ b/cups-str3503.patch @@ -0,0 +1,12 @@ +diff -up cups-1.4.3/cups/dest.c.str3503 cups-1.4.3/cups/dest.c +--- cups-1.4.3/cups/dest.c.str3503 2010-03-31 13:31:42.000000000 +0200 ++++ cups-1.4.3/cups/dest.c 2010-03-31 13:32:52.000000000 +0200 +@@ -553,7 +553,7 @@ cupsGetNamedDest(http_t *http, /* I + + if (!cups_get_sdests(http, op, name, 0, &dest)) + { +- if (op == CUPS_GET_DEFAULT || name) ++ if (op == CUPS_GET_DEFAULT || (name && !set_as_default)) + return (NULL); + + /* diff --git a/cups.spec b/cups.spec index 1cd9b11..58705f7 100644 --- a/cups.spec +++ b/cups.spec @@ -7,8 +7,8 @@ Summary: Common Unix Printing System Name: cups -Version: 1.4.2 -Release: 36%{?dist} +Version: 1.4.3 +Release: 1%{?dist} License: GPLv2 Group: System Environment/Daemons Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2 @@ -38,60 +38,36 @@ Patch4: cups-serial.patch Patch5: cups-banners.patch Patch6: cups-serverbin-compat.patch Patch7: cups-no-export-ssllibs.patch -Patch8: cups-str3448.patch -Patch9: cups-direct-usb.patch -Patch10: cups-lpr-help.patch -Patch11: cups-peercred.patch -Patch12: cups-pid.patch -Patch13: cups-page-label.patch -Patch14: cups-eggcups.patch -Patch15: cups-getpass.patch -Patch16: cups-driverd-timeout.patch -Patch17: cups-strict-ppd-line-length.patch -Patch18: cups-logrotate.patch -Patch19: cups-usb-paperout.patch -Patch20: cups-build.patch -Patch21: cups-res_init.patch -Patch22: cups-filter-debug.patch -Patch23: cups-uri-compat.patch -Patch24: cups-cups-get-classes.patch -Patch25: cups-avahi.patch -Patch26: cups-str3382.patch -Patch27: cups-str3285_v2-str3503.patch -Patch28: cups-str3390.patch -Patch29: cups-str3391.patch -Patch30: cups-str3381.patch -Patch31: cups-str3399.patch -Patch32: cups-str3403.patch -Patch33: cups-str3407.patch -Patch34: cups-str3418.patch -Patch35: cups-CVE-2009-3553.patch -Patch36: cups-str3422.patch -Patch37: cups-str3413.patch -Patch38: cups-str3439.patch -Patch39: cups-str3440.patch -Patch40: cups-str3442.patch -Patch41: cups-negative-snmp-string-length.patch -Patch42: cups-sidechannel-intrs.patch -Patch43: cups-media-empty-warning.patch -Patch44: cups-str3435.patch -Patch45: cups-str3436.patch -Patch46: cups-str3425.patch -Patch47: cups-str3428.patch -Patch48: cups-str3431.patch -Patch49: cups-gnutls-gcrypt-threads.patch -Patch50: cups-str3458.patch -Patch51: cups-0755.patch -Patch52: cups-str3460.patch -Patch53: cups-EAI_AGAIN.patch -Patch54: cups-str3505.patch -Patch55: cups-CVE-2010-0302.patch -Patch56: cups-str3541.patch +Patch8: cups-direct-usb.patch +Patch9: cups-lpr-help.patch +Patch10: cups-peercred.patch +Patch11: cups-pid.patch +Patch12: cups-page-label.patch +Patch13: cups-eggcups.patch +Patch14: cups-getpass.patch +Patch15: cups-driverd-timeout.patch +Patch16: cups-strict-ppd-line-length.patch +Patch17: cups-logrotate.patch +Patch18: cups-usb-paperout.patch +Patch19: cups-build.patch +Patch20: cups-res_init.patch +Patch21: cups-filter-debug.patch +Patch22: cups-uri-compat.patch +Patch23: cups-cups-get-classes.patch +Patch24: cups-avahi.patch +Patch25: cups-str3382.patch +Patch26: cups-str3503.patch +Patch27: cups-str3399.patch +Patch28: cups-gnutls-gcrypt-threads.patch +Patch29: cups-0755.patch +Patch30: cups-EAI_AGAIN.patch +Patch31: cups-str3505.patch +Patch32: cups-str3541.patch Patch100: cups-lspp.patch ## SECURITY PATCHES: - +Patch200: cups-CVE-2010-0302.patch Epoch: 1 Url: http://www.cups.org/ @@ -237,111 +213,66 @@ module. %patch6 -p1 -b .serverbin-compat # Don't export SSLLIBS to cups-config. %patch7 -p1 -b .no-export-ssllibs -# Avoid use-after-free in cupsAddDest. -%patch8 -p1 -b .str3448 # Allow file-based usb device URIs. -%patch9 -p1 -b .direct-usb +%patch8 -p1 -b .direct-usb # Add --help option to lpr. -%patch10 -p1 -b .lpr-help +%patch9 -p1 -b .lpr-help # Fix compilation of peer credentials support. -%patch11 -p1 -b .peercred +%patch10 -p1 -b .peercred # Maintain a cupsd.pid file. -%patch12 -p1 -b .pid +%patch11 -p1 -b .pid # Fix orientation of page labels. -%patch13 -p1 -b .page-label +%patch12 -p1 -b .page-label # Fix implementation of com.redhat.PrinterSpooler D-Bus object. -%patch14 -p1 -b .eggcups +%patch13 -p1 -b .eggcups # More sophisticated implementation of cupsGetPassword than getpass. -%patch15 -p1 -b .getpass +%patch14 -p1 -b .getpass # Increase driverd timeout to 70s to accommodate foomatic. -%patch16 -p1 -b .driverd-timeout +%patch15 -p1 -b .driverd-timeout # Only enforce maximum PPD line length when in strict mode. -%patch17 -p1 -b .strict-ppd-line-length +%patch16 -p1 -b .strict-ppd-line-length # Re-open the log if it has been logrotated under us. -%patch18 -p1 -b .logrotate +%patch17 -p1 -b .logrotate # Support for errno==ENOSPACE-based USB paper-out reporting. -%patch19 -p1 -b .usb-paperout +%patch18 -p1 -b .usb-paperout # Simplify the DNSSD parts so they can build using the compat library. -%patch20 -p1 -b .build +%patch19 -p1 -b .build # Re-initialise the resolver on failure in httpAddrGetList(). -%patch21 -p1 -b .res_init +%patch20 -p1 -b .res_init # Log extra debugging information if no filters are available. -%patch22 -p1 -b .filter-debug +%patch21 -p1 -b .filter-debug # Allow the usb backend to understand old-style URI formats. -%patch23 -p1 -b .uri-compat +%patch22 -p1 -b .uri-compat # Fix support for older CUPS servers in cupsGetDests. -%patch24 -p1 -b .cups-get-classes +%patch23 -p1 -b .cups-get-classes # Avahi support in the dnssd backend. -%patch25 -p1 -b .avahi +%patch24 -p1 -b .avahi # Fix temporary filename creation. -%patch26 -p1 -b .str3382 +%patch25 -p1 -b .str3382 # Fix cupsGetNamedDest() when a name is specified. -%patch27 -p1 -b .str3285_v2-str3503 -# Set the PRINTER_IS_SHARED CGI variable. -%patch28 -p1 -b .str3390 -# Set the CGI variables required by the serial backend. -%patch29 -p1 -b .str3391 -# Fix signal handling when using gnutls. -%patch30 -p1 -b .str3381 -# Reset SIGPIPE handler before starting child processes. -%patch31 -p1 -b .str3399 -# Fixed typo in Russian translation of admin CGI page. -%patch32 -p1 -b .str3403 -# Handle out-of-memory more gracefully when loading jobs. -%patch33 -p1 -b .str3407 -# Set PPD_MAKE CGI variable. -%patch34 -p1 -b .str3418 -# Fix use-after-free in select.c. -%patch35 -p1 -b .CVE-2009-3553 -# Fix Russian translations of CGI pages. -%patch36 -p1 -b .str3422 -# Fix SNMP handling. -%patch37 -p1 -b .str3413 -# Fix adjustment of conflicting options in web interface. -%patch38 -p1 -b .str3439 -# Show which option conflicts in web interface. -%patch39 -p1 -b .str3440 -# Provide filter path for text/css. -%patch40 -p1 -b .str3442 -# Fix SNMP handling with negative string lengths. -%patch41 -p1 -b .negative-snmp-string-length -# Fix signal handling in the sidechannel API. -%patch42 -p1 -b .sidechannel-intrs -# Stop network backends incorrectly clearing media-empty-warning. -%patch43 -p1 -b .media-empty-warning -# Fixed authentication bug in cupsPrintFiles2. -%patch44 -p1 -b .str3435 -# Set PRINTER_NAME and PRINTER_URI_SUPPORTED CGI variables. -%patch45 -p1 -b .str3436 -# Clean out completed jobs when PreserveJobHistory is off. -%patch46 -p1 -b .str3425 -# Don't add two job-name attributes to each job object. -%patch47 -p1 -b .str3428 -# Use the Get-Job-Attributes policy for a printer. -%patch48 -p1 -b .str3431 -#%patch49 -p1 -b .gnutls-gcrypt-threads -# Fix IPP authentication for servers requiring auth for -# IPP-Get-Printer-Attributes. -%patch50 -p1 -b .str3458 +%patch26 -p1 -b .str3503 +# Don't treat SIGPIPE as an error. +%patch27 -p1 -b .str3399 +#%patch28 -p1 -b .gnutls-gcrypt-threads # Use mode 0755 for binaries and libraries where appropriate. -%patch51 -p1 -b .0755 -# Clear printer status after successful IPP job. -%patch52 -p1 -b .str3460 +%patch29 -p1 -b .0755 # Re-initialise the resolver on failure in httpAddrLookup(). -%patch53 -p1 -b .EAI_AGAIN +%patch30 -p1 -b .EAI_AGAIN # Update classes.conf when a class member printer is deleted -%patch54 -p1 -b .str3505 -# Applied patch for CVE-2010-0302 (incomplete fix for CVE-2009-3553, -# bug #557775). -%patch55 -p1 -b .CVE-2010-0302 +%patch31 -p1 -b .str3505 # Fix lpstat to adhere to -o option. -%patch56 -p1 -b .str3541 +%patch32 -p1 -b .str3541 %if %lspp # LSPP support. %patch100 -p1 -b .lspp %endif +# SECURITY PATCHES: +# Applied patch for CVE-2010-0302 (incomplete fix for CVE-2009-3553, +# bug #557775). +%patch200 -p1 -b .CVE-2010-0302 + sed -i -e '1iMaxLogSize 0' conf/cupsd.conf.in cp %{SOURCE5} cups-lpd.real @@ -549,6 +480,8 @@ rm -rf $RPM_BUILD_ROOT %config(noreplace) %doc %{_datadir}/%{name}/www/de/index.html %config(noreplace) %doc %{_datadir}/%{name}/www/es/index.html %config(noreplace) %doc %{_datadir}/%{name}/www/eu/index.html +%config(noreplace) %doc %{_datadir}/%{name}/www/id/index.html +%config(noreplace) %doc %{_datadir}/%{name}/www/it/index.html %config(noreplace) %doc %{_datadir}/%{name}/www/ja/index.html %config(noreplace) %doc %{_datadir}/%{name}/www/pl/index.html %config(noreplace) %doc %{_datadir}/%{name}/www/ru/index.html @@ -584,6 +517,8 @@ rm -rf $RPM_BUILD_ROOT %config(noreplace) %{_datadir}/cups/templates/de/*.tmpl %config(noreplace) %{_datadir}/cups/templates/es/*.tmpl %config(noreplace) %{_datadir}/cups/templates/eu/*.tmpl +%config(noreplace) %{_datadir}/cups/templates/id/*.tmpl +%config(noreplace) %{_datadir}/cups/templates/it/*.tmpl %config(noreplace) %{_datadir}/cups/templates/ja/*.tmpl %config(noreplace) %{_datadir}/cups/templates/pl/*.tmpl %config(noreplace) %{_datadir}/cups/templates/ru/*.tmpl @@ -627,6 +562,14 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog +* Wed Mar 31 2010 Jiri Popelka 1:1.4.3-1 +- 1.4.3. +- No longer need CVE-2009-3553, str3381, str3390, str3391, + str3403, str3407, str3413, str3418, str3422, str3425, + str3428, str3431, str3435, str3436, str3439, str3440, + str3442, str3448, str3458, str3460, cups-sidechannel-intrs, + negative-snmp-string-length, cups-media-empty-warning patches. + * Tue Mar 30 2010 Jiri Popelka 1:1.4.2-36 - Fixed lpstat to adhere to -o option (bug #577901, STR #3541). diff --git a/sources b/sources index 73d408c..4448a10 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -d95e2d588e3d36e563027a963b117b1b cups-1.4.2-source.tar.bz2 +e70b1c3f60143d7310c1d74c111a21ab cups-1.4.3-source.tar.bz2 From 8342f0d21ece6cbd84cec0b9a27c9ae9ed8da74b Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Wed, 31 Mar 2010 16:08:33 +0000 Subject: [PATCH 076/110] - Another BrowsePoll fix: handle EAI_NODATA as well (bug #567353). --- cups-EAI_AGAIN.patch | 2 +- cups-res_init.patch | 2 +- cups.spec | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/cups-EAI_AGAIN.patch b/cups-EAI_AGAIN.patch index 878315a..033e7f8 100644 --- a/cups-EAI_AGAIN.patch +++ b/cups-EAI_AGAIN.patch @@ -6,7 +6,7 @@ diff -up cups-1.4.2/cups/http-addr.c.EAI_AGAIN cups-1.4.2/cups/http-addr.c if (error) { - if (error == EAI_FAIL) -+ if (error == EAI_FAIL || error == EAI_AGAIN) ++ if (error == EAI_FAIL || error == EAI_AGAIN || error == EAI_NODATA) cg->need_res_init = 1; return (httpAddrString(addr, name, namelen)); diff --git a/cups-res_init.patch b/cups-res_init.patch index 1660f07..22c75ba 100644 --- a/cups-res_init.patch +++ b/cups-res_init.patch @@ -6,7 +6,7 @@ diff -up cups-1.4b2-svn8404/cups/http-addrlist.c.res_init cups-1.4b2-svn8404/cup freeaddrinfo(results); } - else if (error == EAI_FAIL) -+ else if (error == EAI_FAIL || error == EAI_AGAIN) ++ else if (error == EAI_FAIL || error == EAI_AGAIN || error == EAI_NODATA) cg->need_res_init = 1; #else diff --git a/cups.spec b/cups.spec index 469c8eb..d822f37 100644 --- a/cups.spec +++ b/cups.spec @@ -8,7 +8,7 @@ Summary: Common Unix Printing System Name: cups Version: 1.4.3 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 Group: System Environment/Daemons Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2 @@ -521,6 +521,9 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog +* Wed Mar 31 2010 Tim Waugh 1:1.4.3-2 +- Another BrowsePoll fix: handle EAI_NODATA as well (bug #567353). + * Wed Mar 31 2010 Jiri Popelka 1:1.4.3-1 - 1.4.3. - No longer need CVE-2009-3553, str3381, str3390, str3391, From 3069b51952e9fbcab9bc1ef8582aa05dd04dea56 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Wed, 31 Mar 2010 16:08:39 +0000 Subject: [PATCH 077/110] - Another BrowsePoll fix: handle EAI_NODATA as well (bug #567353). --- cups-EAI_AGAIN.patch | 2 +- cups-res_init.patch | 2 +- cups.spec | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/cups-EAI_AGAIN.patch b/cups-EAI_AGAIN.patch index 878315a..033e7f8 100644 --- a/cups-EAI_AGAIN.patch +++ b/cups-EAI_AGAIN.patch @@ -6,7 +6,7 @@ diff -up cups-1.4.2/cups/http-addr.c.EAI_AGAIN cups-1.4.2/cups/http-addr.c if (error) { - if (error == EAI_FAIL) -+ if (error == EAI_FAIL || error == EAI_AGAIN) ++ if (error == EAI_FAIL || error == EAI_AGAIN || error == EAI_NODATA) cg->need_res_init = 1; return (httpAddrString(addr, name, namelen)); diff --git a/cups-res_init.patch b/cups-res_init.patch index 1660f07..22c75ba 100644 --- a/cups-res_init.patch +++ b/cups-res_init.patch @@ -6,7 +6,7 @@ diff -up cups-1.4b2-svn8404/cups/http-addrlist.c.res_init cups-1.4b2-svn8404/cup freeaddrinfo(results); } - else if (error == EAI_FAIL) -+ else if (error == EAI_FAIL || error == EAI_AGAIN) ++ else if (error == EAI_FAIL || error == EAI_AGAIN || error == EAI_NODATA) cg->need_res_init = 1; #else diff --git a/cups.spec b/cups.spec index 58705f7..5df8252 100644 --- a/cups.spec +++ b/cups.spec @@ -8,7 +8,7 @@ Summary: Common Unix Printing System Name: cups Version: 1.4.3 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 Group: System Environment/Daemons Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2 @@ -562,6 +562,9 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog +* Wed Mar 31 2010 Tim Waugh 1:1.4.3-2 +- Another BrowsePoll fix: handle EAI_NODATA as well (bug #567353). + * Wed Mar 31 2010 Jiri Popelka 1:1.4.3-1 - 1.4.3. - No longer need CVE-2009-3553, str3381, str3390, str3391, From eb8e84b81ea70c3086f660731a6fccf00df48298 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Tue, 13 Apr 2010 11:22:19 +0000 Subject: [PATCH 078/110] - Handle SNMP supply level quirks (bug #581825). --- cups-snmp-quirks.patch | 86 ++++++++++++++++++++++++++++++++++++++++++ cups.spec | 7 +++- 2 files changed, 92 insertions(+), 1 deletion(-) create mode 100644 cups-snmp-quirks.patch diff --git a/cups-snmp-quirks.patch b/cups-snmp-quirks.patch new file mode 100644 index 0000000..81639bb --- /dev/null +++ b/cups-snmp-quirks.patch @@ -0,0 +1,86 @@ +diff -up cups-1.4.3/backend/snmp-supplies.c.snmp-quirks cups-1.4.3/backend/snmp-supplies.c +--- cups-1.4.3/backend/snmp-supplies.c.snmp-quirks 2009-11-20 01:27:57.000000000 +0000 ++++ cups-1.4.3/backend/snmp-supplies.c 2010-04-13 11:54:13.508023630 +0100 +@@ -38,6 +38,15 @@ + + + /* ++ * Printer quirks... ++ */ ++ ++/* The prtMarkerSuppliesLevel values are percentages, not levels ++ * relative to the stated capacity. */ ++#define QUIRK_LEVEL_IS_PERCENTAGE (1<<0) ++ ++ ++/* + * Local structures... + */ + +@@ -57,6 +66,12 @@ typedef struct /**** Printer state ta + const char *keyword; /* IPP printer-state-reasons keyword */ + } backend_state_t; + ++typedef struct /**** Printer quirk table ****/ ++{ ++ const char *description; /* hrDeviceDescr */ ++ int quirks; /* quirks (bitmask) */ ++} printer_quirk_t; ++ + + /* + * Local globals... +@@ -68,6 +83,7 @@ static int current_state = -1; + static int charset = -1; /* Character set for supply names */ + static int num_supplies = 0; + /* Number of supplies found */ ++static int quirks = 0; /* Printer quirks */ + static backend_supplies_t supplies[CUPS_MAX_SUPPLIES]; + /* Supply information */ + +@@ -153,6 +169,11 @@ static const backend_state_t const print + { CUPS_TC_outputFull, "output-area-full-warning" } + }; + ++static const printer_quirk_t const printer_quirks[] = ++ { ++ { "Officejet Pro 8500 A909g", QUIRK_LEVEL_IS_PERCENTAGE } ++ }; ++ + + /* + * Local functions... +@@ -208,6 +229,9 @@ backendSNMPSupplies( + if (i) + *ptr++ = ','; + ++ if (quirks & QUIRK_LEVEL_IS_PERCENTAGE) ++ supplies[i].max_capacity = 100; ++ + if (supplies[i].max_capacity > 0) + sprintf(ptr, "%d", 100 * supplies[i].level / supplies[i].max_capacity); + else +@@ -366,6 +390,7 @@ backend_init_supplies( + current_state = -1; + num_supplies = -1; + charset = -1; ++ quirks = 0; + + memset(supplies, 0, sizeof(supplies)); + +@@ -404,6 +429,15 @@ backend_init_supplies( + + fprintf(stderr, "DEBUG2: hrDeviceDesc=\"%s\"\n", description); + ++ for (i = 0; i < sizeof (printer_quirks) / sizeof (printer_quirks[0]); i++) ++ { ++ if (!strcmp (description, printer_quirks[i].description)) ++ { ++ quirks = printer_quirks[i].quirks; ++ break; ++ } ++ } ++ + /* + * See if we have already queried this device... + */ diff --git a/cups.spec b/cups.spec index 5df8252..0a2eeb5 100644 --- a/cups.spec +++ b/cups.spec @@ -8,7 +8,7 @@ Summary: Common Unix Printing System Name: cups Version: 1.4.3 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2 Group: System Environment/Daemons Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2 @@ -63,6 +63,7 @@ Patch29: cups-0755.patch Patch30: cups-EAI_AGAIN.patch Patch31: cups-str3505.patch Patch32: cups-str3541.patch +Patch33: cups-snmp-quirks.patch Patch100: cups-lspp.patch @@ -262,6 +263,7 @@ module. %patch31 -p1 -b .str3505 # Fix lpstat to adhere to -o option. %patch32 -p1 -b .str3541 +%patch33 -p1 -b .snmp-quirks %if %lspp # LSPP support. @@ -562,6 +564,9 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog +* Tue Apr 13 2010 Tim Waugh 1:1.4.3-3 +- Handle SNMP supply level quirks (bug #581825). + * Wed Mar 31 2010 Tim Waugh 1:1.4.3-2 - Another BrowsePoll fix: handle EAI_NODATA as well (bug #567353). From 9347367fba72090eb5a59714477976ebb98918c7 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Tue, 13 Apr 2010 11:40:32 +0000 Subject: [PATCH 079/110] - Handle SNMP supply level quirks (bug #581825). --- cups-snmp-quirks.patch | 86 ++++++++++++++++++++++++++++++++++++++++++ cups.spec | 7 +++- 2 files changed, 92 insertions(+), 1 deletion(-) create mode 100644 cups-snmp-quirks.patch diff --git a/cups-snmp-quirks.patch b/cups-snmp-quirks.patch new file mode 100644 index 0000000..81639bb --- /dev/null +++ b/cups-snmp-quirks.patch @@ -0,0 +1,86 @@ +diff -up cups-1.4.3/backend/snmp-supplies.c.snmp-quirks cups-1.4.3/backend/snmp-supplies.c +--- cups-1.4.3/backend/snmp-supplies.c.snmp-quirks 2009-11-20 01:27:57.000000000 +0000 ++++ cups-1.4.3/backend/snmp-supplies.c 2010-04-13 11:54:13.508023630 +0100 +@@ -38,6 +38,15 @@ + + + /* ++ * Printer quirks... ++ */ ++ ++/* The prtMarkerSuppliesLevel values are percentages, not levels ++ * relative to the stated capacity. */ ++#define QUIRK_LEVEL_IS_PERCENTAGE (1<<0) ++ ++ ++/* + * Local structures... + */ + +@@ -57,6 +66,12 @@ typedef struct /**** Printer state ta + const char *keyword; /* IPP printer-state-reasons keyword */ + } backend_state_t; + ++typedef struct /**** Printer quirk table ****/ ++{ ++ const char *description; /* hrDeviceDescr */ ++ int quirks; /* quirks (bitmask) */ ++} printer_quirk_t; ++ + + /* + * Local globals... +@@ -68,6 +83,7 @@ static int current_state = -1; + static int charset = -1; /* Character set for supply names */ + static int num_supplies = 0; + /* Number of supplies found */ ++static int quirks = 0; /* Printer quirks */ + static backend_supplies_t supplies[CUPS_MAX_SUPPLIES]; + /* Supply information */ + +@@ -153,6 +169,11 @@ static const backend_state_t const print + { CUPS_TC_outputFull, "output-area-full-warning" } + }; + ++static const printer_quirk_t const printer_quirks[] = ++ { ++ { "Officejet Pro 8500 A909g", QUIRK_LEVEL_IS_PERCENTAGE } ++ }; ++ + + /* + * Local functions... +@@ -208,6 +229,9 @@ backendSNMPSupplies( + if (i) + *ptr++ = ','; + ++ if (quirks & QUIRK_LEVEL_IS_PERCENTAGE) ++ supplies[i].max_capacity = 100; ++ + if (supplies[i].max_capacity > 0) + sprintf(ptr, "%d", 100 * supplies[i].level / supplies[i].max_capacity); + else +@@ -366,6 +390,7 @@ backend_init_supplies( + current_state = -1; + num_supplies = -1; + charset = -1; ++ quirks = 0; + + memset(supplies, 0, sizeof(supplies)); + +@@ -404,6 +429,15 @@ backend_init_supplies( + + fprintf(stderr, "DEBUG2: hrDeviceDesc=\"%s\"\n", description); + ++ for (i = 0; i < sizeof (printer_quirks) / sizeof (printer_quirks[0]); i++) ++ { ++ if (!strcmp (description, printer_quirks[i].description)) ++ { ++ quirks = printer_quirks[i].quirks; ++ break; ++ } ++ } ++ + /* + * See if we have already queried this device... + */ diff --git a/cups.spec b/cups.spec index d822f37..53e9ae1 100644 --- a/cups.spec +++ b/cups.spec @@ -8,7 +8,7 @@ Summary: Common Unix Printing System Name: cups Version: 1.4.3 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2 Group: System Environment/Daemons Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2 @@ -56,6 +56,7 @@ Patch29: cups-0755.patch Patch30: cups-EAI_AGAIN.patch Patch31: cups-str3505.patch Patch32: cups-str3541.patch +Patch33: cups-snmp-quirks.patch Patch100: cups-lspp.patch @@ -218,6 +219,7 @@ module. %patch30 -p1 -b .EAI_AGAIN %patch31 -p1 -b .str3505 %patch32 -p1 -b .str3541 +%patch33 -p1 -b .snmp-quirks %if %lspp %patch100 -p1 -b .lspp @@ -521,6 +523,9 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog +* Tue Apr 13 2010 Tim Waugh 1:1.4.3-3 +- Handle SNMP supply level quirks (bug #581825). + * Wed Mar 31 2010 Tim Waugh 1:1.4.3-2 - Another BrowsePoll fix: handle EAI_NODATA as well (bug #567353). From 120cd7f6a7f78c789a22dae0115d375ce8c2c93e Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Tue, 13 Apr 2010 16:06:48 +0000 Subject: [PATCH 080/110] - Add an SNMP query for HP's device ID OID (STR #3552). --- cups-hp-deviceid-oid.patch | 21 +++++++++++++++++++++ cups.spec | 9 ++++++++- 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 cups-hp-deviceid-oid.patch diff --git a/cups-hp-deviceid-oid.patch b/cups-hp-deviceid-oid.patch new file mode 100644 index 0000000..29f0781 --- /dev/null +++ b/cups-hp-deviceid-oid.patch @@ -0,0 +1,21 @@ +diff -up cups-1.4.3/backend/snmp.c.hp-deviceid-oid cups-1.4.3/backend/snmp.c +--- cups-1.4.3/backend/snmp.c.hp-deviceid-oid 2009-12-08 02:13:42.000000000 +0000 ++++ cups-1.4.3/backend/snmp.c 2010-04-13 15:00:26.486148914 +0100 +@@ -194,6 +194,7 @@ static const int UriOID[] = { CUPS_OID_p + static const int LexmarkProductOID[] = { 1,3,6,1,4,1,641,2,1,2,1,2,1,-1 }; + static const int LexmarkProductOID2[] = { 1,3,6,1,4,1,674,10898,100,2,1,2,1,2,1,-1 }; + static const int LexmarkDeviceIdOID[] = { 1,3,6,1,4,1,641,2,1,2,1,3,1,-1 }; ++static const int HPDeviceIdOID[] = { 1,3,6,1,4,1,11,2,3,9,1,1,7,0,-1 }; + static const int XeroxProductOID[] = { 1,3,6,1,4,1,128,2,1,3,1,2,0,-1 }; + static cups_array_t *DeviceURIs = NULL; + static int HostNameLookups = 0; +@@ -1003,6 +1004,9 @@ read_snmp_response(int fd) /* I - SNMP + _cupsSNMPWrite(fd, &(packet.address), CUPS_SNMP_VERSION_1, + packet.community, CUPS_ASN1_GET_REQUEST, + DEVICE_PRODUCT, XeroxProductOID); ++ _cupsSNMPWrite(fd, &(packet.address), CUPS_SNMP_VERSION_1, ++ packet.community, CUPS_ASN1_GET_REQUEST, ++ DEVICE_ID, HPDeviceIdOID); + break; + + case DEVICE_DESCRIPTION : diff --git a/cups.spec b/cups.spec index 0a2eeb5..56bc441 100644 --- a/cups.spec +++ b/cups.spec @@ -8,7 +8,7 @@ Summary: Common Unix Printing System Name: cups Version: 1.4.3 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2 Group: System Environment/Daemons Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2 @@ -64,6 +64,7 @@ Patch30: cups-EAI_AGAIN.patch Patch31: cups-str3505.patch Patch32: cups-str3541.patch Patch33: cups-snmp-quirks.patch +Patch34: cups-hp-deviceid-oid.patch Patch100: cups-lspp.patch @@ -263,7 +264,10 @@ module. %patch31 -p1 -b .str3505 # Fix lpstat to adhere to -o option. %patch32 -p1 -b .str3541 +# Handle SNMP supply level quirks (bug #581825). %patch33 -p1 -b .snmp-quirks +# Add an SNMP query for HP's device ID OID (STR #3552). +%patch34 -p1 -b .hp-deviceid-oid %if %lspp # LSPP support. @@ -564,6 +568,9 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog +* Tue Apr 13 2010 Tim Waugh 1:1.4.3-4 +- Add an SNMP query for HP's device ID OID (STR #3552). + * Tue Apr 13 2010 Tim Waugh 1:1.4.3-3 - Handle SNMP supply level quirks (bug #581825). From d2516777d5d343ff44d4fec8606003dd0dba841b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Popelka?= Date: Fri, 16 Apr 2010 11:36:56 +0000 Subject: [PATCH 081/110] - Fixed str3541.patch - Added Require: ghostscript (bug #572701) --- cups-str3541.patch | 25 ++++++++++--------------- cups.spec | 9 ++++++++- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/cups-str3541.patch b/cups-str3541.patch index 49ed2e6..668ce34 100644 --- a/cups-str3541.patch +++ b/cups-str3541.patch @@ -1,17 +1,12 @@ -diff -up cups-1.4.2/systemv/lpstat.c.str3541 cups-1.4.2/systemv/lpstat.c ---- cups-1.4.2/systemv/lpstat.c.str3541 2009-02-04 23:54:22.000000000 +0100 -+++ cups-1.4.2/systemv/lpstat.c 2010-03-30 17:38:09.000000000 +0200 -@@ -581,11 +581,11 @@ match_list(const char *list, /* I - Lis +diff -up cups-1.4.3/systemv/lpstat.c.str3541 cups-1.4.3/systemv/lpstat.c +--- cups-1.4.3/systemv/lpstat.c.str3541 2009-12-15 23:40:37.000000000 +0100 ++++ cups-1.4.3/systemv/lpstat.c 2010-04-16 12:56:04.000000000 +0200 +@@ -1423,7 +1423,7 @@ show_jobs(const char *dests, /* I - Des + rank ++; - /* -- * An empty list always matches... -+ * An empty list never matches... - */ - - if (!list || !*list) -- return (1); -+ return (0); - - while (*list) - { +- if (match_list(dests, dest) || match_list(users, username)) ++ if (match_list(dests, dest) && match_list(users, username)) + { + jobdate = localtime(&jobtime); + snprintf(temp, sizeof(temp), "%s-%d", dest, jobid); diff --git a/cups.spec b/cups.spec index 53e9ae1..76473c6 100644 --- a/cups.spec +++ b/cups.spec @@ -8,7 +8,7 @@ Summary: Common Unix Printing System Name: cups Version: 1.4.3 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2 Group: System Environment/Daemons Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2 @@ -117,6 +117,9 @@ Requires: portreserve Requires: poppler-utils +# pstoraster requires gs +Requires: ghostscript + # We ship udev rules which use setfacl. Requires: udev Requires: acl @@ -523,6 +526,10 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog +* Fri Apr 16 2010 Jiri Popelka 1:1.4.3-4 +- Fixed str3541.patch +- Added Require: ghostscript (bug #572701) + * Tue Apr 13 2010 Tim Waugh 1:1.4.3-3 - Handle SNMP supply level quirks (bug #581825). From ca951c9d94e981fe9d56f82bab0518d2c6c406a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Popelka?= Date: Fri, 16 Apr 2010 11:39:48 +0000 Subject: [PATCH 082/110] - Fixed str3541.patch --- cups-str3541.patch | 25 ++++++++++--------------- cups.spec | 5 ++++- 2 files changed, 14 insertions(+), 16 deletions(-) diff --git a/cups-str3541.patch b/cups-str3541.patch index 49ed2e6..668ce34 100644 --- a/cups-str3541.patch +++ b/cups-str3541.patch @@ -1,17 +1,12 @@ -diff -up cups-1.4.2/systemv/lpstat.c.str3541 cups-1.4.2/systemv/lpstat.c ---- cups-1.4.2/systemv/lpstat.c.str3541 2009-02-04 23:54:22.000000000 +0100 -+++ cups-1.4.2/systemv/lpstat.c 2010-03-30 17:38:09.000000000 +0200 -@@ -581,11 +581,11 @@ match_list(const char *list, /* I - Lis +diff -up cups-1.4.3/systemv/lpstat.c.str3541 cups-1.4.3/systemv/lpstat.c +--- cups-1.4.3/systemv/lpstat.c.str3541 2009-12-15 23:40:37.000000000 +0100 ++++ cups-1.4.3/systemv/lpstat.c 2010-04-16 12:56:04.000000000 +0200 +@@ -1423,7 +1423,7 @@ show_jobs(const char *dests, /* I - Des + rank ++; - /* -- * An empty list always matches... -+ * An empty list never matches... - */ - - if (!list || !*list) -- return (1); -+ return (0); - - while (*list) - { +- if (match_list(dests, dest) || match_list(users, username)) ++ if (match_list(dests, dest) && match_list(users, username)) + { + jobdate = localtime(&jobtime); + snprintf(temp, sizeof(temp), "%s-%d", dest, jobid); diff --git a/cups.spec b/cups.spec index 56bc441..5577d0a 100644 --- a/cups.spec +++ b/cups.spec @@ -8,7 +8,7 @@ Summary: Common Unix Printing System Name: cups Version: 1.4.3 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv2 Group: System Environment/Daemons Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2 @@ -568,6 +568,9 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog +* Fri Apr 16 2010 Jiri Popelka 1:1.4.3-5 +- Fixed str3541.patch + * Tue Apr 13 2010 Tim Waugh 1:1.4.3-4 - Add an SNMP query for HP's device ID OID (STR #3552). From c269c40121f5d3a54a88b7620b94db35ba38e9f1 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Fri, 16 Apr 2010 18:46:49 +0000 Subject: [PATCH 083/110] - Mark DNS-SD Device IDs that have been guessed at with "FZY:1;". --- cups-dnssd-deviceid.patch | 38 ++++++++++++++++++++++++++++++++++++++ cups.spec | 8 +++++++- 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 cups-dnssd-deviceid.patch diff --git a/cups-dnssd-deviceid.patch b/cups-dnssd-deviceid.patch new file mode 100644 index 0000000..abb8366 --- /dev/null +++ b/cups-dnssd-deviceid.patch @@ -0,0 +1,38 @@ +diff -up cups-1.4.3/backend/dnssd.c.dnssd-deviceid.patch cups-1.4.3/backend/dnssd.c +--- cups-1.4.3/backend/dnssd.c.dnssd-deviceid.patch 2010-04-16 19:36:12.226148774 +0100 ++++ cups-1.4.3/backend/dnssd.c 2010-04-16 19:39:53.314148240 +0100 +@@ -1192,15 +1192,22 @@ find_device (cups_array_t *devices, + if (device->device_id) + free(device->device_id); + ++ if (device_id[0]) ++ { ++ /* Mark this as the real device ID. */ ++ ptr = device_id + strlen(device_id); ++ snprintf(ptr, sizeof(device_id) - (ptr - device_id), "FZY:0;"); ++ } ++ + if (!device_id[0] && strcmp(model, "Unknown")) + { + if (make_and_model[0]) +- snprintf(device_id, sizeof(device_id), "MFG:%s;MDL:%s;", ++ snprintf(device_id, sizeof(device_id), "MFG:%s;MDL:%s;FZY:1;", + make_and_model, model); + else if (!strncasecmp(model, "designjet ", 10)) +- snprintf(device_id, sizeof(device_id), "MFG:HP;MDL:%s", model + 10); ++ snprintf(device_id, sizeof(device_id), "MFG:HP;MDL:%s;FZY:1;", model + 10); + else if (!strncasecmp(model, "stylus ", 7)) +- snprintf(device_id, sizeof(device_id), "MFG:EPSON;MDL:%s", model + 7); ++ snprintf(device_id, sizeof(device_id), "MFG:EPSON;MDL:%s;FZY:1;", model + 7); + else if ((ptr = strchr(model, ' ')) != NULL) + { + /* +@@ -1210,7 +1217,7 @@ find_device (cups_array_t *devices, + memcpy(make_and_model, model, ptr - model); + make_and_model[ptr - model] = '\0'; + +- snprintf(device_id, sizeof(device_id), "MFG:%s;MDL:%s", ++ snprintf(device_id, sizeof(device_id), "MFG:%s;MDL:%s;FZY:1;", + make_and_model, ptr + 1); + } + } diff --git a/cups.spec b/cups.spec index 5577d0a..a3fe098 100644 --- a/cups.spec +++ b/cups.spec @@ -8,7 +8,7 @@ Summary: Common Unix Printing System Name: cups Version: 1.4.3 -Release: 5%{?dist} +Release: 6%{?dist} License: GPLv2 Group: System Environment/Daemons Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2 @@ -65,6 +65,7 @@ Patch31: cups-str3505.patch Patch32: cups-str3541.patch Patch33: cups-snmp-quirks.patch Patch34: cups-hp-deviceid-oid.patch +Patch35: cups-dnssd-deviceid.patch Patch100: cups-lspp.patch @@ -268,6 +269,8 @@ module. %patch33 -p1 -b .snmp-quirks # Add an SNMP query for HP's device ID OID (STR #3552). %patch34 -p1 -b .hp-deviceid-oid +# Mark DNS-SD Device IDs that have been guessed at with "FZY:1;". +%patch35 -p1 -b .dnssd-deviceid %if %lspp # LSPP support. @@ -568,6 +571,9 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog +* Fri Apr 16 2010 Tim Waugh 1:1.4.3-6 +- Mark DNS-SD Device IDs that have been guessed at with "FZY:1;". + * Fri Apr 16 2010 Jiri Popelka 1:1.4.3-5 - Fixed str3541.patch From f8156dd5701aa9b3277ec5e46d76bddca6290346 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Thu, 6 May 2010 14:24:14 +0000 Subject: [PATCH 084/110] - Use numeric addresses for interfaces unless HostNameLookups are turned on (bug #583054). --- cups-hostnamelookups.patch | 21 +++++++++++++++++++++ cups.spec | 8 +++++++- 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 cups-hostnamelookups.patch diff --git a/cups-hostnamelookups.patch b/cups-hostnamelookups.patch new file mode 100644 index 0000000..687452a --- /dev/null +++ b/cups-hostnamelookups.patch @@ -0,0 +1,21 @@ +diff -up cups-1.4.3/scheduler/network.c.hostnamelookups cups-1.4.3/scheduler/network.c +--- cups-1.4.3/scheduler/network.c.hostnamelookups 2009-04-28 01:23:38.000000000 +0100 ++++ cups-1.4.3/scheduler/network.c 2010-05-06 15:11:34.652926030 +0100 +@@ -155,7 +155,7 @@ cupsdNetIFUpdate(void) + * Try looking up the hostname for the address as needed... + */ + +- if (HostNameLookups || RemotePort) ++ if (HostNameLookups) + httpAddrLookup((http_addr_t *)(addr->ifa_addr), hostname, + sizeof(hostname)); + else +@@ -163,7 +163,7 @@ cupsdNetIFUpdate(void) + /* + * Map the default server address and localhost to the server name + * and localhost, respectively; for all other addresses, use the +- * dotted notation... ++ * numeric address... + */ + + if (httpAddrLocalhost((http_addr_t *)(addr->ifa_addr))) diff --git a/cups.spec b/cups.spec index 76473c6..4aed07c 100644 --- a/cups.spec +++ b/cups.spec @@ -8,7 +8,7 @@ Summary: Common Unix Printing System Name: cups Version: 1.4.3 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv2 Group: System Environment/Daemons Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2 @@ -57,6 +57,7 @@ Patch30: cups-EAI_AGAIN.patch Patch31: cups-str3505.patch Patch32: cups-str3541.patch Patch33: cups-snmp-quirks.patch +Patch34: cups-hostnamelookups.patch Patch100: cups-lspp.patch @@ -223,6 +224,7 @@ module. %patch31 -p1 -b .str3505 %patch32 -p1 -b .str3541 %patch33 -p1 -b .snmp-quirks +%patch34 -p1 -b .hostnamelookups %if %lspp %patch100 -p1 -b .lspp @@ -526,6 +528,10 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog +* Thu May 6 2010 Tim Waugh 1:1.4.3-5 +- Use numeric addresses for interfaces unless HostNameLookups are + turned on (bug #583054). + * Fri Apr 16 2010 Jiri Popelka 1:1.4.3-4 - Fixed str3541.patch - Added Require: ghostscript (bug #572701) From 750bad94e8c5568b775dc34fab9bfa57aba14317 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Tue, 11 May 2010 16:55:25 +0000 Subject: [PATCH 085/110] - Add an SNMP query for Ricoh's device ID OID (STR #3552). --- cups-ricoh-deviceid-oid.patch | 21 +++++++++++++++++++++ cups.spec | 8 +++++++- 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 cups-ricoh-deviceid-oid.patch diff --git a/cups-ricoh-deviceid-oid.patch b/cups-ricoh-deviceid-oid.patch new file mode 100644 index 0000000..af502d0 --- /dev/null +++ b/cups-ricoh-deviceid-oid.patch @@ -0,0 +1,21 @@ +diff -up cups-1.4.3/backend/snmp.c.ricoh-deviceid-oid cups-1.4.3/backend/snmp.c +--- cups-1.4.3/backend/snmp.c.ricoh-deviceid-oid 2010-05-11 17:30:57.266120467 +0100 ++++ cups-1.4.3/backend/snmp.c 2010-05-11 17:31:16.267120141 +0100 +@@ -195,6 +195,7 @@ static const int LexmarkProductOID[] = { + static const int LexmarkProductOID2[] = { 1,3,6,1,4,1,674,10898,100,2,1,2,1,2,1,-1 }; + static const int LexmarkDeviceIdOID[] = { 1,3,6,1,4,1,641,2,1,2,1,3,1,-1 }; + static const int HPDeviceIdOID[] = { 1,3,6,1,4,1,11,2,3,9,1,1,7,0,-1 }; ++static const int RicohDeviceIdOID[] = { 1,3,6,1,4,1,367,3,2,1,1,1,11,-1 }; + static const int XeroxProductOID[] = { 1,3,6,1,4,1,128,2,1,3,1,2,0,-1 }; + static cups_array_t *DeviceURIs = NULL; + static int HostNameLookups = 0; +@@ -1002,6 +1003,9 @@ read_snmp_response(int fd) /* I - SNMP + packet.community, CUPS_ASN1_GET_REQUEST, + DEVICE_ID, LexmarkDeviceIdOID); + _cupsSNMPWrite(fd, &(packet.address), CUPS_SNMP_VERSION_1, ++ packet.community, CUPS_ASN1_GET_REQUEST, ++ DEVICE_ID, RicohDeviceIdOID); ++ _cupsSNMPWrite(fd, &(packet.address), CUPS_SNMP_VERSION_1, + packet.community, CUPS_ASN1_GET_REQUEST, + DEVICE_PRODUCT, XeroxProductOID); + _cupsSNMPWrite(fd, &(packet.address), CUPS_SNMP_VERSION_1, diff --git a/cups.spec b/cups.spec index a3fe098..bc16883 100644 --- a/cups.spec +++ b/cups.spec @@ -8,7 +8,7 @@ Summary: Common Unix Printing System Name: cups Version: 1.4.3 -Release: 6%{?dist} +Release: 7%{?dist} License: GPLv2 Group: System Environment/Daemons Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2 @@ -66,6 +66,7 @@ Patch32: cups-str3541.patch Patch33: cups-snmp-quirks.patch Patch34: cups-hp-deviceid-oid.patch Patch35: cups-dnssd-deviceid.patch +Patch36: cups-ricoh-deviceid-oid.patch Patch100: cups-lspp.patch @@ -271,6 +272,8 @@ module. %patch34 -p1 -b .hp-deviceid-oid # Mark DNS-SD Device IDs that have been guessed at with "FZY:1;". %patch35 -p1 -b .dnssd-deviceid +# Add an SNMP query for Ricoh's device ID OID (STR #3552). +%patch36 -p1 -b .ricoh-deviceid-oid %if %lspp # LSPP support. @@ -571,6 +574,9 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog +* Tue May 11 2010 Tim Waugh 1:1.4.3-7 +- Add an SNMP query for Ricoh's device ID OID (STR #3552). + * Fri Apr 16 2010 Tim Waugh 1:1.4.3-6 - Mark DNS-SD Device IDs that have been guessed at with "FZY:1;". From ede19bbed9ba829f7c69c179dc0d34baeb905c86 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Thu, 13 May 2010 22:31:34 +0000 Subject: [PATCH 086/110] - Fixed Ricoh Device ID OID (STR #3552). --- cups-ricoh-deviceid-oid.patch | 2 +- cups.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/cups-ricoh-deviceid-oid.patch b/cups-ricoh-deviceid-oid.patch index af502d0..6a5b6a9 100644 --- a/cups-ricoh-deviceid-oid.patch +++ b/cups-ricoh-deviceid-oid.patch @@ -5,7 +5,7 @@ diff -up cups-1.4.3/backend/snmp.c.ricoh-deviceid-oid cups-1.4.3/backend/snmp.c static const int LexmarkProductOID2[] = { 1,3,6,1,4,1,674,10898,100,2,1,2,1,2,1,-1 }; static const int LexmarkDeviceIdOID[] = { 1,3,6,1,4,1,641,2,1,2,1,3,1,-1 }; static const int HPDeviceIdOID[] = { 1,3,6,1,4,1,11,2,3,9,1,1,7,0,-1 }; -+static const int RicohDeviceIdOID[] = { 1,3,6,1,4,1,367,3,2,1,1,1,11,-1 }; ++static const int RicohDeviceIdOID[] = { 1,3,6,1,4,1,367,3,2,1,1,1,11,0,-1 }; static const int XeroxProductOID[] = { 1,3,6,1,4,1,128,2,1,3,1,2,0,-1 }; static cups_array_t *DeviceURIs = NULL; static int HostNameLookups = 0; diff --git a/cups.spec b/cups.spec index bc16883..8ce9e10 100644 --- a/cups.spec +++ b/cups.spec @@ -8,7 +8,7 @@ Summary: Common Unix Printing System Name: cups Version: 1.4.3 -Release: 7%{?dist} +Release: 8%{?dist} License: GPLv2 Group: System Environment/Daemons Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2 @@ -574,6 +574,9 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog +* Thu May 13 2010 Tim Waugh 1:1.4.3-8 +- Fixed Ricoh Device ID OID (STR #3552). + * Tue May 11 2010 Tim Waugh 1:1.4.3-7 - Add an SNMP query for Ricoh's device ID OID (STR #3552). From cb60366b1d82f630e7dacb838bc01235ab5ea8b3 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Tue, 18 May 2010 16:08:16 +0000 Subject: [PATCH 087/110] - Adjust texttops output to be in natural orientation (STR #3563). This fixes page-label orientation when texttops is used in the filter chain (bug #572338). --- cups-texttops-rotate-page.patch | 35 +++++++++++++++++++++++++++++++++ cups.spec | 9 ++++++++- 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 cups-texttops-rotate-page.patch diff --git a/cups-texttops-rotate-page.patch b/cups-texttops-rotate-page.patch new file mode 100644 index 0000000..2b048cd --- /dev/null +++ b/cups-texttops-rotate-page.patch @@ -0,0 +1,35 @@ +diff -up cups-1.4.3/filter/texttops.c.texttops-rotate-page cups-1.4.3/filter/texttops.c +--- cups-1.4.3/filter/texttops.c.texttops-rotate-page 2008-11-06 16:42:18.000000000 +0000 ++++ cups-1.4.3/filter/texttops.c 2010-05-18 16:42:23.669940884 +0100 +@@ -97,6 +97,13 @@ WritePage(void) + + puts("gsave"); + ++ /* If we're opereating in Landscape (Orientation == 1 or Orientation == 3) ++ then rotate and translate the page */ ++ if ( Orientation & 1 ) { ++ printf ("%d rotate\n", (Orientation & 3) * 90 ); ++ printf("0 %.0f neg translate\n", PageLength); ++ } ++ + if (PrettyPrint) + printf("%d H\n", NumPages); + +@@ -212,7 +219,7 @@ WriteProlog(const char *title, /* I - T + + puts("%!PS-Adobe-3.0"); + printf("%%%%BoundingBox: 0 0 %.0f %.0f\n", PageWidth, PageLength); +- printf("%%cupsRotation: %d\n", (Orientation & 3) * 90); ++ puts("%cupsRotation: 0"); + puts("%%Creator: texttops/" CUPS_SVERSION); + printf("%%%%CreationDate: %s\n", curdate); + WriteTextComment("Title", title); +@@ -549,6 +556,8 @@ WriteProlog(const char *title, /* I - T + puts("%%EndComments"); + + puts("%%BeginProlog"); ++ printf("%%%%Orientation: %s\n", ++ Orientation & 1 ? "Landscape" : "Portrait"); + + /* + * Download any missing fonts... diff --git a/cups.spec b/cups.spec index 4aed07c..21ee071 100644 --- a/cups.spec +++ b/cups.spec @@ -8,7 +8,7 @@ Summary: Common Unix Printing System Name: cups Version: 1.4.3 -Release: 5%{?dist} +Release: 6%{?dist} License: GPLv2 Group: System Environment/Daemons Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2 @@ -58,6 +58,7 @@ Patch31: cups-str3505.patch Patch32: cups-str3541.patch Patch33: cups-snmp-quirks.patch Patch34: cups-hostnamelookups.patch +Patch35: cups-texttops-rotate-page.patch Patch100: cups-lspp.patch @@ -225,6 +226,7 @@ module. %patch32 -p1 -b .str3541 %patch33 -p1 -b .snmp-quirks %patch34 -p1 -b .hostnamelookups +%patch35 -p1 -b .texttops-rotate-page %if %lspp %patch100 -p1 -b .lspp @@ -528,6 +530,11 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog +* Tue May 18 2010 Tim Waugh 1:1.4.3-6 +- Adjust texttops output to be in natural orientation (STR #3563). + This fixes page-label orientation when texttops is used in the + filter chain (bug #572338). + * Thu May 6 2010 Tim Waugh 1:1.4.3-5 - Use numeric addresses for interfaces unless HostNameLookups are turned on (bug #583054). From 7bb1955ae7bc62aa17ab2998480ea2d99bebaaac Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Tue, 18 May 2010 16:08:49 +0000 Subject: [PATCH 088/110] - Adjust texttops output to be in natural orientation (STR #3563). This fixes page-label orientation when texttops is used in the filter chain (bug #572338). --- cups-texttops-rotate-page.patch | 35 +++++++++++++++++++++++++++++++++ cups.spec | 12 ++++++++++- 2 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 cups-texttops-rotate-page.patch diff --git a/cups-texttops-rotate-page.patch b/cups-texttops-rotate-page.patch new file mode 100644 index 0000000..2b048cd --- /dev/null +++ b/cups-texttops-rotate-page.patch @@ -0,0 +1,35 @@ +diff -up cups-1.4.3/filter/texttops.c.texttops-rotate-page cups-1.4.3/filter/texttops.c +--- cups-1.4.3/filter/texttops.c.texttops-rotate-page 2008-11-06 16:42:18.000000000 +0000 ++++ cups-1.4.3/filter/texttops.c 2010-05-18 16:42:23.669940884 +0100 +@@ -97,6 +97,13 @@ WritePage(void) + + puts("gsave"); + ++ /* If we're opereating in Landscape (Orientation == 1 or Orientation == 3) ++ then rotate and translate the page */ ++ if ( Orientation & 1 ) { ++ printf ("%d rotate\n", (Orientation & 3) * 90 ); ++ printf("0 %.0f neg translate\n", PageLength); ++ } ++ + if (PrettyPrint) + printf("%d H\n", NumPages); + +@@ -212,7 +219,7 @@ WriteProlog(const char *title, /* I - T + + puts("%!PS-Adobe-3.0"); + printf("%%%%BoundingBox: 0 0 %.0f %.0f\n", PageWidth, PageLength); +- printf("%%cupsRotation: %d\n", (Orientation & 3) * 90); ++ puts("%cupsRotation: 0"); + puts("%%Creator: texttops/" CUPS_SVERSION); + printf("%%%%CreationDate: %s\n", curdate); + WriteTextComment("Title", title); +@@ -549,6 +556,8 @@ WriteProlog(const char *title, /* I - T + puts("%%EndComments"); + + puts("%%BeginProlog"); ++ printf("%%%%Orientation: %s\n", ++ Orientation & 1 ? "Landscape" : "Portrait"); + + /* + * Download any missing fonts... diff --git a/cups.spec b/cups.spec index 8ce9e10..8a83da4 100644 --- a/cups.spec +++ b/cups.spec @@ -8,7 +8,7 @@ Summary: Common Unix Printing System Name: cups Version: 1.4.3 -Release: 8%{?dist} +Release: 9%{?dist} License: GPLv2 Group: System Environment/Daemons Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2 @@ -67,6 +67,7 @@ Patch33: cups-snmp-quirks.patch Patch34: cups-hp-deviceid-oid.patch Patch35: cups-dnssd-deviceid.patch Patch36: cups-ricoh-deviceid-oid.patch +Patch37: cups-texttops-rotate-page.patch Patch100: cups-lspp.patch @@ -274,6 +275,10 @@ module. %patch35 -p1 -b .dnssd-deviceid # Add an SNMP query for Ricoh's device ID OID (STR #3552). %patch36 -p1 -b .ricoh-deviceid-oid +# Adjust texttops output to be in natural orientation (STR #3563). +# This fixes page-label orientation when texttops is used in the +# filter chain (bug #572338). +%patch37 -p1 -b .texttops-rotate-page %if %lspp # LSPP support. @@ -574,6 +579,11 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog +* Tue May 18 2010 Tim Waugh 1:1.4.3-9 +- Adjust texttops output to be in natural orientation (STR #3563). + This fixes page-label orientation when texttops is used in the + filter chain (bug #572338). + * Thu May 13 2010 Tim Waugh 1:1.4.3-8 - Fixed Ricoh Device ID OID (STR #3552). From 8f1b4f4eef6d7363291e460d343913d33f4eacee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Popelka?= Date: Tue, 1 Jun 2010 15:34:26 +0000 Subject: [PATCH 089/110] - Added back still useful str3425.patch. Second part of STR #3425 is still not fixed in 1.4.3 --- cups-str3425p2.patch | 49 ++++++++++++++++++++++++++++++++++++++++++++ cups.spec | 9 +++++++- 2 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 cups-str3425p2.patch diff --git a/cups-str3425p2.patch b/cups-str3425p2.patch new file mode 100644 index 0000000..d4d7a5a --- /dev/null +++ b/cups-str3425p2.patch @@ -0,0 +1,49 @@ +diff -up cups-1.4.3/scheduler/job.c.str3425p2 cups-1.4.3/scheduler/job.c +--- cups-1.4.3/scheduler/job.c.str3425p2 2010-06-01 17:16:46.000000000 +0200 ++++ cups-1.4.3/scheduler/job.c 2010-06-01 17:19:10.000000000 +0200 +@@ -2286,12 +2286,14 @@ cupsdSetJobState( + if (!cupsdLoadJob(job)) + return; + +- /* +- * Don't do anything if the state is unchanged... +- */ +- +- if (newstate == (oldstate = job->state_value)) +- return; ++ /* ++ * Don't do anything if the state is unchanged and we aren't purging the ++ * job... ++ */ ++ ++ oldstate = job->state_value; ++ if (newstate == oldstate && action != CUPSD_JOB_PURGE) ++ return; + + /* + * Stop any processes that are working on the current job... +@@ -2498,6 +2500,15 @@ cupsdSetJobState( + job->dirty = 1; + cupsdMarkDirty(CUPSD_DIRTY_JOBS); + } ++ else if (!job->printer) ++ { ++ /* ++ * Delete the job immediately if not actively printing... ++ */ ++ ++ cupsdDeleteJob(job, CUPSD_JOB_PURGE); ++ job = NULL; ++ } + break; + } + +@@ -2505,7 +2516,7 @@ cupsdSetJobState( + * Finalize the job immediately if we forced things... + */ + +- if (action >= CUPSD_JOB_FORCE && job->printer) ++ if (action >= CUPSD_JOB_FORCE && job && job->printer) + finalize_job(job, 0); + + /* diff --git a/cups.spec b/cups.spec index 8a83da4..1707ffd 100644 --- a/cups.spec +++ b/cups.spec @@ -8,7 +8,7 @@ Summary: Common Unix Printing System Name: cups Version: 1.4.3 -Release: 9%{?dist} +Release: 10%{?dist} License: GPLv2 Group: System Environment/Daemons Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2 @@ -68,6 +68,7 @@ Patch34: cups-hp-deviceid-oid.patch Patch35: cups-dnssd-deviceid.patch Patch36: cups-ricoh-deviceid-oid.patch Patch37: cups-texttops-rotate-page.patch +Patch38: cups-str3425p2.patch Patch100: cups-lspp.patch @@ -279,6 +280,8 @@ module. # This fixes page-label orientation when texttops is used in the # filter chain (bug #572338). %patch37 -p1 -b .texttops-rotate-page +# Delete job files in /var/spool/cups (STR #3425) +%patch38 -p1 -b .str3425p2 %if %lspp # LSPP support. @@ -579,6 +582,10 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog +* Tue Jun 01 2010 Jiri Popelka 1:1.4.3-10 +- Added back still useful str3425.patch. + Second part of STR #3425 is still not fixed in 1.4.3 + * Tue May 18 2010 Tim Waugh 1:1.4.3-9 - Adjust texttops output to be in natural orientation (STR #3563). This fixes page-label orientation when texttops is used in the From c1fd48d63a3ea9ee5ead8b9f5ea7b341bdaf3f87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Popelka?= Date: Tue, 1 Jun 2010 15:34:31 +0000 Subject: [PATCH 090/110] - Added back still useful str3425.patch. Second part of STR #3425 is still not fixed in 1.4.3 --- cups-str3425p2.patch | 49 ++++++++++++++++++++++++++++++++++++++++++++ cups.spec | 8 +++++++- 2 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 cups-str3425p2.patch diff --git a/cups-str3425p2.patch b/cups-str3425p2.patch new file mode 100644 index 0000000..d4d7a5a --- /dev/null +++ b/cups-str3425p2.patch @@ -0,0 +1,49 @@ +diff -up cups-1.4.3/scheduler/job.c.str3425p2 cups-1.4.3/scheduler/job.c +--- cups-1.4.3/scheduler/job.c.str3425p2 2010-06-01 17:16:46.000000000 +0200 ++++ cups-1.4.3/scheduler/job.c 2010-06-01 17:19:10.000000000 +0200 +@@ -2286,12 +2286,14 @@ cupsdSetJobState( + if (!cupsdLoadJob(job)) + return; + +- /* +- * Don't do anything if the state is unchanged... +- */ +- +- if (newstate == (oldstate = job->state_value)) +- return; ++ /* ++ * Don't do anything if the state is unchanged and we aren't purging the ++ * job... ++ */ ++ ++ oldstate = job->state_value; ++ if (newstate == oldstate && action != CUPSD_JOB_PURGE) ++ return; + + /* + * Stop any processes that are working on the current job... +@@ -2498,6 +2500,15 @@ cupsdSetJobState( + job->dirty = 1; + cupsdMarkDirty(CUPSD_DIRTY_JOBS); + } ++ else if (!job->printer) ++ { ++ /* ++ * Delete the job immediately if not actively printing... ++ */ ++ ++ cupsdDeleteJob(job, CUPSD_JOB_PURGE); ++ job = NULL; ++ } + break; + } + +@@ -2505,7 +2516,7 @@ cupsdSetJobState( + * Finalize the job immediately if we forced things... + */ + +- if (action >= CUPSD_JOB_FORCE && job->printer) ++ if (action >= CUPSD_JOB_FORCE && job && job->printer) + finalize_job(job, 0); + + /* diff --git a/cups.spec b/cups.spec index 21ee071..547176f 100644 --- a/cups.spec +++ b/cups.spec @@ -8,7 +8,7 @@ Summary: Common Unix Printing System Name: cups Version: 1.4.3 -Release: 6%{?dist} +Release: 7%{?dist} License: GPLv2 Group: System Environment/Daemons Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2 @@ -59,6 +59,7 @@ Patch32: cups-str3541.patch Patch33: cups-snmp-quirks.patch Patch34: cups-hostnamelookups.patch Patch35: cups-texttops-rotate-page.patch +Patch36: cups-str3425p2.patch Patch100: cups-lspp.patch @@ -227,6 +228,7 @@ module. %patch33 -p1 -b .snmp-quirks %patch34 -p1 -b .hostnamelookups %patch35 -p1 -b .texttops-rotate-page +%patch36 -p1 -b .str3425p2 %if %lspp %patch100 -p1 -b .lspp @@ -530,6 +532,10 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog +* Tue Jun 01 2010 Jiri Popelka 1:1.4.3-7 +- Added back still useful str3425.patch. + Second part of STR #3425 is still not fixed in 1.4.3 + * Tue May 18 2010 Tim Waugh 1:1.4.3-6 - Adjust texttops output to be in natural orientation (STR #3563). This fixes page-label orientation when texttops is used in the From 2553f6911d9ea0ef26c3b1928afd65bcc60d2e08 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Wed, 9 Jun 2010 15:52:18 +0000 Subject: [PATCH 091/110] - Use upstream method of handling SNMP quirks in PPDs (STR #3551, bug #581825). --- cups-snmp-quirks.patch | 83 ++++++++++++++++++++++++++++-------------- cups.spec | 6 ++- 2 files changed, 61 insertions(+), 28 deletions(-) diff --git a/cups-snmp-quirks.patch b/cups-snmp-quirks.patch index 81639bb..d90c5f6 100644 --- a/cups-snmp-quirks.patch +++ b/cups-snmp-quirks.patch @@ -1,36 +1,34 @@ diff -up cups-1.4.3/backend/snmp-supplies.c.snmp-quirks cups-1.4.3/backend/snmp-supplies.c --- cups-1.4.3/backend/snmp-supplies.c.snmp-quirks 2009-11-20 01:27:57.000000000 +0000 -+++ cups-1.4.3/backend/snmp-supplies.c 2010-04-13 11:54:13.508023630 +0100 -@@ -38,6 +38,15 @@ ++++ cups-1.4.3/backend/snmp-supplies.c 2010-06-09 16:27:05.515019804 +0100 +@@ -38,6 +38,13 @@ /* + * Printer quirks... + */ + -+/* The prtMarkerSuppliesLevel values are percentages, not levels -+ * relative to the stated capacity. */ -+#define QUIRK_LEVEL_IS_PERCENTAGE (1<<0) ++#define QUIRK_CAPACITY (1<<0) + + +/* * Local structures... */ -@@ -57,6 +66,12 @@ typedef struct /**** Printer state ta +@@ -57,6 +64,12 @@ typedef struct /**** Printer state ta const char *keyword; /* IPP printer-state-reasons keyword */ } backend_state_t; -+typedef struct /**** Printer quirk table ****/ ++typedef struct /**** Quirk names table ****/ +{ -+ const char *description; /* hrDeviceDescr */ -+ int quirks; /* quirks (bitmask) */ -+} printer_quirk_t; ++ int bit; /* Quirk bit */ ++ const char *keyword; /* cupsSNMPQuirks keyword */ ++} quirk_name_t; + /* * Local globals... -@@ -68,6 +83,7 @@ static int current_state = -1; +@@ -68,6 +81,7 @@ static int current_state = -1; static int charset = -1; /* Character set for supply names */ static int num_supplies = 0; /* Number of supplies found */ @@ -38,29 +36,41 @@ diff -up cups-1.4.3/backend/snmp-supplies.c.snmp-quirks cups-1.4.3/backend/snmp- static backend_supplies_t supplies[CUPS_MAX_SUPPLIES]; /* Supply information */ -@@ -153,6 +169,11 @@ static const backend_state_t const print +@@ -153,6 +167,15 @@ static const backend_state_t const print { CUPS_TC_outputFull, "output-area-full-warning" } }; -+static const printer_quirk_t const printer_quirks[] = ++static const quirk_name_t const quirk_names[] = + { -+ { "Officejet Pro 8500 A909g", QUIRK_LEVEL_IS_PERCENTAGE } ++ /* ++ * The prtMarkerSuppliesLevel values are ++ * percentages, not levels relative to the ++ * stated capacity. ++ */ ++ { QUIRK_CAPACITY, "capacity" } + }; -+ /* * Local functions... -@@ -208,6 +229,9 @@ backendSNMPSupplies( +@@ -208,6 +231,9 @@ backendSNMPSupplies( if (i) *ptr++ = ','; -+ if (quirks & QUIRK_LEVEL_IS_PERCENTAGE) ++ if (quirks & QUIRK_CAPACITY) + supplies[i].max_capacity = 100; + if (supplies[i].max_capacity > 0) sprintf(ptr, "%d", 100 * supplies[i].level / supplies[i].max_capacity); else -@@ -366,6 +390,7 @@ backend_init_supplies( +@@ -305,6 +331,7 @@ backend_init_supplies( + http_addr_t *addr) /* I - Printer address */ + { + int i, /* Looping var */ ++ len, /* Quirk name length */ + type; /* Current marker type */ + cups_file_t *cachefile; /* Cache file */ + const char *cachedir; /* CUPS_CACHEDIR value */ +@@ -366,6 +393,7 @@ backend_init_supplies( current_state = -1; num_supplies = -1; charset = -1; @@ -68,19 +78,38 @@ diff -up cups-1.4.3/backend/snmp-supplies.c.snmp-quirks cups-1.4.3/backend/snmp- memset(supplies, 0, sizeof(supplies)); -@@ -404,6 +429,15 @@ backend_init_supplies( +@@ -381,6 +409,34 @@ backend_init_supplies( + return; + } - fprintf(stderr, "DEBUG2: hrDeviceDesc=\"%s\"\n", description); - -+ for (i = 0; i < sizeof (printer_quirks) / sizeof (printer_quirks[0]); i++) ++ if (ppd && ++ (ppdattr = ppdFindAttr(ppd, "cupsSNMPQuirks", NULL)) != NULL && ++ ppdattr->value) + { -+ if (!strcmp (description, printer_quirks[i].description)) ++ ptr = ppdattr->value; ++ while (*ptr != '\0') + { -+ quirks = printer_quirks[i].quirks; -+ break; ++ /* ++ * Match keyword against quirk_names table. ++ */ ++ ++ for (i = 0; i < sizeof (quirk_names) / sizeof (quirk_names[0]); i++) ++ { ++ len = strlen (quirk_names[i].keyword); ++ if (!strncmp (value, quirk_names[i].keyword, len) && ++ (value[len] == '\0' || value[len] == ' ')) ++ quirks |= quirk_names[i].bit; ++ } ++ ++ /* ++ * Advance to next keyword. ++ */ ++ ++ ptr += strcspn (ptr, " "); ++ ptr += strspn (ptr, " "); + } + } + + ppdClose(ppd); + /* - * See if we have already queried this device... - */ diff --git a/cups.spec b/cups.spec index 1707ffd..c929c83 100644 --- a/cups.spec +++ b/cups.spec @@ -8,7 +8,7 @@ Summary: Common Unix Printing System Name: cups Version: 1.4.3 -Release: 10%{?dist} +Release: 11%{?dist} License: GPLv2 Group: System Environment/Daemons Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2 @@ -582,6 +582,10 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog +* Wed Jun 9 2010 Tim Waugh 1:1.4.3-11 +- Use upstream method of handling SNMP quirks in PPDs (STR #3551, + bug #581825). + * Tue Jun 01 2010 Jiri Popelka 1:1.4.3-10 - Added back still useful str3425.patch. Second part of STR #3425 is still not fixed in 1.4.3 From fdf33eb9cddb8d469c77d1b546d5fbb4083ab4aa Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Thu, 10 Jun 2010 08:12:02 +0000 Subject: [PATCH 092/110] - Use upstream method of handling SNMP quirks in PPDs (STR #3551, bug #581825). --- cups-snmp-quirks.patch | 83 ++++++++++++++++++++++++++++-------------- cups.spec | 6 ++- 2 files changed, 61 insertions(+), 28 deletions(-) diff --git a/cups-snmp-quirks.patch b/cups-snmp-quirks.patch index 81639bb..d90c5f6 100644 --- a/cups-snmp-quirks.patch +++ b/cups-snmp-quirks.patch @@ -1,36 +1,34 @@ diff -up cups-1.4.3/backend/snmp-supplies.c.snmp-quirks cups-1.4.3/backend/snmp-supplies.c --- cups-1.4.3/backend/snmp-supplies.c.snmp-quirks 2009-11-20 01:27:57.000000000 +0000 -+++ cups-1.4.3/backend/snmp-supplies.c 2010-04-13 11:54:13.508023630 +0100 -@@ -38,6 +38,15 @@ ++++ cups-1.4.3/backend/snmp-supplies.c 2010-06-09 16:27:05.515019804 +0100 +@@ -38,6 +38,13 @@ /* + * Printer quirks... + */ + -+/* The prtMarkerSuppliesLevel values are percentages, not levels -+ * relative to the stated capacity. */ -+#define QUIRK_LEVEL_IS_PERCENTAGE (1<<0) ++#define QUIRK_CAPACITY (1<<0) + + +/* * Local structures... */ -@@ -57,6 +66,12 @@ typedef struct /**** Printer state ta +@@ -57,6 +64,12 @@ typedef struct /**** Printer state ta const char *keyword; /* IPP printer-state-reasons keyword */ } backend_state_t; -+typedef struct /**** Printer quirk table ****/ ++typedef struct /**** Quirk names table ****/ +{ -+ const char *description; /* hrDeviceDescr */ -+ int quirks; /* quirks (bitmask) */ -+} printer_quirk_t; ++ int bit; /* Quirk bit */ ++ const char *keyword; /* cupsSNMPQuirks keyword */ ++} quirk_name_t; + /* * Local globals... -@@ -68,6 +83,7 @@ static int current_state = -1; +@@ -68,6 +81,7 @@ static int current_state = -1; static int charset = -1; /* Character set for supply names */ static int num_supplies = 0; /* Number of supplies found */ @@ -38,29 +36,41 @@ diff -up cups-1.4.3/backend/snmp-supplies.c.snmp-quirks cups-1.4.3/backend/snmp- static backend_supplies_t supplies[CUPS_MAX_SUPPLIES]; /* Supply information */ -@@ -153,6 +169,11 @@ static const backend_state_t const print +@@ -153,6 +167,15 @@ static const backend_state_t const print { CUPS_TC_outputFull, "output-area-full-warning" } }; -+static const printer_quirk_t const printer_quirks[] = ++static const quirk_name_t const quirk_names[] = + { -+ { "Officejet Pro 8500 A909g", QUIRK_LEVEL_IS_PERCENTAGE } ++ /* ++ * The prtMarkerSuppliesLevel values are ++ * percentages, not levels relative to the ++ * stated capacity. ++ */ ++ { QUIRK_CAPACITY, "capacity" } + }; -+ /* * Local functions... -@@ -208,6 +229,9 @@ backendSNMPSupplies( +@@ -208,6 +231,9 @@ backendSNMPSupplies( if (i) *ptr++ = ','; -+ if (quirks & QUIRK_LEVEL_IS_PERCENTAGE) ++ if (quirks & QUIRK_CAPACITY) + supplies[i].max_capacity = 100; + if (supplies[i].max_capacity > 0) sprintf(ptr, "%d", 100 * supplies[i].level / supplies[i].max_capacity); else -@@ -366,6 +390,7 @@ backend_init_supplies( +@@ -305,6 +331,7 @@ backend_init_supplies( + http_addr_t *addr) /* I - Printer address */ + { + int i, /* Looping var */ ++ len, /* Quirk name length */ + type; /* Current marker type */ + cups_file_t *cachefile; /* Cache file */ + const char *cachedir; /* CUPS_CACHEDIR value */ +@@ -366,6 +393,7 @@ backend_init_supplies( current_state = -1; num_supplies = -1; charset = -1; @@ -68,19 +78,38 @@ diff -up cups-1.4.3/backend/snmp-supplies.c.snmp-quirks cups-1.4.3/backend/snmp- memset(supplies, 0, sizeof(supplies)); -@@ -404,6 +429,15 @@ backend_init_supplies( +@@ -381,6 +409,34 @@ backend_init_supplies( + return; + } - fprintf(stderr, "DEBUG2: hrDeviceDesc=\"%s\"\n", description); - -+ for (i = 0; i < sizeof (printer_quirks) / sizeof (printer_quirks[0]); i++) ++ if (ppd && ++ (ppdattr = ppdFindAttr(ppd, "cupsSNMPQuirks", NULL)) != NULL && ++ ppdattr->value) + { -+ if (!strcmp (description, printer_quirks[i].description)) ++ ptr = ppdattr->value; ++ while (*ptr != '\0') + { -+ quirks = printer_quirks[i].quirks; -+ break; ++ /* ++ * Match keyword against quirk_names table. ++ */ ++ ++ for (i = 0; i < sizeof (quirk_names) / sizeof (quirk_names[0]); i++) ++ { ++ len = strlen (quirk_names[i].keyword); ++ if (!strncmp (value, quirk_names[i].keyword, len) && ++ (value[len] == '\0' || value[len] == ' ')) ++ quirks |= quirk_names[i].bit; ++ } ++ ++ /* ++ * Advance to next keyword. ++ */ ++ ++ ptr += strcspn (ptr, " "); ++ ptr += strspn (ptr, " "); + } + } + + ppdClose(ppd); + /* - * See if we have already queried this device... - */ diff --git a/cups.spec b/cups.spec index 547176f..767cacf 100644 --- a/cups.spec +++ b/cups.spec @@ -8,7 +8,7 @@ Summary: Common Unix Printing System Name: cups Version: 1.4.3 -Release: 7%{?dist} +Release: 8%{?dist} License: GPLv2 Group: System Environment/Daemons Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2 @@ -532,6 +532,10 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog +* Wed Jun 9 2010 Tim Waugh 1:1.4.3-8 +- Use upstream method of handling SNMP quirks in PPDs (STR #3551, + bug #581825). + * Tue Jun 01 2010 Jiri Popelka 1:1.4.3-7 - Added back still useful str3425.patch. Second part of STR #3425 is still not fixed in 1.4.3 From cc938fb3196774328f16c8ae430ba9eb2d826b8e Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Thu, 10 Jun 2010 10:37:03 +0000 Subject: [PATCH 093/110] - Removed unapplied gnutls-gcrypt-threads patch. Fixed typos in descriptions for lpd and php sub-packages. --- cups-gnutls-gcrypt-threads.patch | 72 -------------------------------- cups.spec | 10 +++-- 2 files changed, 6 insertions(+), 76 deletions(-) delete mode 100644 cups-gnutls-gcrypt-threads.patch diff --git a/cups-gnutls-gcrypt-threads.patch b/cups-gnutls-gcrypt-threads.patch deleted file mode 100644 index 7105d39..0000000 --- a/cups-gnutls-gcrypt-threads.patch +++ /dev/null @@ -1,72 +0,0 @@ -diff -up cups-1.4.2/config-scripts/cups-ssl.m4.gnutls-gcrypt-threads cups-1.4.2/config-scripts/cups-ssl.m4 ---- cups-1.4.2/config-scripts/cups-ssl.m4.gnutls-gcrypt-threads 2010-02-15 12:21:32.000000000 +0100 -+++ cups-1.4.2/config-scripts/cups-ssl.m4 2010-02-15 12:24:57.000000000 +0100 -@@ -61,7 +61,7 @@ if test x$enable_ssl != xno; then - if test "x${SSLLIBS}" = "x" -a "x${enable_gnutls}" != "xno" -a "x$PKGCONFIG" != x; then - AC_PATH_PROG(LIBGNUTLSCONFIG,libgnutls-config) - if $PKGCONFIG --exists gnutls; then -- SSLLIBS=`$PKGCONFIG --libs gnutls` -+ SSLLIBS="`$PKGCONFIG --libs gnutls` -lgcrypt" - SSLFLAGS=`$PKGCONFIG --cflags gnutls` - AC_DEFINE(HAVE_SSL) - AC_DEFINE(HAVE_GNUTLS) -diff -up cups-1.4.2/cups/http.c.gnutls-gcrypt-threads cups-1.4.2/cups/http.c ---- cups-1.4.2/cups/http.c.gnutls-gcrypt-threads 2010-02-15 12:21:32.000000000 +0100 -+++ cups-1.4.2/cups/http.c 2010-02-15 12:25:57.000000000 +0100 -@@ -1161,6 +1161,12 @@ httpHead(http_t *http, /* I - Conne - return (http_send(http, HTTP_HEAD, uri)); - } - -+#ifdef HAVE_GNUTLS -+/* We always have to initialize threading in gcrypt here in libcups -+ * even if cupsd is configured without threading, because an -+ * application using libcups may be using threads itself. */ -+GCRY_THREAD_OPTION_PTHREAD_IMPL; -+#endif - - /* - * 'httpInitialize()' - Initialize the HTTP interface library and set the -@@ -1205,6 +1211,7 @@ httpInitialize(void) - #endif /* WIN32 */ - - #ifdef HAVE_GNUTLS -+ gcry_control (GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread); - gnutls_global_init(); - #endif /* HAVE_GNUTLS */ - -diff -up cups-1.4.2/cups/http-private.h.gnutls-gcrypt-threads cups-1.4.2/cups/http-private.h ---- cups-1.4.2/cups/http-private.h.gnutls-gcrypt-threads 2009-04-07 17:48:14.000000000 +0200 -+++ cups-1.4.2/cups/http-private.h 2010-02-15 12:26:30.000000000 +0100 -@@ -98,6 +98,8 @@ extern BIO_METHOD *_httpBIOMethods(void) - * The GNU TLS library is more of a "bare metal" SSL/TLS library... - */ - # include -+# include -+# include - - typedef struct - { -diff -up cups-1.4.2/scheduler/server.c.gnutls-gcrypt-threads cups-1.4.2/scheduler/server.c ---- cups-1.4.2/scheduler/server.c.gnutls-gcrypt-threads 2008-09-11 00:05:29.000000000 +0200 -+++ cups-1.4.2/scheduler/server.c 2010-02-15 12:24:13.000000000 +0100 -@@ -35,6 +35,9 @@ - */ - - static int started = 0; -+#if !defined(HAVE_LIBSSL) && defined(HAVE_GNUTLS) && defined(HAVE_PTHREAD_H) -+GCRY_THREAD_OPTION_PTHREAD_IMPL; -+#endif - - - /* -@@ -75,7 +78,9 @@ cupsdStartServer(void) - /* - * Initialize the encryption libraries... - */ -- -+#ifdef HAVE_PTHREAD_H -+ gcry_control (GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread); -+#endif /* HAVE_PTHREAD_H */ - gnutls_global_init(); - #endif /* HAVE_LIBSSL */ - diff --git a/cups.spec b/cups.spec index c929c83..ce46c64 100644 --- a/cups.spec +++ b/cups.spec @@ -58,7 +58,6 @@ Patch24: cups-avahi.patch Patch25: cups-str3382.patch Patch26: cups-str3503.patch Patch27: cups-str3399.patch -Patch28: cups-gnutls-gcrypt-threads.patch Patch29: cups-0755.patch Patch30: cups-EAI_AGAIN.patch Patch31: cups-str3505.patch @@ -195,12 +194,12 @@ natively, without needing the lp/lpr commands. %description lpd The Common UNIX Printing System provides a portable printing layer for -UNIX® operating systems. This is the package that provices standard +UNIX® operating systems. This is the package that provides standard lpd emulation. %description php The Common UNIX Printing System provides a portable printing layer for -UNIX® operating systems. This is the package that provices a PHP +UNIX® operating systems. This is the package that provides a PHP module. %prep @@ -259,7 +258,6 @@ module. %patch26 -p1 -b .str3503 # Don't treat SIGPIPE as an error. %patch27 -p1 -b .str3399 -#%patch28 -p1 -b .gnutls-gcrypt-threads # Use mode 0755 for binaries and libraries where appropriate. %patch29 -p1 -b .0755 # Re-initialise the resolver on failure in httpAddrLookup(). @@ -582,6 +580,10 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog +* Thu Jun 10 2010 Tim Waugh +- Removed unapplied gnutls-gcrypt-threads patch. Fixed typos in + descriptions for lpd and php sub-packages. + * Wed Jun 9 2010 Tim Waugh 1:1.4.3-11 - Use upstream method of handling SNMP quirks in PPDs (STR #3551, bug #581825). From 8399d834efa3317782634ffe6e3bfda92b4ae966 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Fri, 18 Jun 2010 10:42:26 +0000 Subject: [PATCH 094/110] - 1.4.4. Fixes several security vulnerabilities (bug #605399): CVE-2010-0540, CVE-2010-0542, CVE-2010-1748. No longer need str3503, str3399, str3505, str3541, str3425p2 or CVE-2010-0302 patches. - Fix lpd provides. - Added comments for all sources and patches. - Reset status after successful ipp job (bug #548219, STR #3460). - Install udev rules in correct place (bug #530378). - Removed unapplied gnutls-gcrypt-threads patch. Fixed typos in descriptions for lpd and php sub-packages. - Add an SNMP query for Ricoh's device ID OID (STR #3552). - Mark DNS-SD Device IDs that have been guessed at with "FZY:1;". - Add an SNMP query for HP's device ID OID (STR #3552). --- .cvsignore | 1 + cups-CVE-2010-0302.patch | 23 ---- cups-dnssd-deviceid.patch | 38 ++++++ cups-getpass.patch | 19 +-- cups-gnutls-gcrypt-threads.patch | 56 --------- cups-hostnamelookups.patch | 15 ++- cups-hp-deviceid-oid.patch | 21 ++++ cups-lspp.patch | 210 +++++++++++++++---------------- cups-page-label.patch | 20 +-- cups-ricoh-deviceid-oid.patch | 21 ++++ cups-str3399.patch | 25 ---- cups-str3425p2.patch | 49 -------- cups-str3503.patch | 12 -- cups-str3505.patch | 158 ----------------------- cups-str3541.patch | 12 -- cups.spec | 132 +++++++++++++------ sources | 1 + 17 files changed, 311 insertions(+), 502 deletions(-) delete mode 100644 cups-CVE-2010-0302.patch create mode 100644 cups-dnssd-deviceid.patch delete mode 100644 cups-gnutls-gcrypt-threads.patch create mode 100644 cups-hp-deviceid-oid.patch create mode 100644 cups-ricoh-deviceid-oid.patch delete mode 100644 cups-str3399.patch delete mode 100644 cups-str3425p2.patch delete mode 100644 cups-str3503.patch delete mode 100644 cups-str3505.patch delete mode 100644 cups-str3541.patch diff --git a/.cvsignore b/.cvsignore index 9569859..462eb21 100644 --- a/.cvsignore +++ b/.cvsignore @@ -42,3 +42,4 @@ cups-1.4.0-source.tar.bz2 cups-1.4b2-source.tar.bz2 cups-1.4b2-svn8404-source.tar.bz2 cups-1.4.3-source.tar.bz2 +cups-1.4.4-source.tar.bz2 diff --git a/cups-CVE-2010-0302.patch b/cups-CVE-2010-0302.patch deleted file mode 100644 index da108e1..0000000 --- a/cups-CVE-2010-0302.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff -up cups-1.4.3/scheduler/select.c.CVE-2010-0302 cups-1.4.3/scheduler/select.c ---- cups-1.4.3/scheduler/select.c.CVE-2010-0302 2010-01-14 23:40:19.000000000 +0100 -+++ cups-1.4.3/scheduler/select.c 2010-03-31 13:54:30.000000000 +0200 -@@ -454,7 +454,8 @@ cupsdDoSelect(long timeout) /* I - Time - if (fdptr->read_cb && event->filter == EVFILT_READ) - (*(fdptr->read_cb))(fdptr->data); - -- if (fdptr->use > 1 && fdptr->write_cb && event->filter == EVFILT_WRITE) -+ if (fdptr->use > 1 && fdptr->write_cb && event->filter == EVFILT_WRITE && -+ !cupsArrayFind(cupsd_inactive_fds, fdptr)) - (*(fdptr->write_cb))(fdptr->data); - - release_fd(fdptr); -@@ -500,7 +501,8 @@ cupsdDoSelect(long timeout) /* I - Time - (*(fdptr->read_cb))(fdptr->data); - - if (fdptr->use > 1 && fdptr->write_cb && -- (event->events & (EPOLLOUT | EPOLLERR | EPOLLHUP))) -+ (event->events & (EPOLLOUT | EPOLLERR | EPOLLHUP)) && -+ !cupsArrayFind(cupsd_inactive_fds, fdptr)) - (*(fdptr->write_cb))(fdptr->data); - - release_fd(fdptr); diff --git a/cups-dnssd-deviceid.patch b/cups-dnssd-deviceid.patch new file mode 100644 index 0000000..abb8366 --- /dev/null +++ b/cups-dnssd-deviceid.patch @@ -0,0 +1,38 @@ +diff -up cups-1.4.3/backend/dnssd.c.dnssd-deviceid.patch cups-1.4.3/backend/dnssd.c +--- cups-1.4.3/backend/dnssd.c.dnssd-deviceid.patch 2010-04-16 19:36:12.226148774 +0100 ++++ cups-1.4.3/backend/dnssd.c 2010-04-16 19:39:53.314148240 +0100 +@@ -1192,15 +1192,22 @@ find_device (cups_array_t *devices, + if (device->device_id) + free(device->device_id); + ++ if (device_id[0]) ++ { ++ /* Mark this as the real device ID. */ ++ ptr = device_id + strlen(device_id); ++ snprintf(ptr, sizeof(device_id) - (ptr - device_id), "FZY:0;"); ++ } ++ + if (!device_id[0] && strcmp(model, "Unknown")) + { + if (make_and_model[0]) +- snprintf(device_id, sizeof(device_id), "MFG:%s;MDL:%s;", ++ snprintf(device_id, sizeof(device_id), "MFG:%s;MDL:%s;FZY:1;", + make_and_model, model); + else if (!strncasecmp(model, "designjet ", 10)) +- snprintf(device_id, sizeof(device_id), "MFG:HP;MDL:%s", model + 10); ++ snprintf(device_id, sizeof(device_id), "MFG:HP;MDL:%s;FZY:1;", model + 10); + else if (!strncasecmp(model, "stylus ", 7)) +- snprintf(device_id, sizeof(device_id), "MFG:EPSON;MDL:%s", model + 7); ++ snprintf(device_id, sizeof(device_id), "MFG:EPSON;MDL:%s;FZY:1;", model + 7); + else if ((ptr = strchr(model, ' ')) != NULL) + { + /* +@@ -1210,7 +1217,7 @@ find_device (cups_array_t *devices, + memcpy(make_and_model, model, ptr - model); + make_and_model[ptr - model] = '\0'; + +- snprintf(device_id, sizeof(device_id), "MFG:%s;MDL:%s", ++ snprintf(device_id, sizeof(device_id), "MFG:%s;MDL:%s;FZY:1;", + make_and_model, ptr + 1); + } + } diff --git a/cups-getpass.patch b/cups-getpass.patch index 577d43a..1c1da96 100644 --- a/cups-getpass.patch +++ b/cups-getpass.patch @@ -1,6 +1,7 @@ ---- cups-1.2.6/cups/usersys.c.getpass 2006-08-29 16:51:19.000000000 +0100 -+++ cups-1.2.6/cups/usersys.c 2006-11-13 16:19:32.000000000 +0000 -@@ -46,6 +46,8 @@ +diff -up cups-1.4.4/cups/usersys.c.getpass cups-1.4.4/cups/usersys.c +--- cups-1.4.4/cups/usersys.c.getpass 2010-03-30 23:07:33.000000000 +0100 ++++ cups-1.4.4/cups/usersys.c 2010-06-18 09:38:08.368096897 +0100 +@@ -41,6 +41,8 @@ #include "globals.h" #include #include @@ -8,11 +9,11 @@ +#include #ifdef WIN32 # include - #endif /* WIN32 */ -@@ -455,7 +457,29 @@ - const char * /* O - Password */ - _cupsGetPassword(const char *prompt) /* I - Prompt string */ - { + #else +@@ -406,7 +408,29 @@ _cupsGetPassword(const char *prompt) /* + * Use the standard getpass function to get a password from the console. + */ + - return (getpass(prompt)); + static char password[100]; + struct termios oldtio, newtio; @@ -37,6 +38,6 @@ + else + password[0] ='\0'; + return password; - } #endif /* WIN32 */ + } diff --git a/cups-gnutls-gcrypt-threads.patch b/cups-gnutls-gcrypt-threads.patch deleted file mode 100644 index 31f14dd..0000000 --- a/cups-gnutls-gcrypt-threads.patch +++ /dev/null @@ -1,56 +0,0 @@ -diff -up cups-1.4.2/cups/http.c.gnutls-gcrypt-threads cups-1.4.2/cups/http.c ---- cups-1.4.2/cups/http.c.gnutls-gcrypt-threads 2009-12-21 16:50:58.931552118 +0000 -+++ cups-1.4.2/cups/http.c 2009-12-21 16:51:15.047552357 +0000 -@@ -1161,6 +1161,9 @@ httpHead(http_t *http, /* I - Conne - return (http_send(http, HTTP_HEAD, uri)); - } - -+#ifdef HAVE_GNUTLS -+GCRY_THREAD_OPTION_PTHREAD_IMPL; -+#endif - - /* - * 'httpInitialize()' - Initialize the HTTP interface library and set the -@@ -1205,6 +1208,7 @@ httpInitialize(void) - #endif /* WIN32 */ - - #ifdef HAVE_GNUTLS -+ gcry_control (GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread); - gnutls_global_init(); - #endif /* HAVE_GNUTLS */ - -diff -up cups-1.4.2/cups/http-private.h.gnutls-gcrypt-threads cups-1.4.2/cups/http-private.h ---- cups-1.4.2/cups/http-private.h.gnutls-gcrypt-threads 2009-04-07 16:48:14.000000000 +0100 -+++ cups-1.4.2/cups/http-private.h 2009-12-21 16:51:15.049552624 +0000 -@@ -98,6 +98,8 @@ extern BIO_METHOD *_httpBIOMethods(void) - * The GNU TLS library is more of a "bare metal" SSL/TLS library... - */ - # include -+# include -+# include - - typedef struct - { -diff -up cups-1.4.2/scheduler/server.c.gnutls-gcrypt-threads cups-1.4.2/scheduler/server.c ---- cups-1.4.2/scheduler/server.c.gnutls-gcrypt-threads 2008-09-10 23:05:29.000000000 +0100 -+++ cups-1.4.2/scheduler/server.c 2009-12-21 16:51:15.048553044 +0000 -@@ -35,7 +35,9 @@ - */ - - static int started = 0; -- -+#if !defined(HAVE_LIBSSL) && defined(HAVE_GNUTLS) -+GCRY_THREAD_OPTION_PTHREAD_IMPL; -+#endif - - /* - * 'cupsdStartServer()' - Start the server. -@@ -75,7 +77,7 @@ cupsdStartServer(void) - /* - * Initialize the encryption libraries... - */ -- -+ gcry_control (GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread); - gnutls_global_init(); - #endif /* HAVE_LIBSSL */ - diff --git a/cups-hostnamelookups.patch b/cups-hostnamelookups.patch index 687452a..75b6abf 100644 --- a/cups-hostnamelookups.patch +++ b/cups-hostnamelookups.patch @@ -1,16 +1,19 @@ -diff -up cups-1.4.3/scheduler/network.c.hostnamelookups cups-1.4.3/scheduler/network.c ---- cups-1.4.3/scheduler/network.c.hostnamelookups 2009-04-28 01:23:38.000000000 +0100 -+++ cups-1.4.3/scheduler/network.c 2010-05-06 15:11:34.652926030 +0100 -@@ -155,7 +155,7 @@ cupsdNetIFUpdate(void) +diff -up cups-1.4.4/scheduler/network.c.hostnamelookups cups-1.4.4/scheduler/network.c +--- cups-1.4.4/scheduler/network.c.hostnamelookups 2010-04-09 23:42:09.000000000 +0100 ++++ cups-1.4.4/scheduler/network.c 2010-06-18 11:13:02.331979867 +0100 +@@ -154,11 +154,7 @@ cupsdNetIFUpdate(void) * Try looking up the hostname for the address as needed... */ +-#ifdef __APPLE__ + if (HostNameLookups) +-#else - if (HostNameLookups || RemotePort) -+ if (HostNameLookups) +-#endif /* __APPLE__ */ httpAddrLookup((http_addr_t *)(addr->ifa_addr), hostname, sizeof(hostname)); else -@@ -163,7 +163,7 @@ cupsdNetIFUpdate(void) +@@ -166,7 +162,7 @@ cupsdNetIFUpdate(void) /* * Map the default server address and localhost to the server name * and localhost, respectively; for all other addresses, use the diff --git a/cups-hp-deviceid-oid.patch b/cups-hp-deviceid-oid.patch new file mode 100644 index 0000000..29f0781 --- /dev/null +++ b/cups-hp-deviceid-oid.patch @@ -0,0 +1,21 @@ +diff -up cups-1.4.3/backend/snmp.c.hp-deviceid-oid cups-1.4.3/backend/snmp.c +--- cups-1.4.3/backend/snmp.c.hp-deviceid-oid 2009-12-08 02:13:42.000000000 +0000 ++++ cups-1.4.3/backend/snmp.c 2010-04-13 15:00:26.486148914 +0100 +@@ -194,6 +194,7 @@ static const int UriOID[] = { CUPS_OID_p + static const int LexmarkProductOID[] = { 1,3,6,1,4,1,641,2,1,2,1,2,1,-1 }; + static const int LexmarkProductOID2[] = { 1,3,6,1,4,1,674,10898,100,2,1,2,1,2,1,-1 }; + static const int LexmarkDeviceIdOID[] = { 1,3,6,1,4,1,641,2,1,2,1,3,1,-1 }; ++static const int HPDeviceIdOID[] = { 1,3,6,1,4,1,11,2,3,9,1,1,7,0,-1 }; + static const int XeroxProductOID[] = { 1,3,6,1,4,1,128,2,1,3,1,2,0,-1 }; + static cups_array_t *DeviceURIs = NULL; + static int HostNameLookups = 0; +@@ -1003,6 +1004,9 @@ read_snmp_response(int fd) /* I - SNMP + _cupsSNMPWrite(fd, &(packet.address), CUPS_SNMP_VERSION_1, + packet.community, CUPS_ASN1_GET_REQUEST, + DEVICE_PRODUCT, XeroxProductOID); ++ _cupsSNMPWrite(fd, &(packet.address), CUPS_SNMP_VERSION_1, ++ packet.community, CUPS_ASN1_GET_REQUEST, ++ DEVICE_ID, HPDeviceIdOID); + break; + + case DEVICE_DESCRIPTION : diff --git a/cups-lspp.patch b/cups-lspp.patch index 3e7a00f..c1bf5f2 100644 --- a/cups-lspp.patch +++ b/cups-lspp.patch @@ -1,7 +1,7 @@ -diff -up cups-1.4.3/config.h.in.lspp cups-1.4.3/config.h.in ---- cups-1.4.3/config.h.in.lspp 2010-03-31 14:08:57.000000000 +0200 -+++ cups-1.4.3/config.h.in 2010-03-31 14:08:57.000000000 +0200 -@@ -633,6 +633,13 @@ +diff -up cups-1.4.4/config.h.in.lspp cups-1.4.4/config.h.in +--- cups-1.4.4/config.h.in.lspp 2010-06-18 09:38:22.645104842 +0100 ++++ cups-1.4.4/config.h.in 2010-06-18 09:38:22.681104733 +0100 +@@ -646,6 +646,13 @@ #undef HAVE_TCPD_H @@ -15,9 +15,9 @@ diff -up cups-1.4.3/config.h.in.lspp cups-1.4.3/config.h.in #endif /* !_CUPS_CONFIG_H_ */ /* -diff -up cups-1.4.3/config-scripts/cups-lspp.m4.lspp cups-1.4.3/config-scripts/cups-lspp.m4 ---- cups-1.4.3/config-scripts/cups-lspp.m4.lspp 2010-03-31 14:08:57.000000000 +0200 -+++ cups-1.4.3/config-scripts/cups-lspp.m4 2010-03-31 14:08:57.000000000 +0200 +diff -up cups-1.4.4/config-scripts/cups-lspp.m4.lspp cups-1.4.4/config-scripts/cups-lspp.m4 +--- cups-1.4.4/config-scripts/cups-lspp.m4.lspp 2010-06-18 09:38:22.681104733 +0100 ++++ cups-1.4.4/config-scripts/cups-lspp.m4 2010-06-18 09:38:22.681104733 +0100 @@ -0,0 +1,36 @@ +dnl +dnl LSPP code for the Common UNIX Printing System (CUPS). @@ -55,9 +55,9 @@ diff -up cups-1.4.3/config-scripts/cups-lspp.m4.lspp cups-1.4.3/config-scripts/c + ;; + esac +fi -diff -up cups-1.4.3/configure.in.lspp cups-1.4.3/configure.in ---- cups-1.4.3/configure.in.lspp 2008-11-14 20:32:22.000000000 +0100 -+++ cups-1.4.3/configure.in 2010-03-31 14:08:57.000000000 +0200 +diff -up cups-1.4.4/configure.in.lspp cups-1.4.4/configure.in +--- cups-1.4.4/configure.in.lspp 2010-06-16 01:39:16.000000000 +0100 ++++ cups-1.4.4/configure.in 2010-06-18 09:38:22.682104565 +0100 @@ -42,6 +42,8 @@ sinclude(config-scripts/cups-pap.m4) sinclude(config-scripts/cups-pdf.m4) sinclude(config-scripts/cups-scripting.m4) @@ -67,9 +67,9 @@ diff -up cups-1.4.3/configure.in.lspp cups-1.4.3/configure.in INSTALL_LANGUAGES="" UNINSTALL_LANGUAGES="" LANGFILES="" -diff -up cups-1.4.3/cups/cups.h.lspp cups-1.4.3/cups/cups.h ---- cups-1.4.3/cups/cups.h.lspp 2009-11-16 18:11:56.000000000 +0100 -+++ cups-1.4.3/cups/cups.h 2010-03-31 14:08:57.000000000 +0200 +diff -up cups-1.4.4/cups/cups.h.lspp cups-1.4.4/cups/cups.h +--- cups-1.4.4/cups/cups.h.lspp 2010-04-23 19:56:34.000000000 +0100 ++++ cups-1.4.4/cups/cups.h 2010-06-18 09:38:22.682104565 +0100 @@ -15,6 +15,9 @@ * This file is subject to the Apple OS-Developed Software exception. */ @@ -80,7 +80,7 @@ diff -up cups-1.4.3/cups/cups.h.lspp cups-1.4.3/cups/cups.h #ifndef _CUPS_CUPS_H_ # define _CUPS_CUPS_H_ -@@ -84,6 +87,12 @@ extern "C" { +@@ -86,6 +89,12 @@ extern "C" { # define CUPS_WHICHJOBS_COMPLETED 1 @@ -93,9 +93,9 @@ diff -up cups-1.4.3/cups/cups.h.lspp cups-1.4.3/cups/cups.h /* * Types and structures... */ -diff -up cups-1.4.3/data/Makefile.lspp cups-1.4.3/data/Makefile ---- cups-1.4.3/data/Makefile.lspp 2008-11-12 20:30:57.000000000 +0100 -+++ cups-1.4.3/data/Makefile 2010-03-31 14:08:57.000000000 +0200 +diff -up cups-1.4.4/data/Makefile.lspp cups-1.4.4/data/Makefile +--- cups-1.4.4/data/Makefile.lspp 2008-11-12 19:30:57.000000000 +0000 ++++ cups-1.4.4/data/Makefile 2010-06-18 09:38:22.686104153 +0100 @@ -25,7 +25,10 @@ BANNERS = \ secret \ standard \ @@ -108,9 +108,9 @@ diff -up cups-1.4.3/data/Makefile.lspp cups-1.4.3/data/Makefile CHARMAPS = \ euc-cn.txt \ -diff -up cups-1.4.3/data/mls.lspp cups-1.4.3/data/mls ---- cups-1.4.3/data/mls.lspp 2010-03-31 14:08:57.000000000 +0200 -+++ cups-1.4.3/data/mls 2010-03-31 14:08:57.000000000 +0200 +diff -up cups-1.4.4/data/mls.lspp cups-1.4.4/data/mls +--- cups-1.4.4/data/mls.lspp 2010-06-18 09:38:22.686104153 +0100 ++++ cups-1.4.4/data/mls 2010-06-18 09:38:22.687104566 +0100 @@ -0,0 +1,261 @@ +%!PS-Adobe-3.0 +%%BoundingBox: 0 0 612 792 @@ -373,9 +373,9 @@ diff -up cups-1.4.3/data/mls.lspp cups-1.4.3/data/mls +% End of "$Id: mls_template,v 1.1 2005/06/27 18:44:46 colmo Exp $". +% +%%EOF -diff -up cups-1.4.3/data/selinux.lspp cups-1.4.3/data/selinux ---- cups-1.4.3/data/selinux.lspp 2010-03-31 14:08:57.000000000 +0200 -+++ cups-1.4.3/data/selinux 2010-03-31 14:08:57.000000000 +0200 +diff -up cups-1.4.4/data/selinux.lspp cups-1.4.4/data/selinux +--- cups-1.4.4/data/selinux.lspp 2010-06-18 09:38:22.687104566 +0100 ++++ cups-1.4.4/data/selinux 2010-06-18 09:38:22.687104566 +0100 @@ -0,0 +1,261 @@ +%!PS-Adobe-3.0 +%%BoundingBox: 0 0 612 792 @@ -638,9 +638,9 @@ diff -up cups-1.4.3/data/selinux.lspp cups-1.4.3/data/selinux +% End of "$Id: mls_template,v 1.1 2005/06/27 18:44:46 colmo Exp $". +% +%%EOF -diff -up cups-1.4.3/data/te.lspp cups-1.4.3/data/te ---- cups-1.4.3/data/te.lspp 2010-03-31 14:08:57.000000000 +0200 -+++ cups-1.4.3/data/te 2010-03-31 14:08:57.000000000 +0200 +diff -up cups-1.4.4/data/te.lspp cups-1.4.4/data/te +--- cups-1.4.4/data/te.lspp 2010-06-18 09:38:22.688105441 +0100 ++++ cups-1.4.4/data/te 2010-06-18 09:38:22.688105441 +0100 @@ -0,0 +1,261 @@ +%!PS-Adobe-3.0 +%%BoundingBox: 0 0 612 792 @@ -903,9 +903,9 @@ diff -up cups-1.4.3/data/te.lspp cups-1.4.3/data/te +% End of "$Id: mls_template,v 1.1 2005/06/27 18:44:46 colmo Exp $". +% +%%EOF -diff -up cups-1.4.3/filter/common.c.lspp cups-1.4.3/filter/common.c ---- cups-1.4.3/filter/common.c.lspp 2007-07-11 23:46:42.000000000 +0200 -+++ cups-1.4.3/filter/common.c 2010-03-31 14:08:57.000000000 +0200 +diff -up cups-1.4.4/filter/common.c.lspp cups-1.4.4/filter/common.c +--- cups-1.4.4/filter/common.c.lspp 2007-07-11 22:46:42.000000000 +0100 ++++ cups-1.4.4/filter/common.c 2010-06-18 09:38:22.689104687 +0100 @@ -30,6 +30,12 @@ * Include necessary headers... */ @@ -1074,10 +1074,10 @@ diff -up cups-1.4.3/filter/common.c.lspp cups-1.4.3/filter/common.c /* -diff -up cups-1.4.3/filter/pstops.c.lspp cups-1.4.3/filter/pstops.c ---- cups-1.4.3/filter/pstops.c.lspp 2010-03-31 14:08:57.000000000 +0200 -+++ cups-1.4.3/filter/pstops.c 2010-03-31 14:08:57.000000000 +0200 -@@ -3275,6 +3275,18 @@ write_label_prolog(pstops_doc_t *doc, /* +diff -up cups-1.4.4/filter/pstops.c.lspp cups-1.4.4/filter/pstops.c +--- cups-1.4.4/filter/pstops.c.lspp 2010-06-18 09:38:22.579980230 +0100 ++++ cups-1.4.4/filter/pstops.c 2010-06-18 09:38:22.693979174 +0100 +@@ -3314,6 +3314,18 @@ write_label_prolog(pstops_doc_t *doc, /* { const char *classification; /* CLASSIFICATION environment variable */ const char *ptr; /* Temporary string pointer */ @@ -1096,7 +1096,7 @@ diff -up cups-1.4.3/filter/pstops.c.lspp cups-1.4.3/filter/pstops.c /* -@@ -3297,6 +3309,124 @@ write_label_prolog(pstops_doc_t *doc, /* +@@ -3336,6 +3348,124 @@ write_label_prolog(pstops_doc_t *doc, /* return; } @@ -1221,7 +1221,7 @@ diff -up cups-1.4.3/filter/pstops.c.lspp cups-1.4.3/filter/pstops.c /* * Set the classification + page label string... */ -@@ -3375,7 +3505,10 @@ write_label_prolog(pstops_doc_t *doc, /* +@@ -3414,7 +3544,10 @@ write_label_prolog(pstops_doc_t *doc, /* doc_printf(doc, " %.0f moveto ESPpl show\n", top - 14.0); doc_puts(doc, "pop\n"); doc_puts(doc, "}bind put\n"); @@ -1232,9 +1232,9 @@ diff -up cups-1.4.3/filter/pstops.c.lspp cups-1.4.3/filter/pstops.c /* -diff -up cups-1.4.3/Makedefs.in.lspp cups-1.4.3/Makedefs.in ---- cups-1.4.3/Makedefs.in.lspp 2010-03-31 14:08:57.000000000 +0200 -+++ cups-1.4.3/Makedefs.in 2010-03-31 14:08:57.000000000 +0200 +diff -up cups-1.4.4/Makedefs.in.lspp cups-1.4.4/Makedefs.in +--- cups-1.4.4/Makedefs.in.lspp 2010-06-18 09:38:22.654104605 +0100 ++++ cups-1.4.4/Makedefs.in 2010-06-18 09:38:22.698980378 +0100 @@ -146,7 +146,7 @@ LIBCUPSORDER = @LIBCUPSORDER@ LIBCUPSIMAGEORDER = @LIBCUPSIMAGEORDER@ LINKCUPS = @LINKCUPS@ $(SSLLIBS) $(DNSSDLIBS) @@ -1253,9 +1253,9 @@ diff -up cups-1.4.3/Makedefs.in.lspp cups-1.4.3/Makedefs.in .SUFFIXES: .1 .1.gz .1m .1m.gz .3 .3.gz .5 .5.gz .7 .7.gz .8 .8.gz .a .c .cxx .h .man .o .32.o .64.o .gz .c.o: -diff -up cups-1.4.3/scheduler/client.c.lspp cups-1.4.3/scheduler/client.c ---- cups-1.4.3/scheduler/client.c.lspp 2009-07-15 01:02:05.000000000 +0200 -+++ cups-1.4.3/scheduler/client.c 2010-03-31 14:08:57.000000000 +0200 +diff -up cups-1.4.4/scheduler/client.c.lspp cups-1.4.4/scheduler/client.c +--- cups-1.4.4/scheduler/client.c.lspp 2010-04-23 19:56:34.000000000 +0100 ++++ cups-1.4.4/scheduler/client.c 2010-06-18 09:38:22.705980063 +0100 @@ -44,6 +44,7 @@ * valid_host() - Is the Host: field valid? * write_file() - Send a file via HTTP. @@ -1425,7 +1425,7 @@ diff -up cups-1.4.3/scheduler/client.c.lspp cups-1.4.3/scheduler/client.c } if (con->http.state != HTTP_POST_SEND) -@@ -4472,6 +4599,50 @@ make_certificate(cupsd_client_t *con) /* +@@ -4481,6 +4608,50 @@ make_certificate(cupsd_client_t *con) /* #endif /* HAVE_SSL */ @@ -1476,9 +1476,9 @@ diff -up cups-1.4.3/scheduler/client.c.lspp cups-1.4.3/scheduler/client.c /* * 'pipe_command()' - Pipe the output of a command to the remote client. */ -diff -up cups-1.4.3/scheduler/client.h.lspp cups-1.4.3/scheduler/client.h ---- cups-1.4.3/scheduler/client.h.lspp 2009-05-27 00:01:23.000000000 +0200 -+++ cups-1.4.3/scheduler/client.h 2010-03-31 14:08:57.000000000 +0200 +diff -up cups-1.4.4/scheduler/client.h.lspp cups-1.4.4/scheduler/client.h +--- cups-1.4.4/scheduler/client.h.lspp 2009-05-26 23:01:23.000000000 +0100 ++++ cups-1.4.4/scheduler/client.h 2010-06-18 09:38:22.711104323 +0100 @@ -18,6 +18,13 @@ #endif /* HAVE_AUTHORIZATION_H */ @@ -1514,9 +1514,9 @@ diff -up cups-1.4.3/scheduler/client.h.lspp cups-1.4.3/scheduler/client.h /* -diff -up cups-1.4.3/scheduler/conf.c.lspp cups-1.4.3/scheduler/conf.c ---- cups-1.4.3/scheduler/conf.c.lspp 2010-03-31 14:08:57.000000000 +0200 -+++ cups-1.4.3/scheduler/conf.c 2010-03-31 14:08:57.000000000 +0200 +diff -up cups-1.4.4/scheduler/conf.c.lspp cups-1.4.4/scheduler/conf.c +--- cups-1.4.4/scheduler/conf.c.lspp 2010-06-18 09:38:22.526979999 +0100 ++++ cups-1.4.4/scheduler/conf.c 2010-06-18 09:38:22.713979624 +0100 @@ -29,6 +29,7 @@ * read_configuration() - Read a configuration file. * read_location() - Read a definition. @@ -1535,7 +1535,7 @@ diff -up cups-1.4.3/scheduler/conf.c.lspp cups-1.4.3/scheduler/conf.c /* * Configuration variable structure... -@@ -174,6 +178,10 @@ static const cupsd_var_t variables[] = +@@ -172,6 +176,10 @@ static const cupsd_var_t variables[] = # if defined(HAVE_LIBSSL) || defined(HAVE_GNUTLS) { "ServerKey", &ServerKey, CUPSD_VARTYPE_PATHNAME }, # endif /* HAVE_LIBSSL || HAVE_GNUTLS */ @@ -1546,7 +1546,7 @@ diff -up cups-1.4.3/scheduler/conf.c.lspp cups-1.4.3/scheduler/conf.c #endif /* HAVE_SSL */ { "ServerName", &ServerName, CUPSD_VARTYPE_STRING }, { "ServerRoot", &ServerRoot, CUPSD_VARTYPE_PATHNAME }, -@@ -432,6 +440,9 @@ cupsdReadConfiguration(void) +@@ -430,6 +438,9 @@ cupsdReadConfiguration(void) const char *tmpdir; /* TMPDIR environment variable */ struct stat tmpinfo; /* Temporary directory info */ cupsd_policy_t *p; /* Policy */ @@ -1556,7 +1556,7 @@ diff -up cups-1.4.3/scheduler/conf.c.lspp cups-1.4.3/scheduler/conf.c /* -@@ -718,6 +729,25 @@ cupsdReadConfiguration(void) +@@ -713,6 +724,25 @@ cupsdReadConfiguration(void) RunUser = getuid(); @@ -1582,7 +1582,7 @@ diff -up cups-1.4.3/scheduler/conf.c.lspp cups-1.4.3/scheduler/conf.c cupsdLogMessage(CUPSD_LOG_INFO, "Remote access is %s.", RemotePort ? "enabled" : "disabled"); -@@ -1083,11 +1113,23 @@ cupsdReadConfiguration(void) +@@ -1081,11 +1111,23 @@ cupsdReadConfiguration(void) * Update classification setting as needed... */ @@ -1607,7 +1607,7 @@ diff -up cups-1.4.3/scheduler/conf.c.lspp cups-1.4.3/scheduler/conf.c /* * Check the MaxClients setting, and then allocate memory for it... -@@ -3646,6 +3688,18 @@ read_location(cups_file_t *fp, /* I - C +@@ -3644,6 +3686,18 @@ read_location(cups_file_t *fp, /* I - C return ((FatalErrors & CUPSD_FATAL_CONFIG) ? 0 : linenum); } @@ -1626,10 +1626,10 @@ diff -up cups-1.4.3/scheduler/conf.c.lspp cups-1.4.3/scheduler/conf.c /* * 'read_policy()' - Read a definition. -diff -up cups-1.4.3/scheduler/conf.h.lspp cups-1.4.3/scheduler/conf.h ---- cups-1.4.3/scheduler/conf.h.lspp 2010-03-31 14:08:57.000000000 +0200 -+++ cups-1.4.3/scheduler/conf.h 2010-03-31 14:08:57.000000000 +0200 -@@ -253,6 +253,12 @@ VAR char *ServerKey VALUE(NULL); +diff -up cups-1.4.4/scheduler/conf.h.lspp cups-1.4.4/scheduler/conf.h +--- cups-1.4.4/scheduler/conf.h.lspp 2010-06-18 09:38:22.527979881 +0100 ++++ cups-1.4.4/scheduler/conf.h 2010-06-18 09:38:22.715979172 +0100 +@@ -250,6 +250,12 @@ VAR char *ServerKey VALUE(NULL); VAR int SSLOptions VALUE(CUPSD_SSL_NONE); /* SSL/TLS options */ #endif /* HAVE_SSL */ @@ -1642,7 +1642,7 @@ diff -up cups-1.4.3/scheduler/conf.h.lspp cups-1.4.3/scheduler/conf.h #ifdef HAVE_LAUNCHD VAR int LaunchdTimeout VALUE(DEFAULT_KEEPALIVE); -@@ -271,6 +277,9 @@ VAR char *SystemGroupAuthKey VALUE(NULL +@@ -266,6 +272,9 @@ VAR char *SystemGroupAuthKey VALUE(NULL /* System group auth key */ #endif /* HAVE_AUTHORIZATION_H */ @@ -1652,9 +1652,9 @@ diff -up cups-1.4.3/scheduler/conf.h.lspp cups-1.4.3/scheduler/conf.h /* * Prototypes... -diff -up cups-1.4.3/scheduler/ipp.c.lspp cups-1.4.3/scheduler/ipp.c ---- cups-1.4.3/scheduler/ipp.c.lspp 2010-03-31 14:08:57.000000000 +0200 -+++ cups-1.4.3/scheduler/ipp.c 2010-03-31 14:11:37.000000000 +0200 +diff -up cups-1.4.4/scheduler/ipp.c.lspp cups-1.4.4/scheduler/ipp.c +--- cups-1.4.4/scheduler/ipp.c.lspp 2010-06-18 09:38:22.599103898 +0100 ++++ cups-1.4.4/scheduler/ipp.c 2010-06-18 09:39:08.308979874 +0100 @@ -41,6 +41,7 @@ * cancel_all_jobs() - Cancel all print jobs. * cancel_job() - Cancel a print job. @@ -1698,10 +1698,10 @@ diff -up cups-1.4.3/scheduler/ipp.c.lspp cups-1.4.3/scheduler/ipp.c static int check_quotas(cupsd_client_t *con, cupsd_printer_t *p); static ipp_attribute_t *copy_attribute(ipp_t *to, ipp_attribute_t *attr, int quickcopy); -@@ -1337,6 +1352,21 @@ add_job(cupsd_client_t *con, /* I - Cl - int kbytes; /* Size of print file */ - int i; /* Looping var */ - int lowerpagerange; /* Page range bound */ +@@ -1355,6 +1370,21 @@ add_job(cupsd_client_t *con, /* I - Cl + ipp_attribute_t *media_col, /* media-col attribute */ + *media_margin; /* media-*-margin attribute */ + ipp_t *unsup_col; /* media-col in unsupported response */ +#ifdef WITH_LSPP + char *audit_message; /* Audit message string */ + char *printerfile; /* device file pointed to by the printer */ @@ -1720,7 +1720,7 @@ diff -up cups-1.4.3/scheduler/ipp.c.lspp cups-1.4.3/scheduler/ipp.c cupsdLogMessage(CUPSD_LOG_DEBUG2, "add_job(%p[%d], %p(%s), %p(%s/%s))", -@@ -1550,6 +1580,104 @@ add_job(cupsd_client_t *con, /* I - Cl +@@ -1625,6 +1655,104 @@ add_job(cupsd_client_t *con, /* I - Cl ippAddString(con->request, IPP_TAG_JOB, IPP_TAG_NAME, "job-name", NULL, "Untitled"); @@ -1825,7 +1825,7 @@ diff -up cups-1.4.3/scheduler/ipp.c.lspp cups-1.4.3/scheduler/ipp.c if ((job = cupsdAddJob(priority, printer->name)) == NULL) { send_ipp_status(con, IPP_INTERNAL_ERROR, -@@ -1558,6 +1686,32 @@ add_job(cupsd_client_t *con, /* I - Cl +@@ -1633,6 +1761,32 @@ add_job(cupsd_client_t *con, /* I - Cl return (NULL); } @@ -1858,7 +1858,7 @@ diff -up cups-1.4.3/scheduler/ipp.c.lspp cups-1.4.3/scheduler/ipp.c job->dtype = printer->type & (CUPS_PRINTER_CLASS | CUPS_PRINTER_IMPLICIT | CUPS_PRINTER_REMOTE); job->attrs = con->request; -@@ -1763,6 +1917,29 @@ add_job(cupsd_client_t *con, /* I - Cl +@@ -1838,6 +1992,29 @@ add_job(cupsd_client_t *con, /* I - Cl attr->values[0].string.text = _cupsStrRetain(printer->job_sheets[0]); attr->values[1].string.text = _cupsStrRetain(printer->job_sheets[1]); } @@ -1888,7 +1888,7 @@ diff -up cups-1.4.3/scheduler/ipp.c.lspp cups-1.4.3/scheduler/ipp.c job->job_sheets = attr; -@@ -1793,6 +1970,9 @@ add_job(cupsd_client_t *con, /* I - Cl +@@ -1868,6 +2045,9 @@ add_job(cupsd_client_t *con, /* I - Cl "job-sheets=\"%s,none\", " "job-originating-user-name=\"%s\"", Classification, job->username); @@ -1898,7 +1898,7 @@ diff -up cups-1.4.3/scheduler/ipp.c.lspp cups-1.4.3/scheduler/ipp.c } else if (attr->num_values == 2 && strcmp(attr->values[0].string.text, -@@ -1811,6 +1991,9 @@ add_job(cupsd_client_t *con, /* I - Cl +@@ -1886,6 +2066,9 @@ add_job(cupsd_client_t *con, /* I - Cl "job-originating-user-name=\"%s\"", attr->values[0].string.text, attr->values[1].string.text, job->username); @@ -1908,7 +1908,7 @@ diff -up cups-1.4.3/scheduler/ipp.c.lspp cups-1.4.3/scheduler/ipp.c } else if (strcmp(attr->values[0].string.text, Classification) && strcmp(attr->values[0].string.text, "none") && -@@ -1831,6 +2014,9 @@ add_job(cupsd_client_t *con, /* I - Cl +@@ -1906,6 +2089,9 @@ add_job(cupsd_client_t *con, /* I - Cl "job-originating-user-name=\"%s\"", attr->values[0].string.text, attr->values[1].string.text, job->username); @@ -1918,7 +1918,7 @@ diff -up cups-1.4.3/scheduler/ipp.c.lspp cups-1.4.3/scheduler/ipp.c } } else if (strcmp(attr->values[0].string.text, Classification) && -@@ -1871,8 +2057,52 @@ add_job(cupsd_client_t *con, /* I - Cl +@@ -1946,8 +2132,52 @@ add_job(cupsd_client_t *con, /* I - Cl "job-sheets=\"%s\", " "job-originating-user-name=\"%s\"", Classification, job->username); @@ -1971,7 +1971,7 @@ diff -up cups-1.4.3/scheduler/ipp.c.lspp cups-1.4.3/scheduler/ipp.c /* * See if we need to add the starting sheet... -@@ -4210,6 +4440,103 @@ check_rss_recipient( +@@ -4300,6 +4530,103 @@ check_rss_recipient( } @@ -2075,7 +2075,7 @@ diff -up cups-1.4.3/scheduler/ipp.c.lspp cups-1.4.3/scheduler/ipp.c /* * 'check_quotas()' - Check quotas for a printer and user. */ -@@ -4761,6 +5088,15 @@ copy_banner(cupsd_client_t *con, /* I - +@@ -4853,6 +5180,15 @@ copy_banner(cupsd_client_t *con, /* I - char attrname[255], /* Name of attribute */ *s; /* Pointer into name */ ipp_attribute_t *attr; /* Attribute */ @@ -2091,7 +2091,7 @@ diff -up cups-1.4.3/scheduler/ipp.c.lspp cups-1.4.3/scheduler/ipp.c cupsdLogMessage(CUPSD_LOG_DEBUG2, -@@ -4796,6 +5132,82 @@ copy_banner(cupsd_client_t *con, /* I - +@@ -4888,6 +5224,82 @@ copy_banner(cupsd_client_t *con, /* I - fchmod(cupsFileNumber(out), 0640); fchown(cupsFileNumber(out), RunUser, Group); @@ -2174,7 +2174,7 @@ diff -up cups-1.4.3/scheduler/ipp.c.lspp cups-1.4.3/scheduler/ipp.c /* * Try the localized banner file under the subdirectory... -@@ -4890,6 +5302,24 @@ copy_banner(cupsd_client_t *con, /* I - +@@ -4982,6 +5394,24 @@ copy_banner(cupsd_client_t *con, /* I - else s = attrname; @@ -2199,7 +2199,7 @@ diff -up cups-1.4.3/scheduler/ipp.c.lspp cups-1.4.3/scheduler/ipp.c if (!strcmp(s, "printer-name")) { cupsFilePuts(out, job->dest); -@@ -6844,6 +7274,22 @@ get_job_attrs(cupsd_client_t *con, /* I +@@ -6940,6 +7370,22 @@ get_job_attrs(cupsd_client_t *con, /* I return; } @@ -2222,7 +2222,7 @@ diff -up cups-1.4.3/scheduler/ipp.c.lspp cups-1.4.3/scheduler/ipp.c /* * Copy attributes... */ -@@ -7074,6 +7520,11 @@ get_jobs(cupsd_client_t *con, /* I - C +@@ -7170,6 +7616,11 @@ get_jobs(cupsd_client_t *con, /* I - C if (username[0] && strcasecmp(username, job->username)) continue; @@ -2234,7 +2234,7 @@ diff -up cups-1.4.3/scheduler/ipp.c.lspp cups-1.4.3/scheduler/ipp.c if (count > 0) ippAddSeparator(con->response); -@@ -11460,6 +11911,11 @@ validate_user(cupsd_job_t *job, /* I +@@ -11572,6 +12023,11 @@ validate_user(cupsd_job_t *job, /* I strlcpy(username, get_username(con), userlen); @@ -2246,9 +2246,9 @@ diff -up cups-1.4.3/scheduler/ipp.c.lspp cups-1.4.3/scheduler/ipp.c /* * Check the username against the owner... */ -diff -up cups-1.4.3/scheduler/job.c.lspp cups-1.4.3/scheduler/job.c ---- cups-1.4.3/scheduler/job.c.lspp 2010-03-31 14:08:57.000000000 +0200 -+++ cups-1.4.3/scheduler/job.c 2010-03-31 14:08:57.000000000 +0200 +diff -up cups-1.4.4/scheduler/job.c.lspp cups-1.4.4/scheduler/job.c +--- cups-1.4.4/scheduler/job.c.lspp 2010-06-18 09:38:22.629104109 +0100 ++++ cups-1.4.4/scheduler/job.c 2010-06-18 09:38:22.734978722 +0100 @@ -66,6 +66,9 @@ * update_job_attrs() - Update the job-printer-* attributes. */ @@ -2495,7 +2495,7 @@ diff -up cups-1.4.3/scheduler/job.c.lspp cups-1.4.3/scheduler/job.c job->attrs->state = IPP_IDLE; if (ippWriteIO(fp, (ipp_iocb_t)cupsFileWrite, 1, NULL, -@@ -3177,6 +3349,18 @@ get_options(cupsd_job_t *job, /* I - Jo +@@ -3188,6 +3360,18 @@ get_options(cupsd_job_t *job, /* I - Jo banner_page) continue; @@ -2514,7 +2514,7 @@ diff -up cups-1.4.3/scheduler/job.c.lspp cups-1.4.3/scheduler/job.c /* * Otherwise add them to the list... */ -@@ -3849,6 +4033,19 @@ static void +@@ -3860,6 +4044,19 @@ static void start_job(cupsd_job_t *job, /* I - Job ID */ cupsd_printer_t *printer) /* I - Printer to print job */ { @@ -2534,7 +2534,7 @@ diff -up cups-1.4.3/scheduler/job.c.lspp cups-1.4.3/scheduler/job.c cupsdLogMessage(CUPSD_LOG_DEBUG2, "start_job(job=%p(%d), printer=%p(%s))", job, job->id, printer, printer->name); -@@ -3971,6 +4168,106 @@ start_job(cupsd_job_t *job, /* I - +@@ -3982,6 +4179,106 @@ start_job(cupsd_job_t *job, /* I - fcntl(job->side_pipes[1], F_SETFD, fcntl(job->side_pipes[1], F_GETFD) | FD_CLOEXEC); @@ -2641,9 +2641,9 @@ diff -up cups-1.4.3/scheduler/job.c.lspp cups-1.4.3/scheduler/job.c /* * Now start the first file in the job... */ -diff -up cups-1.4.3/scheduler/job.h.lspp cups-1.4.3/scheduler/job.h ---- cups-1.4.3/scheduler/job.h.lspp 2009-05-12 00:46:01.000000000 +0200 -+++ cups-1.4.3/scheduler/job.h 2010-03-31 14:08:57.000000000 +0200 +diff -up cups-1.4.4/scheduler/job.h.lspp cups-1.4.4/scheduler/job.h +--- cups-1.4.4/scheduler/job.h.lspp 2009-05-11 23:46:01.000000000 +0100 ++++ cups-1.4.4/scheduler/job.h 2010-06-18 09:38:22.734978722 +0100 @@ -13,6 +13,13 @@ * file is missing or damaged, see the license at "http://www.cups.org/". */ @@ -2669,11 +2669,11 @@ diff -up cups-1.4.3/scheduler/job.h.lspp cups-1.4.3/scheduler/job.h }; typedef struct cupsd_joblog_s /**** Job log message ****/ -diff -up cups-1.4.3/scheduler/main.c.lspp cups-1.4.3/scheduler/main.c ---- cups-1.4.3/scheduler/main.c.lspp 2010-03-31 14:08:57.000000000 +0200 -+++ cups-1.4.3/scheduler/main.c 2010-03-31 14:08:57.000000000 +0200 -@@ -35,6 +35,8 @@ - * usage() - Show scheduler usage. +diff -up cups-1.4.4/scheduler/main.c.lspp cups-1.4.4/scheduler/main.c +--- cups-1.4.4/scheduler/main.c.lspp 2010-06-18 09:38:22.574980424 +0100 ++++ cups-1.4.4/scheduler/main.c 2010-06-18 09:39:26.548103442 +0100 +@@ -37,6 +37,8 @@ + * usage() - Show scheduler usage. */ +/* (c) Copyright 2005-2006 Hewlett-Packard Development Company, L.P. */ @@ -2681,7 +2681,7 @@ diff -up cups-1.4.3/scheduler/main.c.lspp cups-1.4.3/scheduler/main.c /* * Include necessary headers... */ -@@ -73,6 +75,9 @@ +@@ -76,6 +78,9 @@ # include #endif /* __APPLE__ && HAVE_DLFCN_H */ @@ -2691,7 +2691,7 @@ diff -up cups-1.4.3/scheduler/main.c.lspp cups-1.4.3/scheduler/main.c /* * Local functions... -@@ -156,6 +161,9 @@ main(int argc, /* I - Number of comm +@@ -161,6 +166,9 @@ main(int argc, /* I - Number of comm int launchd_idle_exit; /* Idle exit on select timeout? */ #endif /* HAVE_LAUNCHD */ @@ -2701,7 +2701,7 @@ diff -up cups-1.4.3/scheduler/main.c.lspp cups-1.4.3/scheduler/main.c #ifdef HAVE_GETEUID -@@ -465,6 +473,25 @@ main(int argc, /* I - Number of comm +@@ -470,6 +478,25 @@ main(int argc, /* I - Number of comm #endif /* DEBUG */ } @@ -2727,7 +2727,7 @@ diff -up cups-1.4.3/scheduler/main.c.lspp cups-1.4.3/scheduler/main.c /* * Set the timezone info... */ -@@ -1235,6 +1262,11 @@ main(int argc, /* I - Number of comm +@@ -1214,6 +1241,11 @@ main(int argc, /* I - Number of comm cupsdStopSelect(); @@ -2739,10 +2739,10 @@ diff -up cups-1.4.3/scheduler/main.c.lspp cups-1.4.3/scheduler/main.c return (!stop_scheduler); } -diff -up cups-1.4.3/scheduler/printers.c.lspp cups-1.4.3/scheduler/printers.c ---- cups-1.4.3/scheduler/printers.c.lspp 2010-03-31 14:08:57.000000000 +0200 -+++ cups-1.4.3/scheduler/printers.c 2010-03-31 14:08:57.000000000 +0200 -@@ -58,6 +58,8 @@ +diff -up cups-1.4.4/scheduler/printers.c.lspp cups-1.4.4/scheduler/printers.c +--- cups-1.4.4/scheduler/printers.c.lspp 2010-06-18 09:38:22.556104527 +0100 ++++ cups-1.4.4/scheduler/printers.c 2010-06-18 09:38:22.740980299 +0100 +@@ -59,6 +59,8 @@ * write_xml_string() - Write a string with XML escaping. */ @@ -2751,7 +2751,7 @@ diff -up cups-1.4.3/scheduler/printers.c.lspp cups-1.4.3/scheduler/printers.c /* * Include necessary headers... */ -@@ -86,6 +88,10 @@ static void write_irix_state(cupsd_print +@@ -88,6 +90,10 @@ static void write_irix_state(cupsd_print #endif /* __sgi */ static void write_xml_string(cups_file_t *fp, const char *s); @@ -2762,7 +2762,7 @@ diff -up cups-1.4.3/scheduler/printers.c.lspp cups-1.4.3/scheduler/printers.c /* * 'cupsdAddPrinter()' - Add a printer to the system. -@@ -2173,6 +2179,13 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p) +@@ -2211,6 +2217,13 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p) "username", "password" }; @@ -2776,7 +2776,7 @@ diff -up cups-1.4.3/scheduler/printers.c.lspp cups-1.4.3/scheduler/printers.c DEBUG_printf(("cupsdSetPrinterAttrs: entering name = %s, type = %x\n", p->name, -@@ -2303,6 +2316,45 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p) +@@ -2341,6 +2354,45 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p) attr->values[1].string.text = _cupsStrAlloc(Classification ? Classification : p->job_sheets[1]); } @@ -2822,7 +2822,7 @@ diff -up cups-1.4.3/scheduler/printers.c.lspp cups-1.4.3/scheduler/printers.c } p->raw = 0; -@@ -4834,7 +4886,6 @@ write_irix_state(cupsd_printer_t *p) /* +@@ -5320,7 +5372,6 @@ write_irix_state(cupsd_printer_t *p) /* } #endif /* __sgi */ diff --git a/cups-page-label.patch b/cups-page-label.patch index 9aa3b09..518bc8e 100644 --- a/cups-page-label.patch +++ b/cups-page-label.patch @@ -1,6 +1,6 @@ -diff -up cups-1.4.1/filter/pstops.c.page-label cups-1.4.1/filter/pstops.c ---- cups-1.4.1/filter/pstops.c.page-label 2009-10-02 12:33:33.410719651 +0100 -+++ cups-1.4.1/filter/pstops.c 2009-10-02 12:34:11.399594180 +0100 +diff -up cups-1.4.4/filter/pstops.c.page-label cups-1.4.4/filter/pstops.c +--- cups-1.4.4/filter/pstops.c.page-label 2010-03-30 23:07:33.000000000 +0100 ++++ cups-1.4.4/filter/pstops.c 2010-06-18 09:36:18.239126341 +0100 @@ -108,6 +108,7 @@ typedef struct /**** Document informa int num_options; /* Number of document-wide options */ cups_option_t *options; /* Document-wide options */ @@ -9,7 +9,7 @@ diff -up cups-1.4.1/filter/pstops.c.page-label cups-1.4.1/filter/pstops.c saw_eof, /* Saw the %%EOF comment? */ slow_collate, /* Collate copies by hand? */ slow_duplex, /* Duplex pages slowly? */ -@@ -2048,7 +2049,7 @@ do_setup(pstops_doc_t *doc, /* I - Docu +@@ -2083,7 +2084,7 @@ do_setup(pstops_doc_t *doc, /* I - Docu * of the pages... */ @@ -18,7 +18,7 @@ diff -up cups-1.4.1/filter/pstops.c.page-label cups-1.4.1/filter/pstops.c write_label_prolog(doc, doc->page_label, PageBottom, PageWidth - PageLength + PageTop, PageLength); else -@@ -2056,7 +2057,30 @@ do_setup(pstops_doc_t *doc, /* I - Docu +@@ -2091,7 +2092,30 @@ do_setup(pstops_doc_t *doc, /* I - Docu PageLength); } else @@ -50,7 +50,7 @@ diff -up cups-1.4.1/filter/pstops.c.page-label cups-1.4.1/filter/pstops.c } -@@ -2141,7 +2165,7 @@ end_nup(pstops_doc_t *doc, /* I - Docum +@@ -2176,7 +2200,7 @@ end_nup(pstops_doc_t *doc, /* I - Docum case 1 : if (doc->use_ESPshowpage) { @@ -59,7 +59,7 @@ diff -up cups-1.4.1/filter/pstops.c.page-label cups-1.4.1/filter/pstops.c doc_puts(doc, "ESPshowpage\n"); } break; -@@ -2156,7 +2180,7 @@ end_nup(pstops_doc_t *doc, /* I - Docum +@@ -2191,7 +2215,7 @@ end_nup(pstops_doc_t *doc, /* I - Docum * Rotate the labels back to portrait... */ @@ -68,7 +68,7 @@ diff -up cups-1.4.1/filter/pstops.c.page-label cups-1.4.1/filter/pstops.c } else if (Orientation == 0) { -@@ -2182,7 +2206,7 @@ end_nup(pstops_doc_t *doc, /* I - Docum +@@ -2217,7 +2241,7 @@ end_nup(pstops_doc_t *doc, /* I - Docum default : if (is_last_page(number) && doc->use_ESPshowpage) { @@ -77,7 +77,7 @@ diff -up cups-1.4.1/filter/pstops.c.page-label cups-1.4.1/filter/pstops.c doc_puts(doc, "ESPshowpage\n"); } break; -@@ -2385,6 +2409,12 @@ set_pstops_options( +@@ -2420,6 +2444,12 @@ set_pstops_options( doc->new_bounding_box[3] = INT_MIN; /* @@ -87,6 +87,6 @@ diff -up cups-1.4.1/filter/pstops.c.page-label cups-1.4.1/filter/pstops.c + doc->orientation = Orientation; + + /* - * AP_FIRSTPAGE_InputSlot + * AP_FIRSTPAGE_* and the corresponding non-first-page options. */ diff --git a/cups-ricoh-deviceid-oid.patch b/cups-ricoh-deviceid-oid.patch new file mode 100644 index 0000000..6a5b6a9 --- /dev/null +++ b/cups-ricoh-deviceid-oid.patch @@ -0,0 +1,21 @@ +diff -up cups-1.4.3/backend/snmp.c.ricoh-deviceid-oid cups-1.4.3/backend/snmp.c +--- cups-1.4.3/backend/snmp.c.ricoh-deviceid-oid 2010-05-11 17:30:57.266120467 +0100 ++++ cups-1.4.3/backend/snmp.c 2010-05-11 17:31:16.267120141 +0100 +@@ -195,6 +195,7 @@ static const int LexmarkProductOID[] = { + static const int LexmarkProductOID2[] = { 1,3,6,1,4,1,674,10898,100,2,1,2,1,2,1,-1 }; + static const int LexmarkDeviceIdOID[] = { 1,3,6,1,4,1,641,2,1,2,1,3,1,-1 }; + static const int HPDeviceIdOID[] = { 1,3,6,1,4,1,11,2,3,9,1,1,7,0,-1 }; ++static const int RicohDeviceIdOID[] = { 1,3,6,1,4,1,367,3,2,1,1,1,11,0,-1 }; + static const int XeroxProductOID[] = { 1,3,6,1,4,1,128,2,1,3,1,2,0,-1 }; + static cups_array_t *DeviceURIs = NULL; + static int HostNameLookups = 0; +@@ -1002,6 +1003,9 @@ read_snmp_response(int fd) /* I - SNMP + packet.community, CUPS_ASN1_GET_REQUEST, + DEVICE_ID, LexmarkDeviceIdOID); + _cupsSNMPWrite(fd, &(packet.address), CUPS_SNMP_VERSION_1, ++ packet.community, CUPS_ASN1_GET_REQUEST, ++ DEVICE_ID, RicohDeviceIdOID); ++ _cupsSNMPWrite(fd, &(packet.address), CUPS_SNMP_VERSION_1, + packet.community, CUPS_ASN1_GET_REQUEST, + DEVICE_PRODUCT, XeroxProductOID); + _cupsSNMPWrite(fd, &(packet.address), CUPS_SNMP_VERSION_1, diff --git a/cups-str3399.patch b/cups-str3399.patch deleted file mode 100644 index e5b2000..0000000 --- a/cups-str3399.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff -up cups-1.4.2/scheduler/main.c.str3399 cups-1.4.2/scheduler/main.c ---- cups-1.4.2/scheduler/main.c.str3399 2010-03-02 11:04:28.968100478 +0000 -+++ cups-1.4.2/scheduler/main.c 2010-03-02 11:04:47.442226409 +0000 -@@ -1733,7 +1733,7 @@ process_children(void) - job->backend = -pid; - - if (status && status != SIGTERM && status != SIGKILL && -- job->status >= 0) -+ status != SIGPIPE && job->status >= 0) - { - /* - * An error occurred; save the exit status so we know to stop -@@ -1829,6 +1829,12 @@ process_children(void) - "PID %d (%s) was terminated normally with signal %d.", - pid, name, status); - } -+ else if (status == SIGPIPE) -+ { -+ cupsdLogMessage(CUPSD_LOG_DEBUG, -+ "PID %d (%s) did not catch or ignore signal %d.", -+ pid, name, status); -+ } - else if (status) - { - if (WIFEXITED(status)) diff --git a/cups-str3425p2.patch b/cups-str3425p2.patch deleted file mode 100644 index d4d7a5a..0000000 --- a/cups-str3425p2.patch +++ /dev/null @@ -1,49 +0,0 @@ -diff -up cups-1.4.3/scheduler/job.c.str3425p2 cups-1.4.3/scheduler/job.c ---- cups-1.4.3/scheduler/job.c.str3425p2 2010-06-01 17:16:46.000000000 +0200 -+++ cups-1.4.3/scheduler/job.c 2010-06-01 17:19:10.000000000 +0200 -@@ -2286,12 +2286,14 @@ cupsdSetJobState( - if (!cupsdLoadJob(job)) - return; - -- /* -- * Don't do anything if the state is unchanged... -- */ -- -- if (newstate == (oldstate = job->state_value)) -- return; -+ /* -+ * Don't do anything if the state is unchanged and we aren't purging the -+ * job... -+ */ -+ -+ oldstate = job->state_value; -+ if (newstate == oldstate && action != CUPSD_JOB_PURGE) -+ return; - - /* - * Stop any processes that are working on the current job... -@@ -2498,6 +2500,15 @@ cupsdSetJobState( - job->dirty = 1; - cupsdMarkDirty(CUPSD_DIRTY_JOBS); - } -+ else if (!job->printer) -+ { -+ /* -+ * Delete the job immediately if not actively printing... -+ */ -+ -+ cupsdDeleteJob(job, CUPSD_JOB_PURGE); -+ job = NULL; -+ } - break; - } - -@@ -2505,7 +2516,7 @@ cupsdSetJobState( - * Finalize the job immediately if we forced things... - */ - -- if (action >= CUPSD_JOB_FORCE && job->printer) -+ if (action >= CUPSD_JOB_FORCE && job && job->printer) - finalize_job(job, 0); - - /* diff --git a/cups-str3503.patch b/cups-str3503.patch deleted file mode 100644 index 334f483..0000000 --- a/cups-str3503.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up cups-1.4.3/cups/dest.c.str3503 cups-1.4.3/cups/dest.c ---- cups-1.4.3/cups/dest.c.str3503 2010-03-31 13:31:42.000000000 +0200 -+++ cups-1.4.3/cups/dest.c 2010-03-31 13:32:52.000000000 +0200 -@@ -553,7 +553,7 @@ cupsGetNamedDest(http_t *http, /* I - - if (!cups_get_sdests(http, op, name, 0, &dest)) - { -- if (op == CUPS_GET_DEFAULT || name) -+ if (op == CUPS_GET_DEFAULT || (name && !set_as_default)) - return (NULL); - - /* diff --git a/cups-str3505.patch b/cups-str3505.patch deleted file mode 100644 index 95b6918..0000000 --- a/cups-str3505.patch +++ /dev/null @@ -1,158 +0,0 @@ -diff -up cups-1.4.2/scheduler/classes.c.str3505 cups-1.4.2/scheduler/classes.c ---- cups-1.4.2/scheduler/classes.c.str3505 2009-10-07 19:16:09.000000000 +0100 -+++ cups-1.4.2/scheduler/classes.c 2010-02-23 11:43:06.033263862 +0000 -@@ -3,7 +3,7 @@ - * - * Printer class routines for the Common UNIX Printing System (CUPS). - * -- * Copyright 2007-2009 by Apple Inc. -+ * Copyright 2007-2010 by Apple Inc. - * Copyright 1997-2007 by Easy Software Products, all rights reserved. - * - * These coded instructions, statements, and computer programs are the -@@ -117,7 +117,7 @@ cupsdAddPrinterToClass( - * 'cupsdDeletePrinterFromClass()' - Delete a printer from a class. - */ - --void -+int /* O - 1 if class changed, 0 otherwise */ - cupsdDeletePrinterFromClass( - cupsd_printer_t *c, /* I - Class to delete from */ - cupsd_printer_t *p) /* I - Printer to delete */ -@@ -149,13 +149,15 @@ cupsdDeletePrinterFromClass( - (c->num_printers - i) * sizeof(cupsd_printer_t *)); - } - else -- return; -+ return (0); - - /* - * Update the IPP attributes (have to do this for member-names)... - */ - - cupsdSetPrinterAttrs(c); -+ -+ return (1); - } - - -@@ -163,10 +165,11 @@ cupsdDeletePrinterFromClass( - * 'cupsdDeletePrinterFromClasses()' - Delete a printer from all classes. - */ - --void -+int /* O - 1 if class changed, 0 otherwise */ - cupsdDeletePrinterFromClasses( - cupsd_printer_t *p) /* I - Printer to delete */ - { -+ int changed = 0; /* Any class changed? */ - cupsd_printer_t *c; /* Pointer to current class */ - - -@@ -179,7 +182,7 @@ cupsdDeletePrinterFromClasses( - c; - c = (cupsd_printer_t *)cupsArrayNext(Printers)) - if (c->type & (CUPS_PRINTER_CLASS | CUPS_PRINTER_IMPLICIT)) -- cupsdDeletePrinterFromClass(c, p); -+ changed |= cupsdDeletePrinterFromClass(c, p); - - /* - * Then clean out any empty implicit classes... -@@ -193,7 +196,10 @@ cupsdDeletePrinterFromClasses( - cupsdLogMessage(CUPSD_LOG_DEBUG, "Deleting implicit class \"%s\"...", - c->name); - cupsdDeletePrinter(c, 0); -+ changed = 1; - } -+ -+ return (changed); - } - - -diff -up cups-1.4.2/scheduler/classes.h.str3505 cups-1.4.2/scheduler/classes.h ---- cups-1.4.2/scheduler/classes.h.str3505 2008-09-19 21:03:36.000000000 +0100 -+++ cups-1.4.2/scheduler/classes.h 2010-02-23 11:43:06.012262825 +0000 -@@ -3,7 +3,7 @@ - * - * Printer class definitions for the Common UNIX Printing System (CUPS). - * -- * Copyright 2007-2008 by Apple Inc. -+ * Copyright 2007-2010 by Apple Inc. - * Copyright 1997-2005 by Easy Software Products, all rights reserved. - * - * These coded instructions, statements, and computer programs are the -@@ -21,9 +21,9 @@ - extern cupsd_printer_t *cupsdAddClass(const char *name); - extern void cupsdAddPrinterToClass(cupsd_printer_t *c, - cupsd_printer_t *p); --extern void cupsdDeletePrinterFromClass(cupsd_printer_t *c, -+extern int cupsdDeletePrinterFromClass(cupsd_printer_t *c, - cupsd_printer_t *p); --extern void cupsdDeletePrinterFromClasses(cupsd_printer_t *p); -+extern int cupsdDeletePrinterFromClasses(cupsd_printer_t *p); - extern cupsd_printer_t *cupsdFindAvailablePrinter(const char *name); - extern cupsd_printer_t *cupsdFindClass(const char *name); - extern void cupsdLoadAllClasses(void); -diff -up cups-1.4.2/scheduler/ipp.c.str3505 cups-1.4.2/scheduler/ipp.c ---- cups-1.4.2/scheduler/ipp.c.str3505 2010-02-23 11:42:12.713386792 +0000 -+++ cups-1.4.2/scheduler/ipp.c 2010-02-23 11:43:06.025262343 +0000 -@@ -6451,7 +6451,9 @@ delete_printer(cupsd_client_t *con, /* - cupsdLogMessage(CUPSD_LOG_INFO, "Printer \"%s\" deleted by \"%s\".", - printer->name, get_username(con)); - -- cupsdDeletePrinter(printer, 0); -+ if (cupsdDeletePrinter(printer, 0)) -+ cupsdMarkDirty(CUPSD_DIRTY_CLASSES); -+ - cupsdMarkDirty(CUPSD_DIRTY_PRINTERS); - } - -diff -up cups-1.4.2/scheduler/printers.c.str3505 cups-1.4.2/scheduler/printers.c ---- cups-1.4.2/scheduler/printers.c.str3505 2010-02-23 11:42:12.223386167 +0000 -+++ cups-1.4.2/scheduler/printers.c 2010-02-23 11:43:06.030262135 +0000 -@@ -657,12 +657,13 @@ cupsdDeleteAllPrinters(void) - * 'cupsdDeletePrinter()' - Delete a printer from the system. - */ - --void -+int /* O - 1 if classes affected, 0 otherwise */ - cupsdDeletePrinter( - cupsd_printer_t *p, /* I - Printer to delete */ - int update) /* I - Update printers.conf? */ - { -- int i; /* Looping var */ -+ int i, /* Looping var */ -+ changed = 0; /* Class changed? */ - #ifdef __sgi - char filename[1024]; /* Interface script filename */ - #endif /* __sgi */ -@@ -773,7 +774,7 @@ cupsdDeletePrinter( - - if (!(p->type & CUPS_PRINTER_IMPLICIT)) - { -- cupsdDeletePrinterFromClasses(p); -+ changed = cupsdDeletePrinterFromClasses(p); - - /* - * Deregister from any browse protocols... -@@ -854,6 +855,8 @@ cupsdDeletePrinter( - */ - - cupsArrayRestore(Printers); -+ -+ return (changed); - } - - -diff -up cups-1.4.2/scheduler/printers.h.str3505 cups-1.4.2/scheduler/printers.h ---- cups-1.4.2/scheduler/printers.h.str3505 2009-06-25 18:07:26.000000000 +0100 -+++ cups-1.4.2/scheduler/printers.h 2010-02-23 11:43:06.032262357 +0000 -@@ -141,7 +141,7 @@ extern void cupsdAddPrinterUser(cupsd_p - const char *username); - extern void cupsdCreateCommonData(void); - extern void cupsdDeleteAllPrinters(void); --extern void cupsdDeletePrinter(cupsd_printer_t *p, int update); -+extern int cupsdDeletePrinter(cupsd_printer_t *p, int update); - extern cupsd_printer_t *cupsdFindDest(const char *name); - extern cupsd_printer_t *cupsdFindPrinter(const char *name); - extern cupsd_quota_t *cupsdFindQuota(cupsd_printer_t *p, diff --git a/cups-str3541.patch b/cups-str3541.patch deleted file mode 100644 index 668ce34..0000000 --- a/cups-str3541.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up cups-1.4.3/systemv/lpstat.c.str3541 cups-1.4.3/systemv/lpstat.c ---- cups-1.4.3/systemv/lpstat.c.str3541 2009-12-15 23:40:37.000000000 +0100 -+++ cups-1.4.3/systemv/lpstat.c 2010-04-16 12:56:04.000000000 +0200 -@@ -1423,7 +1423,7 @@ show_jobs(const char *dests, /* I - Des - - rank ++; - -- if (match_list(dests, dest) || match_list(users, username)) -+ if (match_list(dests, dest) && match_list(users, username)) - { - jobdate = localtime(&jobtime); - snprintf(temp, sizeof(temp), "%s-%d", dest, jobid); diff --git a/cups.spec b/cups.spec index 767cacf..c8ad672 100644 --- a/cups.spec +++ b/cups.spec @@ -7,23 +7,33 @@ Summary: Common Unix Printing System Name: cups -Version: 1.4.3 -Release: 8%{?dist} +Version: 1.4.4 +Release: 1%{?dist} License: GPLv2 Group: System Environment/Daemons Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2 +# Our initscript Source1: cups.init +# Pixmap for desktop file Source2: cupsprinter.png +# udev rules for libusb devices Source3: cups-libusb.rules +# LSPP-required ps->pdf filter Source4: pstopdf +# xinetd config file for cups-lpd service Source5: cups-lpd -Source6: pstoraster -Source7: pstoraster.convs -Source8: cups.logrotate -Source9: ncp.backend -Source10: cups.cron -Source11: textonly.filter -Source12: textonly.ppd +# Logrotate configuration +Source6: cups.logrotate +# Backend for NCP protocol +Source7: ncp.backend +# Cron-based tmpwatch for /var/spool/cups/tmp +Source8: cups.cron +# Filter and PPD for textonly printing +Source9: textonly.filter +Source10: textonly.ppd +# pstoraster filter from ghostscript. +Source11: pstoraster +Source12: pstoraster.convs Patch1: cups-no-gzip-man.patch Patch2: cups-1.1.16-system-auth.patch Patch3: cups-multilib.patch @@ -49,22 +59,18 @@ Patch22: cups-uri-compat.patch Patch23: cups-cups-get-classes.patch Patch24: cups-avahi.patch Patch25: cups-str3382.patch -Patch26: cups-str3503.patch -Patch27: cups-str3399.patch -Patch28: cups-gnutls-gcrypt-threads.patch Patch29: cups-0755.patch Patch30: cups-EAI_AGAIN.patch -Patch31: cups-str3505.patch -Patch32: cups-str3541.patch +Patch31: cups-hostnamelookups.patch Patch33: cups-snmp-quirks.patch -Patch34: cups-hostnamelookups.patch -Patch35: cups-texttops-rotate-page.patch -Patch36: cups-str3425p2.patch +Patch34: cups-hp-deviceid-oid.patch +Patch35: cups-dnssd-deviceid.patch +Patch36: cups-ricoh-deviceid-oid.patch +Patch37: cups-texttops-rotate-page.patch Patch100: cups-lspp.patch ## SECURITY PATCHES: -Patch200: cups-CVE-2010-0302.patch Epoch: 1 Url: http://www.cups.org/ @@ -100,6 +106,9 @@ BuildRequires: krb5-devel BuildRequires: avahi-devel BuildRequires: poppler-utils +# Make sure we get postscriptdriver tags. +BuildRequires: pycups + %if %lspp BuildRequires: libselinux-devel >= 1.23 BuildRequires: audit-libs-devel >= 1.1 @@ -127,6 +136,9 @@ Requires: ghostscript Requires: udev Requires: acl +# Make sure we have some filters for converting to raster format. +Requires: ghostscript-cups + %package devel Summary: Common Unix Printing System - development environment Group: Development/Libraries @@ -183,60 +195,92 @@ natively, without needing the lp/lpr commands. %description lpd The Common UNIX Printing System provides a portable printing layer for -UNIX® operating systems. This is the package that provices standard +UNIX® operating systems. This is the package that provides standard lpd emulation. %description php The Common UNIX Printing System provides a portable printing layer for -UNIX® operating systems. This is the package that provices a PHP +UNIX® operating systems. This is the package that provides a PHP module. %prep %setup -q +# Don't gzip man pages in the Makefile, let rpmbuild do it. %patch1 -p1 -b .no-gzip-man +# Use the system pam configuration. %patch2 -p1 -b .system-auth +# Prevent multilib conflict in cups-config script. %patch3 -p1 -b .multilib +# Fix compilation of serial backend. %patch4 -p1 -b .serial +# Ignore rpm save/new files in the banners directory. %patch5 -p1 -b .banners +# Use compatibility fallback path for ServerBin. %patch6 -p1 -b .serverbin-compat +# Don't export SSLLIBS to cups-config. %patch7 -p1 -b .no-export-ssllibs +# Allow file-based usb device URIs. %patch8 -p1 -b .direct-usb +# Add --help option to lpr. %patch9 -p1 -b .lpr-help +# Fix compilation of peer credentials support. %patch10 -p1 -b .peercred +# Maintain a cupsd.pid file. %patch11 -p1 -b .pid +# Fix orientation of page labels. %patch12 -p1 -b .page-label +# Fix implementation of com.redhat.PrinterSpooler D-Bus object. %patch13 -p1 -b .eggcups +# More sophisticated implementation of cupsGetPassword than getpass. %patch14 -p1 -b .getpass +# Increase driverd timeout to 70s to accommodate foomatic. %patch15 -p1 -b .driverd-timeout +# Only enforce maximum PPD line length when in strict mode. %patch16 -p1 -b .strict-ppd-line-length +# Re-open the log if it has been logrotated under us. %patch17 -p1 -b .logrotate +# Support for errno==ENOSPACE-based USB paper-out reporting. %patch18 -p1 -b .usb-paperout +# Simplify the DNSSD parts so they can build using the compat library. %patch19 -p1 -b .build +# Re-initialise the resolver on failure in httpAddrGetList(). %patch20 -p1 -b .res_init +# Log extra debugging information if no filters are available. %patch21 -p1 -b .filter-debug +# Allow the usb backend to understand old-style URI formats. %patch22 -p1 -b .uri-compat +# Fix support for older CUPS servers in cupsGetDests. %patch23 -p1 -b .cups-get-classes +# Avahi support in the dnssd backend. %patch24 -p1 -b .avahi +# Fix temporary filename creation. %patch25 -p1 -b .str3382 -%patch26 -p1 -b .str3503 -%patch27 -p1 -b .str3399 -#%patch28 -p1 -b .gnutls-gcrypt-threads +# Use mode 0755 for binaries and libraries where appropriate. %patch29 -p1 -b .0755 +# Re-initialise the resolver on failure in httpAddrLookup(). %patch30 -p1 -b .EAI_AGAIN -%patch31 -p1 -b .str3505 -%patch32 -p1 -b .str3541 +# Use numeric addresses for interfaces unless HostNameLookups are +# turned on (bug #583054). +%patch31 -p1 -b .hostnamelookups +# Handle SNMP supply level quirks (bug #581825). %patch33 -p1 -b .snmp-quirks -%patch34 -p1 -b .hostnamelookups -%patch35 -p1 -b .texttops-rotate-page -%patch36 -p1 -b .str3425p2 +# Add an SNMP query for HP's device ID OID (STR #3552). +%patch34 -p1 -b .hp-deviceid-oid +# Mark DNS-SD Device IDs that have been guessed at with "FZY:1;". +%patch35 -p1 -b .dnssd-deviceid +# Add an SNMP query for Ricoh's device ID OID (STR #3552). +%patch36 -p1 -b .ricoh-deviceid-oid +# Adjust texttops output to be in natural orientation (STR #3563). +# This fixes page-label orientation when texttops is used in the +# filter chain (bug #572338). +%patch37 -p1 -b .texttops-rotate-page %if %lspp +# LSPP support. %patch100 -p1 -b .lspp %endif # SECURITY PATCHES: -%patch200 -p1 -b .CVE-2010-0302 - sed -i -e '1iMaxLogSize 0' conf/cupsd.conf.in @@ -304,11 +348,11 @@ popd mkdir -p $RPM_BUILD_ROOT%{_datadir}/pixmaps $RPM_BUILD_ROOT%{_sysconfdir}/X11/sysconfig $RPM_BUILD_ROOT%{_sysconfdir}/X11/applnk/System $RPM_BUILD_ROOT%{_sysconfdir}/xinetd.d $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d $RPM_BUILD_ROOT%{_sysconfdir}/cron.daily install -c -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/pixmaps install -c -m 644 cups-lpd.real $RPM_BUILD_ROOT%{_sysconfdir}/xinetd.d/cups-lpd -install -c -m 644 %{SOURCE8} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/cups -install -c -m 755 %{SOURCE9} $RPM_BUILD_ROOT%{cups_serverbin}/backend/ncp -install -c -m 755 %{SOURCE10} $RPM_BUILD_ROOT%{_sysconfdir}/cron.daily/cups -install -c -m 755 %{SOURCE11} $RPM_BUILD_ROOT%{cups_serverbin}/filter/textonly -install -c -m 644 %{SOURCE12} $RPM_BUILD_ROOT%{_datadir}/cups/model/textonly.ppd +install -c -m 644 %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/cups +install -c -m 755 %{SOURCE7} $RPM_BUILD_ROOT%{cups_serverbin}/backend/ncp +install -c -m 755 %{SOURCE8} $RPM_BUILD_ROOT%{_sysconfdir}/cron.daily/cups +install -c -m 755 %{SOURCE9} $RPM_BUILD_ROOT%{cups_serverbin}/filter/textonly +install -c -m 644 %{SOURCE10} $RPM_BUILD_ROOT%{_datadir}/cups/model/textonly.ppd # Ship pstopdf for LSPP systems to deal with malicious postscript %if %lspp @@ -316,8 +360,8 @@ install -c -m 755 %{SOURCE4} $RPM_BUILD_ROOT%{cups_serverbin}/filter %endif # Ship pstoraster (bug #69573). -install -c -m 755 %{SOURCE6} $RPM_BUILD_ROOT%{cups_serverbin}/filter -install -c -m 644 %{SOURCE7} $RPM_BUILD_ROOT%{_sysconfdir}/cups +install -c -m 755 %{SOURCE11} $RPM_BUILD_ROOT%{cups_serverbin}/filter +install -c -m 644 %{SOURCE12} $RPM_BUILD_ROOT%{_sysconfdir}/cups # Ship a printers.conf file, and a client.conf file. That way, they get # their SELinux file contexts set correctly. @@ -532,6 +576,20 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog +* Fri Jun 18 2010 Tim Waugh 1:1.4.4-1 +- 1.4.4. Fixes several security vulnerabilities (bug #605399): + CVE-2010-0540, CVE-2010-0542, CVE-2010-1748. No longer need str3503, + str3399, str3505, str3541, str3425p2 or CVE-2010-0302 patches. +- Fix lpd provides. +- Added comments for all sources and patches. +- Reset status after successful ipp job (bug #548219, STR #3460). +- Install udev rules in correct place (bug #530378). +- Removed unapplied gnutls-gcrypt-threads patch. Fixed typos in + descriptions for lpd and php sub-packages. +- Add an SNMP query for Ricoh's device ID OID (STR #3552). +- Mark DNS-SD Device IDs that have been guessed at with "FZY:1;". +- Add an SNMP query for HP's device ID OID (STR #3552). + * Wed Jun 9 2010 Tim Waugh 1:1.4.3-8 - Use upstream method of handling SNMP quirks in PPDs (STR #3551, bug #581825). diff --git a/sources b/sources index 4448a10..0b9781c 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ e70b1c3f60143d7310c1d74c111a21ab cups-1.4.3-source.tar.bz2 +8776403ad60fea9e85eab9c04d88560d cups-1.4.4-source.tar.bz2 From bf1ed416fd6c78038d9f55a3bde3782313aae220 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Fri, 18 Jun 2010 10:51:07 +0000 Subject: [PATCH 095/110] - 1.4.4. Fixes several security vulnerabilities (bug #605399): CVE-2010-0540, CVE-2010-0542, CVE-2010-1748. No longer need str3503, str3399, str3505, str3541, str3425p2 or CVE-2010-0302 patches. --- .cvsignore | 1 + cups-CVE-2010-0302.patch | 23 ----- cups-getpass.patch | 19 ++-- cups-lspp.patch | 210 +++++++++++++++++++-------------------- cups-page-label.patch | 20 ++-- cups-str3399.patch | 25 ----- cups-str3425p2.patch | 49 --------- cups-str3503.patch | 12 --- cups-str3505.patch | 158 ----------------------------- cups-str3541.patch | 12 --- cups.spec | 28 ++---- sources | 1 + 12 files changed, 134 insertions(+), 424 deletions(-) delete mode 100644 cups-CVE-2010-0302.patch delete mode 100644 cups-str3399.patch delete mode 100644 cups-str3425p2.patch delete mode 100644 cups-str3503.patch delete mode 100644 cups-str3505.patch delete mode 100644 cups-str3541.patch diff --git a/.cvsignore b/.cvsignore index f3cee3a..469e81d 100644 --- a/.cvsignore +++ b/.cvsignore @@ -40,3 +40,4 @@ cups-1.4b2-svn8404-source.tar.bz2 cups-1.4rc1-source.tar.bz2 cups-1.4.0-source.tar.bz2 cups-1.4.3-source.tar.bz2 +cups-1.4.4-source.tar.bz2 diff --git a/cups-CVE-2010-0302.patch b/cups-CVE-2010-0302.patch deleted file mode 100644 index da108e1..0000000 --- a/cups-CVE-2010-0302.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff -up cups-1.4.3/scheduler/select.c.CVE-2010-0302 cups-1.4.3/scheduler/select.c ---- cups-1.4.3/scheduler/select.c.CVE-2010-0302 2010-01-14 23:40:19.000000000 +0100 -+++ cups-1.4.3/scheduler/select.c 2010-03-31 13:54:30.000000000 +0200 -@@ -454,7 +454,8 @@ cupsdDoSelect(long timeout) /* I - Time - if (fdptr->read_cb && event->filter == EVFILT_READ) - (*(fdptr->read_cb))(fdptr->data); - -- if (fdptr->use > 1 && fdptr->write_cb && event->filter == EVFILT_WRITE) -+ if (fdptr->use > 1 && fdptr->write_cb && event->filter == EVFILT_WRITE && -+ !cupsArrayFind(cupsd_inactive_fds, fdptr)) - (*(fdptr->write_cb))(fdptr->data); - - release_fd(fdptr); -@@ -500,7 +501,8 @@ cupsdDoSelect(long timeout) /* I - Time - (*(fdptr->read_cb))(fdptr->data); - - if (fdptr->use > 1 && fdptr->write_cb && -- (event->events & (EPOLLOUT | EPOLLERR | EPOLLHUP))) -+ (event->events & (EPOLLOUT | EPOLLERR | EPOLLHUP)) && -+ !cupsArrayFind(cupsd_inactive_fds, fdptr)) - (*(fdptr->write_cb))(fdptr->data); - - release_fd(fdptr); diff --git a/cups-getpass.patch b/cups-getpass.patch index 577d43a..1c1da96 100644 --- a/cups-getpass.patch +++ b/cups-getpass.patch @@ -1,6 +1,7 @@ ---- cups-1.2.6/cups/usersys.c.getpass 2006-08-29 16:51:19.000000000 +0100 -+++ cups-1.2.6/cups/usersys.c 2006-11-13 16:19:32.000000000 +0000 -@@ -46,6 +46,8 @@ +diff -up cups-1.4.4/cups/usersys.c.getpass cups-1.4.4/cups/usersys.c +--- cups-1.4.4/cups/usersys.c.getpass 2010-03-30 23:07:33.000000000 +0100 ++++ cups-1.4.4/cups/usersys.c 2010-06-18 09:38:08.368096897 +0100 +@@ -41,6 +41,8 @@ #include "globals.h" #include #include @@ -8,11 +9,11 @@ +#include #ifdef WIN32 # include - #endif /* WIN32 */ -@@ -455,7 +457,29 @@ - const char * /* O - Password */ - _cupsGetPassword(const char *prompt) /* I - Prompt string */ - { + #else +@@ -406,7 +408,29 @@ _cupsGetPassword(const char *prompt) /* + * Use the standard getpass function to get a password from the console. + */ + - return (getpass(prompt)); + static char password[100]; + struct termios oldtio, newtio; @@ -37,6 +38,6 @@ + else + password[0] ='\0'; + return password; - } #endif /* WIN32 */ + } diff --git a/cups-lspp.patch b/cups-lspp.patch index 3e7a00f..c1bf5f2 100644 --- a/cups-lspp.patch +++ b/cups-lspp.patch @@ -1,7 +1,7 @@ -diff -up cups-1.4.3/config.h.in.lspp cups-1.4.3/config.h.in ---- cups-1.4.3/config.h.in.lspp 2010-03-31 14:08:57.000000000 +0200 -+++ cups-1.4.3/config.h.in 2010-03-31 14:08:57.000000000 +0200 -@@ -633,6 +633,13 @@ +diff -up cups-1.4.4/config.h.in.lspp cups-1.4.4/config.h.in +--- cups-1.4.4/config.h.in.lspp 2010-06-18 09:38:22.645104842 +0100 ++++ cups-1.4.4/config.h.in 2010-06-18 09:38:22.681104733 +0100 +@@ -646,6 +646,13 @@ #undef HAVE_TCPD_H @@ -15,9 +15,9 @@ diff -up cups-1.4.3/config.h.in.lspp cups-1.4.3/config.h.in #endif /* !_CUPS_CONFIG_H_ */ /* -diff -up cups-1.4.3/config-scripts/cups-lspp.m4.lspp cups-1.4.3/config-scripts/cups-lspp.m4 ---- cups-1.4.3/config-scripts/cups-lspp.m4.lspp 2010-03-31 14:08:57.000000000 +0200 -+++ cups-1.4.3/config-scripts/cups-lspp.m4 2010-03-31 14:08:57.000000000 +0200 +diff -up cups-1.4.4/config-scripts/cups-lspp.m4.lspp cups-1.4.4/config-scripts/cups-lspp.m4 +--- cups-1.4.4/config-scripts/cups-lspp.m4.lspp 2010-06-18 09:38:22.681104733 +0100 ++++ cups-1.4.4/config-scripts/cups-lspp.m4 2010-06-18 09:38:22.681104733 +0100 @@ -0,0 +1,36 @@ +dnl +dnl LSPP code for the Common UNIX Printing System (CUPS). @@ -55,9 +55,9 @@ diff -up cups-1.4.3/config-scripts/cups-lspp.m4.lspp cups-1.4.3/config-scripts/c + ;; + esac +fi -diff -up cups-1.4.3/configure.in.lspp cups-1.4.3/configure.in ---- cups-1.4.3/configure.in.lspp 2008-11-14 20:32:22.000000000 +0100 -+++ cups-1.4.3/configure.in 2010-03-31 14:08:57.000000000 +0200 +diff -up cups-1.4.4/configure.in.lspp cups-1.4.4/configure.in +--- cups-1.4.4/configure.in.lspp 2010-06-16 01:39:16.000000000 +0100 ++++ cups-1.4.4/configure.in 2010-06-18 09:38:22.682104565 +0100 @@ -42,6 +42,8 @@ sinclude(config-scripts/cups-pap.m4) sinclude(config-scripts/cups-pdf.m4) sinclude(config-scripts/cups-scripting.m4) @@ -67,9 +67,9 @@ diff -up cups-1.4.3/configure.in.lspp cups-1.4.3/configure.in INSTALL_LANGUAGES="" UNINSTALL_LANGUAGES="" LANGFILES="" -diff -up cups-1.4.3/cups/cups.h.lspp cups-1.4.3/cups/cups.h ---- cups-1.4.3/cups/cups.h.lspp 2009-11-16 18:11:56.000000000 +0100 -+++ cups-1.4.3/cups/cups.h 2010-03-31 14:08:57.000000000 +0200 +diff -up cups-1.4.4/cups/cups.h.lspp cups-1.4.4/cups/cups.h +--- cups-1.4.4/cups/cups.h.lspp 2010-04-23 19:56:34.000000000 +0100 ++++ cups-1.4.4/cups/cups.h 2010-06-18 09:38:22.682104565 +0100 @@ -15,6 +15,9 @@ * This file is subject to the Apple OS-Developed Software exception. */ @@ -80,7 +80,7 @@ diff -up cups-1.4.3/cups/cups.h.lspp cups-1.4.3/cups/cups.h #ifndef _CUPS_CUPS_H_ # define _CUPS_CUPS_H_ -@@ -84,6 +87,12 @@ extern "C" { +@@ -86,6 +89,12 @@ extern "C" { # define CUPS_WHICHJOBS_COMPLETED 1 @@ -93,9 +93,9 @@ diff -up cups-1.4.3/cups/cups.h.lspp cups-1.4.3/cups/cups.h /* * Types and structures... */ -diff -up cups-1.4.3/data/Makefile.lspp cups-1.4.3/data/Makefile ---- cups-1.4.3/data/Makefile.lspp 2008-11-12 20:30:57.000000000 +0100 -+++ cups-1.4.3/data/Makefile 2010-03-31 14:08:57.000000000 +0200 +diff -up cups-1.4.4/data/Makefile.lspp cups-1.4.4/data/Makefile +--- cups-1.4.4/data/Makefile.lspp 2008-11-12 19:30:57.000000000 +0000 ++++ cups-1.4.4/data/Makefile 2010-06-18 09:38:22.686104153 +0100 @@ -25,7 +25,10 @@ BANNERS = \ secret \ standard \ @@ -108,9 +108,9 @@ diff -up cups-1.4.3/data/Makefile.lspp cups-1.4.3/data/Makefile CHARMAPS = \ euc-cn.txt \ -diff -up cups-1.4.3/data/mls.lspp cups-1.4.3/data/mls ---- cups-1.4.3/data/mls.lspp 2010-03-31 14:08:57.000000000 +0200 -+++ cups-1.4.3/data/mls 2010-03-31 14:08:57.000000000 +0200 +diff -up cups-1.4.4/data/mls.lspp cups-1.4.4/data/mls +--- cups-1.4.4/data/mls.lspp 2010-06-18 09:38:22.686104153 +0100 ++++ cups-1.4.4/data/mls 2010-06-18 09:38:22.687104566 +0100 @@ -0,0 +1,261 @@ +%!PS-Adobe-3.0 +%%BoundingBox: 0 0 612 792 @@ -373,9 +373,9 @@ diff -up cups-1.4.3/data/mls.lspp cups-1.4.3/data/mls +% End of "$Id: mls_template,v 1.1 2005/06/27 18:44:46 colmo Exp $". +% +%%EOF -diff -up cups-1.4.3/data/selinux.lspp cups-1.4.3/data/selinux ---- cups-1.4.3/data/selinux.lspp 2010-03-31 14:08:57.000000000 +0200 -+++ cups-1.4.3/data/selinux 2010-03-31 14:08:57.000000000 +0200 +diff -up cups-1.4.4/data/selinux.lspp cups-1.4.4/data/selinux +--- cups-1.4.4/data/selinux.lspp 2010-06-18 09:38:22.687104566 +0100 ++++ cups-1.4.4/data/selinux 2010-06-18 09:38:22.687104566 +0100 @@ -0,0 +1,261 @@ +%!PS-Adobe-3.0 +%%BoundingBox: 0 0 612 792 @@ -638,9 +638,9 @@ diff -up cups-1.4.3/data/selinux.lspp cups-1.4.3/data/selinux +% End of "$Id: mls_template,v 1.1 2005/06/27 18:44:46 colmo Exp $". +% +%%EOF -diff -up cups-1.4.3/data/te.lspp cups-1.4.3/data/te ---- cups-1.4.3/data/te.lspp 2010-03-31 14:08:57.000000000 +0200 -+++ cups-1.4.3/data/te 2010-03-31 14:08:57.000000000 +0200 +diff -up cups-1.4.4/data/te.lspp cups-1.4.4/data/te +--- cups-1.4.4/data/te.lspp 2010-06-18 09:38:22.688105441 +0100 ++++ cups-1.4.4/data/te 2010-06-18 09:38:22.688105441 +0100 @@ -0,0 +1,261 @@ +%!PS-Adobe-3.0 +%%BoundingBox: 0 0 612 792 @@ -903,9 +903,9 @@ diff -up cups-1.4.3/data/te.lspp cups-1.4.3/data/te +% End of "$Id: mls_template,v 1.1 2005/06/27 18:44:46 colmo Exp $". +% +%%EOF -diff -up cups-1.4.3/filter/common.c.lspp cups-1.4.3/filter/common.c ---- cups-1.4.3/filter/common.c.lspp 2007-07-11 23:46:42.000000000 +0200 -+++ cups-1.4.3/filter/common.c 2010-03-31 14:08:57.000000000 +0200 +diff -up cups-1.4.4/filter/common.c.lspp cups-1.4.4/filter/common.c +--- cups-1.4.4/filter/common.c.lspp 2007-07-11 22:46:42.000000000 +0100 ++++ cups-1.4.4/filter/common.c 2010-06-18 09:38:22.689104687 +0100 @@ -30,6 +30,12 @@ * Include necessary headers... */ @@ -1074,10 +1074,10 @@ diff -up cups-1.4.3/filter/common.c.lspp cups-1.4.3/filter/common.c /* -diff -up cups-1.4.3/filter/pstops.c.lspp cups-1.4.3/filter/pstops.c ---- cups-1.4.3/filter/pstops.c.lspp 2010-03-31 14:08:57.000000000 +0200 -+++ cups-1.4.3/filter/pstops.c 2010-03-31 14:08:57.000000000 +0200 -@@ -3275,6 +3275,18 @@ write_label_prolog(pstops_doc_t *doc, /* +diff -up cups-1.4.4/filter/pstops.c.lspp cups-1.4.4/filter/pstops.c +--- cups-1.4.4/filter/pstops.c.lspp 2010-06-18 09:38:22.579980230 +0100 ++++ cups-1.4.4/filter/pstops.c 2010-06-18 09:38:22.693979174 +0100 +@@ -3314,6 +3314,18 @@ write_label_prolog(pstops_doc_t *doc, /* { const char *classification; /* CLASSIFICATION environment variable */ const char *ptr; /* Temporary string pointer */ @@ -1096,7 +1096,7 @@ diff -up cups-1.4.3/filter/pstops.c.lspp cups-1.4.3/filter/pstops.c /* -@@ -3297,6 +3309,124 @@ write_label_prolog(pstops_doc_t *doc, /* +@@ -3336,6 +3348,124 @@ write_label_prolog(pstops_doc_t *doc, /* return; } @@ -1221,7 +1221,7 @@ diff -up cups-1.4.3/filter/pstops.c.lspp cups-1.4.3/filter/pstops.c /* * Set the classification + page label string... */ -@@ -3375,7 +3505,10 @@ write_label_prolog(pstops_doc_t *doc, /* +@@ -3414,7 +3544,10 @@ write_label_prolog(pstops_doc_t *doc, /* doc_printf(doc, " %.0f moveto ESPpl show\n", top - 14.0); doc_puts(doc, "pop\n"); doc_puts(doc, "}bind put\n"); @@ -1232,9 +1232,9 @@ diff -up cups-1.4.3/filter/pstops.c.lspp cups-1.4.3/filter/pstops.c /* -diff -up cups-1.4.3/Makedefs.in.lspp cups-1.4.3/Makedefs.in ---- cups-1.4.3/Makedefs.in.lspp 2010-03-31 14:08:57.000000000 +0200 -+++ cups-1.4.3/Makedefs.in 2010-03-31 14:08:57.000000000 +0200 +diff -up cups-1.4.4/Makedefs.in.lspp cups-1.4.4/Makedefs.in +--- cups-1.4.4/Makedefs.in.lspp 2010-06-18 09:38:22.654104605 +0100 ++++ cups-1.4.4/Makedefs.in 2010-06-18 09:38:22.698980378 +0100 @@ -146,7 +146,7 @@ LIBCUPSORDER = @LIBCUPSORDER@ LIBCUPSIMAGEORDER = @LIBCUPSIMAGEORDER@ LINKCUPS = @LINKCUPS@ $(SSLLIBS) $(DNSSDLIBS) @@ -1253,9 +1253,9 @@ diff -up cups-1.4.3/Makedefs.in.lspp cups-1.4.3/Makedefs.in .SUFFIXES: .1 .1.gz .1m .1m.gz .3 .3.gz .5 .5.gz .7 .7.gz .8 .8.gz .a .c .cxx .h .man .o .32.o .64.o .gz .c.o: -diff -up cups-1.4.3/scheduler/client.c.lspp cups-1.4.3/scheduler/client.c ---- cups-1.4.3/scheduler/client.c.lspp 2009-07-15 01:02:05.000000000 +0200 -+++ cups-1.4.3/scheduler/client.c 2010-03-31 14:08:57.000000000 +0200 +diff -up cups-1.4.4/scheduler/client.c.lspp cups-1.4.4/scheduler/client.c +--- cups-1.4.4/scheduler/client.c.lspp 2010-04-23 19:56:34.000000000 +0100 ++++ cups-1.4.4/scheduler/client.c 2010-06-18 09:38:22.705980063 +0100 @@ -44,6 +44,7 @@ * valid_host() - Is the Host: field valid? * write_file() - Send a file via HTTP. @@ -1425,7 +1425,7 @@ diff -up cups-1.4.3/scheduler/client.c.lspp cups-1.4.3/scheduler/client.c } if (con->http.state != HTTP_POST_SEND) -@@ -4472,6 +4599,50 @@ make_certificate(cupsd_client_t *con) /* +@@ -4481,6 +4608,50 @@ make_certificate(cupsd_client_t *con) /* #endif /* HAVE_SSL */ @@ -1476,9 +1476,9 @@ diff -up cups-1.4.3/scheduler/client.c.lspp cups-1.4.3/scheduler/client.c /* * 'pipe_command()' - Pipe the output of a command to the remote client. */ -diff -up cups-1.4.3/scheduler/client.h.lspp cups-1.4.3/scheduler/client.h ---- cups-1.4.3/scheduler/client.h.lspp 2009-05-27 00:01:23.000000000 +0200 -+++ cups-1.4.3/scheduler/client.h 2010-03-31 14:08:57.000000000 +0200 +diff -up cups-1.4.4/scheduler/client.h.lspp cups-1.4.4/scheduler/client.h +--- cups-1.4.4/scheduler/client.h.lspp 2009-05-26 23:01:23.000000000 +0100 ++++ cups-1.4.4/scheduler/client.h 2010-06-18 09:38:22.711104323 +0100 @@ -18,6 +18,13 @@ #endif /* HAVE_AUTHORIZATION_H */ @@ -1514,9 +1514,9 @@ diff -up cups-1.4.3/scheduler/client.h.lspp cups-1.4.3/scheduler/client.h /* -diff -up cups-1.4.3/scheduler/conf.c.lspp cups-1.4.3/scheduler/conf.c ---- cups-1.4.3/scheduler/conf.c.lspp 2010-03-31 14:08:57.000000000 +0200 -+++ cups-1.4.3/scheduler/conf.c 2010-03-31 14:08:57.000000000 +0200 +diff -up cups-1.4.4/scheduler/conf.c.lspp cups-1.4.4/scheduler/conf.c +--- cups-1.4.4/scheduler/conf.c.lspp 2010-06-18 09:38:22.526979999 +0100 ++++ cups-1.4.4/scheduler/conf.c 2010-06-18 09:38:22.713979624 +0100 @@ -29,6 +29,7 @@ * read_configuration() - Read a configuration file. * read_location() - Read a definition. @@ -1535,7 +1535,7 @@ diff -up cups-1.4.3/scheduler/conf.c.lspp cups-1.4.3/scheduler/conf.c /* * Configuration variable structure... -@@ -174,6 +178,10 @@ static const cupsd_var_t variables[] = +@@ -172,6 +176,10 @@ static const cupsd_var_t variables[] = # if defined(HAVE_LIBSSL) || defined(HAVE_GNUTLS) { "ServerKey", &ServerKey, CUPSD_VARTYPE_PATHNAME }, # endif /* HAVE_LIBSSL || HAVE_GNUTLS */ @@ -1546,7 +1546,7 @@ diff -up cups-1.4.3/scheduler/conf.c.lspp cups-1.4.3/scheduler/conf.c #endif /* HAVE_SSL */ { "ServerName", &ServerName, CUPSD_VARTYPE_STRING }, { "ServerRoot", &ServerRoot, CUPSD_VARTYPE_PATHNAME }, -@@ -432,6 +440,9 @@ cupsdReadConfiguration(void) +@@ -430,6 +438,9 @@ cupsdReadConfiguration(void) const char *tmpdir; /* TMPDIR environment variable */ struct stat tmpinfo; /* Temporary directory info */ cupsd_policy_t *p; /* Policy */ @@ -1556,7 +1556,7 @@ diff -up cups-1.4.3/scheduler/conf.c.lspp cups-1.4.3/scheduler/conf.c /* -@@ -718,6 +729,25 @@ cupsdReadConfiguration(void) +@@ -713,6 +724,25 @@ cupsdReadConfiguration(void) RunUser = getuid(); @@ -1582,7 +1582,7 @@ diff -up cups-1.4.3/scheduler/conf.c.lspp cups-1.4.3/scheduler/conf.c cupsdLogMessage(CUPSD_LOG_INFO, "Remote access is %s.", RemotePort ? "enabled" : "disabled"); -@@ -1083,11 +1113,23 @@ cupsdReadConfiguration(void) +@@ -1081,11 +1111,23 @@ cupsdReadConfiguration(void) * Update classification setting as needed... */ @@ -1607,7 +1607,7 @@ diff -up cups-1.4.3/scheduler/conf.c.lspp cups-1.4.3/scheduler/conf.c /* * Check the MaxClients setting, and then allocate memory for it... -@@ -3646,6 +3688,18 @@ read_location(cups_file_t *fp, /* I - C +@@ -3644,6 +3686,18 @@ read_location(cups_file_t *fp, /* I - C return ((FatalErrors & CUPSD_FATAL_CONFIG) ? 0 : linenum); } @@ -1626,10 +1626,10 @@ diff -up cups-1.4.3/scheduler/conf.c.lspp cups-1.4.3/scheduler/conf.c /* * 'read_policy()' - Read a definition. -diff -up cups-1.4.3/scheduler/conf.h.lspp cups-1.4.3/scheduler/conf.h ---- cups-1.4.3/scheduler/conf.h.lspp 2010-03-31 14:08:57.000000000 +0200 -+++ cups-1.4.3/scheduler/conf.h 2010-03-31 14:08:57.000000000 +0200 -@@ -253,6 +253,12 @@ VAR char *ServerKey VALUE(NULL); +diff -up cups-1.4.4/scheduler/conf.h.lspp cups-1.4.4/scheduler/conf.h +--- cups-1.4.4/scheduler/conf.h.lspp 2010-06-18 09:38:22.527979881 +0100 ++++ cups-1.4.4/scheduler/conf.h 2010-06-18 09:38:22.715979172 +0100 +@@ -250,6 +250,12 @@ VAR char *ServerKey VALUE(NULL); VAR int SSLOptions VALUE(CUPSD_SSL_NONE); /* SSL/TLS options */ #endif /* HAVE_SSL */ @@ -1642,7 +1642,7 @@ diff -up cups-1.4.3/scheduler/conf.h.lspp cups-1.4.3/scheduler/conf.h #ifdef HAVE_LAUNCHD VAR int LaunchdTimeout VALUE(DEFAULT_KEEPALIVE); -@@ -271,6 +277,9 @@ VAR char *SystemGroupAuthKey VALUE(NULL +@@ -266,6 +272,9 @@ VAR char *SystemGroupAuthKey VALUE(NULL /* System group auth key */ #endif /* HAVE_AUTHORIZATION_H */ @@ -1652,9 +1652,9 @@ diff -up cups-1.4.3/scheduler/conf.h.lspp cups-1.4.3/scheduler/conf.h /* * Prototypes... -diff -up cups-1.4.3/scheduler/ipp.c.lspp cups-1.4.3/scheduler/ipp.c ---- cups-1.4.3/scheduler/ipp.c.lspp 2010-03-31 14:08:57.000000000 +0200 -+++ cups-1.4.3/scheduler/ipp.c 2010-03-31 14:11:37.000000000 +0200 +diff -up cups-1.4.4/scheduler/ipp.c.lspp cups-1.4.4/scheduler/ipp.c +--- cups-1.4.4/scheduler/ipp.c.lspp 2010-06-18 09:38:22.599103898 +0100 ++++ cups-1.4.4/scheduler/ipp.c 2010-06-18 09:39:08.308979874 +0100 @@ -41,6 +41,7 @@ * cancel_all_jobs() - Cancel all print jobs. * cancel_job() - Cancel a print job. @@ -1698,10 +1698,10 @@ diff -up cups-1.4.3/scheduler/ipp.c.lspp cups-1.4.3/scheduler/ipp.c static int check_quotas(cupsd_client_t *con, cupsd_printer_t *p); static ipp_attribute_t *copy_attribute(ipp_t *to, ipp_attribute_t *attr, int quickcopy); -@@ -1337,6 +1352,21 @@ add_job(cupsd_client_t *con, /* I - Cl - int kbytes; /* Size of print file */ - int i; /* Looping var */ - int lowerpagerange; /* Page range bound */ +@@ -1355,6 +1370,21 @@ add_job(cupsd_client_t *con, /* I - Cl + ipp_attribute_t *media_col, /* media-col attribute */ + *media_margin; /* media-*-margin attribute */ + ipp_t *unsup_col; /* media-col in unsupported response */ +#ifdef WITH_LSPP + char *audit_message; /* Audit message string */ + char *printerfile; /* device file pointed to by the printer */ @@ -1720,7 +1720,7 @@ diff -up cups-1.4.3/scheduler/ipp.c.lspp cups-1.4.3/scheduler/ipp.c cupsdLogMessage(CUPSD_LOG_DEBUG2, "add_job(%p[%d], %p(%s), %p(%s/%s))", -@@ -1550,6 +1580,104 @@ add_job(cupsd_client_t *con, /* I - Cl +@@ -1625,6 +1655,104 @@ add_job(cupsd_client_t *con, /* I - Cl ippAddString(con->request, IPP_TAG_JOB, IPP_TAG_NAME, "job-name", NULL, "Untitled"); @@ -1825,7 +1825,7 @@ diff -up cups-1.4.3/scheduler/ipp.c.lspp cups-1.4.3/scheduler/ipp.c if ((job = cupsdAddJob(priority, printer->name)) == NULL) { send_ipp_status(con, IPP_INTERNAL_ERROR, -@@ -1558,6 +1686,32 @@ add_job(cupsd_client_t *con, /* I - Cl +@@ -1633,6 +1761,32 @@ add_job(cupsd_client_t *con, /* I - Cl return (NULL); } @@ -1858,7 +1858,7 @@ diff -up cups-1.4.3/scheduler/ipp.c.lspp cups-1.4.3/scheduler/ipp.c job->dtype = printer->type & (CUPS_PRINTER_CLASS | CUPS_PRINTER_IMPLICIT | CUPS_PRINTER_REMOTE); job->attrs = con->request; -@@ -1763,6 +1917,29 @@ add_job(cupsd_client_t *con, /* I - Cl +@@ -1838,6 +1992,29 @@ add_job(cupsd_client_t *con, /* I - Cl attr->values[0].string.text = _cupsStrRetain(printer->job_sheets[0]); attr->values[1].string.text = _cupsStrRetain(printer->job_sheets[1]); } @@ -1888,7 +1888,7 @@ diff -up cups-1.4.3/scheduler/ipp.c.lspp cups-1.4.3/scheduler/ipp.c job->job_sheets = attr; -@@ -1793,6 +1970,9 @@ add_job(cupsd_client_t *con, /* I - Cl +@@ -1868,6 +2045,9 @@ add_job(cupsd_client_t *con, /* I - Cl "job-sheets=\"%s,none\", " "job-originating-user-name=\"%s\"", Classification, job->username); @@ -1898,7 +1898,7 @@ diff -up cups-1.4.3/scheduler/ipp.c.lspp cups-1.4.3/scheduler/ipp.c } else if (attr->num_values == 2 && strcmp(attr->values[0].string.text, -@@ -1811,6 +1991,9 @@ add_job(cupsd_client_t *con, /* I - Cl +@@ -1886,6 +2066,9 @@ add_job(cupsd_client_t *con, /* I - Cl "job-originating-user-name=\"%s\"", attr->values[0].string.text, attr->values[1].string.text, job->username); @@ -1908,7 +1908,7 @@ diff -up cups-1.4.3/scheduler/ipp.c.lspp cups-1.4.3/scheduler/ipp.c } else if (strcmp(attr->values[0].string.text, Classification) && strcmp(attr->values[0].string.text, "none") && -@@ -1831,6 +2014,9 @@ add_job(cupsd_client_t *con, /* I - Cl +@@ -1906,6 +2089,9 @@ add_job(cupsd_client_t *con, /* I - Cl "job-originating-user-name=\"%s\"", attr->values[0].string.text, attr->values[1].string.text, job->username); @@ -1918,7 +1918,7 @@ diff -up cups-1.4.3/scheduler/ipp.c.lspp cups-1.4.3/scheduler/ipp.c } } else if (strcmp(attr->values[0].string.text, Classification) && -@@ -1871,8 +2057,52 @@ add_job(cupsd_client_t *con, /* I - Cl +@@ -1946,8 +2132,52 @@ add_job(cupsd_client_t *con, /* I - Cl "job-sheets=\"%s\", " "job-originating-user-name=\"%s\"", Classification, job->username); @@ -1971,7 +1971,7 @@ diff -up cups-1.4.3/scheduler/ipp.c.lspp cups-1.4.3/scheduler/ipp.c /* * See if we need to add the starting sheet... -@@ -4210,6 +4440,103 @@ check_rss_recipient( +@@ -4300,6 +4530,103 @@ check_rss_recipient( } @@ -2075,7 +2075,7 @@ diff -up cups-1.4.3/scheduler/ipp.c.lspp cups-1.4.3/scheduler/ipp.c /* * 'check_quotas()' - Check quotas for a printer and user. */ -@@ -4761,6 +5088,15 @@ copy_banner(cupsd_client_t *con, /* I - +@@ -4853,6 +5180,15 @@ copy_banner(cupsd_client_t *con, /* I - char attrname[255], /* Name of attribute */ *s; /* Pointer into name */ ipp_attribute_t *attr; /* Attribute */ @@ -2091,7 +2091,7 @@ diff -up cups-1.4.3/scheduler/ipp.c.lspp cups-1.4.3/scheduler/ipp.c cupsdLogMessage(CUPSD_LOG_DEBUG2, -@@ -4796,6 +5132,82 @@ copy_banner(cupsd_client_t *con, /* I - +@@ -4888,6 +5224,82 @@ copy_banner(cupsd_client_t *con, /* I - fchmod(cupsFileNumber(out), 0640); fchown(cupsFileNumber(out), RunUser, Group); @@ -2174,7 +2174,7 @@ diff -up cups-1.4.3/scheduler/ipp.c.lspp cups-1.4.3/scheduler/ipp.c /* * Try the localized banner file under the subdirectory... -@@ -4890,6 +5302,24 @@ copy_banner(cupsd_client_t *con, /* I - +@@ -4982,6 +5394,24 @@ copy_banner(cupsd_client_t *con, /* I - else s = attrname; @@ -2199,7 +2199,7 @@ diff -up cups-1.4.3/scheduler/ipp.c.lspp cups-1.4.3/scheduler/ipp.c if (!strcmp(s, "printer-name")) { cupsFilePuts(out, job->dest); -@@ -6844,6 +7274,22 @@ get_job_attrs(cupsd_client_t *con, /* I +@@ -6940,6 +7370,22 @@ get_job_attrs(cupsd_client_t *con, /* I return; } @@ -2222,7 +2222,7 @@ diff -up cups-1.4.3/scheduler/ipp.c.lspp cups-1.4.3/scheduler/ipp.c /* * Copy attributes... */ -@@ -7074,6 +7520,11 @@ get_jobs(cupsd_client_t *con, /* I - C +@@ -7170,6 +7616,11 @@ get_jobs(cupsd_client_t *con, /* I - C if (username[0] && strcasecmp(username, job->username)) continue; @@ -2234,7 +2234,7 @@ diff -up cups-1.4.3/scheduler/ipp.c.lspp cups-1.4.3/scheduler/ipp.c if (count > 0) ippAddSeparator(con->response); -@@ -11460,6 +11911,11 @@ validate_user(cupsd_job_t *job, /* I +@@ -11572,6 +12023,11 @@ validate_user(cupsd_job_t *job, /* I strlcpy(username, get_username(con), userlen); @@ -2246,9 +2246,9 @@ diff -up cups-1.4.3/scheduler/ipp.c.lspp cups-1.4.3/scheduler/ipp.c /* * Check the username against the owner... */ -diff -up cups-1.4.3/scheduler/job.c.lspp cups-1.4.3/scheduler/job.c ---- cups-1.4.3/scheduler/job.c.lspp 2010-03-31 14:08:57.000000000 +0200 -+++ cups-1.4.3/scheduler/job.c 2010-03-31 14:08:57.000000000 +0200 +diff -up cups-1.4.4/scheduler/job.c.lspp cups-1.4.4/scheduler/job.c +--- cups-1.4.4/scheduler/job.c.lspp 2010-06-18 09:38:22.629104109 +0100 ++++ cups-1.4.4/scheduler/job.c 2010-06-18 09:38:22.734978722 +0100 @@ -66,6 +66,9 @@ * update_job_attrs() - Update the job-printer-* attributes. */ @@ -2495,7 +2495,7 @@ diff -up cups-1.4.3/scheduler/job.c.lspp cups-1.4.3/scheduler/job.c job->attrs->state = IPP_IDLE; if (ippWriteIO(fp, (ipp_iocb_t)cupsFileWrite, 1, NULL, -@@ -3177,6 +3349,18 @@ get_options(cupsd_job_t *job, /* I - Jo +@@ -3188,6 +3360,18 @@ get_options(cupsd_job_t *job, /* I - Jo banner_page) continue; @@ -2514,7 +2514,7 @@ diff -up cups-1.4.3/scheduler/job.c.lspp cups-1.4.3/scheduler/job.c /* * Otherwise add them to the list... */ -@@ -3849,6 +4033,19 @@ static void +@@ -3860,6 +4044,19 @@ static void start_job(cupsd_job_t *job, /* I - Job ID */ cupsd_printer_t *printer) /* I - Printer to print job */ { @@ -2534,7 +2534,7 @@ diff -up cups-1.4.3/scheduler/job.c.lspp cups-1.4.3/scheduler/job.c cupsdLogMessage(CUPSD_LOG_DEBUG2, "start_job(job=%p(%d), printer=%p(%s))", job, job->id, printer, printer->name); -@@ -3971,6 +4168,106 @@ start_job(cupsd_job_t *job, /* I - +@@ -3982,6 +4179,106 @@ start_job(cupsd_job_t *job, /* I - fcntl(job->side_pipes[1], F_SETFD, fcntl(job->side_pipes[1], F_GETFD) | FD_CLOEXEC); @@ -2641,9 +2641,9 @@ diff -up cups-1.4.3/scheduler/job.c.lspp cups-1.4.3/scheduler/job.c /* * Now start the first file in the job... */ -diff -up cups-1.4.3/scheduler/job.h.lspp cups-1.4.3/scheduler/job.h ---- cups-1.4.3/scheduler/job.h.lspp 2009-05-12 00:46:01.000000000 +0200 -+++ cups-1.4.3/scheduler/job.h 2010-03-31 14:08:57.000000000 +0200 +diff -up cups-1.4.4/scheduler/job.h.lspp cups-1.4.4/scheduler/job.h +--- cups-1.4.4/scheduler/job.h.lspp 2009-05-11 23:46:01.000000000 +0100 ++++ cups-1.4.4/scheduler/job.h 2010-06-18 09:38:22.734978722 +0100 @@ -13,6 +13,13 @@ * file is missing or damaged, see the license at "http://www.cups.org/". */ @@ -2669,11 +2669,11 @@ diff -up cups-1.4.3/scheduler/job.h.lspp cups-1.4.3/scheduler/job.h }; typedef struct cupsd_joblog_s /**** Job log message ****/ -diff -up cups-1.4.3/scheduler/main.c.lspp cups-1.4.3/scheduler/main.c ---- cups-1.4.3/scheduler/main.c.lspp 2010-03-31 14:08:57.000000000 +0200 -+++ cups-1.4.3/scheduler/main.c 2010-03-31 14:08:57.000000000 +0200 -@@ -35,6 +35,8 @@ - * usage() - Show scheduler usage. +diff -up cups-1.4.4/scheduler/main.c.lspp cups-1.4.4/scheduler/main.c +--- cups-1.4.4/scheduler/main.c.lspp 2010-06-18 09:38:22.574980424 +0100 ++++ cups-1.4.4/scheduler/main.c 2010-06-18 09:39:26.548103442 +0100 +@@ -37,6 +37,8 @@ + * usage() - Show scheduler usage. */ +/* (c) Copyright 2005-2006 Hewlett-Packard Development Company, L.P. */ @@ -2681,7 +2681,7 @@ diff -up cups-1.4.3/scheduler/main.c.lspp cups-1.4.3/scheduler/main.c /* * Include necessary headers... */ -@@ -73,6 +75,9 @@ +@@ -76,6 +78,9 @@ # include #endif /* __APPLE__ && HAVE_DLFCN_H */ @@ -2691,7 +2691,7 @@ diff -up cups-1.4.3/scheduler/main.c.lspp cups-1.4.3/scheduler/main.c /* * Local functions... -@@ -156,6 +161,9 @@ main(int argc, /* I - Number of comm +@@ -161,6 +166,9 @@ main(int argc, /* I - Number of comm int launchd_idle_exit; /* Idle exit on select timeout? */ #endif /* HAVE_LAUNCHD */ @@ -2701,7 +2701,7 @@ diff -up cups-1.4.3/scheduler/main.c.lspp cups-1.4.3/scheduler/main.c #ifdef HAVE_GETEUID -@@ -465,6 +473,25 @@ main(int argc, /* I - Number of comm +@@ -470,6 +478,25 @@ main(int argc, /* I - Number of comm #endif /* DEBUG */ } @@ -2727,7 +2727,7 @@ diff -up cups-1.4.3/scheduler/main.c.lspp cups-1.4.3/scheduler/main.c /* * Set the timezone info... */ -@@ -1235,6 +1262,11 @@ main(int argc, /* I - Number of comm +@@ -1214,6 +1241,11 @@ main(int argc, /* I - Number of comm cupsdStopSelect(); @@ -2739,10 +2739,10 @@ diff -up cups-1.4.3/scheduler/main.c.lspp cups-1.4.3/scheduler/main.c return (!stop_scheduler); } -diff -up cups-1.4.3/scheduler/printers.c.lspp cups-1.4.3/scheduler/printers.c ---- cups-1.4.3/scheduler/printers.c.lspp 2010-03-31 14:08:57.000000000 +0200 -+++ cups-1.4.3/scheduler/printers.c 2010-03-31 14:08:57.000000000 +0200 -@@ -58,6 +58,8 @@ +diff -up cups-1.4.4/scheduler/printers.c.lspp cups-1.4.4/scheduler/printers.c +--- cups-1.4.4/scheduler/printers.c.lspp 2010-06-18 09:38:22.556104527 +0100 ++++ cups-1.4.4/scheduler/printers.c 2010-06-18 09:38:22.740980299 +0100 +@@ -59,6 +59,8 @@ * write_xml_string() - Write a string with XML escaping. */ @@ -2751,7 +2751,7 @@ diff -up cups-1.4.3/scheduler/printers.c.lspp cups-1.4.3/scheduler/printers.c /* * Include necessary headers... */ -@@ -86,6 +88,10 @@ static void write_irix_state(cupsd_print +@@ -88,6 +90,10 @@ static void write_irix_state(cupsd_print #endif /* __sgi */ static void write_xml_string(cups_file_t *fp, const char *s); @@ -2762,7 +2762,7 @@ diff -up cups-1.4.3/scheduler/printers.c.lspp cups-1.4.3/scheduler/printers.c /* * 'cupsdAddPrinter()' - Add a printer to the system. -@@ -2173,6 +2179,13 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p) +@@ -2211,6 +2217,13 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p) "username", "password" }; @@ -2776,7 +2776,7 @@ diff -up cups-1.4.3/scheduler/printers.c.lspp cups-1.4.3/scheduler/printers.c DEBUG_printf(("cupsdSetPrinterAttrs: entering name = %s, type = %x\n", p->name, -@@ -2303,6 +2316,45 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p) +@@ -2341,6 +2354,45 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p) attr->values[1].string.text = _cupsStrAlloc(Classification ? Classification : p->job_sheets[1]); } @@ -2822,7 +2822,7 @@ diff -up cups-1.4.3/scheduler/printers.c.lspp cups-1.4.3/scheduler/printers.c } p->raw = 0; -@@ -4834,7 +4886,6 @@ write_irix_state(cupsd_printer_t *p) /* +@@ -5320,7 +5372,6 @@ write_irix_state(cupsd_printer_t *p) /* } #endif /* __sgi */ diff --git a/cups-page-label.patch b/cups-page-label.patch index 9aa3b09..518bc8e 100644 --- a/cups-page-label.patch +++ b/cups-page-label.patch @@ -1,6 +1,6 @@ -diff -up cups-1.4.1/filter/pstops.c.page-label cups-1.4.1/filter/pstops.c ---- cups-1.4.1/filter/pstops.c.page-label 2009-10-02 12:33:33.410719651 +0100 -+++ cups-1.4.1/filter/pstops.c 2009-10-02 12:34:11.399594180 +0100 +diff -up cups-1.4.4/filter/pstops.c.page-label cups-1.4.4/filter/pstops.c +--- cups-1.4.4/filter/pstops.c.page-label 2010-03-30 23:07:33.000000000 +0100 ++++ cups-1.4.4/filter/pstops.c 2010-06-18 09:36:18.239126341 +0100 @@ -108,6 +108,7 @@ typedef struct /**** Document informa int num_options; /* Number of document-wide options */ cups_option_t *options; /* Document-wide options */ @@ -9,7 +9,7 @@ diff -up cups-1.4.1/filter/pstops.c.page-label cups-1.4.1/filter/pstops.c saw_eof, /* Saw the %%EOF comment? */ slow_collate, /* Collate copies by hand? */ slow_duplex, /* Duplex pages slowly? */ -@@ -2048,7 +2049,7 @@ do_setup(pstops_doc_t *doc, /* I - Docu +@@ -2083,7 +2084,7 @@ do_setup(pstops_doc_t *doc, /* I - Docu * of the pages... */ @@ -18,7 +18,7 @@ diff -up cups-1.4.1/filter/pstops.c.page-label cups-1.4.1/filter/pstops.c write_label_prolog(doc, doc->page_label, PageBottom, PageWidth - PageLength + PageTop, PageLength); else -@@ -2056,7 +2057,30 @@ do_setup(pstops_doc_t *doc, /* I - Docu +@@ -2091,7 +2092,30 @@ do_setup(pstops_doc_t *doc, /* I - Docu PageLength); } else @@ -50,7 +50,7 @@ diff -up cups-1.4.1/filter/pstops.c.page-label cups-1.4.1/filter/pstops.c } -@@ -2141,7 +2165,7 @@ end_nup(pstops_doc_t *doc, /* I - Docum +@@ -2176,7 +2200,7 @@ end_nup(pstops_doc_t *doc, /* I - Docum case 1 : if (doc->use_ESPshowpage) { @@ -59,7 +59,7 @@ diff -up cups-1.4.1/filter/pstops.c.page-label cups-1.4.1/filter/pstops.c doc_puts(doc, "ESPshowpage\n"); } break; -@@ -2156,7 +2180,7 @@ end_nup(pstops_doc_t *doc, /* I - Docum +@@ -2191,7 +2215,7 @@ end_nup(pstops_doc_t *doc, /* I - Docum * Rotate the labels back to portrait... */ @@ -68,7 +68,7 @@ diff -up cups-1.4.1/filter/pstops.c.page-label cups-1.4.1/filter/pstops.c } else if (Orientation == 0) { -@@ -2182,7 +2206,7 @@ end_nup(pstops_doc_t *doc, /* I - Docum +@@ -2217,7 +2241,7 @@ end_nup(pstops_doc_t *doc, /* I - Docum default : if (is_last_page(number) && doc->use_ESPshowpage) { @@ -77,7 +77,7 @@ diff -up cups-1.4.1/filter/pstops.c.page-label cups-1.4.1/filter/pstops.c doc_puts(doc, "ESPshowpage\n"); } break; -@@ -2385,6 +2409,12 @@ set_pstops_options( +@@ -2420,6 +2444,12 @@ set_pstops_options( doc->new_bounding_box[3] = INT_MIN; /* @@ -87,6 +87,6 @@ diff -up cups-1.4.1/filter/pstops.c.page-label cups-1.4.1/filter/pstops.c + doc->orientation = Orientation; + + /* - * AP_FIRSTPAGE_InputSlot + * AP_FIRSTPAGE_* and the corresponding non-first-page options. */ diff --git a/cups-str3399.patch b/cups-str3399.patch deleted file mode 100644 index e5b2000..0000000 --- a/cups-str3399.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff -up cups-1.4.2/scheduler/main.c.str3399 cups-1.4.2/scheduler/main.c ---- cups-1.4.2/scheduler/main.c.str3399 2010-03-02 11:04:28.968100478 +0000 -+++ cups-1.4.2/scheduler/main.c 2010-03-02 11:04:47.442226409 +0000 -@@ -1733,7 +1733,7 @@ process_children(void) - job->backend = -pid; - - if (status && status != SIGTERM && status != SIGKILL && -- job->status >= 0) -+ status != SIGPIPE && job->status >= 0) - { - /* - * An error occurred; save the exit status so we know to stop -@@ -1829,6 +1829,12 @@ process_children(void) - "PID %d (%s) was terminated normally with signal %d.", - pid, name, status); - } -+ else if (status == SIGPIPE) -+ { -+ cupsdLogMessage(CUPSD_LOG_DEBUG, -+ "PID %d (%s) did not catch or ignore signal %d.", -+ pid, name, status); -+ } - else if (status) - { - if (WIFEXITED(status)) diff --git a/cups-str3425p2.patch b/cups-str3425p2.patch deleted file mode 100644 index d4d7a5a..0000000 --- a/cups-str3425p2.patch +++ /dev/null @@ -1,49 +0,0 @@ -diff -up cups-1.4.3/scheduler/job.c.str3425p2 cups-1.4.3/scheduler/job.c ---- cups-1.4.3/scheduler/job.c.str3425p2 2010-06-01 17:16:46.000000000 +0200 -+++ cups-1.4.3/scheduler/job.c 2010-06-01 17:19:10.000000000 +0200 -@@ -2286,12 +2286,14 @@ cupsdSetJobState( - if (!cupsdLoadJob(job)) - return; - -- /* -- * Don't do anything if the state is unchanged... -- */ -- -- if (newstate == (oldstate = job->state_value)) -- return; -+ /* -+ * Don't do anything if the state is unchanged and we aren't purging the -+ * job... -+ */ -+ -+ oldstate = job->state_value; -+ if (newstate == oldstate && action != CUPSD_JOB_PURGE) -+ return; - - /* - * Stop any processes that are working on the current job... -@@ -2498,6 +2500,15 @@ cupsdSetJobState( - job->dirty = 1; - cupsdMarkDirty(CUPSD_DIRTY_JOBS); - } -+ else if (!job->printer) -+ { -+ /* -+ * Delete the job immediately if not actively printing... -+ */ -+ -+ cupsdDeleteJob(job, CUPSD_JOB_PURGE); -+ job = NULL; -+ } - break; - } - -@@ -2505,7 +2516,7 @@ cupsdSetJobState( - * Finalize the job immediately if we forced things... - */ - -- if (action >= CUPSD_JOB_FORCE && job->printer) -+ if (action >= CUPSD_JOB_FORCE && job && job->printer) - finalize_job(job, 0); - - /* diff --git a/cups-str3503.patch b/cups-str3503.patch deleted file mode 100644 index 334f483..0000000 --- a/cups-str3503.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up cups-1.4.3/cups/dest.c.str3503 cups-1.4.3/cups/dest.c ---- cups-1.4.3/cups/dest.c.str3503 2010-03-31 13:31:42.000000000 +0200 -+++ cups-1.4.3/cups/dest.c 2010-03-31 13:32:52.000000000 +0200 -@@ -553,7 +553,7 @@ cupsGetNamedDest(http_t *http, /* I - - if (!cups_get_sdests(http, op, name, 0, &dest)) - { -- if (op == CUPS_GET_DEFAULT || name) -+ if (op == CUPS_GET_DEFAULT || (name && !set_as_default)) - return (NULL); - - /* diff --git a/cups-str3505.patch b/cups-str3505.patch deleted file mode 100644 index 95b6918..0000000 --- a/cups-str3505.patch +++ /dev/null @@ -1,158 +0,0 @@ -diff -up cups-1.4.2/scheduler/classes.c.str3505 cups-1.4.2/scheduler/classes.c ---- cups-1.4.2/scheduler/classes.c.str3505 2009-10-07 19:16:09.000000000 +0100 -+++ cups-1.4.2/scheduler/classes.c 2010-02-23 11:43:06.033263862 +0000 -@@ -3,7 +3,7 @@ - * - * Printer class routines for the Common UNIX Printing System (CUPS). - * -- * Copyright 2007-2009 by Apple Inc. -+ * Copyright 2007-2010 by Apple Inc. - * Copyright 1997-2007 by Easy Software Products, all rights reserved. - * - * These coded instructions, statements, and computer programs are the -@@ -117,7 +117,7 @@ cupsdAddPrinterToClass( - * 'cupsdDeletePrinterFromClass()' - Delete a printer from a class. - */ - --void -+int /* O - 1 if class changed, 0 otherwise */ - cupsdDeletePrinterFromClass( - cupsd_printer_t *c, /* I - Class to delete from */ - cupsd_printer_t *p) /* I - Printer to delete */ -@@ -149,13 +149,15 @@ cupsdDeletePrinterFromClass( - (c->num_printers - i) * sizeof(cupsd_printer_t *)); - } - else -- return; -+ return (0); - - /* - * Update the IPP attributes (have to do this for member-names)... - */ - - cupsdSetPrinterAttrs(c); -+ -+ return (1); - } - - -@@ -163,10 +165,11 @@ cupsdDeletePrinterFromClass( - * 'cupsdDeletePrinterFromClasses()' - Delete a printer from all classes. - */ - --void -+int /* O - 1 if class changed, 0 otherwise */ - cupsdDeletePrinterFromClasses( - cupsd_printer_t *p) /* I - Printer to delete */ - { -+ int changed = 0; /* Any class changed? */ - cupsd_printer_t *c; /* Pointer to current class */ - - -@@ -179,7 +182,7 @@ cupsdDeletePrinterFromClasses( - c; - c = (cupsd_printer_t *)cupsArrayNext(Printers)) - if (c->type & (CUPS_PRINTER_CLASS | CUPS_PRINTER_IMPLICIT)) -- cupsdDeletePrinterFromClass(c, p); -+ changed |= cupsdDeletePrinterFromClass(c, p); - - /* - * Then clean out any empty implicit classes... -@@ -193,7 +196,10 @@ cupsdDeletePrinterFromClasses( - cupsdLogMessage(CUPSD_LOG_DEBUG, "Deleting implicit class \"%s\"...", - c->name); - cupsdDeletePrinter(c, 0); -+ changed = 1; - } -+ -+ return (changed); - } - - -diff -up cups-1.4.2/scheduler/classes.h.str3505 cups-1.4.2/scheduler/classes.h ---- cups-1.4.2/scheduler/classes.h.str3505 2008-09-19 21:03:36.000000000 +0100 -+++ cups-1.4.2/scheduler/classes.h 2010-02-23 11:43:06.012262825 +0000 -@@ -3,7 +3,7 @@ - * - * Printer class definitions for the Common UNIX Printing System (CUPS). - * -- * Copyright 2007-2008 by Apple Inc. -+ * Copyright 2007-2010 by Apple Inc. - * Copyright 1997-2005 by Easy Software Products, all rights reserved. - * - * These coded instructions, statements, and computer programs are the -@@ -21,9 +21,9 @@ - extern cupsd_printer_t *cupsdAddClass(const char *name); - extern void cupsdAddPrinterToClass(cupsd_printer_t *c, - cupsd_printer_t *p); --extern void cupsdDeletePrinterFromClass(cupsd_printer_t *c, -+extern int cupsdDeletePrinterFromClass(cupsd_printer_t *c, - cupsd_printer_t *p); --extern void cupsdDeletePrinterFromClasses(cupsd_printer_t *p); -+extern int cupsdDeletePrinterFromClasses(cupsd_printer_t *p); - extern cupsd_printer_t *cupsdFindAvailablePrinter(const char *name); - extern cupsd_printer_t *cupsdFindClass(const char *name); - extern void cupsdLoadAllClasses(void); -diff -up cups-1.4.2/scheduler/ipp.c.str3505 cups-1.4.2/scheduler/ipp.c ---- cups-1.4.2/scheduler/ipp.c.str3505 2010-02-23 11:42:12.713386792 +0000 -+++ cups-1.4.2/scheduler/ipp.c 2010-02-23 11:43:06.025262343 +0000 -@@ -6451,7 +6451,9 @@ delete_printer(cupsd_client_t *con, /* - cupsdLogMessage(CUPSD_LOG_INFO, "Printer \"%s\" deleted by \"%s\".", - printer->name, get_username(con)); - -- cupsdDeletePrinter(printer, 0); -+ if (cupsdDeletePrinter(printer, 0)) -+ cupsdMarkDirty(CUPSD_DIRTY_CLASSES); -+ - cupsdMarkDirty(CUPSD_DIRTY_PRINTERS); - } - -diff -up cups-1.4.2/scheduler/printers.c.str3505 cups-1.4.2/scheduler/printers.c ---- cups-1.4.2/scheduler/printers.c.str3505 2010-02-23 11:42:12.223386167 +0000 -+++ cups-1.4.2/scheduler/printers.c 2010-02-23 11:43:06.030262135 +0000 -@@ -657,12 +657,13 @@ cupsdDeleteAllPrinters(void) - * 'cupsdDeletePrinter()' - Delete a printer from the system. - */ - --void -+int /* O - 1 if classes affected, 0 otherwise */ - cupsdDeletePrinter( - cupsd_printer_t *p, /* I - Printer to delete */ - int update) /* I - Update printers.conf? */ - { -- int i; /* Looping var */ -+ int i, /* Looping var */ -+ changed = 0; /* Class changed? */ - #ifdef __sgi - char filename[1024]; /* Interface script filename */ - #endif /* __sgi */ -@@ -773,7 +774,7 @@ cupsdDeletePrinter( - - if (!(p->type & CUPS_PRINTER_IMPLICIT)) - { -- cupsdDeletePrinterFromClasses(p); -+ changed = cupsdDeletePrinterFromClasses(p); - - /* - * Deregister from any browse protocols... -@@ -854,6 +855,8 @@ cupsdDeletePrinter( - */ - - cupsArrayRestore(Printers); -+ -+ return (changed); - } - - -diff -up cups-1.4.2/scheduler/printers.h.str3505 cups-1.4.2/scheduler/printers.h ---- cups-1.4.2/scheduler/printers.h.str3505 2009-06-25 18:07:26.000000000 +0100 -+++ cups-1.4.2/scheduler/printers.h 2010-02-23 11:43:06.032262357 +0000 -@@ -141,7 +141,7 @@ extern void cupsdAddPrinterUser(cupsd_p - const char *username); - extern void cupsdCreateCommonData(void); - extern void cupsdDeleteAllPrinters(void); --extern void cupsdDeletePrinter(cupsd_printer_t *p, int update); -+extern int cupsdDeletePrinter(cupsd_printer_t *p, int update); - extern cupsd_printer_t *cupsdFindDest(const char *name); - extern cupsd_printer_t *cupsdFindPrinter(const char *name); - extern cupsd_quota_t *cupsdFindQuota(cupsd_printer_t *p, diff --git a/cups-str3541.patch b/cups-str3541.patch deleted file mode 100644 index 668ce34..0000000 --- a/cups-str3541.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up cups-1.4.3/systemv/lpstat.c.str3541 cups-1.4.3/systemv/lpstat.c ---- cups-1.4.3/systemv/lpstat.c.str3541 2009-12-15 23:40:37.000000000 +0100 -+++ cups-1.4.3/systemv/lpstat.c 2010-04-16 12:56:04.000000000 +0200 -@@ -1423,7 +1423,7 @@ show_jobs(const char *dests, /* I - Des - - rank ++; - -- if (match_list(dests, dest) || match_list(users, username)) -+ if (match_list(dests, dest) && match_list(users, username)) - { - jobdate = localtime(&jobtime); - snprintf(temp, sizeof(temp), "%s-%d", dest, jobid); diff --git a/cups.spec b/cups.spec index ce46c64..3f8d12c 100644 --- a/cups.spec +++ b/cups.spec @@ -7,8 +7,8 @@ Summary: Common Unix Printing System Name: cups -Version: 1.4.3 -Release: 11%{?dist} +Version: 1.4.4 +Release: 1%{?dist} License: GPLv2 Group: System Environment/Daemons Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2 @@ -56,23 +56,17 @@ Patch22: cups-uri-compat.patch Patch23: cups-cups-get-classes.patch Patch24: cups-avahi.patch Patch25: cups-str3382.patch -Patch26: cups-str3503.patch -Patch27: cups-str3399.patch Patch29: cups-0755.patch Patch30: cups-EAI_AGAIN.patch -Patch31: cups-str3505.patch -Patch32: cups-str3541.patch Patch33: cups-snmp-quirks.patch Patch34: cups-hp-deviceid-oid.patch Patch35: cups-dnssd-deviceid.patch Patch36: cups-ricoh-deviceid-oid.patch Patch37: cups-texttops-rotate-page.patch -Patch38: cups-str3425p2.patch Patch100: cups-lspp.patch ## SECURITY PATCHES: -Patch200: cups-CVE-2010-0302.patch Epoch: 1 Url: http://www.cups.org/ @@ -254,18 +248,10 @@ module. %patch24 -p1 -b .avahi # Fix temporary filename creation. %patch25 -p1 -b .str3382 -# Fix cupsGetNamedDest() when a name is specified. -%patch26 -p1 -b .str3503 -# Don't treat SIGPIPE as an error. -%patch27 -p1 -b .str3399 # Use mode 0755 for binaries and libraries where appropriate. %patch29 -p1 -b .0755 # Re-initialise the resolver on failure in httpAddrLookup(). %patch30 -p1 -b .EAI_AGAIN -# Update classes.conf when a class member printer is deleted -%patch31 -p1 -b .str3505 -# Fix lpstat to adhere to -o option. -%patch32 -p1 -b .str3541 # Handle SNMP supply level quirks (bug #581825). %patch33 -p1 -b .snmp-quirks # Add an SNMP query for HP's device ID OID (STR #3552). @@ -278,8 +264,6 @@ module. # This fixes page-label orientation when texttops is used in the # filter chain (bug #572338). %patch37 -p1 -b .texttops-rotate-page -# Delete job files in /var/spool/cups (STR #3425) -%patch38 -p1 -b .str3425p2 %if %lspp # LSPP support. @@ -287,9 +271,6 @@ module. %endif # SECURITY PATCHES: -# Applied patch for CVE-2010-0302 (incomplete fix for CVE-2009-3553, -# bug #557775). -%patch200 -p1 -b .CVE-2010-0302 sed -i -e '1iMaxLogSize 0' conf/cupsd.conf.in @@ -580,6 +561,11 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog +* Fri Jun 18 2010 Tim Waugh 1:1.4.4-1 +- 1.4.4. Fixes several security vulnerabilities (bug #605399): + CVE-2010-0540, CVE-2010-0542, CVE-2010-1748. No longer need str3503, + str3399, str3505, str3541, str3425p2 or CVE-2010-0302 patches. + * Thu Jun 10 2010 Tim Waugh - Removed unapplied gnutls-gcrypt-threads patch. Fixed typos in descriptions for lpd and php sub-packages. diff --git a/sources b/sources index 4448a10..0b9781c 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ e70b1c3f60143d7310c1d74c111a21ab cups-1.4.3-source.tar.bz2 +8776403ad60fea9e85eab9c04d88560d cups-1.4.4-source.tar.bz2 From b0314bda1b30496093bf3e24ddd64a94e2a00d4e Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Fri, 18 Jun 2010 13:49:51 +0000 Subject: [PATCH 096/110] - Re-enabled SSL support by using OpenSSL instead of gnutls. --- cups.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/cups.spec b/cups.spec index 3f8d12c..95833bb 100644 --- a/cups.spec +++ b/cups.spec @@ -8,7 +8,7 @@ Summary: Common Unix Printing System Name: cups Version: 1.4.4 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 Group: System Environment/Daemons Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2 @@ -91,7 +91,7 @@ Provides: cupsddk-drivers = 1.2.3-7 Conflicts: kdelibs < 6:3.5.2-6 BuildRequires: pam-devel pkgconfig -BuildRequires: gnutls-devel libacl-devel +BuildRequires: openssl-devel libacl-devel BuildRequires: openldap-devel BuildRequires: make >= 1:3.80 BuildRequires: php-devel, pcre-devel @@ -137,7 +137,7 @@ Summary: Common Unix Printing System - development environment Group: Development/Libraries License: LGPLv2 Requires: %{name}-libs = %{epoch}:%{version}-%{release} -Requires: gnutls-devel +Requires: openssl-devel Requires: krb5-devel Requires: zlib-devel Obsoletes: cupsddk-devel < 1.2.3-7 @@ -561,6 +561,9 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog +* Fri Jun 18 2010 Tim Waugh 1:1.4.4-2 +- Re-enabled SSL support by using OpenSSL instead of gnutls. + * Fri Jun 18 2010 Tim Waugh 1:1.4.4-1 - 1.4.4. Fixes several security vulnerabilities (bug #605399): CVE-2010-0540, CVE-2010-0542, CVE-2010-1748. No longer need str3503, From a51b847f8cd51875f06f20a6bf1d8f23e41763b3 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Fri, 18 Jun 2010 13:49:55 +0000 Subject: [PATCH 097/110] - Re-enabled SSL support by using OpenSSL instead of gnutls. --- cups.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/cups.spec b/cups.spec index c8ad672..a3eccd4 100644 --- a/cups.spec +++ b/cups.spec @@ -8,7 +8,7 @@ Summary: Common Unix Printing System Name: cups Version: 1.4.4 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 Group: System Environment/Daemons Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2 @@ -95,7 +95,7 @@ Provides: cupsddk-drivers = 1.2.3-7 Conflicts: kdelibs < 6:3.5.2-6 BuildRequires: pam-devel pkgconfig -BuildRequires: gnutls-devel libacl-devel +BuildRequires: openssl-devel libacl-devel BuildRequires: openldap-devel BuildRequires: make >= 1:3.80 BuildRequires: php-devel, pcre-devel @@ -144,7 +144,7 @@ Summary: Common Unix Printing System - development environment Group: Development/Libraries License: LGPLv2 Requires: %{name}-libs = %{epoch}:%{version}-%{release} -Requires: gnutls-devel +Requires: openssl-devel Requires: krb5-devel Requires: zlib-devel Obsoletes: cupsddk-devel < 1.2.3-7 @@ -576,6 +576,9 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog +* Fri Jun 18 2010 Tim Waugh 1:1.4.4-2 +- Re-enabled SSL support by using OpenSSL instead of gnutls. + * Fri Jun 18 2010 Tim Waugh 1:1.4.4-1 - 1.4.4. Fixes several security vulnerabilities (bug #605399): CVE-2010-0540, CVE-2010-0542, CVE-2010-1748. No longer need str3503, From 47f98d2806b4133cc539714054c2ca0daa342595 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Tue, 22 Jun 2010 09:47:06 +0000 Subject: [PATCH 098/110] - Removed dependency on ghostscript-cups package. The pstoraster filter is not in that package until Fedora 13. --- cups.spec | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/cups.spec b/cups.spec index a3eccd4..83679a3 100644 --- a/cups.spec +++ b/cups.spec @@ -8,7 +8,7 @@ Summary: Common Unix Printing System Name: cups Version: 1.4.4 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2 Group: System Environment/Daemons Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2 @@ -136,9 +136,6 @@ Requires: ghostscript Requires: udev Requires: acl -# Make sure we have some filters for converting to raster format. -Requires: ghostscript-cups - %package devel Summary: Common Unix Printing System - development environment Group: Development/Libraries @@ -576,6 +573,10 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog +* Tue Jun 22 2010 Tim Waugh 1:1.4.4-3 +- Removed dependency on ghostscript-cups package. The pstoraster + filter is not in that package until Fedora 13. + * Fri Jun 18 2010 Tim Waugh 1:1.4.4-2 - Re-enabled SSL support by using OpenSSL instead of gnutls. From 3fec50e02aa0f973bbe8d7a9851d6d402a5535af Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Tue, 22 Jun 2010 09:47:50 +0000 Subject: [PATCH 099/110] - Rebuilt to keep correct package n-v-r ordering between releases. --- cups.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cups.spec b/cups.spec index 95833bb..a2b1b33 100644 --- a/cups.spec +++ b/cups.spec @@ -8,7 +8,7 @@ Summary: Common Unix Printing System Name: cups Version: 1.4.4 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2 Group: System Environment/Daemons Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2 @@ -561,6 +561,9 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog +* Tue Jun 22 2010 Tim Waugh 1:1.4.4-3 +- Rebuilt to keep correct package n-v-r ordering between releases. + * Fri Jun 18 2010 Tim Waugh 1:1.4.4-2 - Re-enabled SSL support by using OpenSSL instead of gnutls. From 12ee3e5cb85c88b5c97047d89dbbfdbcd2336401 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Thu, 24 Jun 2010 12:07:08 +0000 Subject: [PATCH 100/110] - Use gnutls again but disable threading (bug #607159). --- cups.spec | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/cups.spec b/cups.spec index a2b1b33..990d3d0 100644 --- a/cups.spec +++ b/cups.spec @@ -8,7 +8,7 @@ Summary: Common Unix Printing System Name: cups Version: 1.4.4 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2 Group: System Environment/Daemons Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2 @@ -91,7 +91,7 @@ Provides: cupsddk-drivers = 1.2.3-7 Conflicts: kdelibs < 6:3.5.2-6 BuildRequires: pam-devel pkgconfig -BuildRequires: openssl-devel libacl-devel +BuildRequires: gnutls-devel libacl-devel BuildRequires: openldap-devel BuildRequires: make >= 1:3.80 BuildRequires: php-devel, pcre-devel @@ -137,7 +137,7 @@ Summary: Common Unix Printing System - development environment Group: Development/Libraries License: LGPLv2 Requires: %{name}-libs = %{epoch}:%{version}-%{release} -Requires: openssl-devel +Requires: gnutls-devel Requires: krb5-devel Requires: zlib-devel Obsoletes: cupsddk-devel < 1.2.3-7 @@ -295,9 +295,10 @@ export CFLAGS="$RPM_OPT_FLAGS -fstack-protector-all -DLDAP_DEPRECATED=1" --enable-lspp \ %endif --with-log-file-perm=0600 --enable-pie --enable-relro \ - --enable-pdftops --with-pdftops=pdftops \ + --with-pdftops=pdftops \ --with-dbusdir=%{_sysconfdir}/dbus-1 \ --with-php=/usr/bin/php-cgi --enable-avahi \ + --disable-threads --enable-gnutls \ localedir=%{_datadir}/locale # If we got this far, all prerequisite libraries must be here. @@ -561,6 +562,9 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog +* Thu Jun 24 2010 Tim Waugh 1:1.4.4-4 +- Use gnutls again but disable threading (bug #607159). + * Tue Jun 22 2010 Tim Waugh 1:1.4.4-3 - Rebuilt to keep correct package n-v-r ordering between releases. From ba41a86c62e76b77a88e694a2c35c66ef14d23d4 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Thu, 24 Jun 2010 12:07:41 +0000 Subject: [PATCH 101/110] - Use gnutls again but disable threading (bug #607159). --- cups.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cups.spec b/cups.spec index 83679a3..78106f9 100644 --- a/cups.spec +++ b/cups.spec @@ -8,7 +8,7 @@ Summary: Common Unix Printing System Name: cups Version: 1.4.4 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2 Group: System Environment/Daemons Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2 @@ -302,9 +302,10 @@ export CFLAGS="$RPM_OPT_FLAGS -fstack-protector-all -DLDAP_DEPRECATED=1" --enable-lspp \ %endif --with-log-file-perm=0600 --enable-pie --enable-relro \ - --enable-pdftops --with-pdftops=pdftops \ + --with-pdftops=pdftops \ --with-dbusdir=%{_sysconfdir}/dbus-1 \ --with-php=/usr/bin/php-cgi --enable-avahi \ + --disable-threads --enable-gnutls \ localedir=%{_datadir}/locale # If we got this far, all prerequisite libraries must be here. @@ -573,6 +574,9 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog +* Thu Jun 24 2010 Tim Waugh 1:1.4.4-4 +- Use gnutls again but disable threading (bug #607159). + * Tue Jun 22 2010 Tim Waugh 1:1.4.4-3 - Removed dependency on ghostscript-cups package. The pstoraster filter is not in that package until Fedora 13. From 43633faa1937ef38f98e1fa594d0452e0489317c Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Mon, 28 Jun 2010 12:08:21 +0000 Subject: [PATCH 102/110] - Avoid empty notify-subscribed-event attributes (bug #606909, STR #3608). --- cups-str3608.patch | 18 ++++++++++++++++++ cups.spec | 10 +++++++++- 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 cups-str3608.patch diff --git a/cups-str3608.patch b/cups-str3608.patch new file mode 100644 index 0000000..c770f19 --- /dev/null +++ b/cups-str3608.patch @@ -0,0 +1,18 @@ +diff -up cups-1.4.4/scheduler/subscriptions.c.str3608 cups-1.4.4/scheduler/subscriptions.c +--- cups-1.4.4/scheduler/subscriptions.c.str3608 2010-06-28 12:07:54.611008831 +0100 ++++ cups-1.4.4/scheduler/subscriptions.c 2010-06-28 12:09:25.315887577 +0100 +@@ -551,12 +551,14 @@ cupsdEventName( + return ("printer-media-changed"); + + case CUPSD_EVENT_PRINTER_ADDED : ++ case CUPSD_EVENT_PRINTER_ADDED | CUPSD_EVENT_PRINTER_CONFIG: + return ("printer-added"); + + case CUPSD_EVENT_PRINTER_DELETED : + return ("printer-deleted"); + + case CUPSD_EVENT_PRINTER_MODIFIED : ++ case CUPSD_EVENT_PRINTER_MODIFIED | CUPSD_EVENT_PRINTER_CONFIG: + return ("printer-modified"); + + case CUPSD_EVENT_PRINTER_QUEUE_ORDER_CHANGED : diff --git a/cups.spec b/cups.spec index 78106f9..17f28bb 100644 --- a/cups.spec +++ b/cups.spec @@ -8,7 +8,7 @@ Summary: Common Unix Printing System Name: cups Version: 1.4.4 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv2 Group: System Environment/Daemons Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2 @@ -67,6 +67,7 @@ Patch34: cups-hp-deviceid-oid.patch Patch35: cups-dnssd-deviceid.patch Patch36: cups-ricoh-deviceid-oid.patch Patch37: cups-texttops-rotate-page.patch +Patch38: cups-str3608.patch Patch100: cups-lspp.patch @@ -271,6 +272,9 @@ module. # This fixes page-label orientation when texttops is used in the # filter chain (bug #572338). %patch37 -p1 -b .texttops-rotate-page +# Avoid empty notify-subscribed-event attributes (bug #606909, STR +# #3608). +%patch38 -p1 -b .str3608 %if %lspp # LSPP support. @@ -574,6 +578,10 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog +* Mon Jun 28 2010 Tim Waugh 1:1.4.4-5 +- Avoid empty notify-subscribed-event attributes (bug #606909, + STR #3608). + * Thu Jun 24 2010 Tim Waugh 1:1.4.4-4 - Use gnutls again but disable threading (bug #607159). From af255f6ce3b948e62ccf0ff4c44a10c72fe4e373 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Mon, 28 Jun 2010 12:08:36 +0000 Subject: [PATCH 103/110] - Avoid empty notify-subscribed-event attributes (bug #606909, STR #3608). --- cups-str3608.patch | 18 ++++++++++++++++++ cups.spec | 10 +++++++++- 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 cups-str3608.patch diff --git a/cups-str3608.patch b/cups-str3608.patch new file mode 100644 index 0000000..c770f19 --- /dev/null +++ b/cups-str3608.patch @@ -0,0 +1,18 @@ +diff -up cups-1.4.4/scheduler/subscriptions.c.str3608 cups-1.4.4/scheduler/subscriptions.c +--- cups-1.4.4/scheduler/subscriptions.c.str3608 2010-06-28 12:07:54.611008831 +0100 ++++ cups-1.4.4/scheduler/subscriptions.c 2010-06-28 12:09:25.315887577 +0100 +@@ -551,12 +551,14 @@ cupsdEventName( + return ("printer-media-changed"); + + case CUPSD_EVENT_PRINTER_ADDED : ++ case CUPSD_EVENT_PRINTER_ADDED | CUPSD_EVENT_PRINTER_CONFIG: + return ("printer-added"); + + case CUPSD_EVENT_PRINTER_DELETED : + return ("printer-deleted"); + + case CUPSD_EVENT_PRINTER_MODIFIED : ++ case CUPSD_EVENT_PRINTER_MODIFIED | CUPSD_EVENT_PRINTER_CONFIG: + return ("printer-modified"); + + case CUPSD_EVENT_PRINTER_QUEUE_ORDER_CHANGED : diff --git a/cups.spec b/cups.spec index 990d3d0..17b7893 100644 --- a/cups.spec +++ b/cups.spec @@ -8,7 +8,7 @@ Summary: Common Unix Printing System Name: cups Version: 1.4.4 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv2 Group: System Environment/Daemons Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2 @@ -63,6 +63,7 @@ Patch34: cups-hp-deviceid-oid.patch Patch35: cups-dnssd-deviceid.patch Patch36: cups-ricoh-deviceid-oid.patch Patch37: cups-texttops-rotate-page.patch +Patch38: cups-str3608.patch Patch100: cups-lspp.patch @@ -264,6 +265,9 @@ module. # This fixes page-label orientation when texttops is used in the # filter chain (bug #572338). %patch37 -p1 -b .texttops-rotate-page +# Avoid empty notify-subscribed-event attributes (bug #606909, STR +# #3608). +%patch38 -p1 -b .str3608 %if %lspp # LSPP support. @@ -562,6 +566,10 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog +* Mon Jun 28 2010 Tim Waugh 1:1.4.4-5 +- Avoid empty notify-subscribed-event attributes (bug #606909, + STR #3608). + * Thu Jun 24 2010 Tim Waugh 1:1.4.4-4 - Use gnutls again but disable threading (bug #607159). From fa65c8fde97733a47c8248ca29e890d6b92e2cff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Popelka?= Date: Mon, 12 Jul 2010 12:09:00 +0000 Subject: [PATCH 104/110] - Moved LICENSE.txt to libs sub-package. --- cups.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cups.spec b/cups.spec index 17b7893..78c1009 100644 --- a/cups.spec +++ b/cups.spec @@ -8,7 +8,7 @@ Summary: Common Unix Printing System Name: cups Version: 1.4.4 -Release: 5%{?dist} +Release: 6%{?dist} License: GPLv2 Group: System Environment/Daemons Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2 @@ -451,7 +451,7 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) -%doc LICENSE.txt README.txt CREDITS.txt CHANGES.txt +%doc README.txt CREDITS.txt CHANGES.txt /lib/udev/rules.d/70-cups-libusb.rules %dir %attr(0755,root,lp) %{_sysconfdir}/cups %dir %attr(0755,root,lp) /var/run/cups @@ -545,6 +545,7 @@ rm -rf $RPM_BUILD_ROOT %files libs %defattr(-,root,root) +%doc LICENSE.txt %{_libdir}/*.so.* %files devel @@ -566,6 +567,9 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog +* Mon Jul 12 2010 Jiri Popelka 1:1.4.4-6 +- Moved LICENSE.txt to libs sub-package. + * Mon Jun 28 2010 Tim Waugh 1:1.4.4-5 - Avoid empty notify-subscribed-event attributes (bug #606909, STR #3608). From 17626f15a17919e6e8909e170d0c8579e5d96e4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Popelka?= Date: Tue, 13 Jul 2010 09:28:53 +0000 Subject: [PATCH 105/110] - Added restartlog to initscript usage output (bug #612996). --- cups.init | 2 +- cups.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/cups.init b/cups.init index 09f7171..b01c52a 100644 --- a/cups.init +++ b/cups.init @@ -137,7 +137,7 @@ case $1 in ;; *) - echo $"Usage: $prog {start|stop|restart|condrestart|try-restart|reload|force-reload|status}" + echo $"Usage: $prog {start|stop|restart|restartlog|condrestart|try-restart|reload|force-reload|status}" exit 2 esac diff --git a/cups.spec b/cups.spec index 78c1009..c937dbc 100644 --- a/cups.spec +++ b/cups.spec @@ -8,7 +8,7 @@ Summary: Common Unix Printing System Name: cups Version: 1.4.4 -Release: 6%{?dist} +Release: 7%{?dist} License: GPLv2 Group: System Environment/Daemons Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2 @@ -567,6 +567,9 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog +* Mon Jul 12 2010 Jiri Popelka 1:1.4.4-7 +- Added restartlog to initscript usage output (bug #612996). + * Mon Jul 12 2010 Jiri Popelka 1:1.4.4-6 - Moved LICENSE.txt to libs sub-package. From 41d2c934692f74261c6c409ac208a65fbc5cea9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Popelka?= Date: Tue, 13 Jul 2010 09:30:22 +0000 Subject: [PATCH 106/110] Corrected date in changelog --- cups.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cups.spec b/cups.spec index c937dbc..4f2ec8f 100644 --- a/cups.spec +++ b/cups.spec @@ -567,7 +567,7 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog -* Mon Jul 12 2010 Jiri Popelka 1:1.4.4-7 +* Tue Jul 13 2010 Jiri Popelka 1:1.4.4-7 - Added restartlog to initscript usage output (bug #612996). * Mon Jul 12 2010 Jiri Popelka 1:1.4.4-6 From 405b603b93d783e0d1c06370ee7039dc6f0b67d7 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 28 Jul 2010 12:26:32 +0000 Subject: [PATCH 107/110] dist-git conversion --- .cvsignore => .gitignore | 0 Makefile | 21 --------------------- branch | 1 - 3 files changed, 22 deletions(-) rename .cvsignore => .gitignore (100%) delete mode 100644 Makefile delete mode 100644 branch diff --git a/.cvsignore b/.gitignore similarity index 100% rename from .cvsignore rename to .gitignore diff --git a/Makefile b/Makefile deleted file mode 100644 index 1569e04..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: cups -# $Id: Makefile,v 1.2 2007/10/15 18:40:52 notting Exp $ -NAME := cups -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attempt a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) diff --git a/branch b/branch deleted file mode 100644 index baa94ef..0000000 --- a/branch +++ /dev/null @@ -1 +0,0 @@ -F-13 From 91cb8dc7b0ebd1b20aace58941daaad26cb5009e Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 28 Jul 2010 12:26:58 +0000 Subject: [PATCH 108/110] dist-git conversion --- .cvsignore => .gitignore | 0 Makefile | 21 --------------------- branch | 1 - 3 files changed, 22 deletions(-) rename .cvsignore => .gitignore (100%) delete mode 100644 Makefile delete mode 100644 branch diff --git a/.cvsignore b/.gitignore similarity index 100% rename from .cvsignore rename to .gitignore diff --git a/Makefile b/Makefile deleted file mode 100644 index 1569e04..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: cups -# $Id: Makefile,v 1.2 2007/10/15 18:40:52 notting Exp $ -NAME := cups -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attempt a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) diff --git a/branch b/branch deleted file mode 100644 index 06de2d2..0000000 --- a/branch +++ /dev/null @@ -1 +0,0 @@ -F-12 From c48334b105a970974049055ec8272880084276d1 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Tue, 3 Aug 2010 13:10:53 +0100 Subject: [PATCH 109/110] Build requires gnutls-devel not openssl-devel. --- cups.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cups.spec b/cups.spec index 17f28bb..3c45cee 100644 --- a/cups.spec +++ b/cups.spec @@ -96,7 +96,7 @@ Provides: cupsddk-drivers = 1.2.3-7 Conflicts: kdelibs < 6:3.5.2-6 BuildRequires: pam-devel pkgconfig -BuildRequires: openssl-devel libacl-devel +BuildRequires: gnutls-devel libacl-devel BuildRequires: openldap-devel BuildRequires: make >= 1:3.80 BuildRequires: php-devel, pcre-devel @@ -142,7 +142,7 @@ Summary: Common Unix Printing System - development environment Group: Development/Libraries License: LGPLv2 Requires: %{name}-libs = %{epoch}:%{version}-%{release} -Requires: openssl-devel +Requires: gnutls-devel Requires: krb5-devel Requires: zlib-devel Obsoletes: cupsddk-devel < 1.2.3-7 @@ -578,6 +578,9 @@ rm -rf $RPM_BUILD_ROOT %{php_extdir}/phpcups.so %changelog +* Tue Aug 3 2010 Tim Waugh +- Build requires gnutls-devel not openssl-devel. + * Mon Jun 28 2010 Tim Waugh 1:1.4.4-5 - Avoid empty notify-subscribed-event attributes (bug #606909, STR #3608). From 09ebecefb8388d1466cc3464b431bf974a580c60 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Tue, 3 Aug 2010 13:31:24 +0100 Subject: [PATCH 110/110] Removed old tarball. --- sources | 1 - 1 file changed, 1 deletion(-) diff --git a/sources b/sources index 0b9781c..3e65467 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -e70b1c3f60143d7310c1d74c111a21ab cups-1.4.3-source.tar.bz2 8776403ad60fea9e85eab9c04d88560d cups-1.4.4-source.tar.bz2