- 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.
This commit is contained in:
Tim Waugh 2010-06-18 10:51:07 +00:00
parent cc938fb319
commit bf1ed416fd
12 changed files with 134 additions and 424 deletions

View File

@ -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

View File

@ -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);

View File

@ -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 <stdlib.h>
#include <sys/stat.h>
@ -8,11 +9,11 @@
+#include <signal.h>
#ifdef WIN32
# include <windows.h>
#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 */
}

View File

@ -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 <Location path> 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 <Policy name> 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 <dlfcn.h>
#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 */

View File

@ -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.
*/

View File

@ -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))

View File

@ -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);
/*

View File

@ -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);
/*

View File

@ -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,

View File

@ -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);

View File

@ -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 <twaugh@redhat.com> 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 <twaugh@redhat.com>
- Removed unapplied gnutls-gcrypt-threads patch. Fixed typos in
descriptions for lpd and php sub-packages.

View File

@ -1 +1,2 @@
e70b1c3f60143d7310c1d74c111a21ab cups-1.4.3-source.tar.bz2
8776403ad60fea9e85eab9c04d88560d cups-1.4.4-source.tar.bz2