Merge branch 'f13' into f14

This commit is contained in:
Jiri Popelka 2010-12-13 15:08:42 +01:00
commit 9f7795f13c
2 changed files with 72 additions and 61 deletions

View File

@ -1,6 +1,6 @@
diff -up cups-1.4.5/config.h.in.lspp cups-1.4.5/config.h.in diff -up cups-1.4.5/config.h.in.lspp cups-1.4.5/config.h.in
--- cups-1.4.5/config.h.in.lspp 2010-11-12 13:31:27.000000000 +0100 --- cups-1.4.5/config.h.in.lspp 2010-12-13 14:51:01.000000000 +0100
+++ cups-1.4.5/config.h.in 2010-11-12 13:32:50.000000000 +0100 +++ cups-1.4.5/config.h.in 2010-12-13 14:51:01.000000000 +0100
@@ -672,6 +672,12 @@ @@ -672,6 +672,12 @@
#undef HAVE_SYS_STATVFS_H #undef HAVE_SYS_STATVFS_H
#undef HAVE_SYS_VFS_H #undef HAVE_SYS_VFS_H
@ -15,8 +15,8 @@ diff -up cups-1.4.5/config.h.in.lspp cups-1.4.5/config.h.in
#endif /* !_CUPS_CONFIG_H_ */ #endif /* !_CUPS_CONFIG_H_ */
diff -up cups-1.4.5/config-scripts/cups-lspp.m4.lspp cups-1.4.5/config-scripts/cups-lspp.m4 diff -up cups-1.4.5/config-scripts/cups-lspp.m4.lspp cups-1.4.5/config-scripts/cups-lspp.m4
--- cups-1.4.5/config-scripts/cups-lspp.m4.lspp 2010-11-12 13:31:27.000000000 +0100 --- cups-1.4.5/config-scripts/cups-lspp.m4.lspp 2010-12-13 14:51:01.000000000 +0100
+++ cups-1.4.5/config-scripts/cups-lspp.m4 2010-11-12 13:31:27.000000000 +0100 +++ cups-1.4.5/config-scripts/cups-lspp.m4 2010-12-13 14:51:01.000000000 +0100
@@ -0,0 +1,36 @@ @@ -0,0 +1,36 @@
+dnl +dnl
+dnl LSPP code for the Common UNIX Printing System (CUPS). +dnl LSPP code for the Common UNIX Printing System (CUPS).
@ -56,7 +56,7 @@ diff -up cups-1.4.5/config-scripts/cups-lspp.m4.lspp cups-1.4.5/config-scripts/c
+fi +fi
diff -up cups-1.4.5/configure.in.lspp cups-1.4.5/configure.in diff -up cups-1.4.5/configure.in.lspp cups-1.4.5/configure.in
--- cups-1.4.5/configure.in.lspp 2010-06-22 23:42:44.000000000 +0200 --- cups-1.4.5/configure.in.lspp 2010-06-22 23:42:44.000000000 +0200
+++ cups-1.4.5/configure.in 2010-11-12 13:31:27.000000000 +0100 +++ cups-1.4.5/configure.in 2010-12-13 14:51:01.000000000 +0100
@@ -42,6 +42,8 @@ sinclude(config-scripts/cups-pap.m4) @@ -42,6 +42,8 @@ sinclude(config-scripts/cups-pap.m4)
sinclude(config-scripts/cups-pdf.m4) sinclude(config-scripts/cups-pdf.m4)
sinclude(config-scripts/cups-scripting.m4) sinclude(config-scripts/cups-scripting.m4)
@ -68,7 +68,7 @@ diff -up cups-1.4.5/configure.in.lspp cups-1.4.5/configure.in
LANGFILES="" LANGFILES=""
diff -up cups-1.4.5/cups/cups.h.lspp cups-1.4.5/cups/cups.h diff -up cups-1.4.5/cups/cups.h.lspp cups-1.4.5/cups/cups.h
--- cups-1.4.5/cups/cups.h.lspp 2010-06-22 05:18:27.000000000 +0200 --- cups-1.4.5/cups/cups.h.lspp 2010-06-22 05:18:27.000000000 +0200
+++ cups-1.4.5/cups/cups.h 2010-11-12 13:31:27.000000000 +0100 +++ cups-1.4.5/cups/cups.h 2010-12-13 14:51:01.000000000 +0100
@@ -15,6 +15,9 @@ @@ -15,6 +15,9 @@
* This file is subject to the Apple OS-Developed Software exception. * This file is subject to the Apple OS-Developed Software exception.
*/ */
@ -94,7 +94,7 @@ diff -up cups-1.4.5/cups/cups.h.lspp cups-1.4.5/cups/cups.h
*/ */
diff -up cups-1.4.5/data/Makefile.lspp cups-1.4.5/data/Makefile diff -up cups-1.4.5/data/Makefile.lspp cups-1.4.5/data/Makefile
--- cups-1.4.5/data/Makefile.lspp 2008-11-12 20:30:57.000000000 +0100 --- cups-1.4.5/data/Makefile.lspp 2008-11-12 20:30:57.000000000 +0100
+++ cups-1.4.5/data/Makefile 2010-11-12 13:31:27.000000000 +0100 +++ cups-1.4.5/data/Makefile 2010-12-13 14:51:01.000000000 +0100
@@ -25,7 +25,10 @@ BANNERS = \ @@ -25,7 +25,10 @@ BANNERS = \
secret \ secret \
standard \ standard \
@ -108,8 +108,8 @@ diff -up cups-1.4.5/data/Makefile.lspp cups-1.4.5/data/Makefile
CHARMAPS = \ CHARMAPS = \
euc-cn.txt \ euc-cn.txt \
diff -up cups-1.4.5/data/mls.lspp cups-1.4.5/data/mls diff -up cups-1.4.5/data/mls.lspp cups-1.4.5/data/mls
--- cups-1.4.5/data/mls.lspp 2010-11-12 13:31:27.000000000 +0100 --- cups-1.4.5/data/mls.lspp 2010-12-13 14:51:01.000000000 +0100
+++ cups-1.4.5/data/mls 2010-11-12 13:31:27.000000000 +0100 +++ cups-1.4.5/data/mls 2010-12-13 14:51:01.000000000 +0100
@@ -0,0 +1,261 @@ @@ -0,0 +1,261 @@
+%!PS-Adobe-3.0 +%!PS-Adobe-3.0
+%%BoundingBox: 0 0 612 792 +%%BoundingBox: 0 0 612 792
@ -373,8 +373,8 @@ diff -up cups-1.4.5/data/mls.lspp cups-1.4.5/data/mls
+% +%
+%%EOF +%%EOF
diff -up cups-1.4.5/data/selinux.lspp cups-1.4.5/data/selinux diff -up cups-1.4.5/data/selinux.lspp cups-1.4.5/data/selinux
--- cups-1.4.5/data/selinux.lspp 2010-11-12 13:31:27.000000000 +0100 --- cups-1.4.5/data/selinux.lspp 2010-12-13 14:51:01.000000000 +0100
+++ cups-1.4.5/data/selinux 2010-11-12 13:31:27.000000000 +0100 +++ cups-1.4.5/data/selinux 2010-12-13 14:51:01.000000000 +0100
@@ -0,0 +1,261 @@ @@ -0,0 +1,261 @@
+%!PS-Adobe-3.0 +%!PS-Adobe-3.0
+%%BoundingBox: 0 0 612 792 +%%BoundingBox: 0 0 612 792
@ -638,8 +638,8 @@ diff -up cups-1.4.5/data/selinux.lspp cups-1.4.5/data/selinux
+% +%
+%%EOF +%%EOF
diff -up cups-1.4.5/data/te.lspp cups-1.4.5/data/te diff -up cups-1.4.5/data/te.lspp cups-1.4.5/data/te
--- cups-1.4.5/data/te.lspp 2010-11-12 13:31:27.000000000 +0100 --- cups-1.4.5/data/te.lspp 2010-12-13 14:51:01.000000000 +0100
+++ cups-1.4.5/data/te 2010-11-12 13:31:27.000000000 +0100 +++ cups-1.4.5/data/te 2010-12-13 14:51:01.000000000 +0100
@@ -0,0 +1,261 @@ @@ -0,0 +1,261 @@
+%!PS-Adobe-3.0 +%!PS-Adobe-3.0
+%%BoundingBox: 0 0 612 792 +%%BoundingBox: 0 0 612 792
@ -904,7 +904,7 @@ diff -up cups-1.4.5/data/te.lspp cups-1.4.5/data/te
+%%EOF +%%EOF
diff -up cups-1.4.5/filter/common.c.lspp cups-1.4.5/filter/common.c diff -up cups-1.4.5/filter/common.c.lspp cups-1.4.5/filter/common.c
--- cups-1.4.5/filter/common.c.lspp 2007-07-11 23:46:42.000000000 +0200 --- cups-1.4.5/filter/common.c.lspp 2007-07-11 23:46:42.000000000 +0200
+++ cups-1.4.5/filter/common.c 2010-11-12 13:31:27.000000000 +0100 +++ cups-1.4.5/filter/common.c 2010-12-13 14:51:01.000000000 +0100
@@ -30,6 +30,12 @@ @@ -30,6 +30,12 @@
* Include necessary headers... * Include necessary headers...
*/ */
@ -1074,8 +1074,8 @@ diff -up cups-1.4.5/filter/common.c.lspp cups-1.4.5/filter/common.c
/* /*
diff -up cups-1.4.5/filter/pstops.c.lspp cups-1.4.5/filter/pstops.c diff -up cups-1.4.5/filter/pstops.c.lspp cups-1.4.5/filter/pstops.c
--- cups-1.4.5/filter/pstops.c.lspp 2010-11-12 13:31:27.000000000 +0100 --- cups-1.4.5/filter/pstops.c.lspp 2010-12-13 14:51:01.000000000 +0100
+++ cups-1.4.5/filter/pstops.c 2010-11-12 13:31:27.000000000 +0100 +++ cups-1.4.5/filter/pstops.c 2010-12-13 14:51:01.000000000 +0100
@@ -3335,6 +3335,18 @@ write_label_prolog(pstops_doc_t *doc, /* @@ -3335,6 +3335,18 @@ write_label_prolog(pstops_doc_t *doc, /*
{ {
const char *classification; /* CLASSIFICATION environment variable */ const char *classification; /* CLASSIFICATION environment variable */
@ -1232,8 +1232,8 @@ diff -up cups-1.4.5/filter/pstops.c.lspp cups-1.4.5/filter/pstops.c
/* /*
diff -up cups-1.4.5/Makedefs.in.lspp cups-1.4.5/Makedefs.in diff -up cups-1.4.5/Makedefs.in.lspp cups-1.4.5/Makedefs.in
--- cups-1.4.5/Makedefs.in.lspp 2010-11-12 13:31:27.000000000 +0100 --- cups-1.4.5/Makedefs.in.lspp 2010-12-13 14:51:01.000000000 +0100
+++ cups-1.4.5/Makedefs.in 2010-11-12 13:31:27.000000000 +0100 +++ cups-1.4.5/Makedefs.in 2010-12-13 14:51:01.000000000 +0100
@@ -146,7 +146,7 @@ LIBCUPSORDER = @LIBCUPSORDER@ @@ -146,7 +146,7 @@ LIBCUPSORDER = @LIBCUPSORDER@
LIBCUPSIMAGEORDER = @LIBCUPSIMAGEORDER@ LIBCUPSIMAGEORDER = @LIBCUPSIMAGEORDER@
LINKCUPS = @LINKCUPS@ $(SSLLIBS) $(DNSSDLIBS) LINKCUPS = @LINKCUPS@ $(SSLLIBS) $(DNSSDLIBS)
@ -1254,7 +1254,7 @@ diff -up cups-1.4.5/Makedefs.in.lspp cups-1.4.5/Makedefs.in
.c.o: .c.o:
diff -up cups-1.4.5/scheduler/client.c.lspp cups-1.4.5/scheduler/client.c diff -up cups-1.4.5/scheduler/client.c.lspp cups-1.4.5/scheduler/client.c
--- cups-1.4.5/scheduler/client.c.lspp 2010-10-17 06:13:56.000000000 +0200 --- cups-1.4.5/scheduler/client.c.lspp 2010-10-17 06:13:56.000000000 +0200
+++ cups-1.4.5/scheduler/client.c 2010-11-12 13:34:02.000000000 +0100 +++ cups-1.4.5/scheduler/client.c 2010-12-13 14:51:01.000000000 +0100
@@ -44,6 +44,7 @@ @@ -44,6 +44,7 @@
* valid_host() - Is the Host: field valid? * valid_host() - Is the Host: field valid?
* write_file() - Send a file via HTTP. * write_file() - Send a file via HTTP.
@ -1477,7 +1477,7 @@ diff -up cups-1.4.5/scheduler/client.c.lspp cups-1.4.5/scheduler/client.c
*/ */
diff -up cups-1.4.5/scheduler/client.h.lspp cups-1.4.5/scheduler/client.h diff -up cups-1.4.5/scheduler/client.h.lspp cups-1.4.5/scheduler/client.h
--- cups-1.4.5/scheduler/client.h.lspp 2009-05-27 00:01:23.000000000 +0200 --- cups-1.4.5/scheduler/client.h.lspp 2009-05-27 00:01:23.000000000 +0200
+++ cups-1.4.5/scheduler/client.h 2010-11-12 13:31:27.000000000 +0100 +++ cups-1.4.5/scheduler/client.h 2010-12-13 14:51:01.000000000 +0100
@@ -18,6 +18,13 @@ @@ -18,6 +18,13 @@
#endif /* HAVE_AUTHORIZATION_H */ #endif /* HAVE_AUTHORIZATION_H */
@ -1514,8 +1514,8 @@ diff -up cups-1.4.5/scheduler/client.h.lspp cups-1.4.5/scheduler/client.h
/* /*
diff -up cups-1.4.5/scheduler/conf.c.lspp cups-1.4.5/scheduler/conf.c diff -up cups-1.4.5/scheduler/conf.c.lspp cups-1.4.5/scheduler/conf.c
--- cups-1.4.5/scheduler/conf.c.lspp 2010-11-12 13:31:27.000000000 +0100 --- cups-1.4.5/scheduler/conf.c.lspp 2010-12-13 14:51:01.000000000 +0100
+++ cups-1.4.5/scheduler/conf.c 2010-11-12 13:31:27.000000000 +0100 +++ cups-1.4.5/scheduler/conf.c 2010-12-13 14:51:01.000000000 +0100
@@ -29,6 +29,7 @@ @@ -29,6 +29,7 @@
* read_configuration() - Read a configuration file. * read_configuration() - Read a configuration file.
* read_location() - Read a <Location path> definition. * read_location() - Read a <Location path> definition.
@ -1626,8 +1626,8 @@ diff -up cups-1.4.5/scheduler/conf.c.lspp cups-1.4.5/scheduler/conf.c
/* /*
* 'read_policy()' - Read a <Policy name> definition. * 'read_policy()' - Read a <Policy name> definition.
diff -up cups-1.4.5/scheduler/conf.h.lspp cups-1.4.5/scheduler/conf.h diff -up cups-1.4.5/scheduler/conf.h.lspp cups-1.4.5/scheduler/conf.h
--- cups-1.4.5/scheduler/conf.h.lspp 2010-11-12 13:31:27.000000000 +0100 --- cups-1.4.5/scheduler/conf.h.lspp 2010-12-13 14:51:01.000000000 +0100
+++ cups-1.4.5/scheduler/conf.h 2010-11-12 13:31:27.000000000 +0100 +++ cups-1.4.5/scheduler/conf.h 2010-12-13 14:51:01.000000000 +0100
@@ -250,6 +250,12 @@ VAR char *ServerKey VALUE(NULL); @@ -250,6 +250,12 @@ VAR char *ServerKey VALUE(NULL);
VAR int SSLOptions VALUE(CUPSD_SSL_NONE); VAR int SSLOptions VALUE(CUPSD_SSL_NONE);
/* SSL/TLS options */ /* SSL/TLS options */
@ -1652,8 +1652,8 @@ diff -up cups-1.4.5/scheduler/conf.h.lspp cups-1.4.5/scheduler/conf.h
/* /*
* Prototypes... * Prototypes...
diff -up cups-1.4.5/scheduler/ipp.c.lspp cups-1.4.5/scheduler/ipp.c diff -up cups-1.4.5/scheduler/ipp.c.lspp cups-1.4.5/scheduler/ipp.c
--- cups-1.4.5/scheduler/ipp.c.lspp 2010-11-12 13:31:27.000000000 +0100 --- cups-1.4.5/scheduler/ipp.c.lspp 2010-12-13 14:51:01.000000000 +0100
+++ cups-1.4.5/scheduler/ipp.c 2010-11-12 13:31:27.000000000 +0100 +++ cups-1.4.5/scheduler/ipp.c 2010-12-13 15:01:43.000000000 +0100
@@ -41,6 +41,7 @@ @@ -41,6 +41,7 @@
* cancel_all_jobs() - Cancel all print jobs. * cancel_all_jobs() - Cancel all print jobs.
* cancel_job() - Cancel a print job. * cancel_job() - Cancel a print job.
@ -1719,7 +1719,7 @@ diff -up cups-1.4.5/scheduler/ipp.c.lspp cups-1.4.5/scheduler/ipp.c
cupsdLogMessage(CUPSD_LOG_DEBUG2, "add_job(%p[%d], %p(%s), %p(%s/%s))", cupsdLogMessage(CUPSD_LOG_DEBUG2, "add_job(%p[%d], %p(%s), %p(%s/%s))",
@@ -1612,6 +1642,104 @@ add_job(cupsd_client_t *con, /* I - Cl @@ -1612,6 +1642,106 @@ add_job(cupsd_client_t *con, /* I - Cl
ippAddString(con->request, IPP_TAG_JOB, IPP_TAG_NAME, "job-name", NULL, ippAddString(con->request, IPP_TAG_JOB, IPP_TAG_NAME, "job-name", NULL,
"Untitled"); "Untitled");
@ -1774,7 +1774,9 @@ diff -up cups-1.4.5/scheduler/ipp.c.lspp cups-1.4.5/scheduler/ipp.c
+ send_ipp_status(con, IPP_NOT_AUTHORIZED, _("Printer is not a character device or regular file")); + send_ipp_status(con, IPP_NOT_AUTHORIZED, _("Printer is not a character device or regular file"));
+ return (NULL); + return (NULL);
+ } + }
+ avc_init("cupsd_enqueue_", NULL, NULL, NULL, NULL); + static avc_initialized = 0;
+ if (!avc_initialized++)
+ avc_init("cupsd_enqueue_", NULL, NULL, NULL, NULL);
+ avc_entry_ref_init(&avcref); + avc_entry_ref_init(&avcref);
+ if (avc_context_to_sid(con->scon, &clisid) != 0) + if (avc_context_to_sid(con->scon, &clisid) != 0)
+ { + {
@ -1824,7 +1826,7 @@ diff -up cups-1.4.5/scheduler/ipp.c.lspp cups-1.4.5/scheduler/ipp.c
if ((job = cupsdAddJob(priority, printer->name)) == NULL) if ((job = cupsdAddJob(priority, printer->name)) == NULL)
{ {
send_ipp_status(con, IPP_INTERNAL_ERROR, send_ipp_status(con, IPP_INTERNAL_ERROR,
@@ -1620,6 +1748,32 @@ add_job(cupsd_client_t *con, /* I - Cl @@ -1620,6 +1750,32 @@ add_job(cupsd_client_t *con, /* I - Cl
return (NULL); return (NULL);
} }
@ -1857,7 +1859,7 @@ diff -up cups-1.4.5/scheduler/ipp.c.lspp cups-1.4.5/scheduler/ipp.c
job->dtype = printer->type & (CUPS_PRINTER_CLASS | CUPS_PRINTER_IMPLICIT | job->dtype = printer->type & (CUPS_PRINTER_CLASS | CUPS_PRINTER_IMPLICIT |
CUPS_PRINTER_REMOTE); CUPS_PRINTER_REMOTE);
job->attrs = con->request; job->attrs = con->request;
@@ -1825,6 +1979,29 @@ add_job(cupsd_client_t *con, /* I - Cl @@ -1825,6 +1981,29 @@ add_job(cupsd_client_t *con, /* I - Cl
attr->values[0].string.text = _cupsStrRetain(printer->job_sheets[0]); attr->values[0].string.text = _cupsStrRetain(printer->job_sheets[0]);
attr->values[1].string.text = _cupsStrRetain(printer->job_sheets[1]); attr->values[1].string.text = _cupsStrRetain(printer->job_sheets[1]);
} }
@ -1887,7 +1889,7 @@ diff -up cups-1.4.5/scheduler/ipp.c.lspp cups-1.4.5/scheduler/ipp.c
job->job_sheets = attr; job->job_sheets = attr;
@@ -1855,6 +2032,9 @@ add_job(cupsd_client_t *con, /* I - Cl @@ -1855,6 +2034,9 @@ add_job(cupsd_client_t *con, /* I - Cl
"job-sheets=\"%s,none\", " "job-sheets=\"%s,none\", "
"job-originating-user-name=\"%s\"", "job-originating-user-name=\"%s\"",
Classification, job->username); Classification, job->username);
@ -1897,7 +1899,7 @@ diff -up cups-1.4.5/scheduler/ipp.c.lspp cups-1.4.5/scheduler/ipp.c
} }
else if (attr->num_values == 2 && else if (attr->num_values == 2 &&
strcmp(attr->values[0].string.text, strcmp(attr->values[0].string.text,
@@ -1873,6 +2053,9 @@ add_job(cupsd_client_t *con, /* I - Cl @@ -1873,6 +2055,9 @@ add_job(cupsd_client_t *con, /* I - Cl
"job-originating-user-name=\"%s\"", "job-originating-user-name=\"%s\"",
attr->values[0].string.text, attr->values[0].string.text,
attr->values[1].string.text, job->username); attr->values[1].string.text, job->username);
@ -1907,7 +1909,7 @@ diff -up cups-1.4.5/scheduler/ipp.c.lspp cups-1.4.5/scheduler/ipp.c
} }
else if (strcmp(attr->values[0].string.text, Classification) && else if (strcmp(attr->values[0].string.text, Classification) &&
strcmp(attr->values[0].string.text, "none") && strcmp(attr->values[0].string.text, "none") &&
@@ -1893,6 +2076,9 @@ add_job(cupsd_client_t *con, /* I - Cl @@ -1893,6 +2078,9 @@ add_job(cupsd_client_t *con, /* I - Cl
"job-originating-user-name=\"%s\"", "job-originating-user-name=\"%s\"",
attr->values[0].string.text, attr->values[0].string.text,
attr->values[1].string.text, job->username); attr->values[1].string.text, job->username);
@ -1917,7 +1919,7 @@ diff -up cups-1.4.5/scheduler/ipp.c.lspp cups-1.4.5/scheduler/ipp.c
} }
} }
else if (strcmp(attr->values[0].string.text, Classification) && else if (strcmp(attr->values[0].string.text, Classification) &&
@@ -1933,8 +2119,52 @@ add_job(cupsd_client_t *con, /* I - Cl @@ -1933,8 +2121,52 @@ add_job(cupsd_client_t *con, /* I - Cl
"job-sheets=\"%s\", " "job-sheets=\"%s\", "
"job-originating-user-name=\"%s\"", "job-originating-user-name=\"%s\"",
Classification, job->username); Classification, job->username);
@ -1970,7 +1972,7 @@ diff -up cups-1.4.5/scheduler/ipp.c.lspp cups-1.4.5/scheduler/ipp.c
/* /*
* See if we need to add the starting sheet... * See if we need to add the starting sheet...
@@ -4289,6 +4519,103 @@ check_rss_recipient( @@ -4289,6 +4521,107 @@ check_rss_recipient(
} }
@ -2015,10 +2017,14 @@ diff -up cups-1.4.5/scheduler/ipp.c.lspp cups-1.4.5/scheduler/ipp.c
+ * Initialize the avc engine... + * Initialize the avc engine...
+ */ + */
+ +
+ if (avc_init("cupsd", NULL, NULL, NULL, NULL) < 0) + static avc_initialized = 0;
+ if (! avc_initialized++)
+ { + {
+ cupsdLogMessage(CUPSD_LOG_ERROR, "check_context: unable avc_init"); + if (avc_init("cupsd", NULL, NULL, NULL, NULL) < 0)
+ return -1; + {
+ cupsdLogMessage(CUPSD_LOG_ERROR, "check_context: unable avc_init");
+ return -1;
+ }
+ } + }
+ if (avc_context_to_sid(con->scon, &clisid) != 0) + if (avc_context_to_sid(con->scon, &clisid) != 0)
+ { + {
@ -2074,7 +2080,7 @@ diff -up cups-1.4.5/scheduler/ipp.c.lspp cups-1.4.5/scheduler/ipp.c
/* /*
* 'check_quotas()' - Check quotas for a printer and user. * 'check_quotas()' - Check quotas for a printer and user.
*/ */
@@ -4843,6 +5170,15 @@ copy_banner(cupsd_client_t *con, /* I - @@ -4843,6 +5176,15 @@ copy_banner(cupsd_client_t *con, /* I -
char attrname[255], /* Name of attribute */ char attrname[255], /* Name of attribute */
*s; /* Pointer into name */ *s; /* Pointer into name */
ipp_attribute_t *attr; /* Attribute */ ipp_attribute_t *attr; /* Attribute */
@ -2090,7 +2096,7 @@ diff -up cups-1.4.5/scheduler/ipp.c.lspp cups-1.4.5/scheduler/ipp.c
cupsdLogMessage(CUPSD_LOG_DEBUG2, cupsdLogMessage(CUPSD_LOG_DEBUG2,
@@ -4878,6 +5214,82 @@ copy_banner(cupsd_client_t *con, /* I - @@ -4878,6 +5220,82 @@ copy_banner(cupsd_client_t *con, /* I -
fchmod(cupsFileNumber(out), 0640); fchmod(cupsFileNumber(out), 0640);
fchown(cupsFileNumber(out), RunUser, Group); fchown(cupsFileNumber(out), RunUser, Group);
@ -2173,7 +2179,7 @@ diff -up cups-1.4.5/scheduler/ipp.c.lspp cups-1.4.5/scheduler/ipp.c
/* /*
* Try the localized banner file under the subdirectory... * Try the localized banner file under the subdirectory...
@@ -4972,6 +5384,24 @@ copy_banner(cupsd_client_t *con, /* I - @@ -4972,6 +5390,24 @@ copy_banner(cupsd_client_t *con, /* I -
else else
s = attrname; s = attrname;
@ -2198,7 +2204,7 @@ diff -up cups-1.4.5/scheduler/ipp.c.lspp cups-1.4.5/scheduler/ipp.c
if (!strcmp(s, "printer-name")) if (!strcmp(s, "printer-name"))
{ {
cupsFilePuts(out, job->dest); cupsFilePuts(out, job->dest);
@@ -6945,6 +7375,22 @@ get_job_attrs(cupsd_client_t *con, /* I @@ -6945,6 +7381,22 @@ get_job_attrs(cupsd_client_t *con, /* I
return; return;
} }
@ -2221,7 +2227,7 @@ diff -up cups-1.4.5/scheduler/ipp.c.lspp cups-1.4.5/scheduler/ipp.c
/* /*
* Copy attributes... * Copy attributes...
*/ */
@@ -7175,6 +7621,11 @@ get_jobs(cupsd_client_t *con, /* I - C @@ -7175,6 +7627,11 @@ get_jobs(cupsd_client_t *con, /* I - C
if (username[0] && strcasecmp(username, job->username)) if (username[0] && strcasecmp(username, job->username))
continue; continue;
@ -2233,7 +2239,7 @@ diff -up cups-1.4.5/scheduler/ipp.c.lspp cups-1.4.5/scheduler/ipp.c
if (count > 0) if (count > 0)
ippAddSeparator(con->response); ippAddSeparator(con->response);
@@ -11594,6 +12045,11 @@ validate_user(cupsd_job_t *job, /* I @@ -11594,6 +12051,11 @@ validate_user(cupsd_job_t *job, /* I
strlcpy(username, get_username(con), userlen); strlcpy(username, get_username(con), userlen);
@ -2246,8 +2252,8 @@ diff -up cups-1.4.5/scheduler/ipp.c.lspp cups-1.4.5/scheduler/ipp.c
* Check the username against the owner... * Check the username against the owner...
*/ */
diff -up cups-1.4.5/scheduler/job.c.lspp cups-1.4.5/scheduler/job.c diff -up cups-1.4.5/scheduler/job.c.lspp cups-1.4.5/scheduler/job.c
--- cups-1.4.5/scheduler/job.c.lspp 2010-11-12 13:31:27.000000000 +0100 --- cups-1.4.5/scheduler/job.c.lspp 2010-12-13 14:51:01.000000000 +0100
+++ cups-1.4.5/scheduler/job.c 2010-11-12 13:31:27.000000000 +0100 +++ cups-1.4.5/scheduler/job.c 2010-12-13 15:02:11.000000000 +0100
@@ -66,6 +66,9 @@ @@ -66,6 +66,9 @@
* update_job_attrs() - Update the job-printer-* attributes. * update_job_attrs() - Update the job-printer-* attributes.
*/ */
@ -2533,7 +2539,7 @@ diff -up cups-1.4.5/scheduler/job.c.lspp cups-1.4.5/scheduler/job.c
cupsdLogMessage(CUPSD_LOG_DEBUG2, "start_job(job=%p(%d), printer=%p(%s))", cupsdLogMessage(CUPSD_LOG_DEBUG2, "start_job(job=%p(%d), printer=%p(%s))",
job, job->id, printer, printer->name); job, job->id, printer, printer->name);
@@ -4142,6 +4339,106 @@ start_job(cupsd_job_t *job, /* I - @@ -4142,6 +4339,108 @@ start_job(cupsd_job_t *job, /* I -
fcntl(job->side_pipes[1], F_SETFD, fcntl(job->side_pipes[1], F_SETFD,
fcntl(job->side_pipes[1], F_GETFD) | FD_CLOEXEC); fcntl(job->side_pipes[1], F_GETFD) | FD_CLOEXEC);
@ -2582,7 +2588,9 @@ diff -up cups-1.4.5/scheduler/job.c.lspp cups-1.4.5/scheduler/job.c
+ cupsdSetJobState(job, IPP_JOB_ABORTED, CUPSD_JOB_DEFAULT, NULL); + cupsdSetJobState(job, IPP_JOB_ABORTED, CUPSD_JOB_DEFAULT, NULL);
+ return ; + return ;
+ } + }
+ avc_init("cupsd_dequeue_", NULL, NULL, NULL, NULL); + static avc_initialized = 0;
+ if (!avc_initialized++)
+ avc_init("cupsd_dequeue_", NULL, NULL, NULL, NULL);
+ avc_entry_ref_init(&avcref); + avc_entry_ref_init(&avcref);
+ if (avc_context_to_sid(job->scon, &clisid) != 0) + if (avc_context_to_sid(job->scon, &clisid) != 0)
+ { + {
@ -2642,7 +2650,7 @@ diff -up cups-1.4.5/scheduler/job.c.lspp cups-1.4.5/scheduler/job.c
*/ */
diff -up cups-1.4.5/scheduler/job.h.lspp cups-1.4.5/scheduler/job.h diff -up cups-1.4.5/scheduler/job.h.lspp cups-1.4.5/scheduler/job.h
--- cups-1.4.5/scheduler/job.h.lspp 2009-05-12 00:46:01.000000000 +0200 --- cups-1.4.5/scheduler/job.h.lspp 2009-05-12 00:46:01.000000000 +0200
+++ cups-1.4.5/scheduler/job.h 2010-11-12 13:31:27.000000000 +0100 +++ cups-1.4.5/scheduler/job.h 2010-12-13 14:51:01.000000000 +0100
@@ -13,6 +13,13 @@ @@ -13,6 +13,13 @@
* file is missing or damaged, see the license at "http://www.cups.org/". * file is missing or damaged, see the license at "http://www.cups.org/".
*/ */
@ -2669,8 +2677,8 @@ diff -up cups-1.4.5/scheduler/job.h.lspp cups-1.4.5/scheduler/job.h
typedef struct cupsd_joblog_s /**** Job log message ****/ typedef struct cupsd_joblog_s /**** Job log message ****/
diff -up cups-1.4.5/scheduler/main.c.lspp cups-1.4.5/scheduler/main.c diff -up cups-1.4.5/scheduler/main.c.lspp cups-1.4.5/scheduler/main.c
--- cups-1.4.5/scheduler/main.c.lspp 2010-11-12 13:31:27.000000000 +0100 --- cups-1.4.5/scheduler/main.c.lspp 2010-12-13 14:51:01.000000000 +0100
+++ cups-1.4.5/scheduler/main.c 2010-11-12 13:31:27.000000000 +0100 +++ cups-1.4.5/scheduler/main.c 2010-12-13 14:51:01.000000000 +0100
@@ -37,6 +37,8 @@ @@ -37,6 +37,8 @@
* usage() - Show scheduler usage. * usage() - Show scheduler usage.
*/ */
@ -2739,8 +2747,8 @@ diff -up cups-1.4.5/scheduler/main.c.lspp cups-1.4.5/scheduler/main.c
} }
diff -up cups-1.4.5/scheduler/printers.c.lspp cups-1.4.5/scheduler/printers.c diff -up cups-1.4.5/scheduler/printers.c.lspp cups-1.4.5/scheduler/printers.c
--- cups-1.4.5/scheduler/printers.c.lspp 2010-11-12 13:31:27.000000000 +0100 --- cups-1.4.5/scheduler/printers.c.lspp 2010-12-13 14:51:01.000000000 +0100
+++ cups-1.4.5/scheduler/printers.c 2010-11-12 13:31:27.000000000 +0100 +++ cups-1.4.5/scheduler/printers.c 2010-12-13 14:51:01.000000000 +0100
@@ -59,6 +59,8 @@ @@ -59,6 +59,8 @@
* write_xml_string() - Write a string with XML escaping. * write_xml_string() - Write a string with XML escaping.
*/ */

View File

@ -8,7 +8,7 @@
Summary: Common Unix Printing System Summary: Common Unix Printing System
Name: cups Name: cups
Version: 1.4.5 Version: 1.4.5
Release: 2%{?dist} Release: 3%{?dist}
License: GPLv2 License: GPLv2
Group: System Environment/Daemons Group: System Environment/Daemons
Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2 Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2
@ -573,6 +573,9 @@ rm -rf $RPM_BUILD_ROOT
%{php_extdir}/phpcups.so %{php_extdir}/phpcups.so
%changelog %changelog
* Mon Dec 13 2010 Jiri Popelka <jpopelka@redhat.com> 1:1.4.5-3
- Call avc_init() only once to not leak file descriptors (bug #654075).
* Fri Dec 03 2010 Jiri Popelka <jpopelka@redhat.com> 1:1.4.5-2 * Fri Dec 03 2010 Jiri Popelka <jpopelka@redhat.com> 1:1.4.5-2
- Changed subsystem lock file name in initscript - Changed subsystem lock file name in initscript
so the service is correctly stopped on reboot or halt (bug #659391). so the service is correctly stopped on reboot or halt (bug #659391).