rpms/cups/F-9 cups-lspp.patch,1.29,1.30 cups.spec,1.410,1.411
Tim Waugh (twaugh)
fedora-extras-commits at redhat.com
Wed May 28 09:00:28 UTC 2008
- Previous message (by thread): rpms/guitone/F-9 guitone-0.8-update-crash.patch, NONE, 1.1 .cvsignore, 1.3, 1.4 guitone.spec, 1.4, 1.5 sources, 1.3, 1.4 guitone-0.7-gcc43.patch, 1.1, NONE guitone-0.7-qt-svg.patch, 1.1, NONE
- Next message (by thread): rpms/cups/F-9 cups-lspp.patch,1.30,1.31
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: twaugh
Update of /cvs/pkgs/rpms/cups/F-9
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv14993
Modified Files:
cups-lspp.patch cups.spec
Log Message:
* Wed May 28 2008 Tim Waugh <twaugh at redhat.com>
- If cupsdTimeoutJob is called when the originating connection is still
known, pass that to the function so that copy_banner can get at it if
necessary (bug #447200).
cups-lspp.patch:
Index: cups-lspp.patch
===================================================================
RCS file: /cvs/pkgs/rpms/cups/F-9/cups-lspp.patch,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- cups-lspp.patch 5 Feb 2008 15:37:24 -0000 1.29
+++ cups-lspp.patch 28 May 2008 08:59:58 -0000 1.30
@@ -1501,8 +1501,8 @@
/*
* Prototypes...
---- cups-1.3rc2/scheduler/ipp.c.lspp 2007-07-31 12:28:32.000000000 +0100
-+++ cups-1.3rc2/scheduler/ipp.c 2007-07-31 12:29:34.000000000 +0100
+--- cups-1.3.7/scheduler/ipp.c.lspp 2008-05-28 09:05:27.000000000 +0100
++++ cups-1.3.7/scheduler/ipp.c 2008-05-28 09:05:22.000000000 +0100
@@ -36,6 +36,7 @@
* cancel_all_jobs() - Cancel all print jobs.
* cancel_job() - Cancel a print job.
@@ -1521,7 +1521,7 @@
/*
* Include necessary headers...
*/
-@@ -120,6 +124,14 @@
+@@ -116,6 +120,14 @@ extern int mbr_check_membership_by_id(uu
# endif /* HAVE_MEMBERSHIPPRIV_H */
#endif /* __APPLE__ */
@@ -1536,7 +1536,7 @@
/*
* Local functions...
-@@ -144,6 +156,9 @@
+@@ -140,6 +152,9 @@ static void authenticate_job(cupsd_clien
static void cancel_all_jobs(cupsd_client_t *con, ipp_attribute_t *uri);
static void cancel_job(cupsd_client_t *con, ipp_attribute_t *uri);
static void cancel_subscription(cupsd_client_t *con, int id);
@@ -1546,7 +1546,26 @@
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);
-@@ -1235,6 +1250,21 @@
+@@ -747,7 +762,8 @@ cupsdProcessIPPRequest(
+ */
+
+ int /* O - 0 on success, -1 on error */
+-cupsdTimeoutJob(cupsd_job_t *job) /* I - Job to timeout */
++cupsdTimeoutJob(cupsd_job_t *job, /* I - Job to timeout */
++ cupsd_client_t *con) /* I - Client connection if any */
+ {
+ cupsd_printer_t *printer; /* Destination printer or class */
+ ipp_attribute_t *attr; /* job-sheets attribute */
+@@ -774,7 +790,7 @@ cupsdTimeoutJob(cupsd_job_t *job) /* I -
+ cupsdLogMessage(CUPSD_LOG_INFO, "[Job %d] Adding end banner page \"%s\".",
+ job->id, attr->values[1].string.text);
+
+- if ((kbytes = copy_banner(NULL, job, attr->values[1].string.text)) < 0)
++ if ((kbytes = copy_banner(con, job, attr->values[1].string.text)) < 0)
+ return (-1);
+
+ cupsdUpdateQuota(printer, job->username, 0, kbytes);
+@@ -1267,6 +1283,21 @@ add_job(cupsd_client_t *con, /* I - Cl
int kbytes; /* Size of print file */
int i; /* Looping var */
int lowerpagerange; /* Page range bound */
@@ -1568,7 +1587,7 @@
cupsdLogMessage(CUPSD_LOG_DEBUG2, "add_job(%p[%d], %p(%s), %p(%s/%s))",
-@@ -1421,6 +1451,104 @@
+@@ -1454,6 +1485,104 @@ add_job(cupsd_client_t *con, /* I - Cl
ippAddString(con->request, IPP_TAG_JOB, IPP_TAG_NAME, "job-name", NULL,
title = "Untitled");
@@ -1673,7 +1692,7 @@
if ((job = cupsdAddJob(priority, printer->name)) == NULL)
{
send_ipp_status(con, IPP_INTERNAL_ERROR,
-@@ -1429,6 +1557,32 @@
+@@ -1462,6 +1591,32 @@ add_job(cupsd_client_t *con, /* I - Cl
return (NULL);
}
@@ -1706,7 +1725,7 @@
job->dtype = printer->type & (CUPS_PRINTER_CLASS | CUPS_PRINTER_IMPLICIT |
CUPS_PRINTER_REMOTE);
job->attrs = con->request;
-@@ -1645,6 +1799,29 @@
+@@ -1668,6 +1823,29 @@ add_job(cupsd_client_t *con, /* I - Cl
attr->values[0].string.text = _cupsStrAlloc(printer->job_sheets[0]);
attr->values[1].string.text = _cupsStrAlloc(printer->job_sheets[1]);
}
@@ -1736,7 +1755,7 @@
job->job_sheets = attr;
-@@ -1675,6 +1852,9 @@
+@@ -1698,6 +1876,9 @@ add_job(cupsd_client_t *con, /* I - Cl
"job-sheets=\"%s,none\", "
"job-originating-user-name=\"%s\"",
job->id, Classification, job->username);
@@ -1746,7 +1765,7 @@
}
else if (attr->num_values == 2 &&
strcmp(attr->values[0].string.text,
-@@ -1693,6 +1873,9 @@
+@@ -1716,6 +1897,9 @@ add_job(cupsd_client_t *con, /* I - Cl
"job-originating-user-name=\"%s\"",
job->id, attr->values[0].string.text,
attr->values[1].string.text, job->username);
@@ -1756,7 +1775,7 @@
}
else if (strcmp(attr->values[0].string.text, Classification) &&
strcmp(attr->values[0].string.text, "none") &&
-@@ -1713,6 +1896,9 @@
+@@ -1736,6 +1920,9 @@ add_job(cupsd_client_t *con, /* I - Cl
"job-originating-user-name=\"%s\"",
job->id, attr->values[0].string.text,
attr->values[1].string.text, job->username);
@@ -1766,7 +1785,7 @@
}
}
else if (strcmp(attr->values[0].string.text, Classification) &&
-@@ -1753,9 +1939,52 @@
+@@ -1776,9 +1963,52 @@ add_job(cupsd_client_t *con, /* I - Cl
"job-sheets=\"%s\", "
"job-originating-user-name=\"%s\"",
job->id, Classification, job->username);
@@ -1819,7 +1838,7 @@
/*
* See if we need to add the starting sheet...
*/
-@@ -3317,6 +3546,103 @@
+@@ -3391,6 +3621,103 @@ cancel_subscription(
}
@@ -1923,7 +1942,7 @@
/*
* 'check_quotas()' - Check quotas for a printer and user.
*/
-@@ -3845,6 +4171,15 @@
+@@ -3912,6 +4239,15 @@ copy_banner(cupsd_client_t *con, /* I -
char attrname[255], /* Name of attribute */
*s; /* Pointer into name */
ipp_attribute_t *attr; /* Attribute */
@@ -1939,12 +1958,13 @@
cupsdLogMessage(CUPSD_LOG_DEBUG2, "copy_banner(%p[%d], %p[%d], %s)",
-@@ -3879,6 +4214,81 @@
+@@ -3946,6 +4282,82 @@ copy_banner(cupsd_client_t *con, /* I -
fchmod(cupsFileNumber(out), 0640);
fchown(cupsFileNumber(out), RunUser, Group);
+#ifdef WITH_LSPP
-+ if (strncmp(con->scon, UNKNOWN_SL, strlen(UNKNOWN_SL)) != 0)
++ if (con->scon != NULL &&
++ strncmp(con->scon, UNKNOWN_SL, strlen(UNKNOWN_SL)) != 0)
+ {
+ if (getfilecon(filename, &spoolcon) == -1)
+ {
@@ -2021,7 +2041,7 @@
/*
* Try the localized banner file under the subdirectory...
-@@ -3973,6 +4383,24 @@
+@@ -4040,6 +4452,24 @@ copy_banner(cupsd_client_t *con, /* I -
else
s = attrname;
@@ -2046,7 +2066,7 @@
if (!strcmp(s, "printer-name"))
{
cupsFilePuts(out, job->dest);
-@@ -5694,6 +6122,22 @@
+@@ -5765,6 +6195,22 @@ get_job_attrs(cupsd_client_t *con, /* I
return;
}
@@ -2069,7 +2089,7 @@
/*
* Copy attributes...
*/
-@@ -5893,6 +6337,11 @@
+@@ -5970,6 +6416,11 @@ get_jobs(cupsd_client_t *con, /* I - C
if (count > 0)
ippAddSeparator(con->response);
@@ -2081,7 +2101,25 @@
count ++;
cupsdLogMessage(CUPSD_LOG_DEBUG2, "get_jobs: count = %d", count);
-@@ -9881,6 +10330,11 @@
+@@ -7554,7 +8005,7 @@ print_job(cupsd_client_t *con, /* I -
+ * See if we need to add the ending sheet...
+ */
+
+- if (cupsdTimeoutJob(job))
++ if (cupsdTimeoutJob(job, con))
+ return;
+
+ /*
+@@ -8759,7 +9210,7 @@ send_document(cupsd_client_t *con, /* I
+ * See if we need to add the ending sheet...
+ */
+
+- if (cupsdTimeoutJob(job))
++ if (cupsdTimeoutJob(job, con))
+ return;
+
+ if (job->state_value == IPP_JOB_STOPPED)
+@@ -10042,6 +10493,11 @@ validate_user(cupsd_job_t *job, /* I
strlcpy(username, get_username(con), userlen);
@@ -2093,8 +2131,8 @@
/*
* Check the username against the owner...
*/
---- cups-1.3rc2/scheduler/job.c.lspp 2007-07-31 12:28:32.000000000 +0100
-+++ cups-1.3rc2/scheduler/job.c 2007-07-31 12:28:32.000000000 +0100
+--- cups-1.3.7/scheduler/job.c.lspp 2008-05-28 09:05:27.000000000 +0100
++++ cups-1.3.7/scheduler/job.c 2008-05-28 09:05:24.000000000 +0100
@@ -60,6 +60,9 @@
* update_job_attrs() - Update the job-printer-* attributes.
*/
@@ -2120,7 +2158,16 @@
/*
* Local globals...
-@@ -1063,6 +1074,23 @@
+@@ -380,7 +391,7 @@ cupsdCheckJobs(void)
+ if (job->pending_timeout)
+ {
+ /* Add trailing banner as needed */
+- if (cupsdTimeoutJob(job))
++ if (cupsdTimeoutJob(job, NULL))
+ continue;
+ }
+
+@@ -1100,6 +1111,23 @@ cupsdLoadJob(cupsd_job_t *job) /* I - J
return;
}
@@ -2144,7 +2191,7 @@
job->sheets = ippFindAttribute(job->attrs, "job-media-sheets-completed",
IPP_TAG_INTEGER);
job->job_sheets = ippFindAttribute(job->attrs, "job-sheets", IPP_TAG_NAME);
-@@ -1416,6 +1444,13 @@
+@@ -1453,6 +1481,13 @@ cupsdSaveJob(cupsd_job_t *job) /* I - J
{
char filename[1024]; /* Job control filename */
cups_file_t *fp; /* Job file */
@@ -2158,7 +2205,7 @@
cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdSaveJob(job=%p(%d)): job->attrs=%p",
-@@ -1434,6 +1469,76 @@
+@@ -1471,6 +1506,76 @@ cupsdSaveJob(cupsd_job_t *job) /* I - J
fchmod(cupsFileNumber(fp), 0600);
fchown(cupsFileNumber(fp), RunUser, Group);
@@ -2235,7 +2282,7 @@
job->attrs->state = IPP_IDLE;
if (ippWriteIO(fp, (ipp_iocb_t)cupsFileWrite, 1, NULL,
-@@ -2446,6 +2551,21 @@
+@@ -2484,6 +2589,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 */
@@ -2257,7 +2304,7 @@
cupsdLogMessage(CUPSD_LOG_DEBUG2, "[Job %d] start_job: file = %d/%d",
-@@ -2697,6 +2817,106 @@
+@@ -2739,6 +2859,106 @@ start_job(cupsd_job_t *job, /* I -
fcntl(job->side_pipes[1], F_GETFL) | O_NONBLOCK);
}
@@ -2364,7 +2411,7 @@
/*
* Determine if we are printing a banner page or not...
*/
-@@ -2837,6 +3057,18 @@
+@@ -2883,6 +3103,18 @@ start_job(cupsd_job_t *job, /* I -
banner_page)
continue;
@@ -2383,8 +2430,8 @@
/*
* Otherwise add them to the list...
*/
-@@ -3053,6 +3285,67 @@
- envp[envc ++] = final_content_type;
+@@ -3125,6 +3357,67 @@ start_job(cupsd_job_t *job, /* I -
+ }
}
+#ifdef WITH_LSPP
@@ -2532,8 +2579,8 @@
}
p->raw = 0;
---- cups-1.3rc2/scheduler/job.h.lspp 2007-07-12 23:58:17.000000000 +0100
-+++ cups-1.3rc2/scheduler/job.h 2007-07-31 12:28:32.000000000 +0100
+--- cups-1.3.7/scheduler/job.h.lspp 2008-01-16 22:20:33.000000000 +0000
++++ cups-1.3.7/scheduler/job.h 2008-05-28 09:44:47.000000000 +0100
@@ -13,6 +13,13 @@
* file is missing or damaged, see the license at "http://www.cups.org/".
*/
@@ -2548,8 +2595,8 @@
/*
* Job request structure...
*/
-@@ -59,6 +66,10 @@
- #ifdef HAVE_GSSAPI
+@@ -60,6 +67,10 @@ typedef struct cupsd_job_s
+ krb5_ccache ccache; /* Kerberos credential cache */
char *ccname; /* KRB5CCNAME environment variable */
#endif /* HAVE_GSSAPI */
+#ifdef WITH_LSPP
@@ -2559,6 +2606,15 @@
} cupsd_job_t;
+@@ -122,7 +133,7 @@ extern void cupsdSetJobHoldUntil(cupsd_
+ extern void cupsdSetJobPriority(cupsd_job_t *job, int priority);
+ extern void cupsdStopAllJobs(int force);
+ extern void cupsdStopJob(cupsd_job_t *job, int force);
+-extern int cupsdTimeoutJob(cupsd_job_t *job);
++extern int cupsdTimeoutJob(cupsd_job_t *job, cupsd_client_t *con);
+ extern void cupsdUnloadCompletedJobs(void);
+
+
--- cups-1.3rc2/Makedefs.in.lspp 2007-07-18 20:49:45.000000000 +0100
+++ cups-1.3rc2/Makedefs.in 2007-07-31 12:28:32.000000000 +0100
@@ -134,7 +134,7 @@
Index: cups.spec
===================================================================
RCS file: /cvs/pkgs/rpms/cups/F-9/cups.spec,v
retrieving revision 1.410
retrieving revision 1.411
diff -u -r1.410 -r1.411
--- cups.spec 9 May 2008 11:10:09 -0000 1.410
+++ cups.spec 28 May 2008 08:59:58 -0000 1.411
@@ -442,6 +442,11 @@
%{cups_serverbin}/daemon/cups-lpd
%changelog
+* Wed May 28 2008 Tim Waugh <twaugh at redhat.com>
+- If cupsdTimeoutJob is called when the originating connection is still
+ known, pass that to the function so that copy_banner can get at it if
+ necessary (bug #447200).
+
* Fri May 9 2008 Tim Waugh <twaugh at redhat.com> 1:1.3.7-2
- Applied patch to fix CVE-2008-1722 (integer overflow in image filter,
bug #441692, STR #2790).
- Previous message (by thread): rpms/guitone/F-9 guitone-0.8-update-crash.patch, NONE, 1.1 .cvsignore, 1.3, 1.4 guitone.spec, 1.4, 1.5 sources, 1.3, 1.4 guitone-0.7-gcc43.patch, 1.1, NONE guitone-0.7-qt-svg.patch, 1.1, NONE
- Next message (by thread): rpms/cups/F-9 cups-lspp.patch,1.30,1.31
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list