rpms/cups/F-10 cups-str3077.patch, NONE, 1.1 cups-str3078.patch, NONE, 1.1 cups-lspp.patch, 1.37, 1.38 cups.spec, 1.451, 1.452
Tim Waugh
twaugh at fedoraproject.org
Wed Jan 28 17:18:09 UTC 2009
- Previous message: rpms/cups/devel cups-str3077.patch, NONE, 1.1 cups-str3078.patch, NONE, 1.1 cups-lspp.patch, 1.39, 1.40 cups.spec, 1.455, 1.456
- Next message: rpms/selinux-policy/devel policy-20090105.patch, 1.21, 1.22 selinux-policy.spec, 1.776, 1.777
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: twaugh
Update of /cvs/pkgs/rpms/cups/F-10
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv2560
Modified Files:
cups-lspp.patch cups.spec
Added Files:
cups-str3077.patch cups-str3078.patch
Log Message:
* Wed Jan 28 2009 Tim Waugh <twaugh at redhat.com> 1:1.3.9-7
- Fixed quotas (STR #3077, STR #3078).
cups-str3077.patch:
--- NEW FILE cups-str3077.patch ---
diff -up cups-1.3.9/cups/encode.c.str3077 cups-1.3.9/cups/encode.c
--- cups-1.3.9/cups/encode.c.str3077 2008-07-11 23:48:49.000000000 +0100
+++ cups-1.3.9/cups/encode.c 2009-01-28 17:02:21.000000000 +0000
@@ -63,10 +63,10 @@ static const _ipp_option_t ipp_options[]
{ 0, "gamma-default", IPP_TAG_INTEGER, IPP_TAG_PRINTER },
{ 0, "hue", IPP_TAG_INTEGER, IPP_TAG_JOB },
{ 0, "hue-default", IPP_TAG_INTEGER, IPP_TAG_PRINTER },
- { 0, "job-k-limit", IPP_TAG_INTEGER, IPP_TAG_JOB },
- { 0, "job-page-limit", IPP_TAG_INTEGER, IPP_TAG_JOB },
+ { 0, "job-k-limit", IPP_TAG_INTEGER, IPP_TAG_PRINTER },
+ { 0, "job-page-limit", IPP_TAG_INTEGER, IPP_TAG_PRINTER },
{ 0, "job-priority", IPP_TAG_INTEGER, IPP_TAG_JOB },
- { 0, "job-quota-period", IPP_TAG_INTEGER, IPP_TAG_JOB },
+ { 0, "job-quota-period", IPP_TAG_INTEGER, IPP_TAG_PRINTER },
{ 1, "job-sheets", IPP_TAG_NAME, IPP_TAG_JOB },
{ 1, "job-sheets-default", IPP_TAG_NAME, IPP_TAG_PRINTER },
{ 0, "job-uuid", IPP_TAG_URI, IPP_TAG_JOB },
cups-str3078.patch:
--- NEW FILE cups-str3078.patch ---
diff -up cups-1.3.9/scheduler/job.c.str3078 cups-1.3.9/scheduler/job.c
--- cups-1.3.9/scheduler/job.c.str3078 2009-01-28 17:02:21.000000000 +0000
+++ cups-1.3.9/scheduler/job.c 2009-01-28 17:03:05.000000000 +0000
@@ -3,7 +3,7 @@
*
* Job management routines for the Common UNIX Printing System (CUPS).
*
- * Copyright 2007-2008 by Apple Inc.
+ * Copyright 2007-2009 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
*
* These coded instructions, statements, and computer programs are the
@@ -1019,7 +1019,7 @@ cupsdLoadAllJobs(void)
* 'cupsdLoadJob()' - Load a single job...
*/
-void
+int /* O - 1 on success, 0 on failure */
cupsdLoadJob(cupsd_job_t *job) /* I - Job */
{
char jobfile[1024]; /* Job filename */
@@ -1037,14 +1037,14 @@ cupsdLoadJob(cupsd_job_t *job) /* I - J
if (job->state_value > IPP_JOB_STOPPED)
job->access_time = time(NULL);
- return;
+ return (1);
}
if ((job->attrs = ippNew()) == NULL)
{
cupsdLogMessage(CUPSD_LOG_ERROR,
"[Job %d] Ran out of memory for job attributes!", job->id);
- return;
+ return (0);
}
/*
@@ -1059,9 +1059,7 @@ cupsdLoadJob(cupsd_job_t *job) /* I - J
cupsdLogMessage(CUPSD_LOG_ERROR,
"[Job %d] Unable to open job control file \"%s\" - %s!",
job->id, jobfile, strerror(errno));
- ippDelete(job->attrs);
- job->attrs = NULL;
- return;
+ goto error;
}
if (ippReadIO(fp, (ipp_iocb_t)cupsFileRead, 1, NULL, job->attrs) != IPP_DATA)
@@ -1070,10 +1068,7 @@ cupsdLoadJob(cupsd_job_t *job) /* I - J
"[Job %d] Unable to read job control file \"%s\"!",
job->id, jobfile);
cupsFileClose(fp);
- ippDelete(job->attrs);
- job->attrs = NULL;
- unlink(jobfile);
- return;
+ goto error;
}
cupsFileClose(fp);
@@ -1089,10 +1084,7 @@ cupsdLoadJob(cupsd_job_t *job) /* I - J
"[Job %d] Missing or bad job-state attribute in "
"control file!",
job->id);
- ippDelete(job->attrs);
- job->attrs = NULL;
- unlink(jobfile);
- return;
+ goto error;
}
job->state_value = (ipp_jstate_t)job->state->values[0].integer;
@@ -1105,10 +1097,7 @@ cupsdLoadJob(cupsd_job_t *job) /* I - J
cupsdLogMessage(CUPSD_LOG_ERROR,
"[Job %d] No job-printer-uri attribute in control file!",
job->id);
- ippDelete(job->attrs);
- job->attrs = NULL;
- unlink(jobfile);
- return;
+ goto error;
}
if ((dest = cupsdValidateDest(attr->values[0].string.text, &(job->dtype),
@@ -1117,10 +1106,7 @@ cupsdLoadJob(cupsd_job_t *job) /* I - J
cupsdLogMessage(CUPSD_LOG_ERROR,
"[Job %d] Unable to queue job for destination \"%s\"!",
job->id, attr->values[0].string.text);
- ippDelete(job->attrs);
- job->attrs = NULL;
- unlink(jobfile);
- return;
+ goto error;
}
cupsdSetString(&job->dest, dest);
@@ -1130,10 +1116,7 @@ cupsdLoadJob(cupsd_job_t *job) /* I - J
cupsdLogMessage(CUPSD_LOG_ERROR,
"[Job %d] Unable to queue job for destination \"%s\"!",
job->id, job->dest);
- ippDelete(job->attrs);
- job->attrs = NULL;
- unlink(jobfile);
- return;
+ goto error;
}
job->sheets = ippFindAttribute(job->attrs, "job-media-sheets-completed",
@@ -1148,10 +1131,7 @@ cupsdLoadJob(cupsd_job_t *job) /* I - J
cupsdLogMessage(CUPSD_LOG_ERROR,
"[Job %d] Missing or bad job-priority attribute in "
"control file!", job->id);
- ippDelete(job->attrs);
- job->attrs = NULL;
- unlink(jobfile);
- return;
+ goto error;
}
job->priority = attr->values[0].integer;
@@ -1165,10 +1145,7 @@ cupsdLoadJob(cupsd_job_t *job) /* I - J
cupsdLogMessage(CUPSD_LOG_ERROR,
"[Job %d] Missing or bad job-originating-user-name "
"attribute in control file!", job->id);
- ippDelete(job->attrs);
- job->attrs = NULL;
- unlink(jobfile);
- return;
+ goto error;
}
cupsdSetString(&job->username, attr->values[0].string.text);
@@ -1237,7 +1214,7 @@ cupsdLoadJob(cupsd_job_t *job) /* I - J
cupsdLogMessage(CUPSD_LOG_ERROR,
"[Job %d] Ran out of memory for job file types!",
job->id);
- return;
+ return (1);
}
job->compressions = compressions;
@@ -1293,7 +1270,20 @@ cupsdLoadJob(cupsd_job_t *job) /* I - J
cupsFileClose(fp);
}
}
+
job->access_time = time(NULL);
+ return (1);
+
+ /*
+ * If we get here then something bad happened...
+ */
+
+ error:
+
+ ippDelete(job->attrs);
+ job->attrs = NULL;
+ unlink(jobfile);
+ return (0);
}
diff -up cups-1.3.9/scheduler/job.h.str3078 cups-1.3.9/scheduler/job.h
--- cups-1.3.9/scheduler/job.h.str3078 2008-01-16 22:20:33.000000000 +0000
+++ cups-1.3.9/scheduler/job.h 2009-01-28 17:03:05.000000000 +0000
@@ -3,7 +3,7 @@
*
* Print job definitions for the Common UNIX Printing System (CUPS) scheduler.
*
- * Copyright 2007-2008 by Apple Inc.
+ * Copyright 2007-2009 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
*
* These coded instructions, statements, and computer programs are the
@@ -112,7 +112,7 @@ extern int cupsdGetPrinterJobCount(cons
extern int cupsdGetUserJobCount(const char *username);
extern void cupsdHoldJob(cupsd_job_t *job);
extern void cupsdLoadAllJobs(void);
-extern void cupsdLoadJob(cupsd_job_t *job);
+extern int cupsdLoadJob(cupsd_job_t *job);
extern void cupsdMoveJob(cupsd_job_t *job, cupsd_printer_t *p);
extern void cupsdReleaseJob(cupsd_job_t *job);
extern void cupsdRestartJob(cupsd_job_t *job);
diff -up cups-1.3.9/scheduler/quotas.c.str3078 cups-1.3.9/scheduler/quotas.c
--- cups-1.3.9/scheduler/quotas.c.str3078 2007-09-12 22:33:23.000000000 +0100
+++ cups-1.3.9/scheduler/quotas.c 2009-01-28 17:03:05.000000000 +0000
@@ -3,7 +3,7 @@
*
* Quota routines for the Common UNIX Printing System (CUPS).
*
- * Copyright 2007 by Apple Inc.
+ * Copyright 2007-2009 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
@@ -155,10 +155,22 @@ cupsdUpdateQuota(
job;
job = (cupsd_job_t *)cupsArrayNext(Jobs))
{
+ /*
+ * We only care about the current printer/class and user...
+ */
+
if (strcasecmp(job->dest, p->name) != 0 ||
strcasecmp(job->username, q->username) != 0)
continue;
+ /*
+ * Make sure attributes are loaded; we always call cupsdLoadJob() to ensure
+ * the access_time member is updated so the job isn't unloaded right away...
+ */
+
+ if (!cupsdLoadJob(job))
+ continue;
+
if ((attr = ippFindAttribute(job->attrs, "time-at-completion",
IPP_TAG_INTEGER)) == NULL)
if ((attr = ippFindAttribute(job->attrs, "time-at-processing",
@@ -166,11 +178,22 @@ cupsdUpdateQuota(
attr = ippFindAttribute(job->attrs, "time-at-creation",
IPP_TAG_INTEGER);
- if (attr == NULL)
- break;
+ if (!attr)
+ {
+ /*
+ * This should never happen since cupsdLoadJob() checks for
+ * time-at-creation, but if it does just ignore this job...
+ */
+
+ continue;
+ }
if (attr->values[0].integer < curtime)
{
+ /*
+ * This job is too old to count towards the quota, ignore it...
+ */
+
if (JobAutoPurge)
cupsdCancelJob(job, 1, IPP_JOB_CANCELED);
cups-lspp.patch:
Index: cups-lspp.patch
===================================================================
RCS file: /cvs/pkgs/rpms/cups/F-10/cups-lspp.patch,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -r1.37 -r1.38
--- cups-lspp.patch 30 Oct 2008 14:31:23 -0000 1.37
+++ cups-lspp.patch 28 Jan 2009 17:18:09 -0000 1.38
@@ -1,7 +1,7 @@
-diff -up cups-1.3.8/config.h.in.lspp cups-1.3.8/config.h.in
---- cups-1.3.8/config.h.in.lspp 2008-09-10 16:18:26.000000000 +0100
-+++ cups-1.3.8/config.h.in 2008-09-10 16:18:26.000000000 +0100
-@@ -544,6 +544,13 @@
+diff -up cups-1.3.9/config.h.in.lspp cups-1.3.9/config.h.in
+--- cups-1.3.9/config.h.in.lspp 2009-01-28 17:12:34.000000000 +0000
++++ cups-1.3.9/config.h.in 2009-01-28 17:12:34.000000000 +0000
+@@ -551,6 +551,13 @@
#undef HAVE_REMOVEFILE
@@ -15,9 +15,9 @@
#endif /* !_CUPS_CONFIG_H_ */
/*
-diff -up /dev/null cups-1.3.8/config-scripts/cups-lspp.m4
---- /dev/null 2008-09-10 08:56:32.430063181 +0100
-+++ cups-1.3.8/config-scripts/cups-lspp.m4 2008-09-10 16:18:26.000000000 +0100
+diff -up /dev/null cups-1.3.9/config-scripts/cups-lspp.m4
+--- /dev/null 2009-01-28 08:58:18.489189414 +0000
++++ cups-1.3.9/config-scripts/cups-lspp.m4 2009-01-28 17:12:34.000000000 +0000
@@ -0,0 +1,36 @@
+dnl
+dnl LSPP code for the Common UNIX Printing System (CUPS).
@@ -55,9 +55,9 @@
+ ;;
+ esac
+fi
-diff -up cups-1.3.8/configure.in.lspp cups-1.3.8/configure.in
---- cups-1.3.8/configure.in.lspp 2007-07-25 00:47:12.000000000 +0100
-+++ cups-1.3.8/configure.in 2008-09-10 16:18:26.000000000 +0100
+diff -up cups-1.3.9/configure.in.lspp cups-1.3.9/configure.in
+--- cups-1.3.9/configure.in.lspp 2007-07-25 00:47:12.000000000 +0100
++++ cups-1.3.9/configure.in 2009-01-28 17:12:34.000000000 +0000
@@ -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 @@
INSTALL_LANGUAGES=""
UNINSTALL_LANGUAGES=""
LANGFILES=""
-diff -up cups-1.3.8/configure.lspp cups-1.3.8/configure
---- cups-1.3.8/configure.lspp 2008-09-10 16:18:26.000000000 +0100
-+++ cups-1.3.8/configure 2008-09-10 16:18:43.000000000 +0100
+diff -up cups-1.3.9/configure.lspp cups-1.3.9/configure
+--- cups-1.3.9/configure.lspp 2009-01-28 17:12:34.000000000 +0000
++++ cups-1.3.9/configure 2009-01-28 17:12:34.000000000 +0000
@@ -807,6 +807,8 @@ PHP
PHPCONFIG
PHPDIR
@@ -87,7 +87,7 @@
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
-@@ -18555,6 +18558,412 @@ fi
+@@ -18862,6 +18865,412 @@ fi
@@ -500,7 +500,7 @@
INSTALL_LANGUAGES=""
UNINSTALL_LANGUAGES=""
LANGFILES=""
-@@ -19449,7 +19858,7 @@ PHP!$PHP$ac_delim
+@@ -19756,7 +20165,7 @@ PHP!$PHP$ac_delim
PHPCONFIG!$PHPCONFIG$ac_delim
PHPDIR!$PHPDIR$ac_delim
PYTHON!$PYTHON$ac_delim
@@ -509,7 +509,7 @@
_ACEOF
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
-@@ -19491,12 +19900,14 @@ _ACEOF
+@@ -19798,12 +20207,14 @@ _ACEOF
ac_delim='%!_!# '
for ac_last_try in false false false false false :; do
cat >conf$$subs.sed <<_ACEOF
@@ -525,9 +525,9 @@
break
elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
-diff -up cups-1.3.8/cups/cups.h.lspp cups-1.3.8/cups/cups.h
---- cups-1.3.8/cups/cups.h.lspp 2008-09-10 16:18:26.000000000 +0100
-+++ cups-1.3.8/cups/cups.h 2008-09-10 16:18:26.000000000 +0100
+diff -up cups-1.3.9/cups/cups.h.lspp cups-1.3.9/cups/cups.h
+--- cups-1.3.9/cups/cups.h.lspp 2009-01-28 17:12:34.000000000 +0000
++++ cups-1.3.9/cups/cups.h 2009-01-28 17:12:34.000000000 +0000
@@ -15,6 +15,9 @@
* This file is subject to the Apple OS-Developed Software exception.
*/
@@ -551,9 +551,9 @@
/*
* Types and structures...
*/
-diff -up cups-1.3.8/data/Makefile.lspp cups-1.3.8/data/Makefile
---- cups-1.3.8/data/Makefile.lspp 2007-10-10 23:00:43.000000000 +0100
-+++ cups-1.3.8/data/Makefile 2008-09-10 16:18:26.000000000 +0100
+diff -up cups-1.3.9/data/Makefile.lspp cups-1.3.9/data/Makefile
+--- cups-1.3.9/data/Makefile.lspp 2007-10-10 23:00:43.000000000 +0100
++++ cups-1.3.9/data/Makefile 2009-01-28 17:12:34.000000000 +0000
@@ -25,7 +25,10 @@ BANNERS = \
secret \
standard \
@@ -566,9 +566,9 @@
CHARMAPS = \
euc-cn.txt \
-diff -up /dev/null cups-1.3.8/data/mls
---- /dev/null 2008-09-10 08:56:32.430063181 +0100
-+++ cups-1.3.8/data/mls 2008-09-10 16:18:26.000000000 +0100
+diff -up /dev/null cups-1.3.9/data/mls
+--- /dev/null 2009-01-28 08:58:18.489189414 +0000
++++ cups-1.3.9/data/mls 2009-01-28 17:12:34.000000000 +0000
@@ -0,0 +1,261 @@
+%!PS-Adobe-3.0
+%%BoundingBox: 0 0 612 792
@@ -831,9 +831,9 @@
+% End of "$Id$".
+%
+%%EOF
-diff -up /dev/null cups-1.3.8/data/selinux
---- /dev/null 2008-09-10 08:56:32.430063181 +0100
-+++ cups-1.3.8/data/selinux 2008-09-10 16:18:26.000000000 +0100
+diff -up /dev/null cups-1.3.9/data/selinux
+--- /dev/null 2009-01-28 08:58:18.489189414 +0000
++++ cups-1.3.9/data/selinux 2009-01-28 17:12:34.000000000 +0000
@@ -0,0 +1,261 @@
+%!PS-Adobe-3.0
+%%BoundingBox: 0 0 612 792
@@ -1096,9 +1096,9 @@
+% End of "$Id$".
+%
+%%EOF
-diff -up /dev/null cups-1.3.8/data/te
---- /dev/null 2008-09-10 08:56:32.430063181 +0100
-+++ cups-1.3.8/data/te 2008-09-10 16:18:26.000000000 +0100
+diff -up /dev/null cups-1.3.9/data/te
+--- /dev/null 2009-01-28 08:58:18.489189414 +0000
++++ cups-1.3.9/data/te 2009-01-28 17:12:34.000000000 +0000
@@ -0,0 +1,261 @@
+%!PS-Adobe-3.0
+%%BoundingBox: 0 0 612 792
@@ -1361,9 +1361,9 @@
+% End of "$Id$".
+%
+%%EOF
-diff -up cups-1.3.8/filter/common.c.lspp cups-1.3.8/filter/common.c
---- cups-1.3.8/filter/common.c.lspp 2008-07-11 23:48:49.000000000 +0100
-+++ cups-1.3.8/filter/common.c 2008-09-10 16:18:26.000000000 +0100
+diff -up cups-1.3.9/filter/common.c.lspp cups-1.3.9/filter/common.c
+--- cups-1.3.9/filter/common.c.lspp 2008-07-11 23:48:49.000000000 +0100
++++ cups-1.3.9/filter/common.c 2009-01-28 17:12:34.000000000 +0000
@@ -30,6 +30,12 @@
* Include necessary headers...
*/
@@ -1532,9 +1532,10 @@
/*
---- cups-1.3.9/filter/pstops.c.lspp 2008-10-30 13:29:33.000000000 +0000
-+++ cups-1.3.9/filter/pstops.c 2008-10-30 13:31:06.000000000 +0000
-@@ -3233,6 +3233,18 @@ write_label_prolog(pstops_doc_t *doc, /*
+diff -up cups-1.3.9/filter/pstops.c.lspp cups-1.3.9/filter/pstops.c
+--- cups-1.3.9/filter/pstops.c.lspp 2009-01-28 17:12:34.000000000 +0000
++++ cups-1.3.9/filter/pstops.c 2009-01-28 17:12:34.000000000 +0000
+@@ -3230,6 +3230,18 @@ write_label_prolog(pstops_doc_t *doc, /*
{
const char *classification; /* CLASSIFICATION environment variable */
const char *ptr; /* Temporary string pointer */
@@ -1553,7 +1554,7 @@
/*
-@@ -3255,6 +3267,124 @@ write_label_prolog(pstops_doc_t *doc, /*
+@@ -3252,6 +3264,124 @@ write_label_prolog(pstops_doc_t *doc, /*
return;
}
@@ -1678,7 +1679,7 @@
/*
* Set the classification + page label string...
*/
-@@ -3333,7 +3463,10 @@ write_label_prolog(pstops_doc_t *doc, /*
+@@ -3330,7 +3460,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");
@@ -1689,9 +1690,9 @@
/*
-diff -up cups-1.3.8/Makedefs.in.lspp cups-1.3.8/Makedefs.in
---- cups-1.3.8/Makedefs.in.lspp 2008-01-22 22:37:21.000000000 +0000
-+++ cups-1.3.8/Makedefs.in 2008-09-10 16:18:26.000000000 +0100
+diff -up cups-1.3.9/Makedefs.in.lspp cups-1.3.9/Makedefs.in
+--- cups-1.3.9/Makedefs.in.lspp 2008-01-22 22:37:21.000000000 +0000
++++ cups-1.3.9/Makedefs.in 2009-01-28 17:12:34.000000000 +0000
@@ -134,7 +134,7 @@ LIBCUPSORDER = @LIBCUPSORDER@
LIBCUPSIMAGEORDER = @LIBCUPSIMAGEORDER@
LINKCUPS = @LINKCUPS@ $(SSLLIBS)
@@ -1701,9 +1702,9 @@
OPTIM = @OPTIM@
OPTIONS =
PAMLIBS = @PAMLIBS@
-diff -up cups-1.3.8/scheduler/client.c.lspp cups-1.3.8/scheduler/client.c
---- cups-1.3.8/scheduler/client.c.lspp 2008-09-10 16:18:26.000000000 +0100
-+++ cups-1.3.8/scheduler/client.c 2008-09-10 16:18:26.000000000 +0100
+diff -up cups-1.3.9/scheduler/client.c.lspp cups-1.3.9/scheduler/client.c
+--- cups-1.3.9/scheduler/client.c.lspp 2009-01-28 17:12:34.000000000 +0000
++++ cups-1.3.9/scheduler/client.c 2009-01-28 17:12:34.000000000 +0000
@@ -40,12 +40,14 @@
* pipe_command() - Pipe the output of a command to the remote client.
* write_file() - Send a file via HTTP.
@@ -1790,7 +1791,7 @@
#ifdef AF_INET6
if (con->http.hostaddr->addr.sa_family == AF_INET6)
cupsdLogMessage(CUPSD_LOG_DEBUG, "cupsdAcceptClient: %d from %s:%d (IPv6)",
-@@ -733,6 +792,13 @@ cupsdReadClient(cupsd_client_t *con) /*
+@@ -741,6 +800,13 @@ cupsdReadClient(cupsd_client_t *con) /*
mime_type_t *type; /* MIME type of file */
cupsd_printer_t *p; /* Printer */
static unsigned request_id = 0; /* Request ID for temp files */
@@ -1804,7 +1805,7 @@
status = HTTP_CONTINUE;
-@@ -2017,6 +2083,67 @@ cupsdReadClient(cupsd_client_t *con) /*
+@@ -2034,6 +2100,67 @@ cupsdReadClient(cupsd_client_t *con) /*
fchmod(con->file, 0640);
fchown(con->file, RunUser, Group);
fcntl(con->file, F_SETFD, fcntl(con->file, F_GETFD) | FD_CLOEXEC);
@@ -1872,7 +1873,7 @@
}
if (con->http.state != HTTP_POST_SEND)
-@@ -4288,6 +4415,50 @@ make_certificate(cupsd_client_t *con) /*
+@@ -4305,6 +4432,50 @@ make_certificate(cupsd_client_t *con) /*
#endif /* HAVE_SSL */
@@ -1923,9 +1924,9 @@
/*
* 'pipe_command()' - Pipe the output of a command to the remote client.
*/
-diff -up cups-1.3.8/scheduler/client.h.lspp cups-1.3.8/scheduler/client.h
---- cups-1.3.8/scheduler/client.h.lspp 2007-10-22 19:52:13.000000000 +0100
-+++ cups-1.3.8/scheduler/client.h 2008-09-10 16:18:26.000000000 +0100
+diff -up cups-1.3.9/scheduler/client.h.lspp cups-1.3.9/scheduler/client.h
+--- cups-1.3.9/scheduler/client.h.lspp 2007-10-22 19:52:13.000000000 +0100
++++ cups-1.3.9/scheduler/client.h 2009-01-28 17:12:34.000000000 +0000
@@ -17,6 +17,13 @@
# include <Security/Authorization.h>
#endif /* HAVE_AUTHORIZATION_H */
@@ -1961,9 +1962,9 @@
/*
-diff -up cups-1.3.8/scheduler/conf.c.lspp cups-1.3.8/scheduler/conf.c
---- cups-1.3.8/scheduler/conf.c.lspp 2008-09-10 16:18:26.000000000 +0100
-+++ cups-1.3.8/scheduler/conf.c 2008-09-10 16:18:26.000000000 +0100
+diff -up cups-1.3.9/scheduler/conf.c.lspp cups-1.3.9/scheduler/conf.c
+--- cups-1.3.9/scheduler/conf.c.lspp 2009-01-28 17:12:34.000000000 +0000
++++ cups-1.3.9/scheduler/conf.c 2009-01-28 17:12:34.000000000 +0000
@@ -27,6 +27,7 @@
* read_configuration() - Read a configuration file.
* read_location() - Read a <Location path> definition.
@@ -1993,7 +1994,7 @@
#endif /* HAVE_SSL */
{ "ServerName", &ServerName, CUPSD_VARTYPE_STRING },
{ "ServerRoot", &ServerRoot, CUPSD_VARTYPE_PATHNAME },
-@@ -352,6 +360,9 @@ cupsdReadConfiguration(void)
+@@ -370,6 +378,9 @@ cupsdReadConfiguration(void)
*old_requestroot; /* Old RequestRoot */
const char *tmpdir; /* TMPDIR environment variable */
struct stat tmpinfo; /* Temporary directory info */
@@ -2003,7 +2004,7 @@
/*
-@@ -614,6 +625,25 @@ cupsdReadConfiguration(void)
+@@ -632,6 +643,25 @@ cupsdReadConfiguration(void)
RunUser = getuid();
@@ -2029,7 +2030,7 @@
/*
* See if the ServerName is an IP address...
*/
-@@ -896,11 +926,23 @@ cupsdReadConfiguration(void)
+@@ -911,11 +941,23 @@ cupsdReadConfiguration(void)
if (MaxActiveJobs > (MaxFDs / 3))
MaxActiveJobs = MaxFDs / 3;
@@ -2054,7 +2055,7 @@
/*
* Update the MaxClientsPerHost value, as needed...
-@@ -3299,6 +3341,18 @@ read_location(cups_file_t *fp, /* I - C
+@@ -3314,6 +3356,18 @@ read_location(cups_file_t *fp, /* I - C
return ((FatalErrors & CUPSD_FATAL_CONFIG) ? 0 : linenum);
}
@@ -2073,9 +2074,9 @@
/*
* 'read_policy()' - Read a <Policy name> definition.
-diff -up cups-1.3.8/scheduler/conf.h.lspp cups-1.3.8/scheduler/conf.h
---- cups-1.3.8/scheduler/conf.h.lspp 2008-09-10 16:18:26.000000000 +0100
-+++ cups-1.3.8/scheduler/conf.h 2008-09-10 16:18:26.000000000 +0100
+diff -up cups-1.3.9/scheduler/conf.h.lspp cups-1.3.9/scheduler/conf.h
+--- cups-1.3.9/scheduler/conf.h.lspp 2009-01-28 17:12:34.000000000 +0000
++++ cups-1.3.9/scheduler/conf.h 2009-01-28 17:12:34.000000000 +0000
@@ -208,6 +208,12 @@ VAR char *ServerKey VALUE(NULL);
/* Server key file */
# endif /* HAVE_LIBSSL || HAVE_GNUTLS */
@@ -2099,9 +2100,9 @@
/*
* Prototypes...
-diff -up cups-1.3.8/scheduler/ipp.c.lspp cups-1.3.8/scheduler/ipp.c
---- cups-1.3.8/scheduler/ipp.c.lspp 2008-09-10 16:18:26.000000000 +0100
-+++ cups-1.3.8/scheduler/ipp.c 2008-09-10 16:18:26.000000000 +0100
+diff -up cups-1.3.9/scheduler/ipp.c.lspp cups-1.3.9/scheduler/ipp.c
+--- cups-1.3.9/scheduler/ipp.c.lspp 2009-01-28 17:12:34.000000000 +0000
++++ cups-1.3.9/scheduler/ipp.c 2009-01-28 17:12:34.000000000 +0000
@@ -36,6 +36,7 @@
* cancel_all_jobs() - Cancel all print jobs.
* cancel_job() - Cancel a print job.
@@ -2418,7 +2419,7 @@
/*
* See if we need to add the starting sheet...
*/
-@@ -3521,6 +3750,103 @@ check_rss_recipient(
+@@ -3522,6 +3751,103 @@ check_rss_recipient(
}
@@ -2522,7 +2523,7 @@
/*
* 'check_quotas()' - Check quotas for a printer and user.
*/
-@@ -4042,6 +4368,15 @@ copy_banner(cupsd_client_t *con, /* I -
+@@ -4043,6 +4369,15 @@ copy_banner(cupsd_client_t *con, /* I -
char attrname[255], /* Name of attribute */
*s; /* Pointer into name */
ipp_attribute_t *attr; /* Attribute */
@@ -2538,7 +2539,7 @@
cupsdLogMessage(CUPSD_LOG_DEBUG2,
-@@ -4077,6 +4412,82 @@ copy_banner(cupsd_client_t *con, /* I -
+@@ -4078,6 +4413,82 @@ copy_banner(cupsd_client_t *con, /* I -
fchmod(cupsFileNumber(out), 0640);
fchown(cupsFileNumber(out), RunUser, Group);
@@ -2621,7 +2622,7 @@
/*
* Try the localized banner file under the subdirectory...
-@@ -4171,6 +4582,24 @@ copy_banner(cupsd_client_t *con, /* I -
+@@ -4172,6 +4583,24 @@ copy_banner(cupsd_client_t *con, /* I -
else
s = attrname;
@@ -2646,7 +2647,7 @@
if (!strcmp(s, "printer-name"))
{
cupsFilePuts(out, job->dest);
-@@ -5938,6 +6367,22 @@ get_job_attrs(cupsd_client_t *con, /* I
+@@ -5944,6 +6373,22 @@ get_job_attrs(cupsd_client_t *con, /* I
return;
}
@@ -2669,7 +2670,7 @@
/*
* Copy attributes...
*/
-@@ -6143,6 +6588,11 @@ get_jobs(cupsd_client_t *con, /* I - C
+@@ -6149,6 +6594,11 @@ get_jobs(cupsd_client_t *con, /* I - C
if (count > 0)
ippAddSeparator(con->response);
@@ -2681,7 +2682,7 @@
count ++;
cupsdLogMessage(CUPSD_LOG_DEBUG2, "get_jobs: count = %d", count);
-@@ -10255,6 +10705,11 @@ validate_user(cupsd_job_t *job, /* I
+@@ -10286,6 +10736,11 @@ validate_user(cupsd_job_t *job, /* I
strlcpy(username, get_username(con), userlen);
@@ -2693,9 +2694,9 @@
/*
* Check the username against the owner...
*/
-diff -up cups-1.3.8/scheduler/job.c.lspp cups-1.3.8/scheduler/job.c
---- cups-1.3.8/scheduler/job.c.lspp 2008-09-10 16:18:26.000000000 +0100
-+++ cups-1.3.8/scheduler/job.c 2008-09-10 16:18:26.000000000 +0100
+diff -up cups-1.3.9/scheduler/job.c.lspp cups-1.3.9/scheduler/job.c
+--- cups-1.3.9/scheduler/job.c.lspp 2009-01-28 17:12:34.000000000 +0000
++++ cups-1.3.9/scheduler/job.c 2009-01-28 17:12:47.000000000 +0000
@@ -60,6 +60,9 @@
* update_job_attrs() - Update the job-printer-* attributes.
*/
@@ -2721,8 +2722,8 @@
/*
* Local globals...
-@@ -1136,6 +1147,23 @@ cupsdLoadJob(cupsd_job_t *job) /* I - J
- return;
+@@ -1119,6 +1130,20 @@ cupsdLoadJob(cupsd_job_t *job) /* I - J
+ goto error;
}
+#ifdef WITH_LSPP
@@ -2735,17 +2736,14 @@
+ */
+ cupsdLogMessage(CUPSD_LOG_ERROR, "LoadAllJobs: Missing or bad security-context attribute in control file \"%s\"!",
+ jobfile);
-+ ippDelete(job->attrs);
-+ job->attrs = NULL;
-+ unlink(jobfile);
-+ return;
++ goto error;
+ }
+#endif /* WITH_LSPP */
+
job->sheets = ippFindAttribute(job->attrs, "job-media-sheets-completed",
IPP_TAG_INTEGER);
job->job_sheets = ippFindAttribute(job->attrs, "job-sheets", IPP_TAG_NAME);
-@@ -1493,6 +1521,13 @@ cupsdSaveJob(cupsd_job_t *job) /* I - J
+@@ -1483,6 +1508,13 @@ cupsdSaveJob(cupsd_job_t *job) /* I - J
{
char filename[1024]; /* Job control filename */
cups_file_t *fp; /* Job file */
@@ -2759,7 +2757,7 @@
cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdSaveJob(job=%p(%d)): job->attrs=%p",
-@@ -1511,6 +1546,76 @@ cupsdSaveJob(cupsd_job_t *job) /* I - J
+@@ -1501,6 +1533,76 @@ cupsdSaveJob(cupsd_job_t *job) /* I - J
fchmod(cupsFileNumber(fp), 0600);
fchown(cupsFileNumber(fp), RunUser, Group);
@@ -2836,7 +2834,7 @@
job->attrs->state = IPP_IDLE;
if (ippWriteIO(fp, (ipp_iocb_t)cupsFileWrite, 1, NULL,
-@@ -2485,6 +2590,21 @@ start_job(cupsd_job_t *job, /* I -
+@@ -2475,6 +2577,21 @@ start_job(cupsd_job_t *job, /* I -
/* RIP_MAX_CACHE env variable */
static char *options = NULL;/* Full list of options */
static int optlength = 0; /* Length of option buffer */
@@ -2858,7 +2856,7 @@
cupsdLogMessage(CUPSD_LOG_DEBUG2, "[Job %d] start_job: file = %d/%d",
-@@ -2756,6 +2876,106 @@ start_job(cupsd_job_t *job, /* I -
+@@ -2746,6 +2863,106 @@ start_job(cupsd_job_t *job, /* I -
fcntl(job->side_pipes[1], F_GETFL) | O_NONBLOCK);
}
@@ -2965,7 +2963,7 @@
/*
* Determine if we are printing a banner page or not...
*/
-@@ -2904,6 +3124,18 @@ start_job(cupsd_job_t *job, /* I -
+@@ -2894,6 +3111,18 @@ start_job(cupsd_job_t *job, /* I -
banner_page)
continue;
@@ -2984,7 +2982,7 @@
/*
* Otherwise add them to the list...
*/
-@@ -3146,6 +3378,67 @@ start_job(cupsd_job_t *job, /* I -
+@@ -3136,6 +3365,67 @@ start_job(cupsd_job_t *job, /* I -
}
}
@@ -3052,9 +3050,9 @@
if (Classification && !banner_page)
{
if ((attr = ippFindAttribute(job->attrs, "job-sheets",
-diff -up cups-1.3.8/scheduler/job.h.lspp cups-1.3.8/scheduler/job.h
---- cups-1.3.8/scheduler/job.h.lspp 2008-01-16 22:20:33.000000000 +0000
-+++ cups-1.3.8/scheduler/job.h 2008-09-10 16:18:26.000000000 +0100
+diff -up cups-1.3.9/scheduler/job.h.lspp cups-1.3.9/scheduler/job.h
+--- cups-1.3.9/scheduler/job.h.lspp 2009-01-28 17:12:34.000000000 +0000
++++ cups-1.3.9/scheduler/job.h 2009-01-28 17:12:34.000000000 +0000
@@ -13,6 +13,13 @@
* file is missing or damaged, see the license at "http://www.cups.org/".
*/
@@ -3080,9 +3078,9 @@
} cupsd_job_t;
-diff -up cups-1.3.8/scheduler/main.c.lspp cups-1.3.8/scheduler/main.c
---- cups-1.3.8/scheduler/main.c.lspp 2008-09-10 16:18:26.000000000 +0100
-+++ cups-1.3.8/scheduler/main.c 2008-09-10 16:18:26.000000000 +0100
+diff -up cups-1.3.9/scheduler/main.c.lspp cups-1.3.9/scheduler/main.c
+--- cups-1.3.9/scheduler/main.c.lspp 2009-01-28 17:12:34.000000000 +0000
++++ cups-1.3.9/scheduler/main.c 2009-01-28 17:12:34.000000000 +0000
@@ -35,6 +35,8 @@
* usage() - Show scheduler usage.
*/
@@ -3138,7 +3136,7 @@
/*
* Set the timezone info...
*/
-@@ -1160,6 +1187,11 @@ main(int argc, /* I - Number of comm
+@@ -1192,6 +1219,11 @@ main(int argc, /* I - Number of comm
cupsdStopSelect();
@@ -3150,9 +3148,9 @@
return (!stop_scheduler);
}
-diff -up cups-1.3.8/scheduler/printers.c.lspp cups-1.3.8/scheduler/printers.c
---- cups-1.3.8/scheduler/printers.c.lspp 2008-09-10 16:18:26.000000000 +0100
-+++ cups-1.3.8/scheduler/printers.c 2008-09-10 16:18:26.000000000 +0100
+diff -up cups-1.3.9/scheduler/printers.c.lspp cups-1.3.9/scheduler/printers.c
+--- cups-1.3.9/scheduler/printers.c.lspp 2009-01-28 17:12:34.000000000 +0000
++++ cups-1.3.9/scheduler/printers.c 2009-01-28 17:12:34.000000000 +0000
@@ -51,6 +51,8 @@
* printing desktop tools.
*/
@@ -3187,7 +3185,7 @@
DEBUG_printf(("cupsdSetPrinterAttrs: entering name = %s, type = %x\n", p->name,
-@@ -1989,6 +2002,44 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)
+@@ -1995,6 +2008,44 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)
attr->values[1].string.text = _cupsStrAlloc(Classification ?
Classification : p->job_sheets[1]);
}
Index: cups.spec
===================================================================
RCS file: /cvs/pkgs/rpms/cups/F-10/cups.spec,v
retrieving revision 1.451
retrieving revision 1.452
diff -u -r1.451 -r1.452
--- cups.spec 9 Dec 2008 12:14:31 -0000 1.451
+++ cups.spec 28 Jan 2009 17:18:09 -0000 1.452
@@ -7,7 +7,7 @@
Summary: Common Unix Printing System
Name: cups
Version: 1.3.9
-Release: 6%{?svn:.svn%{svn}}%{?dist}
+Release: 7%{?svn:.svn%{svn}}%{?dist}
License: GPLv2
Group: System Environment/Daemons
Source: ftp://ftp.easysw.com/pub/cups/test//cups-%{version}%{?svn:svn-r%{svn}}-source.tar.bz2
@@ -53,6 +53,8 @@
Patch27: cups-CVE-2008-5183.patch
Patch28: cups-CVE-2008-5286.patch
Patch29: cups-str2831.patch
+Patch30: cups-str3077.patch
+Patch31: cups-str3078.patch
Patch100: cups-lspp.patch
Epoch: 1
Url: http://www.cups.org/
@@ -192,6 +194,8 @@
%patch27 -p1 -b .CVE-2008-5183
%patch28 -p1 -b .CVE-2008-5286
%patch29 -p1 -b .str2831
+%patch30 -p1 -b .str3077
+%patch31 -p1 -b .str3078
%if %lspp
%patch100 -p1 -b .lspp
@@ -480,6 +484,9 @@
%{_libdir}/php/modules/*.so
%changelog
+* Wed Jan 28 2009 Tim Waugh <twaugh at redhat.com> 1:1.3.9-7
+- Fixed quotas (STR #3077, STR #3078).
+
* Tue Dec 9 2008 Tim Waugh <twaugh at redhat.com> 1:1.3.9-6
- Attempt to unbreak the fix for STR #2831 (bug #474742).
- Previous message: rpms/cups/devel cups-str3077.patch, NONE, 1.1 cups-str3078.patch, NONE, 1.1 cups-lspp.patch, 1.39, 1.40 cups.spec, 1.455, 1.456
- Next message: rpms/selinux-policy/devel policy-20090105.patch, 1.21, 1.22 selinux-policy.spec, 1.776, 1.777
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the scm-commits
mailing list