diff --git a/.gitignore b/.gitignore index 480bd49..579590a 100644 --- a/.gitignore +++ b/.gitignore @@ -53,3 +53,4 @@ cups-1.4.4-source.tar.bz2 /cups-1.5.3-source.tar.bz2 /cups-1.5.4-source.tar.bz2 /cups-1.6.1-source.tar.bz2 +/cups-1.6.2-source.tar.bz2 diff --git a/cups-build.patch b/cups-build.patch deleted file mode 100644 index c229a76..0000000 --- a/cups-build.patch +++ /dev/null @@ -1,42 +0,0 @@ -diff -up cups-1.5b1/Makedefs.in.build cups-1.5b1/Makedefs.in ---- cups-1.5b1/Makedefs.in.build 2011-05-04 06:28:00.000000000 +0200 -+++ cups-1.5b1/Makedefs.in 2011-05-24 15:54:03.000000000 +0200 -@@ -138,7 +138,7 @@ BACKLIBS = @BACKLIBS@ - BANNERTOPS = @BANNERTOPS@ - BUILDDIRS = @BUILDDIRS@ - CFLAGS = @CPPFLAGS@ @CFLAGS@ --COMMONLIBS = @LIBS@ -+COMMONLIBS = @LIBS@ $(DNSSDLIBS) - CXXFLAGS = @CPPFLAGS@ @CXXFLAGS@ - CXXLIBS = @CXXLIBS@ - DBUS_NOTIFIER = @DBUS_NOTIFIER@ -diff -up cups-1.5b1/scheduler/dirsvc.c.build cups-1.5b1/scheduler/dirsvc.c ---- cups-1.5b1/scheduler/dirsvc.c.build 2011-05-20 05:49:49.000000000 +0200 -+++ cups-1.5b1/scheduler/dirsvc.c 2011-05-24 15:55:26.000000000 +0200 -@@ -2047,7 +2047,7 @@ cupsdUpdateDNSSDName(void) - - WebIFRef = DNSSDRef; - if ((error = DNSServiceRegister(&WebIFRef, -- kDNSServiceFlagsShareConnection, -+ 0, - 0, webif, "_http._tcp", NULL, - NULL, htons(DNSSDPort), 7, - "\006path=/", dnssdRegisterCallback, -@@ -2769,7 +2769,7 @@ dnssdRegisterPrinter(cupsd_printer_t *p) - do - { - p->ipp_ref = DNSSDRef; -- if ((se = DNSServiceRegister(&p->ipp_ref, kDNSServiceFlagsShareConnection, -+ if ((se = DNSServiceRegister(&p->ipp_ref, 0, - 0, name, regtype, NULL, NULL, - htons(DNSSDPort), ipp_len, ipp_txt, - dnssdRegisterCallback, -@@ -2866,7 +2866,7 @@ dnssdRegisterPrinter(cupsd_printer_t *p) - - p->printer_ref = DNSSDRef; - if ((se = DNSServiceRegister(&p->printer_ref, -- kDNSServiceFlagsShareConnection, -+ 0, - 0, name, "_printer._tcp", NULL, NULL, - htons(printer_port), printer_len, printer_txt, - dnssdRegisterCallback, diff --git a/cups-directives.patch b/cups-directives.patch deleted file mode 100644 index 47edc7c..0000000 --- a/cups-directives.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 3f4855845fc8c3c41c3564bd91add767d35841e1 Mon Sep 17 00:00:00 2001 -From: mike -Date: Tue, 28 Aug 2012 22:03:51 +0000 -Subject: [PATCH] The cupsd.conf file included obsolete browsing directives - (STR #4157) - -git-svn-id: http://svn.easysw.com/public/cups/trunk@10575 7a7537e8-13f0-0310-91df-b6672ffda945 ---- - conf/cupsd.conf.in | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/conf/cupsd.conf.in b/conf/cupsd.conf.in -index 2ce33e3..8ed157e 100644 ---- a/conf/cupsd.conf.in -+++ b/conf/cupsd.conf.in -@@ -19,8 +19,6 @@ Listen localhost:@DEFAULT_IPP_PORT@ - - # Show shared printers on the local network. - Browsing On --BrowseOrder allow,deny --BrowseAllow all - BrowseLocalProtocols @CUPS_BROWSE_LOCAL_PROTOCOLS@ - - # Default authentication type, when authentication is required... --- -1.8.1.4 - diff --git a/cups-lpd-manpage.patch b/cups-lpd-manpage.patch index b295448..12cffc1 100644 --- a/cups-lpd-manpage.patch +++ b/cups-lpd-manpage.patch @@ -1,6 +1,6 @@ -diff -up cups-1.6.1/man/cups-lpd.man.in.lpd-manpage cups-1.6.1/man/cups-lpd.man.in ---- cups-1.6.1/man/cups-lpd.man.in.lpd-manpage 2012-04-23 18:26:57.000000000 +0100 -+++ cups-1.6.1/man/cups-lpd.man.in 2013-03-05 17:31:57.182856029 +0000 +diff -up cups-1.6.2/man/cups-lpd.man.in.lpd-manpage cups-1.6.2/man/cups-lpd.man.in +--- cups-1.6.2/man/cups-lpd.man.in.lpd-manpage 2013-01-10 17:58:21.000000000 +0100 ++++ cups-1.6.2/man/cups-lpd.man.in 2013-03-18 18:59:46.837056613 +0100 @@ -26,39 +26,8 @@ cups-lpd \- receive print jobs and repor \fIcups-lpd\fR is the CUPS Line Printer Daemon ("LPD") mini-server that supports legacy client systems that use the LPD @@ -63,4 +63,4 @@ diff -up cups-1.6.1/man/cups-lpd.man.in.lpd-manpage cups-1.6.1/man/cups-lpd.man. +\fIcups(1)\fR, \fIcupsd(8)\fR, \fIsystemd(1)\fR, http://localhost:631/help .SH COPYRIGHT - Copyright 2007-2012 by Apple Inc. + Copyright 2007-2013 by Apple Inc. diff --git a/cups-lspp.patch b/cups-lspp.patch index 789c15b..d3bf086 100644 --- a/cups-lspp.patch +++ b/cups-lspp.patch @@ -1,7 +1,7 @@ -diff -up cups-1.6.1/config.h.in.lspp cups-1.6.1/config.h.in ---- cups-1.6.1/config.h.in.lspp 2012-11-26 22:47:22.453674634 +0000 -+++ cups-1.6.1/config.h.in 2012-11-26 22:47:22.463674686 +0000 -@@ -742,6 +742,13 @@ static __inline int _cups_abs(int i) { r +diff -up cups-1.6.2/config.h.in.lspp cups-1.6.2/config.h.in +--- cups-1.6.2/config.h.in.lspp 2013-03-18 19:00:30.704448157 +0100 ++++ cups-1.6.2/config.h.in 2013-03-18 19:00:30.724447879 +0100 +@@ -746,6 +746,13 @@ static __inline int _cups_abs(int i) { r # endif /* __GNUC__ || __STDC_VERSION__ */ #endif /* !HAVE_ABS && !abs */ @@ -15,9 +15,9 @@ diff -up cups-1.6.1/config.h.in.lspp cups-1.6.1/config.h.in #endif /* !_CUPS_CONFIG_H_ */ /* -diff -up cups-1.6.1/config-scripts/cups-lspp.m4.lspp cups-1.6.1/config-scripts/cups-lspp.m4 ---- cups-1.6.1/config-scripts/cups-lspp.m4.lspp 2012-11-26 22:47:22.464674691 +0000 -+++ cups-1.6.1/config-scripts/cups-lspp.m4 2012-11-26 22:47:22.464674691 +0000 +diff -up cups-1.6.2/config-scripts/cups-lspp.m4.lspp cups-1.6.2/config-scripts/cups-lspp.m4 +--- cups-1.6.2/config-scripts/cups-lspp.m4.lspp 2013-03-18 19:00:30.724447879 +0100 ++++ cups-1.6.2/config-scripts/cups-lspp.m4 2013-03-18 19:00:30.724447879 +0100 @@ -0,0 +1,36 @@ +dnl +dnl LSPP code for the Common UNIX Printing System (CUPS). @@ -55,9 +55,9 @@ diff -up cups-1.6.1/config-scripts/cups-lspp.m4.lspp cups-1.6.1/config-scripts/c + ;; + esac +fi -diff -up cups-1.6.1/configure.in.lspp cups-1.6.1/configure.in ---- cups-1.6.1/configure.in.lspp 2012-11-26 22:47:22.457674655 +0000 -+++ cups-1.6.1/configure.in 2012-11-26 22:47:22.464674691 +0000 +diff -up cups-1.6.2/configure.in.lspp cups-1.6.2/configure.in +--- cups-1.6.2/configure.in.lspp 2013-03-18 19:00:30.705448143 +0100 ++++ cups-1.6.2/configure.in 2013-03-18 19:00:30.724447879 +0100 @@ -37,6 +37,8 @@ sinclude(config-scripts/cups-systemd.m4) sinclude(config-scripts/cups-defaults.m4) sinclude(config-scripts/cups-scripting.m4) @@ -67,9 +67,9 @@ diff -up cups-1.6.1/configure.in.lspp cups-1.6.1/configure.in INSTALL_LANGUAGES="" UNINSTALL_LANGUAGES="" LANGFILES="" -diff -up cups-1.6.1/filter/common.c.lspp cups-1.6.1/filter/common.c ---- cups-1.6.1/filter/common.c.lspp 2011-05-20 04:49:49.000000000 +0100 -+++ cups-1.6.1/filter/common.c 2012-11-26 22:47:22.464674691 +0000 +diff -up cups-1.6.2/filter/common.c.lspp cups-1.6.2/filter/common.c +--- cups-1.6.2/filter/common.c.lspp 2011-05-20 05:49:49.000000000 +0200 ++++ cups-1.6.2/filter/common.c 2013-03-18 19:00:30.725447865 +0100 @@ -30,6 +30,12 @@ * Include necessary headers... */ @@ -238,9 +238,9 @@ diff -up cups-1.6.1/filter/common.c.lspp cups-1.6.1/filter/common.c /* -diff -up cups-1.6.1/filter/pstops.c.lspp cups-1.6.1/filter/pstops.c ---- cups-1.6.1/filter/pstops.c.lspp 2012-04-23 20:19:19.000000000 +0100 -+++ cups-1.6.1/filter/pstops.c 2012-11-26 22:47:22.465674696 +0000 +diff -up cups-1.6.2/filter/pstops.c.lspp cups-1.6.2/filter/pstops.c +--- cups-1.6.2/filter/pstops.c.lspp 2012-04-23 21:19:19.000000000 +0200 ++++ cups-1.6.2/filter/pstops.c 2013-03-18 19:00:30.726447852 +0100 @@ -3202,6 +3202,18 @@ write_label_prolog(pstops_doc_t *doc, /* { const char *classification; /* CLASSIFICATION environment variable */ @@ -396,9 +396,9 @@ diff -up cups-1.6.1/filter/pstops.c.lspp cups-1.6.1/filter/pstops.c /* -diff -up cups-1.6.1/Makedefs.in.lspp cups-1.6.1/Makedefs.in ---- cups-1.6.1/Makedefs.in.lspp 2012-11-26 22:47:22.454674639 +0000 -+++ cups-1.6.1/Makedefs.in 2012-11-26 22:47:22.465674696 +0000 +diff -up cups-1.6.2/Makedefs.in.lspp cups-1.6.2/Makedefs.in +--- cups-1.6.2/Makedefs.in.lspp 2013-03-18 19:00:30.706448129 +0100 ++++ cups-1.6.2/Makedefs.in 2013-03-18 19:00:30.726447852 +0100 @@ -146,7 +146,7 @@ LDFLAGS = -L../cgi-bin -L../cups -L../f @LDFLAGS@ @RELROFLAGS@ @PIEFLAGS@ $(OPTIM) LINKCUPS = @LINKCUPS@ $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(LIBZ) @@ -408,9 +408,9 @@ diff -up cups-1.6.1/Makedefs.in.lspp cups-1.6.1/Makedefs.in OPTIM = @OPTIM@ OPTIONS = PAMLIBS = @PAMLIBS@ -diff -up cups-1.6.1/scheduler/client.c.lspp cups-1.6.1/scheduler/client.c ---- cups-1.6.1/scheduler/client.c.lspp 2012-11-26 22:47:22.460674671 +0000 -+++ cups-1.6.1/scheduler/client.c 2012-11-26 22:47:22.466674701 +0000 +diff -up cups-1.6.2/scheduler/client.c.lspp cups-1.6.2/scheduler/client.c +--- cups-1.6.2/scheduler/client.c.lspp 2013-01-21 16:29:47.000000000 +0100 ++++ cups-1.6.2/scheduler/client.c 2013-03-18 19:00:30.727447838 +0100 @@ -41,6 +41,7 @@ * valid_host() - Is the Host: field valid? * write_file() - Send a file via HTTP. @@ -508,7 +508,7 @@ diff -up cups-1.6.1/scheduler/client.c.lspp cups-1.6.1/scheduler/client.c status = HTTP_CONTINUE; -@@ -2123,6 +2188,67 @@ cupsdReadClient(cupsd_client_t *con) /* +@@ -2134,6 +2199,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); @@ -576,7 +576,7 @@ diff -up cups-1.6.1/scheduler/client.c.lspp cups-1.6.1/scheduler/client.c } if (con->http.state != HTTP_POST_SEND) -@@ -3568,6 +3694,49 @@ is_path_absolute(const char *path) /* I +@@ -3572,6 +3698,49 @@ is_path_absolute(const char *path) /* I return (1); } @@ -626,9 +626,9 @@ diff -up cups-1.6.1/scheduler/client.c.lspp cups-1.6.1/scheduler/client.c /* * 'pipe_command()' - Pipe the output of a command to the remote client. -diff -up cups-1.6.1/scheduler/client.h.lspp cups-1.6.1/scheduler/client.h ---- cups-1.6.1/scheduler/client.h.lspp 2012-11-26 22:47:22.454674639 +0000 -+++ cups-1.6.1/scheduler/client.h 2012-11-26 22:47:22.466674701 +0000 +diff -up cups-1.6.2/scheduler/client.h.lspp cups-1.6.2/scheduler/client.h +--- cups-1.6.2/scheduler/client.h.lspp 2013-03-18 19:00:30.706448129 +0100 ++++ cups-1.6.2/scheduler/client.h 2013-03-18 19:00:30.727447838 +0100 @@ -18,6 +18,13 @@ #endif /* HAVE_AUTHORIZATION_H */ @@ -664,9 +664,9 @@ diff -up cups-1.6.1/scheduler/client.h.lspp cups-1.6.1/scheduler/client.h #ifdef HAVE_SSL extern int cupsdEndTLS(cupsd_client_t *con); -diff -up cups-1.6.1/scheduler/conf.c.lspp cups-1.6.1/scheduler/conf.c ---- cups-1.6.1/scheduler/conf.c.lspp 2012-11-26 22:47:22.461674676 +0000 -+++ cups-1.6.1/scheduler/conf.c 2012-11-26 22:49:49.201331930 +0000 +diff -up cups-1.6.2/scheduler/conf.c.lspp cups-1.6.2/scheduler/conf.c +--- cups-1.6.2/scheduler/conf.c.lspp 2013-03-18 19:00:30.643449003 +0100 ++++ cups-1.6.2/scheduler/conf.c 2013-03-18 19:00:30.728447824 +0100 @@ -34,6 +34,7 @@ * read_location() - Read a definition. * read_policy() - Read a definition. @@ -685,7 +685,7 @@ diff -up cups-1.6.1/scheduler/conf.c.lspp cups-1.6.1/scheduler/conf.c /* * Configuration variable structure... -@@ -147,6 +151,10 @@ static const cupsd_var_t cupsd_vars[] = +@@ -146,6 +150,10 @@ static const cupsd_var_t cupsd_vars[] = { "ServerName", &ServerName, CUPSD_VARTYPE_STRING }, { "StrictConformance", &StrictConformance, CUPSD_VARTYPE_BOOLEAN }, { "Timeout", &Timeout, CUPSD_VARTYPE_TIME }, @@ -706,7 +706,7 @@ diff -up cups-1.6.1/scheduler/conf.c.lspp cups-1.6.1/scheduler/conf.c /* -@@ -835,6 +846,25 @@ cupsdReadConfiguration(void) +@@ -851,6 +862,25 @@ cupsdReadConfiguration(void) RunUser = getuid(); @@ -732,7 +732,7 @@ diff -up cups-1.6.1/scheduler/conf.c.lspp cups-1.6.1/scheduler/conf.c cupsdLogMessage(CUPSD_LOG_INFO, "Remote access is %s.", RemotePort ? "enabled" : "disabled"); -@@ -1219,7 +1249,19 @@ cupsdReadConfiguration(void) +@@ -1253,7 +1283,19 @@ cupsdReadConfiguration(void) cupsdClearString(&Classification); if (Classification) @@ -752,7 +752,7 @@ diff -up cups-1.6.1/scheduler/conf.c.lspp cups-1.6.1/scheduler/conf.c /* * Check the MaxClients setting, and then allocate memory for it... -@@ -3570,6 +3612,18 @@ read_location(cups_file_t *fp, /* I - C +@@ -3639,6 +3681,18 @@ read_location(cups_file_t *fp, /* I - C return ((FatalErrors & CUPSD_FATAL_CONFIG) ? 0 : linenum); } @@ -771,9 +771,9 @@ diff -up cups-1.6.1/scheduler/conf.c.lspp cups-1.6.1/scheduler/conf.c /* * 'read_policy()' - Read a definition. -diff -up cups-1.6.1/scheduler/conf.h.lspp cups-1.6.1/scheduler/conf.h ---- cups-1.6.1/scheduler/conf.h.lspp 2012-11-26 22:47:22.461674676 +0000 -+++ cups-1.6.1/scheduler/conf.h 2012-11-26 22:47:22.467674707 +0000 +diff -up cups-1.6.2/scheduler/conf.h.lspp cups-1.6.2/scheduler/conf.h +--- cups-1.6.2/scheduler/conf.h.lspp 2013-03-18 19:00:30.643449003 +0100 ++++ cups-1.6.2/scheduler/conf.h 2013-03-18 19:00:30.729447810 +0100 @@ -249,6 +249,13 @@ VAR int SSLOptions VALUE(CUPSD_SSL_NO /* SSL/TLS options */ #endif /* HAVE_SSL */ @@ -798,9 +798,9 @@ diff -up cups-1.6.1/scheduler/conf.h.lspp cups-1.6.1/scheduler/conf.h /* * Prototypes... -diff -up cups-1.6.1/scheduler/cupsd.h.lspp cups-1.6.1/scheduler/cupsd.h ---- cups-1.6.1/scheduler/cupsd.h.lspp 2012-05-21 18:40:22.000000000 +0100 -+++ cups-1.6.1/scheduler/cupsd.h 2012-11-26 22:47:22.468674713 +0000 +diff -up cups-1.6.2/scheduler/cupsd.h.lspp cups-1.6.2/scheduler/cupsd.h +--- cups-1.6.2/scheduler/cupsd.h.lspp 2012-12-17 23:17:08.000000000 +0100 ++++ cups-1.6.2/scheduler/cupsd.h 2013-03-18 19:00:30.729447810 +0100 @@ -13,6 +13,8 @@ * file is missing or damaged, see the license at "http://www.cups.org/". */ @@ -832,9 +832,9 @@ diff -up cups-1.6.1/scheduler/cupsd.h.lspp cups-1.6.1/scheduler/cupsd.h /* * Some OS's don't have hstrerror(), most notably Solaris... */ -diff -up cups-1.6.1/scheduler/ipp.c.lspp cups-1.6.1/scheduler/ipp.c ---- cups-1.6.1/scheduler/ipp.c.lspp 2012-11-26 22:47:22.431674518 +0000 -+++ cups-1.6.1/scheduler/ipp.c 2012-11-26 22:47:22.470674723 +0000 +diff -up cups-1.6.2/scheduler/ipp.c.lspp cups-1.6.2/scheduler/ipp.c +--- cups-1.6.2/scheduler/ipp.c.lspp 2013-03-18 19:00:30.668448656 +0100 ++++ cups-1.6.2/scheduler/ipp.c 2013-03-18 19:05:00.416706472 +0100 @@ -35,6 +35,7 @@ * cancel_all_jobs() - Cancel all or selected print jobs. * cancel_job() - Cancel a print job. @@ -878,10 +878,10 @@ diff -up cups-1.6.1/scheduler/ipp.c.lspp cups-1.6.1/scheduler/ipp.c static int check_quotas(cupsd_client_t *con, cupsd_printer_t *p); static void close_job(cupsd_client_t *con, ipp_attribute_t *uri); static void copy_attrs(ipp_t *to, ipp_t *from, cups_array_t *ra, -@@ -1285,6 +1300,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 */ +@@ -1300,6 +1315,21 @@ add_job(cupsd_client_t *con, /* I - Cl + "time-at-creation", + "time-at-processing" + }; +#ifdef WITH_LSPP + char *audit_message; /* Audit message string */ + char *printerfile; /* device file pointed to by the printer */ @@ -900,9 +900,9 @@ diff -up cups-1.6.1/scheduler/ipp.c.lspp cups-1.6.1/scheduler/ipp.c cupsdLogMessage(CUPSD_LOG_DEBUG2, "add_job(%p[%d], %p(%s), %p(%s/%s))", -@@ -1542,6 +1572,106 @@ add_job(cupsd_client_t *con, /* I - Cl - ippAddString(con->request, IPP_TAG_JOB, IPP_TAG_NAME, "job-name", NULL, - "Untitled"); +@@ -1640,6 +1670,106 @@ add_job(cupsd_client_t *con, /* I - Cl + } + } +#ifdef WITH_LSPP + if (is_lspp_config()) @@ -1007,7 +1007,7 @@ diff -up cups-1.6.1/scheduler/ipp.c.lspp cups-1.6.1/scheduler/ipp.c if ((job = cupsdAddJob(priority, printer->name)) == NULL) { send_ipp_status(con, IPP_INTERNAL_ERROR, -@@ -1550,6 +1680,32 @@ add_job(cupsd_client_t *con, /* I - Cl +@@ -1648,6 +1778,32 @@ add_job(cupsd_client_t *con, /* I - Cl return (NULL); } @@ -1040,7 +1040,7 @@ diff -up cups-1.6.1/scheduler/ipp.c.lspp cups-1.6.1/scheduler/ipp.c job->dtype = printer->type & (CUPS_PRINTER_CLASS | CUPS_PRINTER_REMOTE); job->attrs = con->request; job->dirty = 1; -@@ -1759,6 +1915,29 @@ add_job(cupsd_client_t *con, /* I - Cl +@@ -1857,6 +2013,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]); } @@ -1070,7 +1070,7 @@ diff -up cups-1.6.1/scheduler/ipp.c.lspp cups-1.6.1/scheduler/ipp.c job->job_sheets = attr; -@@ -1789,6 +1968,9 @@ add_job(cupsd_client_t *con, /* I - Cl +@@ -1887,6 +2066,9 @@ add_job(cupsd_client_t *con, /* I - Cl "job-sheets=\"%s,none\", " "job-originating-user-name=\"%s\"", Classification, job->username); @@ -1080,7 +1080,7 @@ diff -up cups-1.6.1/scheduler/ipp.c.lspp cups-1.6.1/scheduler/ipp.c } else if (attr->num_values == 2 && strcmp(attr->values[0].string.text, -@@ -1807,6 +1989,9 @@ add_job(cupsd_client_t *con, /* I - Cl +@@ -1905,6 +2087,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); @@ -1090,7 +1090,7 @@ diff -up cups-1.6.1/scheduler/ipp.c.lspp cups-1.6.1/scheduler/ipp.c } else if (strcmp(attr->values[0].string.text, Classification) && strcmp(attr->values[0].string.text, "none") && -@@ -1827,6 +2012,9 @@ add_job(cupsd_client_t *con, /* I - Cl +@@ -1925,6 +2110,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); @@ -1100,7 +1100,7 @@ diff -up cups-1.6.1/scheduler/ipp.c.lspp cups-1.6.1/scheduler/ipp.c } } else if (strcmp(attr->values[0].string.text, Classification) && -@@ -1867,8 +2055,52 @@ add_job(cupsd_client_t *con, /* I - Cl +@@ -1965,8 +2153,52 @@ add_job(cupsd_client_t *con, /* I - Cl "job-sheets=\"%s\", " "job-originating-user-name=\"%s\"", Classification, job->username); @@ -1153,7 +1153,7 @@ diff -up cups-1.6.1/scheduler/ipp.c.lspp cups-1.6.1/scheduler/ipp.c /* * See if we need to add the starting sheet... -@@ -3615,6 +3847,111 @@ check_rss_recipient( +@@ -3730,6 +3962,111 @@ check_rss_recipient( } @@ -1265,7 +1265,7 @@ diff -up cups-1.6.1/scheduler/ipp.c.lspp cups-1.6.1/scheduler/ipp.c /* * 'check_quotas()' - Check quotas for a printer and user. */ -@@ -4067,6 +4404,15 @@ copy_banner(cupsd_client_t *con, /* I - +@@ -4182,6 +4519,15 @@ copy_banner(cupsd_client_t *con, /* I - char attrname[255], /* Name of attribute */ *s; /* Pointer into name */ ipp_attribute_t *attr; /* Attribute */ @@ -1281,7 +1281,7 @@ diff -up cups-1.6.1/scheduler/ipp.c.lspp cups-1.6.1/scheduler/ipp.c cupsdLogMessage(CUPSD_LOG_DEBUG2, -@@ -4102,6 +4448,82 @@ copy_banner(cupsd_client_t *con, /* I - +@@ -4217,6 +4563,82 @@ copy_banner(cupsd_client_t *con, /* I - fchmod(cupsFileNumber(out), 0640); fchown(cupsFileNumber(out), RunUser, Group); @@ -1364,7 +1364,7 @@ diff -up cups-1.6.1/scheduler/ipp.c.lspp cups-1.6.1/scheduler/ipp.c /* * Try the localized banner file under the subdirectory... -@@ -4196,6 +4618,24 @@ copy_banner(cupsd_client_t *con, /* I - +@@ -4311,6 +4733,24 @@ copy_banner(cupsd_client_t *con, /* I - else s = attrname; @@ -1389,7 +1389,7 @@ diff -up cups-1.6.1/scheduler/ipp.c.lspp cups-1.6.1/scheduler/ipp.c if (!strcmp(s, "printer-name")) { cupsFilePuts(out, job->dest); -@@ -6273,6 +6713,22 @@ get_job_attrs(cupsd_client_t *con, /* I +@@ -6388,6 +6828,22 @@ get_job_attrs(cupsd_client_t *con, /* I exclude = cupsdGetPrivateAttrs(policy, con, printer, job->username); @@ -1412,7 +1412,7 @@ diff -up cups-1.6.1/scheduler/ipp.c.lspp cups-1.6.1/scheduler/ipp.c /* * Copy attributes... */ -@@ -6626,6 +7082,11 @@ get_jobs(cupsd_client_t *con, /* I - C +@@ -6741,6 +7197,11 @@ get_jobs(cupsd_client_t *con, /* I - C if (username[0] && _cups_strcasecmp(username, job->username)) continue; @@ -1424,7 +1424,7 @@ diff -up cups-1.6.1/scheduler/ipp.c.lspp cups-1.6.1/scheduler/ipp.c if (count > 0) ippAddSeparator(con->response); -@@ -11106,6 +11567,11 @@ validate_user(cupsd_job_t *job, /* I +@@ -11303,6 +11764,11 @@ validate_user(cupsd_job_t *job, /* I strlcpy(username, get_username(con), userlen); @@ -1436,9 +1436,9 @@ diff -up cups-1.6.1/scheduler/ipp.c.lspp cups-1.6.1/scheduler/ipp.c /* * Check the username against the owner... */ -diff -up cups-1.6.1/scheduler/job.c.lspp cups-1.6.1/scheduler/job.c ---- cups-1.6.1/scheduler/job.c.lspp 2012-11-26 22:47:22.442674576 +0000 -+++ cups-1.6.1/scheduler/job.c 2012-11-26 22:47:22.471674728 +0000 +diff -up cups-1.6.2/scheduler/job.c.lspp cups-1.6.2/scheduler/job.c +--- cups-1.6.2/scheduler/job.c.lspp 2013-03-18 19:00:30.686448406 +0100 ++++ cups-1.6.2/scheduler/job.c 2013-03-18 19:00:30.735447727 +0100 @@ -68,6 +68,9 @@ * update_job_attrs() - Update the job-printer-* attributes. */ @@ -1660,7 +1660,7 @@ diff -up cups-1.6.1/scheduler/job.c.lspp cups-1.6.1/scheduler/job.c job->attrs->state = IPP_IDLE; if (ippWriteIO(fp, (ipp_iocb_t)cupsFileWrite, 1, NULL, -@@ -3735,6 +3907,18 @@ get_options(cupsd_job_t *job, /* I - Jo +@@ -3756,6 +3928,18 @@ get_options(cupsd_job_t *job, /* I - Jo banner_page) continue; @@ -1679,7 +1679,7 @@ diff -up cups-1.6.1/scheduler/job.c.lspp cups-1.6.1/scheduler/job.c /* * Otherwise add them to the list... */ -@@ -4457,6 +4641,19 @@ static void +@@ -4480,6 +4664,19 @@ static void start_job(cupsd_job_t *job, /* I - Job ID */ cupsd_printer_t *printer) /* I - Printer to print job */ { @@ -1699,7 +1699,7 @@ diff -up cups-1.6.1/scheduler/job.c.lspp cups-1.6.1/scheduler/job.c cupsdLogMessage(CUPSD_LOG_DEBUG2, "start_job(job=%p(%d), printer=%p(%s))", job, job->id, printer, printer->name); -@@ -4599,6 +4796,108 @@ start_job(cupsd_job_t *job, /* I - +@@ -4622,6 +4819,108 @@ start_job(cupsd_job_t *job, /* I - fcntl(job->side_pipes[1], F_SETFD, fcntl(job->side_pipes[1], F_GETFD) | FD_CLOEXEC); @@ -1808,9 +1808,9 @@ diff -up cups-1.6.1/scheduler/job.c.lspp cups-1.6.1/scheduler/job.c /* * Now start the first file in the job... */ -diff -up cups-1.6.1/scheduler/job.h.lspp cups-1.6.1/scheduler/job.h ---- cups-1.6.1/scheduler/job.h.lspp 2012-05-23 02:36:50.000000000 +0100 -+++ cups-1.6.1/scheduler/job.h 2012-11-26 22:47:22.471674728 +0000 +diff -up cups-1.6.2/scheduler/job.h.lspp cups-1.6.2/scheduler/job.h +--- cups-1.6.2/scheduler/job.h.lspp 2012-05-23 03:36:50.000000000 +0200 ++++ cups-1.6.2/scheduler/job.h 2013-03-18 19:00:30.736447713 +0100 @@ -13,6 +13,13 @@ * file is missing or damaged, see the license at "http://www.cups.org/". */ @@ -1836,9 +1836,9 @@ diff -up cups-1.6.1/scheduler/job.h.lspp cups-1.6.1/scheduler/job.h }; typedef struct cupsd_joblog_s /**** Job log message ****/ -diff -up cups-1.6.1/scheduler/main.c.lspp cups-1.6.1/scheduler/main.c ---- cups-1.6.1/scheduler/main.c.lspp 2012-11-26 22:47:22.462674681 +0000 -+++ cups-1.6.1/scheduler/main.c 2012-11-26 22:47:22.472674733 +0000 +diff -up cups-1.6.2/scheduler/main.c.lspp cups-1.6.2/scheduler/main.c +--- cups-1.6.2/scheduler/main.c.lspp 2013-03-18 19:00:30.708448101 +0100 ++++ cups-1.6.2/scheduler/main.c 2013-03-18 19:05:36.422206888 +0100 @@ -38,6 +38,8 @@ * usage() - Show scheduler usage. */ @@ -1848,9 +1848,9 @@ diff -up cups-1.6.1/scheduler/main.c.lspp cups-1.6.1/scheduler/main.c /* * Include necessary headers... */ -@@ -75,6 +77,9 @@ - # include - #endif /* HAVE_NOTIFY_H */ +@@ -80,6 +82,9 @@ + # include + #endif /* HAVE_SYS_PARAM_H */ +#ifdef WITH_LSPP +# include @@ -1858,7 +1858,7 @@ diff -up cups-1.6.1/scheduler/main.c.lspp cups-1.6.1/scheduler/main.c /* * Local functions... -@@ -138,6 +143,9 @@ main(int argc, /* I - Number of comm +@@ -143,6 +148,9 @@ main(int argc, /* I - Number of comm #if defined(HAVE_SIGACTION) && !defined(HAVE_SIGSET) struct sigaction action; /* Actions for POSIX signals */ #endif /* HAVE_SIGACTION && !HAVE_SIGSET */ @@ -1868,7 +1868,7 @@ diff -up cups-1.6.1/scheduler/main.c.lspp cups-1.6.1/scheduler/main.c #ifdef __sgi cups_file_t *fp; /* Fake lpsched lock file */ struct stat statbuf; /* Needed for checking lpsched FIFO */ -@@ -514,6 +522,25 @@ main(int argc, /* I - Number of comm +@@ -522,6 +530,25 @@ main(int argc, /* I - Number of comm #endif /* DEBUG */ } @@ -1894,7 +1894,7 @@ diff -up cups-1.6.1/scheduler/main.c.lspp cups-1.6.1/scheduler/main.c /* * Set the timezone info... */ -@@ -1231,6 +1258,11 @@ main(int argc, /* I - Number of comm +@@ -1216,6 +1243,11 @@ main(int argc, /* I - Number of comm cupsdStopSelect(); @@ -1906,9 +1906,9 @@ diff -up cups-1.6.1/scheduler/main.c.lspp cups-1.6.1/scheduler/main.c return (!stop_scheduler); } -diff -up cups-1.6.1/scheduler/printers.c.lspp cups-1.6.1/scheduler/printers.c ---- cups-1.6.1/scheduler/printers.c.lspp 2012-11-26 22:47:22.419674456 +0000 -+++ cups-1.6.1/scheduler/printers.c 2012-11-26 22:47:22.472674733 +0000 +diff -up cups-1.6.2/scheduler/printers.c.lspp cups-1.6.2/scheduler/printers.c +--- cups-1.6.2/scheduler/printers.c.lspp 2013-03-18 19:00:30.649448920 +0100 ++++ cups-1.6.2/scheduler/printers.c 2013-03-18 19:07:48.244377673 +0100 @@ -56,6 +56,8 @@ * write_xml_string() - Write a string with XML escaping. */ @@ -1929,10 +1929,10 @@ diff -up cups-1.6.1/scheduler/printers.c.lspp cups-1.6.1/scheduler/printers.c /* * Local functions... -@@ -2101,6 +2107,13 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p) - "username", - "password" - }; +@@ -2090,6 +2096,13 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p) + ipp_attribute_t *attr; /* Attribute data */ + char *name, /* Current user/group name */ + *filter; /* Current filter */ +#ifdef WITH_LSPP + char *audit_message; /* Audit message string */ + char *printerfile; /* Path to a local printer dev */ @@ -1943,7 +1943,7 @@ diff -up cups-1.6.1/scheduler/printers.c.lspp cups-1.6.1/scheduler/printers.c DEBUG_printf(("cupsdSetPrinterAttrs: entering name = %s, type = %x\n", p->name, -@@ -2234,6 +2247,45 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p) +@@ -2212,6 +2225,45 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p) attr->values[1].string.text = _cupsStrAlloc(Classification ? Classification : p->job_sheets[1]); } @@ -1989,7 +1989,7 @@ diff -up cups-1.6.1/scheduler/printers.c.lspp cups-1.6.1/scheduler/printers.c } p->raw = 0; -@@ -5320,7 +5372,6 @@ write_irix_state(cupsd_printer_t *p) /* +@@ -5298,7 +5350,6 @@ write_irix_state(cupsd_printer_t *p) /* } #endif /* __sgi */ diff --git a/cups-str4223.patch b/cups-str4223.patch deleted file mode 100644 index 10c21a0..0000000 --- a/cups-str4223.patch +++ /dev/null @@ -1,3238 +0,0 @@ -diff -up cups-1.6.1/conf/cupsd.conf.in.str4223 cups-1.6.1/conf/cupsd.conf.in ---- cups-1.6.1/conf/cupsd.conf.in.str4223 2013-03-05 16:58:52.738286029 +0000 -+++ cups-1.6.1/conf/cupsd.conf.in 2013-03-05 16:58:52.793286241 +0000 -@@ -9,10 +9,6 @@ - # for troubleshooting... - LogLevel @CUPS_LOG_LEVEL@ - --# Administrator user group... --SystemGroup @CUPS_SYSTEM_GROUPS@ --@CUPS_SYSTEM_AUTHKEY@ -- - # Only listen for connections from the local machine. - Listen localhost:@DEFAULT_IPP_PORT@ - @CUPS_LISTEN_DOMAINSOCKET@ -diff -up cups-1.6.1/conf/cups-files.conf.in.str4223 cups-1.6.1/conf/cups-files.conf.in ---- cups-1.6.1/conf/cups-files.conf.in.str4223 2013-03-05 16:58:52.794286245 +0000 -+++ cups-1.6.1/conf/cups-files.conf.in 2013-03-05 16:58:52.794286245 +0000 -@@ -0,0 +1,98 @@ -+# -+# "$Id$" -+# -+# Sample file/directory/user/group configuration file for the CUPS scheduler. -+# See "man cups-files.conf" for a complete description of this file. -+# -+ -+# List of events that are considered fatal errors for the scheduler... -+#FatalErrors @CUPS_FATAL_ERRORS@ -+ -+# Default user and group for filters/backends/helper programs; this cannot be -+# any user or group that resolves to ID 0 for security reasons... -+#User @CUPS_USER@ -+#Group @CUPS_GROUP@ -+ -+# Administrator user group, used to match @SYSTEM in cupsd.conf policy rules... -+SystemGroup @CUPS_SYSTEM_GROUPS@ -+@CUPS_SYSTEM_AUTHKEY@ -+ -+# User that is substituted for unauthenticated (remote) root accesses... -+#RemoteRoot remroot -+ -+# Do we allow file: device URIs other than to /dev/null? -+#FileDevice No -+ -+# Permissions for configuration and log files... -+#ConfigFilePerm @CUPS_CONFIG_FILE_PERM@ -+#LogFilePerm @CUPS_LOG_FILE_PERM@ -+ -+# Location of the file logging all access to the scheduler; may be the name -+# "syslog". If not an absolute path, the value of ServerRoot is used as the -+# root directory. Also see the "AccessLogLevel" directive in cupsd.conf. -+AccessLog @CUPS_LOGDIR@/access_log -+ -+# Location of cache files used by the scheduler... -+#CacheDir @CUPS_CACHEDIR@ -+ -+# Location of data files used by the scheduler... -+#DataDir @CUPS_DATADIR@ -+ -+# Location of the static web content served by the scheduler... -+#DocumentRoot @CUPS_DOCROOT@ -+ -+# Location of the file logging all messages produced by the scheduler and any -+# helper programs; may be the name "syslog". If not an absolute path, the value -+# of ServerRoot is used as the root directory. Also see the "LogLevel" -+# directive in cupsd.conf. -+ErrorLog @CUPS_LOGDIR@/error_log -+ -+# Location of fonts used by older print filters... -+#FontPath @CUPS_FONTPATH@ -+ -+# Location of LPD configuration -+#LPDConfigFile @CUPS_DEFAULT_LPD_CONFIG_FILE@ -+ -+# Location of the file logging all pages printed by the scheduler and any -+# helper programs; may be the name "syslog". If not an absolute path, the value -+# of ServerRoot is used as the root directory. Also see the "PageLogFormat" -+# directive in cupsd.conf. -+PageLog @CUPS_LOGDIR@/page_log -+ -+# Location of the file listing all of the local printers... -+#Printcap @CUPS_DEFAULT_PRINTCAP@ -+ -+# Format of the Printcap file... -+#PrintcapFormat bsd -+#PrintcapFormat plist -+#PrintcapFormat solaris -+ -+# Location of all spool files... -+#RequestRoot @CUPS_REQUESTS@ -+ -+# Location of helper programs... -+#ServerBin @CUPS_SERVERBIN@ -+ -+# SSL/TLS certificate for the scheduler... -+#ServerCertificate @CUPS_SERVERCERT@ -+ -+# SSL/TLS private key for the scheduler... -+#ServerKey @CUPS_SERVERKEY@ -+ -+# Location of other configuration files... -+#ServerRoot @CUPS_SERVERROOT@ -+ -+# Location of Samba configuration file... -+#SMBConfigFile @CUPS_DEFAULT_SMB_CONFIG_FILE@ -+ -+# Location of scheduler state files... -+#StateDir @CUPS_STATEDIR@ -+ -+# Location of scheduler/helper temporary files. This directory is emptied on -+# scheduler startup and cannot be one of the standard (public) temporary -+# directory locations for security reasons... -+#TempDir @CUPS_REQUESTS@/tmp -+ -+# -+# End of "$Id$". -+# -diff -up cups-1.6.1/config-scripts/cups-defaults.m4.str4223 cups-1.6.1/config-scripts/cups-defaults.m4 ---- cups-1.6.1/config-scripts/cups-defaults.m4.str4223 2012-04-23 18:26:57.000000000 +0100 -+++ cups-1.6.1/config-scripts/cups-defaults.m4 2013-03-05 16:58:52.795286249 +0000 -@@ -305,6 +305,7 @@ else - fi - - AC_DEFINE_UNQUOTED(CUPS_DEFAULT_LPD_CONFIG_FILE, "$CUPS_DEFAULT_LPD_CONFIG_FILE") -+AC_SUBST(CUPS_DEFAULT_LPD_CONFIG_FILE) - - dnl Default SMB config file... - AC_ARG_WITH(smbconfigfile, [ --with-smbconfigfile set default SMBConfigFile URI], -@@ -326,6 +327,7 @@ else - fi - - AC_DEFINE_UNQUOTED(CUPS_DEFAULT_SMB_CONFIG_FILE, "$CUPS_DEFAULT_SMB_CONFIG_FILE") -+AC_SUBST(CUPS_DEFAULT_SMB_CONFIG_FILE) - - dnl Default MaxCopies value... - AC_ARG_WITH(max-copies, [ --with-max-copies set default max copies value, default=9999 ], -diff -up cups-1.6.1/config-scripts/cups-ssl.m4.str4223 cups-1.6.1/config-scripts/cups-ssl.m4 ---- cups-1.6.1/config-scripts/cups-ssl.m4.str4223 2013-03-05 16:58:52.663285739 +0000 -+++ cups-1.6.1/config-scripts/cups-ssl.m4 2013-03-05 16:58:52.795286249 +0000 -@@ -27,6 +27,8 @@ AC_ARG_WITH(openssl-includes, [ --with- - SSLFLAGS="" - SSLLIBS="" - have_ssl=0 -+CUPS_SERVERCERT="" -+CUPS_SERVERKEY="" - - if test x$enable_ssl != xno; then - dnl Look for CDSA... -@@ -36,6 +38,7 @@ if test x$enable_ssl != xno; then - have_ssl=1 - AC_DEFINE(HAVE_SSL) - AC_DEFINE(HAVE_CDSASSL) -+ CUPS_SERVERCERT="/Library/Keychains/System.keychain" - - dnl Check for the various security headers... - AC_CHECK_HEADER(Security/SecureTransportPriv.h, -@@ -106,6 +109,9 @@ if test x$enable_ssl != xno; then - fi - - if test $have_ssl = 1; then -+ CUPS_SERVERCERT="ssl/server.crt" -+ CUPS_SERVERKEY="ssl/server.key" -+ - if $PKGCONFIG --exists gcrypt; then - SSLLIBS="$SSLLIBS `$PKGCONFIG --libs gcrypt`" - SSLFLAGS="$SSLFLAGS `$PKGCONFIG --cflags gcrypt`" -@@ -148,6 +154,9 @@ if test x$enable_ssl != xno; then - done - - if test "x${SSLLIBS}" != "x"; then -+ CUPS_SERVERCERT="ssl/server.crt" -+ CUPS_SERVERKEY="ssl/server.key" -+ - LIBS="$SAVELIBS $SSLLIBS" - AC_CHECK_FUNCS(SSL_set_tlsext_host_name) - fi -@@ -165,6 +174,8 @@ elif test x$enable_cdsa = xyes -o x$enab - AC_MSG_ERROR([Unable to enable SSL support.]) - fi - -+AC_SUBST(CUPS_SERVERCERT) -+AC_SUBST(CUPS_SERVERKEY) - AC_SUBST(IPPALIASES) - AC_SUBST(SSLFLAGS) - AC_SUBST(SSLLIBS) -diff -up cups-1.6.1/configure.in.str4223 cups-1.6.1/configure.in ---- cups-1.6.1/configure.in.str4223 2013-03-05 16:58:52.778286183 +0000 -+++ cups-1.6.1/configure.in 2013-03-05 16:59:16.625378649 +0000 -@@ -61,6 +61,7 @@ AC_SUBST(INSTALL_LANGUAGES) - AC_SUBST(UNINSTALL_LANGUAGES) - - AC_OUTPUT(Makedefs -+ conf/cups-files.conf - conf/cupsd.conf - conf/mime.convs - conf/pam.std -@@ -71,12 +72,14 @@ AC_OUTPUT(Makedefs - data/cups.socket - data/cups.path - desktop/cups.desktop -+ doc/help/ref-cups-files-conf.html - doc/help/ref-cupsd-conf.html - doc/help/standard.html - doc/index.html - man/client.conf.man - man/cups-deviced.man - man/cups-driverd.man -+ man/cups-files.conf.man - man/cups-lpd.man - man/cups-snmp.man - man/cupsaddsmb.man -diff -up cups-1.6.1/conf/Makefile.str4223 cups-1.6.1/conf/Makefile ---- cups-1.6.1/conf/Makefile.str4223 2013-03-05 16:58:52.623285586 +0000 -+++ cups-1.6.1/conf/Makefile 2013-03-05 16:58:52.796286252 +0000 -@@ -19,7 +19,7 @@ include ../Makedefs - # Config files... - # - --KEEP = cupsd.conf snmp.conf -+KEEP = cups-files.conf cupsd.conf snmp.conf - REPLACE = mime.convs mime.types - - -diff -up cups-1.6.1/doc/help/ref-cupsd-conf.html.in.str4223 cups-1.6.1/doc/help/ref-cupsd-conf.html.in ---- cups-1.6.1/doc/help/ref-cupsd-conf.html.in.str4223 2012-05-18 20:51:02.000000000 +0100 -+++ cups-1.6.1/doc/help/ref-cupsd-conf.html.in 2013-03-05 17:01:38.442945499 +0000 -@@ -49,36 +49,6 @@ automatically handles restarting the sch - - - --

AccessLog

-- --

Examples

-- --
--AccessLog /var/log/cups/access_log
--AccessLog /var/log/cups/access_log-%s
--AccessLog syslog
--
-- --

Description

-- --

The AccessLog directive sets the name of the --access log file. If the filename is not absolute then it is --assumed to be relative to the ServerRoot directory. The --access log file is stored in "common log format" and can be used --by any web access reporting tool to generate a report on CUPS --server activity.

-- --

The server name can be included in the filename by using --%s in the name.

-- --

The special name "syslog" can be used to send the access --information to the system log instead of a plain file.

-- --

The default access log file is --@CUPS_LOGDIR@/access_log.

-- -- -

AccessLogLevel

- -

Examples

-@@ -197,82 +167,6 @@ HREF="#Location">LocationLimit section.

- - --

DeprecatedAuthClass

-- --

Examples

-- --
--<Location /path>
--  ...
--  AuthClass Anonymous
--  AuthClass User
--  AuthClass System
--  AuthClass Group
--</Location>
--
-- --

Description

-- --

The AuthClass directive defines what level of --authentication is required:

-- --
    -- --
  • Anonymous - No authentication should be -- performed (default)
  • -- --
  • User - A valid username and password is -- required
  • -- --
  • System - A valid username and password -- is required, and the username must belong to the "sys" -- group; this can be changed using the SystemGroup -- directive
  • -- --
  • Group - A valid username and password is -- required, and the username must belong to the group named -- by the AuthGroupName -- directive
  • -- --
-- --

The AuthClass directive must appear inside a Location or Limit section.

-- --

This directive is deprecated and will be removed from a --future release of CUPS. Consider using the more flexible Require directive instead.

-- -- --

DeprecatedAuthGroupName

-- --

Examples

-- --
--<Location /path>
--  ...
--  AuthGroupName mygroup
--  AuthGroupName lp
--</Location>
--
-- --

Description

-- --

The AuthGroupName directive sets the group to use --for Group authentication.

-- --

The AuthGroupName directive must appear inside a --Location or Limit section.

-- --

This directive is deprecated and will be removed from a --future release of CUPS. Consider using the more flexible Require directive instead.

-- -- -

AuthType

- -

Examples

-@@ -436,40 +330,6 @@ used.

-

The default is to not allow classification overrides.

- - --

CUPS 1.1.15ConfigFilePerm

-- --

Examples

-- --
--ConfigFilePerm 0644
--ConfigFilePerm 0640
--
-- --

Description

-- --

The ConfigFilePerm directive specifies the permissions to use when the scheduler writes configuration and cache files, typically in response to IPP or HTTP requests. The default is @CUPS_CONFIG_FILE_PERM@.

-- --
Note: -- --

The permissions for the printers.conf file are always masked to only allow access from the scheduler user (typically root). This is done because printer device URIs sometimes contain sensitive authentication information that should not be generally known on the system. There is no way to disable this security feature.

-- --
-- -- --

DataDir

-- --

Examples

-- --
--DataDir /usr/share/cups
--
-- --

Description

-- --

The DataDir directive sets the directory to use --for data files.

-- -- -

CUPS 1.2/OS X 10.5DefaultAuthType

- -

Examples

-@@ -653,32 +513,6 @@ DirtyCleanInterval 0 -

The default value is 30 (30 seconds).

- - --

DocumentRoot

-- --

Examples

-- --
--DocumentRoot /usr/share/doc/cups
--DocumentRoot /foo/bar/doc/cups
--
-- --

Description

-- --

The DocumentRoot directive specifies the location --of web content for the HTTP server in CUPS. If an absolute path --is not specified then it is assumed to be relative to the ServerRoot directory. The --default directory is @CUPS_DOCROOT@.

-- --

Documents are first looked up in a sub-directory for the --primary language requested by the client (e.g. --@CUPS_DOCROOT@/fr/...) and then directly under --the DocumentRoot directory (e.g. --@CUPS_DOCROOT@/...), so it is possible to --localize the web content by providing subdirectories for each --language needed.

-- -- -

Encryption

- -

Examples

-@@ -701,31 +535,6 @@ encryption settings for that location. T - IfRequested for all locations.

- - --

ErrorLog

-- --

Examples

-- --
--ErrorLog /var/log/cups/error_log
--ErrorLog /var/log/cups/error_log-%s
--ErrorLog syslog
--
-- --

Description

-- --

The ErrorLog directive sets the name of the error --log file. If the filename is not absolute then it is assumed to --be relative to the ServerRoot directory. The --default error log file is @CUPS_LOGDIR@/error_log.

-- --

The server name can be included in the filename by using --%s in the name.

-- --

The special name "syslog" can be used to send the error --information to the system log instead of a plain file.

-- -- -

CUPS 1.3/OS X 10.5ErrorPolicy

- -

Examples

-@@ -765,90 +574,6 @@ printer.

- - - --

CUPS 1.4/OS X 10.6FatalErrors

-- --

Examples

-- --
--FatalErrors none
--FatalErrors all
--FatalErrors browse
--FatalErrors config
--FatalErrors listen
--FatalErrors log
--FatalErrors permissions
--FatalErrors all -permissions
--FatalErrors config permissions log
--
-- --

Description

-- --

The FatalErrors directive determines whether certain kinds of --errors are fatal. The following kinds of errors are currently recognized:

-- --
    -- --
  • none - No errors are fatal
  • -- --
  • all - All of the errors below are fatal
  • -- --
  • browse - Browsing initialization errors are fatal, -- for example failed binding to the CUPS browse port or failed connections -- to LDAP servers
  • -- --
  • config - Configuration file syntax errors are -- fatal
  • -- --
  • listen - Listen or Port errors are fatal, except for -- IPv6 failures on the loopback or "any" addresses
  • -- --
  • log - Log file creation or write errors are fatal
  • -- --
  • permissions - Bad startup file permissions are -- fatal, for example shared SSL certificate and key files with world- -- read permissions
  • -- --
-- --

Multiple errors can be listed, and the form "-kind" can be used with --all to remove specific kinds of errors. The default setting is --@CUPS_FATAL_ERRORS@.

-- -- --

CUPS 1.1.18FileDevice

-- --

Examples

-- --
--FileDevice Yes
--FileDevice No
--
-- --

Description

-- --

The FileDevice directive determines whether the --scheduler allows new printers to be added using device URIs of --the form file:/filename. File devices are most often --used to test new printer drivers and do not support raw file --printing.

-- --

The default setting is No.

-- --
Note: -- --

File devices are managed by the scheduler. Since the --scheduler normally runs as the root user, file devices --can be used to overwrite system files and potentially --gain unauthorized access to the system. If you must --create printers using file devices, we recommend that --you set the FileDevice directive to --Yes for only as long as you need to add the --printers to the system, and then reset the directive to --No.

-- --
-- -- -

CUPS 1.1.3FilterLimit

- -

Examples

-@@ -893,39 +618,6 @@ value to assign to filter processes. The - is 0.

- - --

CUPS 1.1.3FontPath

-- --

Examples

-- --
--FontPath /foo/bar/fonts
--FontPath /usr/share/cups/fonts:/foo/bar/fonts
--
-- --

Description

-- --

The FontPath directive specifies the font path to --use when searching for fonts. The default font path is --/usr/share/cups/fonts.

-- -- --

Group

-- --

Examples

-- --
--Group lp
--Group nobody
--
-- --

Description

-- --

The Group directive specifies the UNIX group that --filter and CGI programs run as. The default group is --system-specific but is usually lp or --nobody.

-- -- -

CUPS 1.6/OS X 10.8GSSServiceName

- -

Examples

-@@ -1533,22 +1225,6 @@ error occurs during printing. The defaul - disables debugging history entirely and is not recommended.

- - --

CUPS 1.1.15LogFilePerm

-- --

Examples

-- --
--LogFilePerm 0644
--LogFilePerm 0600
--
-- --

Description

-- --

The LogFilePerm directive specifies the --permissions to use when writing log files. The default --is @CUPS_LOG_FILE_PERM@.

-- -- -

LogLevel

- -

Examples

-@@ -1893,31 +1569,6 @@ HREF="#Location">LocationLimit section.

- - --

PageLog

-- --

Examples

-- --
--PageLog /var/log/cups/page_log
--PageLog /var/log/cups/page_log-%s
--PageLog syslog
--
-- --

Description

-- --

The PageLog directive sets the name of the page --log file. If the filename is not absolute then it is assumed to --be relative to the ServerRoot directory. The --default page log file is @CUPS_LOGDIR@/page_log.

-- --

The server name can be included in the filename by using --%s in the name.

-- --

The special name "syslog" can be used to send the page --information to the system log instead of a plain file.

-- -- -

PageLogFormat

- -

Examples

-@@ -2096,65 +1747,6 @@ PreserveJobFiles 604800 - - - --

Printcap

-- --

Examples

-- --
--Printcap
--Printcap /etc/printcap
--Printcap /etc/printers.conf
--Printcap /Library/Preferences/org.cups.printers.plist
--
-- --

Description

-- --

The Printcap directive controls whether or not a --printcap file is automatically generated and updated with a list --of available printers. If specified with no value, then no --printcap file will be generated. The default is to generate a --file named @CUPS_DEFAUL_PRINTCAP@.

-- --

When a filename is specified (e.g. @CUPS_DEFAULT_PRINTCAP@), --the printcap file is written whenever a printer is added or --removed. The printcap file can then be used by applications that --are hardcoded to look at the printcap file for the available --printers.

-- -- --

PrintcapFormat

-- --

Examples

-- --
--PrintcapFormat BSD
--PrintcapFormat Solaris
--PrintcapFormat plist
--
-- --

Description

-- --

The PrintcapFormat directive controls the output format of the --printcap file. The default is to generate the plist format on OS X, the --Solaris format on Solaris, and the BSD format on other operating systems.

-- -- --

CUPS 1.1.13PrintcapGUI

-- --

Examples

-- --
--PrintGUI /usr/bin/glpoptions
--
-- --

Description

-- --

The PrintcapGUI directive sets the program to --associate with the IRIX printer GUI interface script which is --used by IRIX applications to display printer-specific options. --There is no default program.

-- -- -

CUPS 1.1.21ReloadTimeout

- -

Examples

-@@ -2171,42 +1763,6 @@ of seconds the scheduler will wait for a - before doing a restart. The default is 30 seconds.

- - --

CUPS 1.1.3RemoteRoot

-- --

Examples

-- --
--RemoteRoot remroot
--RemoteRoot root
--
-- --

Description

-- --

The RemoteRoot directive sets the username for --unauthenticated root requests from remote hosts. The default --username is remroot. Setting RemoteRoot --to root effectively disables this security --mechanism.

-- -- --

RequestRoot

-- --

Examples

-- --
--RequestRoot /var/spool/cups
--RequestRoot /foo/bar/spool/cups
--
-- --

Description

-- --

The RequestRoot directive sets the directory for --incoming IPP requests and HTML forms. If an absolute path is not --provided then it is assumed to be relative to the ServerRoot directory. The --default request directory is @CUPS_REQUESTS@.

-- -- -

CUPS 1.1.7Require

- -

Examples

-@@ -2359,64 +1915,6 @@ alternate name with a ServerAlias direct - - - --

ServerBin

-- --

Examples

-- --
--ServerBin /usr/lib/cups
--ServerBin /foo/bar/lib/cups
--
-- --

Description

-- --

The ServerBin directive sets the directory for --server-run executables. If an absolute path is not provided then --it is assumed to be relative to the ServerRoot directory. The --default executable directory is /usr/lib/cups, --/usr/lib32/cups, or /usr/libexec/cups --depending on the operating system.

-- -- --

ServerCertificate

-- --

Examples

-- --
--ServerCertificate /etc/cups/ssl/server.crt
--
-- --

Description

-- --

The ServerCertificate directive specifies the --location of the SSL certificate file used by the server when --negotiating encrypted connections. The certificate must not be --encrypted (password protected) since the scheduler normally runs --in the background and will be unable to ask for a password.

-- --

The default certificate file is --/etc/cups/ssl/server.crt.

-- -- --

ServerKey

-- --

Examples

-- --
--ServerKey /etc/cups/ssl/server.key
--
-- --

Description

-- --

The ServerKey directive specifies the location of --the SSL private key file used by the server when negotiating --encrypted connections.

-- --

The default key file is --/etc/cups/ssl/server.crt.

-- -- -

ServerName

- -

Examples

-@@ -2433,23 +1931,6 @@ that is reported to clients. By default - hostname.

- - --

ServerRoot

-- --

Examples

-- --
--ServerRoot /etc/cups
--ServerRoot /foo/bar/cups
--
-- --

Description

-- --

The ServerRoot directive specifies the absolute --path to the server configuration and state files. It is also used --to resolve relative paths in the cupsd.conf file. The --default server directory is /etc/cups.

-- -- -

CUPS 1.1.21ServerTokens

- -

Examples

-@@ -2645,53 +2126,6 @@ subscription values to make private. The - HREF="#Policy">Policy section.

- - --

SystemGroup

-- --

Examples

-- --
--SystemGroup lpadmin
--SystemGroup sys
--SystemGroup system
--SystemGroup root
--SystemGroup root lpadmin
--
-- --

Description

-- --

The SystemGroup directive specifies the system --administration group for System authentication. --Multiple groups can be listed, separated with spaces. The default --group list is @CUPS_SYSTEM_GROUPS@.

-- -- --

TempDir

-- --

Examples

-- --
--TempDir /var/tmp
--TempDir /foo/bar/tmp
--
-- --

Description

-- --

The TempDir directive specifies an absolute path --for the directory to use for temporary files. The default --directory is @CUPS_REQUESTS@/tmp.

-- --

Temporary directories must be world-writable and should have --the "sticky" permission bit enabled so that other users cannot --delete filter temporary files. The following commands will create --an appropriate temporary directory called --/foo/bar/tmp:

-- --
--mkdir /foo/bar/tmp
--chmod a+rwxt /foo/bar/tmp
--
-- -- -

Timeout

- -

Examples

-@@ -2712,53 +2146,6 @@ to wait before an active HTTP or IPP req -

The default timeout is 5m (five minutes).

- - --

CUPS 1.2/OS X 10.5UseNetworkDefault

-- --

Examples

-- --
--UseNetworkDefault yes
--UseNetworkDefault no
--
-- --

Description

-- --

The UseNetworkDefault directive controls whether --the client will use a network/remote printer as a default --printer. If enabled, the default printer of a server is used as --the default printer on a client. When multiple servers are --advertising a default printer, the client's default printer is --set to the first discovered printer, or to the implicit class for --the same printer available from multiple servers.

-- --

The default is @CUPS_USE_NETWORK_DEFAULT@.

-- -- --

User

-- --

Examples

-- --
--User lp
--User guest
--
-- --

Description

-- --

The User directive specifies the UNIX user that --filter and CGI programs run as. The default user is --@CUPS_USER@.

-- --
Note: -- --

You may not use user root, as that would expose --the system to unacceptable security risks. The scheduler will --automatically choose user nobody if you specify a --user whose ID is 0.

-- --
-- -- -

CUPS 1.5WebInterface

- -

Examples

-diff -up cups-1.6.1/doc/help/ref-cups-files-conf.html.in.str4223 cups-1.6.1/doc/help/ref-cups-files-conf.html.in ---- cups-1.6.1/doc/help/ref-cups-files-conf.html.in.str4223 2013-03-05 16:58:52.798286260 +0000 -+++ cups-1.6.1/doc/help/ref-cups-files-conf.html.in 2013-03-05 17:02:04.602052537 +0000 -@@ -0,0 +1,513 @@ -+ -+ -+ -+ cups-files.conf -+ -+ -+ -+ -+

cups-files.conf

-+ -+

The /etc/cups/cups-files.conf file contains configuration directives that control the files, directories. users. and groups that are used by the CUPS scheduler, cupsd(8). Each directive is listed on a line by itself followed by its value. Comments are introduced using the number sign ("#") character at the beginning of a line.

-+ -+

AccessLog

-+ -+

Examples

-+ -+
-+AccessLog /var/log/cups/access_log
-+AccessLog /var/log/cups/access_log-%s
-+AccessLog syslog
-+
-+ -+

Description

-+ -+

The AccessLog directive sets the name of the -+access log file. If the filename is not absolute then it is -+assumed to be relative to the ServerRoot directory. The -+access log file is stored in "common log format" and can be used -+by any web access reporting tool to generate a report on CUPS -+server activity.

-+ -+

The server name can be included in the filename by using -+%s in the name.

-+ -+

The special name "syslog" can be used to send the access -+information to the system log instead of a plain file.

-+ -+

The default access log file is -+@CUPS_LOGDIR@/access_log.

-+ -+ -+

CUPS 1.1.15ConfigFilePerm

-+ -+

Examples

-+ -+
-+ConfigFilePerm 0644
-+ConfigFilePerm 0640
-+
-+ -+

Description

-+ -+

The ConfigFilePerm directive specifies the permissions to use when the scheduler writes configuration and cache files, typically in response to IPP or HTTP requests. The default is @CUPS_CONFIG_FILE_PERM@.

-+ -+
Note: -+ -+

The permissions for the printers.conf file are always masked to only allow access from the scheduler user (typically root). This is done because printer device URIs sometimes contain sensitive authentication information that should not be generally known on the system. There is no way to disable this security feature.

-+ -+
-+ -+ -+

DataDir

-+ -+

Examples

-+ -+
-+DataDir /usr/share/cups
-+
-+ -+

Description

-+ -+

The DataDir directive sets the directory to use -+for data files.

-+ -+ -+

DocumentRoot

-+ -+

Examples

-+ -+
-+DocumentRoot /usr/share/doc/cups
-+DocumentRoot /foo/bar/doc/cups
-+
-+ -+

Description

-+ -+

The DocumentRoot directive specifies the location -+of web content for the HTTP server in CUPS. If an absolute path -+is not specified then it is assumed to be relative to the ServerRoot directory. The -+default directory is @CUPS_DOCROOT@.

-+ -+

Documents are first looked up in a sub-directory for the -+primary language requested by the client (e.g. -+@CUPS_DOCROOT@/fr/...) and then directly under -+the DocumentRoot directory (e.g. -+@CUPS_DOCROOT@/...), so it is possible to -+localize the web content by providing subdirectories for each -+language needed.

-+ -+ -+

ErrorLog

-+ -+

Examples

-+ -+
-+ErrorLog /var/log/cups/error_log
-+ErrorLog /var/log/cups/error_log-%s
-+ErrorLog syslog
-+
-+ -+

Description

-+ -+

The ErrorLog directive sets the name of the error -+log file. If the filename is not absolute then it is assumed to -+be relative to the ServerRoot directory. The -+default error log file is @CUPS_LOGDIR@/error_log.

-+ -+

The server name can be included in the filename by using -+%s in the name.

-+ -+

The special name "syslog" can be used to send the error -+information to the system log instead of a plain file.

-+ -+ -+

CUPS 1.4/OS X 10.6FatalErrors

-+ -+

Examples

-+ -+
-+FatalErrors none
-+FatalErrors all
-+FatalErrors browse
-+FatalErrors config
-+FatalErrors listen
-+FatalErrors log
-+FatalErrors permissions
-+FatalErrors all -permissions
-+FatalErrors config permissions log
-+
-+ -+

Description

-+ -+

The FatalErrors directive determines whether certain kinds of -+errors are fatal. The following kinds of errors are currently recognized:

-+ -+
    -+ -+
  • none - No errors are fatal
  • -+ -+
  • all - All of the errors below are fatal
  • -+ -+
  • browse - Browsing initialization errors are fatal, -+ for example failed binding to the CUPS browse port or failed connections -+ to LDAP servers
  • -+ -+
  • config - Configuration file syntax errors are -+ fatal
  • -+ -+
  • listen - Listen or Port errors are fatal, except for -+ IPv6 failures on the loopback or "any" addresses
  • -+ -+
  • log - Log file creation or write errors are fatal
  • -+ -+
  • permissions - Bad startup file permissions are -+ fatal, for example shared SSL certificate and key files with world- -+ read permissions
  • -+ -+
-+ -+

Multiple errors can be listed, and the form "-kind" can be used with -+all to remove specific kinds of errors. The default setting is -+@CUPS_FATAL_ERRORS@.

-+ -+ -+

CUPS 1.1.18FileDevice

-+ -+

Examples

-+ -+
-+FileDevice Yes
-+FileDevice No
-+
-+ -+

Description

-+ -+

The FileDevice directive determines whether the -+scheduler allows new printers to be added using device URIs of -+the form file:/filename. File devices are most often -+used to test new printer drivers and do not support raw file -+printing.

-+ -+

The default setting is No.

-+ -+
Note: -+ -+

File devices are managed by the scheduler. Since the -+scheduler normally runs as the root user, file devices -+can be used to overwrite system files and potentially -+gain unauthorized access to the system. If you must -+create printers using file devices, we recommend that -+you set the FileDevice directive to -+Yes for only as long as you need to add the -+printers to the system, and then reset the directive to -+No.

-+ -+
-+ -+ -+

CUPS 1.1.3FontPath

-+ -+

Examples

-+ -+
-+FontPath /foo/bar/fonts
-+FontPath /usr/share/cups/fonts:/foo/bar/fonts
-+
-+ -+

Description

-+ -+

The FontPath directive specifies the font path to -+use when searching for fonts. The default font path is -+/usr/share/cups/fonts.

-+ -+ -+

Group

-+ -+

Examples

-+ -+
-+Group lp
-+Group nobody
-+
-+ -+

Description

-+ -+

The Group directive specifies the UNIX group that -+filter and CGI programs run as. The default group is -+system-specific but is usually lp or -+nobody.

-+ -+ -+

CUPS 1.1.15LogFilePerm

-+ -+

Examples

-+ -+
-+LogFilePerm 0644
-+LogFilePerm 0600
-+
-+ -+

Description

-+ -+

The LogFilePerm directive specifies the -+permissions to use when writing log files. The default -+is @CUPS_LOG_FILE_PERM@.

-+ -+ -+

PageLog

-+ -+

Examples

-+ -+
-+PageLog /var/log/cups/page_log
-+PageLog /var/log/cups/page_log-%s
-+PageLog syslog
-+
-+ -+

Description

-+ -+

The PageLog directive sets the name of the page -+log file. If the filename is not absolute then it is assumed to -+be relative to the ServerRoot directory. The -+default page log file is @CUPS_LOGDIR@/page_log.

-+ -+

The server name can be included in the filename by using -+%s in the name.

-+ -+

The special name "syslog" can be used to send the page -+information to the system log instead of a plain file.

-+ -+ -+

Printcap

-+ -+

Examples

-+ -+
-+Printcap
-+Printcap /etc/printcap
-+Printcap /etc/printers.conf
-+Printcap /Library/Preferences/org.cups.printers.plist
-+
-+ -+

Description

-+ -+

The Printcap directive controls whether or not a -+printcap file is automatically generated and updated with a list -+of available printers. If specified with no value, then no -+printcap file will be generated. The default is to generate a -+file named @CUPS_DEFAULT_PRINTCAP@.

-+ -+

When a filename is specified (e.g. @CUPS_DEFAULT_PRINTCAP@), -+the printcap file is written whenever a printer is added or -+removed. The printcap file can then be used by applications that -+are hardcoded to look at the printcap file for the available -+printers.

-+ -+ -+

PrintcapFormat

-+ -+

Examples

-+ -+
-+PrintcapFormat BSD
-+PrintcapFormat Solaris
-+PrintcapFormat plist
-+
-+ -+

Description

-+ -+

The PrintcapFormat directive controls the output format of the -+printcap file. The default is to generate the plist format on OS X, the -+Solaris format on Solaris, and the BSD format on other operating systems.

-+ -+ -+

CUPS 1.1.3RemoteRoot

-+ -+

Examples

-+ -+
-+RemoteRoot remroot
-+RemoteRoot root
-+
-+ -+

Description

-+ -+

The RemoteRoot directive sets the username for -+unauthenticated root requests from remote hosts. The default -+username is remroot. Setting RemoteRoot -+to root effectively disables this security -+mechanism.

-+ -+ -+

RequestRoot

-+ -+

Examples

-+ -+
-+RequestRoot /var/spool/cups
-+RequestRoot /foo/bar/spool/cups
-+
-+ -+

Description

-+ -+

The RequestRoot directive sets the directory for -+incoming IPP requests and HTML forms. If an absolute path is not -+provided then it is assumed to be relative to the ServerRoot directory. The -+default request directory is @CUPS_REQUESTS@.

-+ -+ -+

ServerBin

-+ -+

Examples

-+ -+
-+ServerBin /usr/lib/cups
-+ServerBin /foo/bar/lib/cups
-+
-+ -+

Description

-+ -+

The ServerBin directive sets the directory for -+server-run executables. If an absolute path is not provided then -+it is assumed to be relative to the ServerRoot directory. The -+default executable directory is /usr/lib/cups, -+/usr/lib32/cups, or /usr/libexec/cups -+depending on the operating system.

-+ -+ -+

ServerCertificate

-+ -+

Examples

-+ -+
-+ServerCertificate /etc/cups/ssl/server.crt
-+
-+ -+

Description

-+ -+

The ServerCertificate directive specifies the -+location of the SSL certificate file used by the server when -+negotiating encrypted connections. The certificate must not be -+encrypted (password protected) since the scheduler normally runs -+in the background and will be unable to ask for a password.

-+ -+

The default certificate file is -+/etc/cups/ssl/server.crt.

-+ -+ -+

ServerKey

-+ -+

Examples

-+ -+
-+ServerKey /etc/cups/ssl/server.key
-+
-+ -+

Description

-+ -+

The ServerKey directive specifies the location of -+the SSL private key file used by the server when negotiating -+encrypted connections.

-+ -+

The default key file is -+/etc/cups/ssl/server.crt.

-+ -+ -+

ServerRoot

-+ -+

Examples

-+ -+
-+ServerRoot /etc/cups
-+ServerRoot /foo/bar/cups
-+
-+ -+

Description

-+ -+

The ServerRoot directive specifies the absolute -+path to the server configuration and state files. It is also used -+to resolve relative paths in the cupsd.conf file. The -+default server directory is /etc/cups.

-+ -+ -+

SystemGroup

-+ -+

Examples

-+ -+
-+SystemGroup lpadmin
-+SystemGroup sys
-+SystemGroup system
-+SystemGroup root
-+SystemGroup root lpadmin
-+
-+ -+

Description

-+ -+

The SystemGroup directive specifies the system -+administration group for System authentication. -+Multiple groups can be listed, separated with spaces. The default -+group list is @CUPS_SYSTEM_GROUPS@.

-+ -+ -+

TempDir

-+ -+

Examples

-+ -+
-+TempDir /var/tmp
-+TempDir /foo/bar/tmp
-+
-+ -+

Description

-+ -+

The TempDir directive specifies an absolute path -+for the directory to use for temporary files. The default -+directory is @CUPS_REQUESTS@/tmp.

-+ -+

Temporary directories must be world-writable and should have -+the "sticky" permission bit enabled so that other users cannot -+delete filter temporary files. The following commands will create -+an appropriate temporary directory called -+/foo/bar/tmp:

-+ -+
-+mkdir /foo/bar/tmp
-+chmod a+rwxt /foo/bar/tmp
-+
-+ -+ -+

User

-+ -+

Examples

-+ -+
-+User lp
-+User guest
-+
-+ -+

Description

-+ -+

The User directive specifies the UNIX user that -+filter and CGI programs run as. The default user is -+@CUPS_USER@.

-+ -+
Note: -+ -+

You may not use user root, as that would expose -+the system to unacceptable security risks. The scheduler will -+automatically choose user nobody if you specify a -+user whose ID is 0.

-+ -+
-+ -+ -+ -+ -diff -up cups-1.6.1/doc/Makefile.str4223 cups-1.6.1/doc/Makefile ---- cups-1.6.1/doc/Makefile.str4223 2012-04-23 19:04:24.000000000 +0100 -+++ cups-1.6.1/doc/Makefile 2013-03-05 17:02:38.730193057 +0000 -@@ -3,7 +3,7 @@ - # - # Documentation makefile for CUPS. - # --# Copyright 2007-2011 by Apple Inc. -+# Copyright 2007-2012 by Apple Inc. - # Copyright 1997-2007 by Easy Software Products. - # - # These coded instructions, statements, and computer programs are the -@@ -105,6 +105,7 @@ HELPFILES = \ - help/ref-classes-conf.html \ - help/ref-client-conf.html \ - help/ref-cupsd-conf.html \ -+ help/ref-cups-files-conf.html \ - help/ref-error_log.html \ - help/ref-mailto-conf.html \ - help/ref-page_log.html \ -diff -up cups-1.6.1/locale/cups_ca.po.str4223 cups-1.6.1/locale/cups_ca.po ---- cups-1.6.1/locale/cups_ca.po.str4223 2012-07-16 18:34:21.000000000 +0100 -+++ cups-1.6.1/locale/cups_ca.po 2013-03-05 16:58:52.799286264 +0000 -@@ -3710,10 +3710,10 @@ msgstr "Carpeta d'arxivador " - #, c-format - msgid "" - "File device URIs have been disabled. To enable, see the FileDevice directive " --"in \"%s/cupsd.conf\"." -+"in \"%s/cups-files.conf\"." - msgstr "" - "S'han deshabilitat els URIs dels dispositius de fitxers. Per habilitar-los, " --"vegeu la directriu FileDevice a «%s/cupsd.conf»." -+"vegeu la directriu FileDevice a «%s/cups-files.conf»." - - #: filter/rastertoepson.c:1117 filter/rastertohp.c:845 - #: filter/rastertolabel.c:1273 -diff -up cups-1.6.1/locale/cups_es.po.str4223 cups-1.6.1/locale/cups_es.po ---- cups-1.6.1/locale/cups_es.po.str4223 2012-07-16 18:26:00.000000000 +0100 -+++ cups-1.6.1/locale/cups_es.po 2013-03-05 16:58:52.800286268 +0000 -@@ -3824,8 +3824,8 @@ msgstr "Carpeta de archivo" - - #: scheduler/ipp.c:2370 - #, c-format --msgid "File device URIs have been disabled. To enable, see the FileDevice directive in \"%s/cupsd.conf\"." --msgstr "Los URIs del dispositivo de archivo han sido deshabilitados. Para habilitarlos, vea la directiva FileDevice en \"%s/cupsd.conf\"." -+msgid "File device URIs have been disabled. To enable, see the FileDevice directive in \"%s/cups-files.conf\"." -+msgstr "Los URIs del dispositivo de archivo han sido deshabilitados. Para habilitarlos, vea la directiva FileDevice en \"%s/cups-files.conf\"." - - #: filter/rastertoepson.c:1117 - #: filter/rastertohp.c:845 -diff -up cups-1.6.1/locale/cups_ja.po.str4223 cups-1.6.1/locale/cups_ja.po ---- cups-1.6.1/locale/cups_ja.po.str4223 2012-06-22 03:34:12.000000000 +0100 -+++ cups-1.6.1/locale/cups_ja.po 2013-03-05 16:58:52.801286271 +0000 -@@ -3631,8 +3631,8 @@ msgstr "ファイルフォルダー" - #, c-format - msgid "" - "File device URIs have been disabled. To enable, see the FileDevice directive " --"in \"%s/cupsd.conf\"." --msgstr "ファイルデバイス URI は無効になっています。有効にするには、\"%s/cupsd.conf\" の FileDevice ディレクティブを参照してください。" -+"in \"%s/cups-files.conf\"." -+msgstr "ファイルデバイス URI は無効になっています。有効にするには、\"%s/cups-files.conf\" の FileDevice ディレクティブを参照してください。" - - #: filter/rastertoepson.c:1117 filter/rastertohp.c:845 - #: filter/rastertolabel.c:1273 -diff -up cups-1.6.1/man/cupsctl.man.str4223 cups-1.6.1/man/cupsctl.man ---- cups-1.6.1/man/cupsctl.man.str4223 2013-03-05 17:02:49.671238300 +0000 -+++ cups-1.6.1/man/cupsctl.man 2013-03-05 17:03:26.576391527 +0000 -@@ -12,7 +12,7 @@ - .\" which should have been included with this file. If this file is - .\" file is missing or damaged, see the license at "http://www.cups.org/". - .\" --.TH cupsctl 8 "CUPS" "16 July 2012" "Apple Inc." -+.TH cupsctl 8 "CUPS" "12 December 2012" "Apple Inc." - .SH NAME - cupsctl \- configure cupsd.conf options - .SH SYNOPSIS -@@ -84,11 +84,6 @@ Disable printer sharing: - .nf - cupsctl --no-shared-printers - .fi --.LP --Enable printing using the file: pseudo-device: --.nf -- cupsctl FileDevice=Yes --.fi - .SH KNOWN ISSUES - You cannot set the Listen or Port directives using \fIcupsctl\fR. - .SH SEE ALSO -diff -up cups-1.6.1/man/cupsd.conf.man.in.str4223 cups-1.6.1/man/cupsd.conf.man.in ---- cups-1.6.1/man/cupsd.conf.man.in.str4223 2012-05-18 20:51:02.000000000 +0100 -+++ cups-1.6.1/man/cupsd.conf.man.in 2013-03-05 16:58:52.801286271 +0000 -@@ -12,12 +12,15 @@ - .\" which should have been included with this file. If this file is - .\" file is missing or damaged, see the license at "http://www.cups.org/". - .\" --.TH cupsd.conf 5 "CUPS" "18 May 2012" "Apple Inc." -+.TH cupsd.conf 5 "CUPS" "19 November 2012" "Apple Inc." - .SH NAME - cupsd.conf \- server configuration file for cups - .SH DESCRIPTION - The \fIcupsd.conf\fR file configures the CUPS scheduler, \fIcupsd(8)\fR. It --is normally located in the \fI@CUPS_SERVERROOT@\fR directory. -+is normally located in the \fI@CUPS_SERVERROOT@\fR directory. \fBNote:\fR -+File, directory, and user configuration directives that used to be allowed in -+the \fIcupsd.conf\fR file are now stored in the \fIcups-files.conf(5)\fR instead -+in order to prevent certain types of privilege escalation attacks. - .LP - Each line in the file can be a configuration directive, a blank line, - or a comment. Comment lines start with the # character. The -@@ -27,12 +30,6 @@ popular Apache web server software and a - The following directives are understood by \fIcupsd(8)\fR. Consult the - on-line help for detailed descriptions: - .TP 5 --AccessLog filename --.TP 5 --AccessLog syslog --.br --Defines the access log filename. --.TP 5 - AccessLogLevel config - .TP 5 - AccessLogLevel actions -@@ -61,20 +58,6 @@ Allow @LOCAL - .br - Allows access from the named hosts or addresses. - .TP 5 --AuthClass User --.TP 5 --AuthClass Group --.TP 5 --AuthClass System --.br --Specifies the authentication class (User, Group, System) - --\fBthis directive is deprecated\fR. --.TP 5 --AuthGroupName group-name --.br --Specifies the authentication group - \fBthis directive is --deprecated\fR. --.TP 5 - AuthType None - .TP 5 - AuthType Basic -@@ -108,7 +91,7 @@ Browsing Yes - .TP 5 - Browsing No - .br --Specifies whether or not remote printer browsing should be enabled. -+Specifies whether or not shared printers should be advertised. - .TP 5 - Classification banner - .br -@@ -121,15 +104,6 @@ ClassifyOverride No - Specifies whether to allow users to override the classification - of individual print jobs. - .TP 5 --ConfigFilePerm mode --.br --Specifies the permissions for all configuration files that the scheduler --writes. --.TP 5 --DataDir path --.br --Specified the directory where data files can be found. --.TP 5 - DefaultAuthType Basic - .TP 5 - DefaultAuthType BasicDigest -@@ -197,10 +171,6 @@ Specifies the delay for updating of conf - causes the update to happen as soon as possible, typically within a few - milliseconds. - .TP 5 --DocumentRoot directory --.br --Specifies the root directory for the internal web server documents. --.TP 5 - Encryption IfRequested - .TP 5 - Encryption Never -@@ -210,28 +180,6 @@ Encryption Required - Specifies the level of encryption that is required for a particular - location. - .TP 5 --ErrorLog filename --.TP 5 --ErrorLog syslog --.br --Specifies the error log filename. --.TP 5 --FatalErrors none --.TP 5 --FatalErrors all -kind [... -kind] --.TP 5 --FatalErrors kind [... kind] --.br --Specifies which errors are fatal, causing the scheduler to exit. "Kind" is --"browse", "config", "listen", "log", or "permissions". --.TP 5 --FileDevice Yes --.TP 5 --FileDevice No --.br --Specifies whether the file pseudo-device can be used for new --printer queues. --.TP 5 - FilterLimit limit - .br - Specifies the maximum cost of filters that are run concurrently. -@@ -241,15 +189,6 @@ FilterNice nice-value - Specifies the scheduling priority ("nice" value) of filters that - are run to print a job. - .TP 5 --FontPath directory[:directory:...] --.br --Specifies the search path for fonts. --.TP 5 --Group group-name-or-number --.br --Specifies the group name or ID that will be used when executing --external programs. --.TP 5 - GSSServiceName name - .br - Specifies the service name when using Kerberos authentication. The default -@@ -341,10 +280,6 @@ LogDebugHistory #-messages - Specifies the number of debugging messages that are logged when an error - occurs in a print job. - .TP 5 --LogFilePerm mode --.br --Specifies the permissions for all log files that the scheduler writes. --.TP 5 - LogLevel alert - .TP 5 - LogLevel crit -@@ -429,12 +364,6 @@ Order deny,allow - .br - Specifies the order of HTTP access control (allow,deny or deny,allow) - .TP 5 --PageLog filename --.TP 5 --PageLog syslog --.br --Specifies the page log filename. --.TP 5 - PageLogFormat format string - .br - Specifies the format of page log lines. -@@ -464,15 +393,6 @@ PreserveJobHistory No - Specifies whether or not to preserve the job history after they are - printed. - .TP 5 --Printcap --.TP 5 --Printcap filename --.br --Specifies the filename for a printcap file that is updated --automatically with a list of available printers (needed for --legacy applications); specifying Printcap with no filename --disables printcap generation. --.TP 5 - PrintcapFormat bsd - .TP 5 - PrintcapFormat plist -@@ -481,29 +401,11 @@ PrintcapFormat solaris - .br - Specifies the format of the printcap file. - .TP 5 --PrintcapGUI --.TP 5 --PrintcapGUI gui-program-filename --.br --Specifies whether to generate option panel definition files on --some operating systems. When provided with no program filename, --disables option panel definition files. --.TP 5 - ReloadTimeout seconds - .br - Specifies the amount of time to wait for job completion before - restarting the scheduler. - .TP 5 --RemoteRoot user-name --.br --Specifies the username that is associated with unauthenticated root --accesses. --.TP 5 --RequestRoot directory --.br --Specifies the directory to store print jobs and other HTTP request --data. --.TP 5 - Require group group-name-list - .TP 5 - Require user user-name-list -@@ -535,27 +437,10 @@ ServerAlias * - Specifies an alternate name that the server is known by. The special name "*" - allows any name to be used. - .TP 5 --ServerBin directory --.br --Specifies the directory where backends, CGIs, daemons, and filters may --be found. --.TP 5 --ServerCertificate filename --.br --Specifies the encryption certificate to use. --.TP 5 --ServerKey filename --.br --Specifies the encryption key to use. --.TP 5 - ServerName hostname-or-ip-address - .br - Specifies the fully-qualified hostname of the server. - .TP 5 --ServerRoot directory --.br --Specifies the directory where the server configuration files can be found. --.TP 5 - ServerTokens Full - .TP 5 - ServerTokens Major -@@ -619,29 +504,17 @@ Specifies the list of job values to make - "notify-events", "notify-pull-method", "notify-recipient-uri", - "notify-subscriber-user-name", and "notify-user-data". - .TP 5 --SystemGroup group-name [group-name ...] --.br --Specifies the group(s) to use for System class authentication. --.TP 5 --TempDir directory --.br --Specifies the directory where temporary files are stored. --.TP 5 - Timeout seconds - .br - Specifies the HTTP request timeout in seconds. - .TP 5 --User user-name --.br --Specifies the user name or ID that is used when running external programs. --.TP 5 - WebInterface yes - .TP 5 - WebInterface no - Specifies whether the web interface is enabled. - .SH SEE ALSO --\fIclasses.conf(5)\fR, \fIcupsd(8)\fR, \fImime.convs(5)\fR, --\fImime.types(5)\fR, \fIprinters.conf(5)\fR, -+\fIclasses.conf(5)\fR, \fIcups-files.conf(5)\fR, \fIcupsd(8)\fR, -+\fImime.convs(5)\fR, \fImime.types(5)\fR, \fIprinters.conf(5)\fR, - \fIsubscriptions.conf(5)\fR, - .br - http://localhost:631/help -diff -up cups-1.6.1/man/cups-files.conf.man.in.str4223 cups-1.6.1/man/cups-files.conf.man.in ---- cups-1.6.1/man/cups-files.conf.man.in.str4223 2013-03-05 16:58:52.801286271 +0000 -+++ cups-1.6.1/man/cups-files.conf.man.in 2013-03-05 16:58:52.801286271 +0000 -@@ -0,0 +1,146 @@ -+.\" -+.\" "$Id$" -+.\" -+.\" cupsd.conf man page for CUPS. -+.\" -+.\" Copyright 2007-2012 by Apple Inc. -+.\" Copyright 1997-2006 by Easy Software Products. -+.\" -+.\" These coded instructions, statements, and computer programs are the -+.\" property of Apple Inc. and are protected by Federal copyright -+.\" law. Distribution and use rights are outlined in the file "LICENSE.txt" -+.\" which should have been included with this file. If this file is -+.\" file is missing or damaged, see the license at "http://www.cups.org/". -+.\" -+.TH cups-files.conf 5 "CUPS" "19 November 2012" "Apple Inc." -+.SH NAME -+cups-files.conf \- file and directory configuration file for cups -+.SH DESCRIPTION -+The \fIcups-file.conf\fR file configures the files and directories used by the -+CUPS scheduler, \fIcupsd(8)\fR. It is normally located in the -+\fI@CUPS_SERVERROOT@\fR directory. -+.LP -+Each line in the file can be a configuration directive, a blank line, -+or a comment. Comment lines start with the # character. -+.SH DIRECTIVES -+The following directives are understood by \fIcupsd(8)\fR. Consult the -+on-line help for detailed descriptions: -+.TP 5 -+AccessLog filename -+.TP 5 -+AccessLog syslog -+.br -+Defines the access log filename. -+.TP 5 -+ConfigFilePerm mode -+.br -+Specifies the permissions for all configuration files that the scheduler -+writes. -+.TP 5 -+DataDir path -+.br -+Specified the directory where data files can be found. -+.TP 5 -+DocumentRoot directory -+.br -+Specifies the root directory for the internal web server documents. -+.TP 5 -+ErrorLog filename -+.TP 5 -+ErrorLog syslog -+.br -+Specifies the error log filename. -+.TP 5 -+FatalErrors none -+.TP 5 -+FatalErrors all -kind [... -kind] -+.TP 5 -+FatalErrors kind [... kind] -+.br -+Specifies which errors are fatal, causing the scheduler to exit. "Kind" is -+"browse", "config", "listen", "log", or "permissions". -+.TP 5 -+FileDevice Yes -+.TP 5 -+FileDevice No -+.br -+Specifies whether the file pseudo-device can be used for new -+printer queues. -+.TP 5 -+FontPath directory[:directory:...] -+.br -+Specifies the search path for fonts. -+.TP 5 -+Group group-name-or-number -+.br -+Specifies the group name or ID that will be used when executing -+external programs. -+.TP 5 -+LogFilePerm mode -+.br -+Specifies the permissions for all log files that the scheduler writes. -+.TP 5 -+PageLog filename -+.TP 5 -+PageLog syslog -+.br -+Specifies the page log filename. -+.TP 5 -+Printcap -+.TP 5 -+Printcap filename -+.br -+Specifies the filename for a printcap file that is updated -+automatically with a list of available printers (needed for -+legacy applications); specifying Printcap with no filename -+disables printcap generation. -+.TP 5 -+RemoteRoot user-name -+.br -+Specifies the username that is associated with unauthenticated root -+accesses. -+.TP 5 -+RequestRoot directory -+.br -+Specifies the directory to store print jobs and other HTTP request -+data. -+.TP 5 -+ServerBin directory -+.br -+Specifies the directory where backends, CGIs, daemons, and filters may -+be found. -+.TP 5 -+ServerCertificate filename -+.br -+Specifies the encryption certificate to use. -+.TP 5 -+ServerKey filename -+.br -+Specifies the encryption key to use. -+.TP 5 -+ServerRoot directory -+.br -+Specifies the directory where the server configuration files can be found. -+.TP 5 -+SystemGroup group-name [group-name ...] -+.br -+Specifies the group(s) to use for System class authentication. -+.TP 5 -+TempDir directory -+.br -+Specifies the directory where temporary files are stored. -+.TP 5 -+User user-name -+.br -+Specifies the user name or ID that is used when running external programs. -+.SH SEE ALSO -+\fIclasses.conf(5)\fR, \fIcupsd(8)\fR, \fIcupsd.conf(5)\fR, \fImime.convs(5)\fR, -+\fImime.types(5)\fR, \fIprinters.conf(5)\fR, -+\fIsubscriptions.conf(5)\fR, -+.br -+http://localhost:631/help -+.SH COPYRIGHT -+Copyright 2007-2012 by Apple Inc. -+.\" -+.\" End of "$Id$". -+.\" -diff -up cups-1.6.1/man/Makefile.str4223 cups-1.6.1/man/Makefile ---- cups-1.6.1/man/Makefile.str4223 2012-05-25 04:11:46.000000000 +0100 -+++ cups-1.6.1/man/Makefile 2013-03-05 16:58:52.801286271 +0000 -@@ -39,6 +39,7 @@ MAN1 = cancel.$(MAN1EXT) \ - ppdpo.$(MAN1EXT) - MAN5 = classes.conf.$(MAN5EXT) \ - client.conf.$(MAN5EXT) \ -+ cups-files.conf.$(MAN5EXT) \ - cups-snmp.conf.$(MAN5EXT) \ - cupsd.conf.$(MAN5EXT) \ - ipptoolfile.$(MAN5EXT) \ -diff -up cups-1.6.1/packaging/cups.list.in.str4223 cups-1.6.1/packaging/cups.list.in ---- cups-1.6.1/packaging/cups.list.in.str4223 2012-05-07 23:41:42.000000000 +0100 -+++ cups-1.6.1/packaging/cups.list.in 2013-03-05 16:58:52.802286275 +0000 -@@ -534,6 +534,8 @@ d 0755 root sys $SERVERROOT - - d 0755 root $CUPS_GROUP $SERVERROOT/interfaces - - d 0755 root $CUPS_GROUP $SERVERROOT/ppd - - d 0700 root $CUPS_GROUP $SERVERROOT/ssl - -+c $CUPS_PERM root $CUPS_GROUP $SERVERROOT/cups-files.conf conf/cups-files.conf -+f $CUPS_PERM root $CUPS_GROUP $SERVERROOT/cups-files.conf.default conf/cups-files.conf - c $CUPS_PERM root $CUPS_GROUP $SERVERROOT/cupsd.conf conf/cupsd.conf - f $CUPS_PERM root $CUPS_GROUP $SERVERROOT/cupsd.conf.default conf/cupsd.conf - c $CUPS_PERM root $CUPS_GROUP $SERVERROOT/snmp.conf conf/snmp.conf -diff -up cups-1.6.1/packaging/cups.spec.in.str4223 cups-1.6.1/packaging/cups.spec.in ---- cups-1.6.1/packaging/cups.spec.in.str4223 2012-07-27 21:33:27.000000000 +0100 -+++ cups-1.6.1/packaging/cups.spec.in 2013-03-05 16:58:52.802286275 +0000 -@@ -135,6 +135,7 @@ rm -rf $RPM_BUILD_ROOT - %defattr(-,root,root) - %dir /etc/cups - %config(noreplace) /etc/cups/*.conf -+/etc/cups/cups-files.conf.default - /etc/cups/cupsd.conf.default - %dir /etc/cups/interfaces - %dir /etc/cups/ppd -diff -up cups-1.6.1/scheduler/client.c.str4223 cups-1.6.1/scheduler/client.c ---- cups-1.6.1/scheduler/client.c.str4223 2012-05-07 23:41:30.000000000 +0100 -+++ cups-1.6.1/scheduler/client.c 2013-03-05 16:58:52.802286275 +0000 -@@ -32,7 +32,7 @@ - * compare_clients() - Compare two client connections. - * data_ready() - Check whether data is available from a client. - * get_file() - Get a filename and state info. -- * install_conf_file() - Install a configuration file. -+ * install_cupsd_conf() - Install a configuration file. - * is_cgi() - Is the resource a CGI script/program? - * is_path_absolute() - Is a path absolute and free of relative elements - * (i.e. ".."). -@@ -95,7 +95,7 @@ static int compare_clients(cupsd_client - static int data_ready(cupsd_client_t *con); - static char *get_file(cupsd_client_t *con, struct stat *filestats, - char *filename, int len); --static http_status_t install_conf_file(cupsd_client_t *con); -+static http_status_t install_cupsd_conf(cupsd_client_t *con); - static int is_cgi(cupsd_client_t *con, const char *filename, - struct stat *filestats, mime_type_t *type); - static int is_path_absolute(const char *path); -@@ -1666,17 +1666,14 @@ cupsdReadClient(cupsd_client_t *con) /* - * Validate the resource name... - */ - -- if (strncmp(con->uri, "/admin/conf/", 12) || -- strchr(con->uri + 12, '/') || -- strlen(con->uri) == 12) -+ if (strcmp(con->uri, "/admin/conf/cupsd.conf")) - { - /* -- * PUT can only be done to configuration files under -- * /admin/conf... -+ * PUT can only be done to the cupsd.conf file... - */ - - cupsdLogMessage(CUPSD_LOG_ERROR, -- "[Client %d] Request for subdirectory \"%s\".", -+ "[Client %d] Disallowed PUT request for \"%s\".", - con->http.fd, con->uri); - - if (!cupsdSendError(con, HTTP_FORBIDDEN, CUPSD_AUTH_NONE)) -@@ -2044,7 +2041,7 @@ cupsdReadClient(cupsd_client_t *con) /* - * Install the configuration file... - */ - -- status = install_conf_file(con); -+ status = install_cupsd_conf(con); - - /* - * Return the status to the client... -@@ -3301,14 +3298,13 @@ get_file(cupsd_client_t *con, /* I - C - - - /* -- * 'install_conf_file()' - Install a configuration file. -+ * 'install_cupsd_conf()' - Install a configuration file. - */ - - static http_status_t /* O - Status */ --install_conf_file(cupsd_client_t *con) /* I - Connection */ -+install_cupsd_conf(cupsd_client_t *con) /* I - Connection */ - { - char filename[1024]; /* Configuration filename */ -- mode_t mode; /* Permissions */ - cups_file_t *in, /* Input file */ - *out; /* Output file */ - char buffer[16384]; /* Copy buffer */ -@@ -3330,13 +3326,8 @@ install_conf_file(cupsd_client_t *con) / - * Open the new config file... - */ - -- snprintf(filename, sizeof(filename), "%s%s", ServerRoot, con->uri + 11); -- if (!strcmp(con->uri, "/admin/conf/printers.conf")) -- mode = ConfigFilePerm & 0600; -- else -- mode = ConfigFilePerm; -- -- if ((out = cupsdCreateConfFile(filename, mode)) == NULL) -+ snprintf(filename, sizeof(filename), "%s/cupsd.conf", ServerRoot); -+ if ((out = cupsdCreateConfFile(filename, ConfigFilePerm)) == NULL) - { - cupsFileClose(in); - return (HTTP_SERVER_ERROR); -@@ -3381,14 +3372,10 @@ install_conf_file(cupsd_client_t *con) / - cupsdClearString(&con->filename); - - /* -- * If the cupsd.conf file was updated, set the NeedReload flag... -+ * Set the NeedReload flag... - */ - -- if (!strcmp(con->uri, "/admin/conf/cupsd.conf")) -- NeedReload = RELOAD_CUPSD; -- else -- NeedReload = RELOAD_ALL; -- -+ NeedReload = RELOAD_CUPSD; - ReloadTime = time(NULL); - - /* -diff -up cups-1.6.1/scheduler/conf.c.str4223 cups-1.6.1/scheduler/conf.c ---- cups-1.6.1/scheduler/conf.c.str4223 2013-03-05 16:58:52.648285681 +0000 -+++ cups-1.6.1/scheduler/conf.c 2013-03-05 16:58:52.803286279 +0000 -@@ -14,23 +14,25 @@ - * - * Contents: - * -- * cupsdAddAlias() - Add a host alias. -+ * cupsdAddAlias() - Add a host alias. - * cupsdCheckPermissions() - Fix the mode and ownership of a file or -- * directory. -+ * directory. - * cupsdDefaultAuthType() - Get the default AuthType. - * cupsdFreeAliases() - Free all of the alias entries. - * cupsdReadConfiguration() - Read the cupsd.conf file. -- * get_address() - Get an address + port number from a line. -+ * get_address() - Get an address + port number from a line. - * get_addr_and_mask() - Get an IP address and netmask. -- * mime_error_cb() - Log a MIME error. -- * parse_aaa() - Parse authentication, authorization, and access -- * control lines. -+ * mime_error_cb() - Log a MIME error. -+ * parse_aaa() - Parse authentication, authorization, and access -+ * control lines. - * parse_fatal_errors() - Parse FatalErrors values in a string. -- * parse_groups() - Parse system group names in a string. -- * parse_protocols() - Parse browse protocols in a string. -- * read_configuration() - Read a configuration file. -- * read_location() - Read a definition. -- * read_policy() - Read a definition. -+ * parse_groups() - Parse system group names in a string. -+ * parse_protocols() - Parse browse protocols in a string. -+ * parse_variable() - Parse a variable line. -+ * read_cupsd_conf() - Read the cupsd.conf configuration file. -+ * read_cups_files_conf() - Read the cups-files.conf configuration file. -+ * read_location() - Read a definition. -+ * read_policy() - Read a definition. - * set_policy_defaults() - Set default policy values as needed. - */ - -@@ -83,35 +85,25 @@ typedef struct - * Local globals... - */ - --static int default_auth_type = CUPSD_AUTH_AUTO; -- /* Default AuthType, if not specified */ --static const cupsd_var_t variables[] = -+static const cupsd_var_t cupsd_vars[] = - { -- { "AccessLog", &AccessLog, CUPSD_VARTYPE_STRING }, - { "AutoPurgeJobs", &JobAutoPurge, CUPSD_VARTYPE_BOOLEAN }, - #ifdef HAVE_DNSSD - { "BrowseDNSSDSubTypes", &DNSSDSubTypes, CUPSD_VARTYPE_STRING }, - #endif /* HAVE_DNSSD */ - { "BrowseWebIF", &BrowseWebIF, CUPSD_VARTYPE_BOOLEAN }, - { "Browsing", &Browsing, CUPSD_VARTYPE_BOOLEAN }, -- { "CacheDir", &CacheDir, CUPSD_VARTYPE_STRING }, - { "Classification", &Classification, CUPSD_VARTYPE_STRING }, - { "ClassifyOverride", &ClassifyOverride, CUPSD_VARTYPE_BOOLEAN }, -- { "ConfigFilePerm", &ConfigFilePerm, CUPSD_VARTYPE_INTEGER }, -- { "DataDir", &DataDir, CUPSD_VARTYPE_STRING }, - { "DefaultLanguage", &DefaultLanguage, CUPSD_VARTYPE_STRING }, - { "DefaultLeaseDuration", &DefaultLeaseDuration, CUPSD_VARTYPE_TIME }, - { "DefaultPaperSize", &DefaultPaperSize, CUPSD_VARTYPE_STRING }, - { "DefaultPolicy", &DefaultPolicy, CUPSD_VARTYPE_STRING }, - { "DefaultShared", &DefaultShared, CUPSD_VARTYPE_BOOLEAN }, - { "DirtyCleanInterval", &DirtyCleanInterval, CUPSD_VARTYPE_TIME }, -- { "DocumentRoot", &DocumentRoot, CUPSD_VARTYPE_STRING }, -- { "ErrorLog", &ErrorLog, CUPSD_VARTYPE_STRING }, - { "ErrorPolicy", &ErrorPolicy, CUPSD_VARTYPE_STRING }, -- { "FileDevice", &FileDevice, CUPSD_VARTYPE_BOOLEAN }, - { "FilterLimit", &FilterLimit, CUPSD_VARTYPE_INTEGER }, - { "FilterNice", &FilterNice, CUPSD_VARTYPE_INTEGER }, -- { "FontPath", &FontPath, CUPSD_VARTYPE_STRING }, - #ifdef HAVE_GSSAPI - { "GSSServiceName", &GSSServiceName, CUPSD_VARTYPE_STRING }, - #endif /* HAVE_GSSAPI */ -@@ -126,8 +118,6 @@ static const cupsd_var_t variables[] = - { "LimitRequestBody", &MaxRequestSize, CUPSD_VARTYPE_INTEGER }, - { "ListenBackLog", &ListenBackLog, CUPSD_VARTYPE_INTEGER }, - { "LogDebugHistory", &LogDebugHistory, CUPSD_VARTYPE_INTEGER }, -- { "LogFilePerm", &LogFilePerm, CUPSD_VARTYPE_INTEGER }, -- { "LPDConfigFile", &LPDConfigFile, CUPSD_VARTYPE_STRING }, - { "MaxActiveJobs", &MaxActiveJobs, CUPSD_VARTYPE_INTEGER }, - { "MaxClients", &MaxClients, CUPSD_VARTYPE_INTEGER }, - { "MaxClientsPerHost", &MaxClientsPerHost, CUPSD_VARTYPE_INTEGER }, -@@ -146,18 +136,34 @@ static const cupsd_var_t variables[] = - { "MaxSubscriptionsPerPrinter",&MaxSubscriptionsPerPrinter, CUPSD_VARTYPE_INTEGER }, - { "MaxSubscriptionsPerUser", &MaxSubscriptionsPerUser, CUPSD_VARTYPE_INTEGER }, - { "MultipleOperationTimeout", &MultipleOperationTimeout, CUPSD_VARTYPE_TIME }, -- { "PageLog", &PageLog, CUPSD_VARTYPE_STRING }, - { "PageLogFormat", &PageLogFormat, CUPSD_VARTYPE_STRING }, - { "PreserveJobFiles", &JobFiles, CUPSD_VARTYPE_TIME }, - { "PreserveJobHistory", &JobHistory, CUPSD_VARTYPE_TIME }, -- { "Printcap", &Printcap, CUPSD_VARTYPE_STRING }, -- { "PrintcapGUI", &PrintcapGUI, CUPSD_VARTYPE_STRING }, - { "ReloadTimeout", &ReloadTimeout, CUPSD_VARTYPE_TIME }, -- { "RemoteRoot", &RemoteRoot, CUPSD_VARTYPE_STRING }, -- { "RequestRoot", &RequestRoot, CUPSD_VARTYPE_STRING }, - { "RIPCache", &RIPCache, CUPSD_VARTYPE_STRING }, - { "RootCertDuration", &RootCertDuration, CUPSD_VARTYPE_TIME }, - { "ServerAdmin", &ServerAdmin, CUPSD_VARTYPE_STRING }, -+ { "ServerName", &ServerName, CUPSD_VARTYPE_STRING }, -+ { "StrictConformance", &StrictConformance, CUPSD_VARTYPE_BOOLEAN }, -+ { "Timeout", &Timeout, CUPSD_VARTYPE_TIME }, -+ { "WebInterface", &WebInterface, CUPSD_VARTYPE_BOOLEAN } -+}; -+static const cupsd_var_t cupsfiles_vars[] = -+{ -+ { "AccessLog", &AccessLog, CUPSD_VARTYPE_STRING }, -+ { "CacheDir", &CacheDir, CUPSD_VARTYPE_STRING }, -+ { "ConfigFilePerm", &ConfigFilePerm, CUPSD_VARTYPE_INTEGER }, -+ { "DataDir", &DataDir, CUPSD_VARTYPE_STRING }, -+ { "DocumentRoot", &DocumentRoot, CUPSD_VARTYPE_STRING }, -+ { "ErrorLog", &ErrorLog, CUPSD_VARTYPE_STRING }, -+ { "FileDevice", &FileDevice, CUPSD_VARTYPE_BOOLEAN }, -+ { "FontPath", &FontPath, CUPSD_VARTYPE_STRING }, -+ { "LogFilePerm", &LogFilePerm, CUPSD_VARTYPE_INTEGER }, -+ { "LPDConfigFile", &LPDConfigFile, CUPSD_VARTYPE_STRING }, -+ { "PageLog", &PageLog, CUPSD_VARTYPE_STRING }, -+ { "Printcap", &Printcap, CUPSD_VARTYPE_STRING }, -+ { "RemoteRoot", &RemoteRoot, CUPSD_VARTYPE_STRING }, -+ { "RequestRoot", &RequestRoot, CUPSD_VARTYPE_STRING }, - { "ServerBin", &ServerBin, CUPSD_VARTYPE_PATHNAME }, - #ifdef HAVE_SSL - { "ServerCertificate", &ServerCertificate, CUPSD_VARTYPE_PATHNAME }, -@@ -165,20 +171,17 @@ static const cupsd_var_t variables[] = - { "ServerKey", &ServerKey, CUPSD_VARTYPE_PATHNAME }, - # endif /* HAVE_LIBSSL || HAVE_GNUTLS */ - #endif /* HAVE_SSL */ -- { "ServerName", &ServerName, CUPSD_VARTYPE_STRING }, - { "ServerRoot", &ServerRoot, CUPSD_VARTYPE_PATHNAME }, - { "SMBConfigFile", &SMBConfigFile, CUPSD_VARTYPE_STRING }, - { "StateDir", &StateDir, CUPSD_VARTYPE_STRING }, -- { "StrictConformance", &StrictConformance, CUPSD_VARTYPE_BOOLEAN }, - #ifdef HAVE_AUTHORIZATION_H - { "SystemGroupAuthKey", &SystemGroupAuthKey, CUPSD_VARTYPE_STRING }, - #endif /* HAVE_AUTHORIZATION_H */ -- { "TempDir", &TempDir, CUPSD_VARTYPE_PATHNAME }, -- { "Timeout", &Timeout, CUPSD_VARTYPE_TIME }, -- { "WebInterface", &WebInterface, CUPSD_VARTYPE_BOOLEAN } -+ { "TempDir", &TempDir, CUPSD_VARTYPE_PATHNAME } - }; --#define NUM_VARS (sizeof(variables) / sizeof(variables[0])) - -+static int default_auth_type = CUPSD_AUTH_AUTO; -+ /* Default AuthType, if not specified */ - - static const unsigned ones[4] = - { -@@ -203,7 +206,12 @@ static int parse_aaa(cupsd_location_t * - static int parse_fatal_errors(const char *s); - static int parse_groups(const char *s); - static int parse_protocols(const char *s); --static int read_configuration(cups_file_t *fp); -+static int parse_variable(const char *filename, int linenum, -+ const char *line, const char *value, -+ size_t num_vars, -+ const cupsd_var_t *vars); -+static int read_cupsd_conf(cups_file_t *fp); -+static int read_cups_files_conf(cups_file_t *fp); - static int read_location(cups_file_t *fp, char *name, int linenum); - static int read_policy(cups_file_t *fp, char *name, int linenum); - static void set_policy_defaults(cupsd_policy_t *pol); -@@ -783,22 +791,48 @@ cupsdReadConfiguration(void) - cupsdInitEnv(); - - /* -- * Read the configuration file... -+ * Read the cups-files.conf file... -+ */ -+ -+ if ((fp = cupsFileOpen(CupsFilesFile, "r")) != NULL) -+ { -+ status = read_cups_files_conf(fp); -+ -+ cupsFileClose(fp); -+ -+ if (!status) -+ return (0); -+ } -+ else if (errno == ENOENT) -+ cupsdLogMessage(CUPSD_LOG_INFO, "No %s, using defaults.", CupsFilesFile); -+ else -+ { -+ cupsdLogMessage(CUPSD_LOG_CRIT, "Unable to open %s: %s", CupsFilesFile, -+ strerror(errno)); -+ return (0); -+ } -+ -+ if (!ErrorLog) -+ cupsdSetString(&ErrorLog, CUPS_LOGDIR "/error_log"); -+ -+ /* -+ * Read the cupsd.conf file... - */ - - if ((fp = cupsFileOpen(ConfigurationFile, "r")) == NULL) -+ { -+ cupsdLogMessage(CUPSD_LOG_CRIT, "Unable to open %s: %s", ConfigurationFile, -+ strerror(errno)); - return (0); -+ } - -- status = read_configuration(fp); -+ status = read_cupsd_conf(fp); - - cupsFileClose(fp); - - if (!status) - return (0); - -- if (!ErrorLog) -- cupsdSetString(&ErrorLog, CUPS_LOGDIR "/error_log"); -- - RunUser = getuid(); - - cupsdLogMessage(CUPSD_LOG_INFO, "Remote access is %s.", -@@ -911,6 +945,13 @@ cupsdReadConfiguration(void) - } - - /* -+ * Make sure ConfigFilePerm and LogFilePerm have sane values... -+ */ -+ -+ ConfigFilePerm &= 0664; -+ LogFilePerm &= 0664; -+ -+ /* - * Open the system log for cupsd if necessary... - */ - -@@ -2558,13 +2599,244 @@ parse_protocols(const char *s) /* I - S - - - /* -- * 'read_configuration()' - Read a configuration file. -+ * 'parse_variable()' - Parse a variable line. - */ - - static int /* O - 1 on success, 0 on failure */ --read_configuration(cups_file_t *fp) /* I - File to read from */ -+parse_variable( -+ const char *filename, /* I - Name of configuration file */ -+ int linenum, /* I - Line in configuration file */ -+ const char *line, /* I - Line from configuration file */ -+ const char *value, /* I - Value from configuration file */ -+ size_t num_vars, /* I - Number of variables */ -+ const cupsd_var_t *vars) /* I - Variables */ -+{ -+ size_t i; /* Looping var */ -+ const cupsd_var_t *var; /* Variables */ -+ char temp[1024]; /* Temporary string */ -+ -+ -+ for (i = num_vars, var = vars; i > 0; i --, var ++) -+ if (!_cups_strcasecmp(line, var->name)) -+ break; -+ -+ if (i == 0) -+ { -+ /* -+ * Unknown directive! Output an error message and continue... -+ */ -+ -+ if (!value) -+ cupsdLogMessage(CUPSD_LOG_ERROR, "Missing value for %s on line %d of %s.", -+ line, linenum, filename); -+ else -+ cupsdLogMessage(CUPSD_LOG_ERROR, "Unknown directive %s on line %d of %s.", -+ line, linenum, filename); -+ -+ return (0); -+ } -+ -+ switch (var->type) -+ { -+ case CUPSD_VARTYPE_INTEGER : -+ if (!value) -+ { -+ cupsdLogMessage(CUPSD_LOG_ERROR, -+ "Missing integer value for %s on line %d of %s.", -+ line, linenum, filename); -+ return (0); -+ } -+ else if (!isdigit(*value & 255)) -+ { -+ cupsdLogMessage(CUPSD_LOG_ERROR, -+ "Bad integer value for %s on line %d of %s.", -+ line, linenum, filename); -+ return (0); -+ } -+ else -+ { -+ int n; /* Number */ -+ char *units; /* Units */ -+ -+ n = strtol(value, &units, 0); -+ -+ if (units && *units) -+ { -+ if (tolower(units[0] & 255) == 'g') -+ n *= 1024 * 1024 * 1024; -+ else if (tolower(units[0] & 255) == 'm') -+ n *= 1024 * 1024; -+ else if (tolower(units[0] & 255) == 'k') -+ n *= 1024; -+ else if (tolower(units[0] & 255) == 't') -+ n *= 262144; -+ else -+ { -+ cupsdLogMessage(CUPSD_LOG_ERROR, -+ "Unknown integer value for %s on line %d of %s.", -+ line, linenum, filename); -+ return (0); -+ } -+ } -+ -+ if (n < 0) -+ { -+ cupsdLogMessage(CUPSD_LOG_ERROR, -+ "Bad negative integer value for %s on line %d of " -+ "%s.", line, linenum, filename); -+ return (0); -+ } -+ else -+ { -+ *((int *)var->ptr) = n; -+ } -+ } -+ break; -+ -+ case CUPSD_VARTYPE_TIME : -+ if (!value) -+ { -+ cupsdLogMessage(CUPSD_LOG_ERROR, -+ "Missing time interval value for %s on line %d of " -+ "%s.", line, linenum, filename); -+ return (0); -+ } -+ else if (!_cups_strncasecmp(line, "PreserveJob", 11) && -+ (!_cups_strcasecmp(value, "true") || -+ !_cups_strcasecmp(value, "on") || -+ !_cups_strcasecmp(value, "enabled") || -+ !_cups_strcasecmp(value, "yes"))) -+ { -+ *((int *)var->ptr) = INT_MAX; -+ } -+ else if (!_cups_strcasecmp(value, "false") || -+ !_cups_strcasecmp(value, "off") || -+ !_cups_strcasecmp(value, "disabled") || -+ !_cups_strcasecmp(value, "no")) -+ { -+ *((int *)var->ptr) = 0; -+ } -+ else if (!isdigit(*value & 255)) -+ { -+ cupsdLogMessage(CUPSD_LOG_ERROR, -+ "Unknown time interval value for %s on line %d of " -+ "%s.", line, linenum, filename); -+ return (0); -+ } -+ else -+ { -+ double n; /* Number */ -+ char *units; /* Units */ -+ -+ n = strtod(value, &units); -+ -+ if (units && *units) -+ { -+ if (tolower(units[0] & 255) == 'w') -+ n *= 7 * 24 * 60 * 60; -+ else if (tolower(units[0] & 255) == 'd') -+ n *= 24 * 60 * 60; -+ else if (tolower(units[0] & 255) == 'h') -+ n *= 60 * 60; -+ else if (tolower(units[0] & 255) == 'm') -+ n *= 60; -+ else -+ { -+ cupsdLogMessage(CUPSD_LOG_ERROR, -+ "Unknown time interval value for %s on line " -+ "%d of %s.", line, linenum, filename); -+ return (0); -+ } -+ } -+ -+ if (n < 0.0 || n > INT_MAX) -+ { -+ cupsdLogMessage(CUPSD_LOG_ERROR, -+ "Bad time value for %s on line %d of %s.", -+ line, linenum, filename); -+ return (0); -+ } -+ else -+ { -+ *((int *)var->ptr) = (int)n; -+ } -+ } -+ break; -+ -+ case CUPSD_VARTYPE_BOOLEAN : -+ if (!value) -+ { -+ cupsdLogMessage(CUPSD_LOG_ERROR, -+ "Missing boolean value for %s on line %d of %s.", -+ line, linenum, filename); -+ return (0); -+ } -+ else if (!_cups_strcasecmp(value, "true") || -+ !_cups_strcasecmp(value, "on") || -+ !_cups_strcasecmp(value, "enabled") || -+ !_cups_strcasecmp(value, "yes") || -+ atoi(value) != 0) -+ { -+ *((int *)var->ptr) = TRUE; -+ } -+ else if (!_cups_strcasecmp(value, "false") || -+ !_cups_strcasecmp(value, "off") || -+ !_cups_strcasecmp(value, "disabled") || -+ !_cups_strcasecmp(value, "no") || -+ !_cups_strcasecmp(value, "0")) -+ { -+ *((int *)var->ptr) = FALSE; -+ } -+ else -+ { -+ cupsdLogMessage(CUPSD_LOG_ERROR, -+ "Unknown boolean value %s on line %d of %s.", -+ value, linenum, filename); -+ return (0); -+ } -+ break; -+ -+ case CUPSD_VARTYPE_PATHNAME : -+ if (!value) -+ { -+ cupsdLogMessage(CUPSD_LOG_ERROR, -+ "Missing pathname value for %s on line %d of %s.", -+ line, linenum, filename); -+ return (0); -+ } -+ -+ if (value[0] == '/') -+ strlcpy(temp, value, sizeof(temp)); -+ else -+ snprintf(temp, sizeof(temp), "%s/%s", ServerRoot, value); -+ -+ if (access(temp, 0)) -+ { -+ cupsdLogMessage(CUPSD_LOG_ERROR, -+ "File or directory for \"%s %s\" on line %d of %s " -+ "does not exist.", line, value, linenum, filename); -+ return (0); -+ } -+ -+ cupsdSetString((char **)var->ptr, temp); -+ break; -+ -+ case CUPSD_VARTYPE_STRING : -+ cupsdSetString((char **)var->ptr, value); -+ break; -+ } -+ -+ return (1); -+} -+ -+ -+/* -+ * 'read_cupsd_conf()' - Read the cupsd.conf configuration file. -+ */ -+ -+static int /* O - 1 on success, 0 on failure */ -+read_cupsd_conf(cups_file_t *fp) /* I - File to read from */ - { -- int i; /* Looping var */ - int linenum; /* Current line number */ - char line[HTTP_MAX_BUFFER], - /* Line from file */ -@@ -2573,12 +2845,10 @@ read_configuration(cups_file_t *fp) /* I - *value, /* Pointer to value */ - *valueptr; /* Pointer into value */ - int valuelen; /* Length of value */ -- cupsd_var_t const *var; /* Current variable */ - http_addrlist_t *addrlist, /* Address list */ - *addr; /* Current address */ - cups_file_t *incfile; /* Include file */ - char incname[1024]; /* Include filename */ -- struct group *group; /* Group */ - - - /* -@@ -2610,7 +2880,7 @@ read_configuration(cups_file_t *fp) /* I - incname, strerror(errno)); - else - { -- read_configuration(incfile); -+ read_cupsd_conf(incfile); - cupsFileClose(incfile); - } - } -@@ -2634,8 +2904,6 @@ read_configuration(cups_file_t *fp) /* I - if (linenum == 0) - return (0); - } -- else if (!_cups_strcasecmp(line, "FatalErrors")) -- FatalErrors = parse_fatal_errors(value); - else if (!_cups_strcasecmp(line, "FaxRetryInterval") && value) - { - JobRetryInterval = atoi(value); -@@ -2779,10 +3047,10 @@ read_configuration(cups_file_t *fp) /* I - - BrowseLocalProtocols = protocols; - } -- else if (!_cups_strcasecmp(line, "default_auth_type") && value) -+ else if (!_cups_strcasecmp(line, "DefaultAuthType") && value) - { - /* -- * default_auth_type {basic,digest,basicdigest,negotiate} -+ * DefaultAuthType {basic,digest,basicdigest,negotiate} - */ - - if (!_cups_strcasecmp(value, "none")) -@@ -2831,81 +3099,6 @@ read_configuration(cups_file_t *fp) /* I - } - } - #endif /* HAVE_SSL */ -- else if (!_cups_strcasecmp(line, "User") && value) -- { -- /* -- * User ID to run as... -- */ -- -- if (isdigit(value[0] & 255)) -- { -- int uid = atoi(value); -- -- if (!uid) -- cupsdLogMessage(CUPSD_LOG_ERROR, -- "Will not use User 0 as specified on line %d " -- "for security reasons. You must use a non-" -- "privileged account instead.", -- linenum); -- else -- User = atoi(value); -- } -- else -- { -- struct passwd *p; /* Password information */ -- -- endpwent(); -- p = getpwnam(value); -- -- if (p) -- { -- if (!p->pw_uid) -- cupsdLogMessage(CUPSD_LOG_ERROR, -- "Will not use User %s (UID=0) as specified on line " -- "%d for security reasons. You must use a non-" -- "privileged account instead.", -- value, linenum); -- else -- User = p->pw_uid; -- } -- else -- cupsdLogMessage(CUPSD_LOG_ERROR, -- "Unknown User \"%s\" on line %d, ignoring.", -- value, linenum); -- } -- } -- else if (!_cups_strcasecmp(line, "Group") && value) -- { -- /* -- * Group ID to run as... -- */ -- -- if (isdigit(value[0])) -- Group = atoi(value); -- else -- { -- endgrent(); -- group = getgrnam(value); -- -- if (group != NULL) -- Group = group->gr_gid; -- else -- cupsdLogMessage(CUPSD_LOG_ERROR, -- "Unknown Group \"%s\" on line %d, ignoring.", -- value, linenum); -- } -- } -- else if (!_cups_strcasecmp(line, "SystemGroup") && value) -- { -- /* -- * SystemGroup (admin) group(s)... -- */ -- -- if (!parse_groups(value)) -- cupsdLogMessage(CUPSD_LOG_ERROR, -- "Unknown SystemGroup \"%s\" on line %d, ignoring.", -- value, linenum); -- } - else if (!_cups_strcasecmp(line, "HostNameLookups") && value) - { - /* -@@ -2984,22 +3177,6 @@ read_configuration(cups_file_t *fp) /* I - cupsdLogMessage(CUPSD_LOG_WARN, "Unknown LogTimeFormat %s on line %d.", - value, linenum); - } -- else if (!_cups_strcasecmp(line, "PrintcapFormat") && value) -- { -- /* -- * Format of printcap file? -- */ -- -- if (!_cups_strcasecmp(value, "bsd")) -- PrintcapFormat = PRINTCAP_BSD; -- else if (!_cups_strcasecmp(value, "plist")) -- PrintcapFormat = PRINTCAP_PLIST; -- else if (!_cups_strcasecmp(value, "solaris")) -- PrintcapFormat = PRINTCAP_SOLARIS; -- else -- cupsdLogMessage(CUPSD_LOG_WARN, "Unknown PrintcapFormat %s on line %d.", -- value, linenum); -- } - else if (!_cups_strcasecmp(line, "ServerTokens") && value) - { - /* -@@ -3125,182 +3302,193 @@ read_configuration(cups_file_t *fp) /* I - "line %d.", value, linenum); - } - #endif /* HAVE_SSL */ -+ else if (!_cups_strcasecmp(line, "AccessLog") || -+ !_cups_strcasecmp(line, "CacheDir") || -+ !_cups_strcasecmp(line, "ConfigFilePerm") || -+ !_cups_strcasecmp(line, "DataDir") || -+ !_cups_strcasecmp(line, "DocumentRoot") || -+ !_cups_strcasecmp(line, "ErrorLog") || -+ !_cups_strcasecmp(line, "FatalErrors") || -+ !_cups_strcasecmp(line, "FileDevice") || -+ !_cups_strcasecmp(line, "FontPath") || -+ !_cups_strcasecmp(line, "Group") || -+ !_cups_strcasecmp(line, "LogFilePerm") || -+ !_cups_strcasecmp(line, "LPDConfigFile") || -+ !_cups_strcasecmp(line, "PageLog") || -+ !_cups_strcasecmp(line, "Printcap") || -+ !_cups_strcasecmp(line, "PrintcapFormat") || -+ !_cups_strcasecmp(line, "RemoteRoot") || -+ !_cups_strcasecmp(line, "RequestRoot") || -+ !_cups_strcasecmp(line, "ServerBin") || -+ !_cups_strcasecmp(line, "ServerCertificate") || -+ !_cups_strcasecmp(line, "ServerKey") || -+ !_cups_strcasecmp(line, "ServerRoot") || -+ !_cups_strcasecmp(line, "SMBConfigFile") || -+ !_cups_strcasecmp(line, "StateDir") || -+ !_cups_strcasecmp(line, "SystemGroup") || -+ !_cups_strcasecmp(line, "SystemGroupAuthKey") || -+ !_cups_strcasecmp(line, "TempDir") || -+ !_cups_strcasecmp(line, "User")) -+ { -+ cupsdLogMessage(CUPSD_LOG_WARN, -+ "Please move \"%s%s%s\" on line %d of %s to the %s file; " -+ "this will become an error in a future release.", -+ line, value ? " " : "", value ? value : "", linenum, -+ ConfigurationFile, CupsFilesFile); -+ } - else -+ parse_variable(ConfigurationFile, linenum, line, value, -+ sizeof(cupsd_vars) / sizeof(cupsd_vars[0]), cupsd_vars); -+ } -+ -+ return (1); -+} -+ -+ -+/* -+ * 'read_cups_files_conf()' - Read the cups-files.conf configuration file. -+ */ -+ -+static int /* O - 1 on success, 0 on failure */ -+read_cups_files_conf(cups_file_t *fp) /* I - File to read from */ -+{ -+ int linenum; /* Current line number */ -+ char line[HTTP_MAX_BUFFER], /* Line from file */ -+ *value; /* Value from line */ -+ struct group *group; /* Group */ -+ -+ -+ /* -+ * Loop through each line in the file... -+ */ -+ -+ linenum = 0; -+ -+ while (cupsFileGetConf(fp, line, sizeof(line), &value, &linenum)) -+ { -+ if (!_cups_strcasecmp(line, "FatalErrors")) -+ FatalErrors = parse_fatal_errors(value); -+ else if (!_cups_strcasecmp(line, "Group") && value) - { - /* -- * Find a simple variable in the list... -+ * Group ID to run as... - */ - -- for (i = NUM_VARS, var = variables; i > 0; i --, var ++) -- if (!_cups_strcasecmp(line, var->name)) -- break; -- -- if (i == 0) -+ if (isdigit(value[0])) -+ Group = atoi(value); -+ else - { -- /* -- * Unknown directive! Output an error message and continue... -- */ -+ endgrent(); -+ group = getgrnam(value); - -- if (!value) -- cupsdLogMessage(CUPSD_LOG_ERROR, "Missing value for %s on line %d.", -- line, linenum); -+ if (group != NULL) -+ Group = group->gr_gid; - else -- cupsdLogMessage(CUPSD_LOG_ERROR, "Unknown directive %s on line %d.", -- line, linenum); -- continue; -+ { -+ cupsdLogMessage(CUPSD_LOG_ERROR, -+ "Unknown Group \"%s\" on line %d of %s.", value, -+ linenum, CupsFilesFile); -+ if (FatalErrors & CUPSD_FATAL_CONFIG) -+ return (0); -+ } - } -+ } -+ else if (!_cups_strcasecmp(line, "PrintcapFormat") && value) -+ { -+ /* -+ * Format of printcap file? -+ */ - -- switch (var->type) -+ if (!_cups_strcasecmp(value, "bsd")) -+ PrintcapFormat = PRINTCAP_BSD; -+ else if (!_cups_strcasecmp(value, "plist")) -+ PrintcapFormat = PRINTCAP_PLIST; -+ else if (!_cups_strcasecmp(value, "solaris")) -+ PrintcapFormat = PRINTCAP_SOLARIS; -+ else - { -- case CUPSD_VARTYPE_INTEGER : -- if (!value) -- cupsdLogMessage(CUPSD_LOG_ERROR, -- "Missing integer value for %s on line %d.", -- line, linenum); -- else if (!isdigit(*value & 255)) -- cupsdLogMessage(CUPSD_LOG_ERROR, -- "Bad integer value for %s on line %d.", -- line, linenum); -- else -- { -- int n; /* Number */ -- char *units; /* Units */ -- -- n = strtol(value, &units, 0); -- -- if (units && *units) -- { -- if (tolower(units[0] & 255) == 'g') -- n *= 1024 * 1024 * 1024; -- else if (tolower(units[0] & 255) == 'm') -- n *= 1024 * 1024; -- else if (tolower(units[0] & 255) == 'k') -- n *= 1024; -- else if (tolower(units[0] & 255) == 't') -- n *= 262144; -- else -- { -- cupsdLogMessage(CUPSD_LOG_ERROR, -- "Unknown integer value for %s on line %d.", -- line, linenum); -- break; -- } -- } -- -- if (n < 0) -- cupsdLogMessage(CUPSD_LOG_ERROR, -- "Bad negative integer value for %s on line %d.", -- line, linenum); -- else -- *((int *)var->ptr) = n; -- } -- break; -- -- case CUPSD_VARTYPE_TIME : -- if (!value) -- cupsdLogMessage(CUPSD_LOG_ERROR, -- "Missing time interval value for %s on line %d.", -- line, linenum); -- else if (!_cups_strncasecmp(line, "PreserveJob", 11) && -- (!_cups_strcasecmp(value, "true") || -- !_cups_strcasecmp(value, "on") || -- !_cups_strcasecmp(value, "enabled") || -- !_cups_strcasecmp(value, "yes"))) -- *((int *)var->ptr) = INT_MAX; -- else if (!_cups_strcasecmp(value, "false") || -- !_cups_strcasecmp(value, "off") || -- !_cups_strcasecmp(value, "disabled") || -- !_cups_strcasecmp(value, "no")) -- *((int *)var->ptr) = 0; -- else if (!isdigit(*value & 255)) -- cupsdLogMessage(CUPSD_LOG_ERROR, -- "Unknown time interval value for %s on line %d.", -- line, linenum); -- else -- { -- double n; /* Number */ -- char *units; /* Units */ -- -- n = strtod(value, &units); -- -- if (units && *units) -- { -- if (tolower(units[0] & 255) == 'w') -- n *= 7 * 24 * 60 * 60; -- else if (tolower(units[0] & 255) == 'd') -- n *= 24 * 60 * 60; -- else if (tolower(units[0] & 255) == 'h') -- n *= 60 * 60; -- else if (tolower(units[0] & 255) == 'm') -- n *= 60; -- else -- { -- cupsdLogMessage(CUPSD_LOG_ERROR, -- "Unknown time interval value for %s on line " -- "%d.", line, linenum); -- break; -- } -- } -- -- if (n < 0.0 || n > INT_MAX) -- cupsdLogMessage(CUPSD_LOG_ERROR, -- "Bad time value for %s on line %d.", -- line, linenum); -- else -- *((int *)var->ptr) = (int)n; -- } -- break; -+ cupsdLogMessage(CUPSD_LOG_ERROR, -+ "Unknown PrintcapFormat \"%s\" on line %d of %s.", -+ value, linenum, CupsFilesFile); -+ if (FatalErrors & CUPSD_FATAL_CONFIG) -+ return (0); -+ } -+ } -+ else if (!_cups_strcasecmp(line, "SystemGroup") && value) -+ { -+ /* -+ * SystemGroup (admin) group(s)... -+ */ - -- case CUPSD_VARTYPE_BOOLEAN : -- if (!value) -- cupsdLogMessage(CUPSD_LOG_ERROR, -- "Missing boolean value for %s on line %d.", -- line, linenum); -- else if (!_cups_strcasecmp(value, "true") || -- !_cups_strcasecmp(value, "on") || -- !_cups_strcasecmp(value, "enabled") || -- !_cups_strcasecmp(value, "yes") || -- atoi(value) != 0) -- *((int *)var->ptr) = TRUE; -- else if (!_cups_strcasecmp(value, "false") || -- !_cups_strcasecmp(value, "off") || -- !_cups_strcasecmp(value, "disabled") || -- !_cups_strcasecmp(value, "no") || -- !_cups_strcasecmp(value, "0")) -- *((int *)var->ptr) = FALSE; -- else -- cupsdLogMessage(CUPSD_LOG_ERROR, -- "Unknown boolean value %s on line %d.", -- value, linenum); -- break; -+ if (!parse_groups(value)) -+ { -+ cupsdLogMessage(CUPSD_LOG_ERROR, -+ "Unknown SystemGroup \"%s\" on line %d of %s.", value, -+ linenum, CupsFilesFile); -+ if (FatalErrors & CUPSD_FATAL_CONFIG) -+ return (0); -+ } -+ } -+ else if (!_cups_strcasecmp(line, "User") && value) -+ { -+ /* -+ * User ID to run as... -+ */ - -- case CUPSD_VARTYPE_PATHNAME : -- if (!value) -- { -- cupsdLogMessage(CUPSD_LOG_ERROR, -- "Missing pathname value for %s on line %d.", -- line, linenum); -- break; -- } -+ if (isdigit(value[0] & 255)) -+ { -+ int uid = atoi(value); - -- if (value[0] == '/') -- strlcpy(temp, value, sizeof(temp)); -- else -- snprintf(temp, sizeof(temp), "%s/%s", ServerRoot, value); -+ if (!uid) -+ { -+ cupsdLogMessage(CUPSD_LOG_ERROR, -+ "Will not use User 0 as specified on line %d of %s " -+ "for security reasons. You must use a non-" -+ "privileged account instead.", -+ linenum, CupsFilesFile); -+ if (FatalErrors & CUPSD_FATAL_CONFIG) -+ return (0); -+ } -+ else -+ User = atoi(value); -+ } -+ else -+ { -+ struct passwd *p; /* Password information */ - -- if (access(temp, 0)) -- { -- cupsdLogMessage(CUPSD_LOG_ERROR, -- "File or directory for \"%s %s\" on line %d " -- "does not exist.", line, value, linenum); -- break; -- } -+ endpwent(); -+ p = getpwnam(value); - -- case CUPSD_VARTYPE_STRING : -- cupsdSetString((char **)var->ptr, value); -- break; -+ if (p) -+ { -+ if (!p->pw_uid) -+ { -+ cupsdLogMessage(CUPSD_LOG_ERROR, -+ "Will not use User %s (UID=0) as specified on line " -+ "%d of %s for security reasons. You must use a " -+ "non-privileged account instead.", -+ value, linenum, CupsFilesFile); -+ if (FatalErrors & CUPSD_FATAL_CONFIG) -+ return (0); -+ } -+ else -+ User = p->pw_uid; -+ } -+ else -+ { -+ cupsdLogMessage(CUPSD_LOG_ERROR, -+ "Unknown User \"%s\" on line %d of %s.", -+ value, linenum, CupsFilesFile); -+ if (FatalErrors & CUPSD_FATAL_CONFIG) -+ return (0); -+ } - } - } -+ else if (!parse_variable(CupsFilesFile, linenum, line, value, -+ sizeof(cupsfiles_vars) / sizeof(cupsfiles_vars[0]), -+ cupsfiles_vars) && -+ (FatalErrors & CUPSD_FATAL_CONFIG)) -+ return (0); - } - - return (1); -diff -up cups-1.6.1/scheduler/conf.h.str4223 cups-1.6.1/scheduler/conf.h ---- cups-1.6.1/scheduler/conf.h.str4223 2013-03-05 16:58:52.649285685 +0000 -+++ cups-1.6.1/scheduler/conf.h 2013-03-05 16:58:52.803286279 +0000 -@@ -96,7 +96,9 @@ typedef struct - */ - - VAR char *ConfigurationFile VALUE(NULL), -- /* Configuration file to use */ -+ /* cupsd.conf file to use */ -+ *CupsFilesFile VALUE(NULL), -+ /* cups-files.conf file to use */ - *ServerName VALUE(NULL), - /* FQDN for server */ - *ServerAdmin VALUE(NULL), -diff -up cups-1.6.1/scheduler/ipp.c.str4223 cups-1.6.1/scheduler/ipp.c ---- cups-1.6.1/scheduler/ipp.c.str4223 2013-03-05 16:58:52.693285856 +0000 -+++ cups-1.6.1/scheduler/ipp.c 2013-03-05 16:58:52.805286287 +0000 -@@ -2369,7 +2369,7 @@ add_printer(cupsd_client_t *con, /* I - - send_ipp_status(con, IPP_NOT_POSSIBLE, - _("File device URIs have been disabled. " - "To enable, see the FileDevice directive in " -- "\"%s/cupsd.conf\"."), -+ "\"%s/cups-files.conf\"."), - ServerRoot); - return; - } -diff -up cups-1.6.1/scheduler/main.c.str4223 cups-1.6.1/scheduler/main.c ---- cups-1.6.1/scheduler/main.c.str4223 2013-03-05 16:58:52.786286214 +0000 -+++ cups-1.6.1/scheduler/main.c 2013-03-05 16:58:52.805286287 +0000 -@@ -216,7 +216,6 @@ main(int argc, /* I - Number of comm - - char *current; /* Current directory */ - -- - /* - * Allocate a buffer for the current working directory to - * reduce run-time stack usage; this approximates the -@@ -280,6 +279,29 @@ main(int argc, /* I - Number of comm - UseProfiles = 0; - break; - -+ case 's' : /* Set cups-files.conf location */ -+ i ++; -+ if (i >= argc) -+ { -+ _cupsLangPuts(stderr, _("cupsd: Expected cups-files.conf " -+ "filename after \"-s\" option.")); -+ usage(1); -+ } -+ -+ if (argv[i][0] != '/') -+ { -+ /* -+ * Relative filename not allowed... -+ */ -+ -+ _cupsLangPuts(stderr, _("cupsd: Relative cups-files.conf " -+ "filename not allowed.")); -+ usage(1); -+ } -+ -+ cupsdSetString(&CupsFilesFile, argv[i]); -+ break; -+ - #ifdef __APPLE__ - case 'S' : /* Disable system management functions */ - fputs("cupsd: -S (disable system management) for internal " -@@ -309,6 +331,35 @@ main(int argc, /* I - Number of comm - if (!ConfigurationFile) - cupsdSetString(&ConfigurationFile, CUPS_SERVERROOT "/cupsd.conf"); - -+ if (!CupsFilesFile) -+ { -+ char *filename, /* Copy of cupsd.conf filename */ -+ *slash; /* Final slash in cupsd.conf filename */ -+ size_t len; /* Size of buffer */ -+ -+ len = strlen(ConfigurationFile) + 15; -+ if ((filename = malloc(len)) == NULL) -+ { -+ _cupsLangPrintf(stderr, -+ _("cupsd: Unable to get path to " -+ "cups-files.conf file.")); -+ return (1); -+ } -+ -+ strlcpy(filename, ConfigurationFile, len); -+ if ((slash = strrchr(filename, '/')) == NULL) -+ { -+ _cupsLangPrintf(stderr, -+ _("cupsd: Unable to get path to " -+ "cups-files.conf file.")); -+ return (1); -+ } -+ -+ strlcpy(slash, "/cups-files.conf", len - (slash - filename)); -+ cupsdSetString(&CupsFilesFile, filename); -+ free(filename); -+ } -+ - /* - * If the user hasn't specified "-f", run in the background... - */ -diff -up cups-1.6.1/test/run-stp-tests.sh.str4223 cups-1.6.1/test/run-stp-tests.sh ---- cups-1.6.1/test/run-stp-tests.sh.str4223 2012-05-21 16:35:25.000000000 +0100 -+++ cups-1.6.1/test/run-stp-tests.sh 2013-03-05 16:58:52.805286287 +0000 -@@ -385,26 +385,11 @@ fi - cat >/tmp/cups-$user/cupsd.conf < - EOF - -+cat >/tmp/cups-$user/cups-files.conf <fd); -diff -up cups-1.6b1/scheduler/main.c.systemd-socket cups-1.6b1/scheduler/main.c ---- cups-1.6b1/scheduler/main.c.systemd-socket 2012-05-28 11:16:35.612250897 +0200 -+++ cups-1.6b1/scheduler/main.c 2012-05-28 12:49:32.698375139 +0200 +diff -up cups-1.6.2/scheduler/main.c.systemd-socket cups-1.6.2/scheduler/main.c +--- cups-1.6.2/scheduler/main.c.systemd-socket 2013-03-18 18:53:53.724962256 +0100 ++++ cups-1.6.2/scheduler/main.c 2013-03-18 18:53:53.772961588 +0100 @@ -26,6 +26,8 @@ * launchd_checkin() - Check-in with launchd and collect the listening * fds. @@ -229,7 +229,7 @@ diff -up cups-1.6b1/scheduler/main.c.systemd-socket cups-1.6b1/scheduler/main.c #if defined(HAVE_MALLOC_H) && defined(HAVE_MALLINFO) # include #endif /* HAVE_MALLOC_H && HAVE_MALLINFO */ -@@ -78,6 +84,9 @@ +@@ -83,6 +89,9 @@ static void launchd_checkin(void); static void launchd_checkout(void); #endif /* HAVE_LAUNCHD */ @@ -239,7 +239,7 @@ diff -up cups-1.6b1/scheduler/main.c.systemd-socket cups-1.6b1/scheduler/main.c static void parent_handler(int sig); static void process_children(void); static void sigchld_handler(int sig); -@@ -528,6 +537,13 @@ main(int argc, /* I - Number of comm +@@ -581,6 +590,13 @@ main(int argc, /* I - Number of comm } #endif /* HAVE_LAUNCHD */ @@ -253,7 +253,7 @@ diff -up cups-1.6b1/scheduler/main.c.systemd-socket cups-1.6b1/scheduler/main.c /* * Startup the server... */ -@@ -738,6 +754,15 @@ main(int argc, /* I - Number of comm +@@ -791,6 +807,15 @@ main(int argc, /* I - Number of comm } #endif /* HAVE_LAUNCHD */ @@ -269,7 +269,7 @@ diff -up cups-1.6b1/scheduler/main.c.systemd-socket cups-1.6b1/scheduler/main.c /* * Startup the server... */ -@@ -1516,6 +1541,102 @@ launchd_checkout(void) +@@ -1552,6 +1577,102 @@ launchd_checkout(void) } #endif /* HAVE_LAUNCHD */ @@ -372,9 +372,9 @@ diff -up cups-1.6b1/scheduler/main.c.systemd-socket cups-1.6b1/scheduler/main.c /* * 'parent_handler()' - Catch USR1/CHLD signals... -diff -up cups-1.6b1/scheduler/Makefile.systemd-socket cups-1.6b1/scheduler/Makefile ---- cups-1.6b1/scheduler/Makefile.systemd-socket 2012-05-21 19:40:22.000000000 +0200 -+++ cups-1.6b1/scheduler/Makefile 2012-05-28 11:16:35.663250542 +0200 +diff -up cups-1.6.2/scheduler/Makefile.systemd-socket cups-1.6.2/scheduler/Makefile +--- cups-1.6.2/scheduler/Makefile.systemd-socket 2012-05-21 19:40:22.000000000 +0200 ++++ cups-1.6.2/scheduler/Makefile 2013-03-18 18:53:53.772961588 +0100 @@ -371,7 +371,7 @@ cupsd: $(CUPSDOBJS) $(LIBCUPSMIME) ../cu $(CC) $(LDFLAGS) -o cupsd $(CUPSDOBJS) -L. -lcupsmime \ $(LIBZ) $(SSLLIBS) $(LIBSLP) $(LIBLDAP) $(PAMLIBS) \ diff --git a/cups-usblp-quirks.patch b/cups-usblp-quirks.patch deleted file mode 100644 index ebf5d4c..0000000 --- a/cups-usblp-quirks.patch +++ /dev/null @@ -1,112 +0,0 @@ -diff -up cups-1.5.4/backend/usb-libusb.c.usblp-quirks cups-1.5.4/backend/usb-libusb.c ---- cups-1.5.4/backend/usb-libusb.c.usblp-quirks 2012-07-16 19:16:46.000000000 +0200 -+++ cups-1.5.4/backend/usb-libusb.c 2012-10-17 16:30:58.571793169 +0200 -@@ -70,7 +70,7 @@ typedef struct usb_printer_s /**** USB - read_endp, /* Read endpoint */ - protocol, /* Protocol: 1 = Uni-di, 2 = Bi-di. */ - usblp_attached, /* "usblp" kernel module attached? */ -- opened_for_job; /* Set to 1 by print_device() */ -+ reset_after_job; /* Set to 1 by print_device() */ - unsigned int quirks; /* Quirks flags */ - struct libusb_device_handle *handle; /* Open handle to device */ - } usb_printer_t; -@@ -122,6 +122,8 @@ struct quirk_printer_struct { - #define USBLP_QUIRK_USB_INIT 0x2 /* needs vendor USB init string */ - #define USBLP_QUIRK_BAD_CLASS 0x4 /* descriptor uses vendor-specific - Class or SubClass */ -+#define USBLP_QUIRK_RESET 0x4000 /* After printing do a reset -+ for clean-up */ - #define USBLP_QUIRK_NO_REATTACH 0x8000 /* After printing we cannot re-attach - the usblp kernel module */ - -@@ -141,15 +143,45 @@ static const struct quirk_printer_struct - { 0x0409, 0xf1be, USBLP_QUIRK_BIDIR }, /* NEC Picty800 (HP OEM) */ - { 0x0482, 0x0010, USBLP_QUIRK_BIDIR }, /* Kyocera Mita FS 820, - by zut */ -+ { 0x04a9, 0x10a2, USBLP_QUIRK_BIDIR }, /* Canon, Inc. PIXMA iP4200 -+ Printer, http://www.cups.org/str.php?L4155 */ -+ { 0x04a9, 0x10b6, USBLP_QUIRK_BIDIR }, /* Canon, Inc. PIXMA iP4300 -+ Printer, https://bugs.launchpad.net/bugs/1032385 */ -+ { 0x04a9, 0x1721, USBLP_QUIRK_BIDIR }, /* Canon, Inc. MP210 -+ https://bugzilla.redhat.com/show_bug.cgi?id=847923#c53 */ -+ { 0x04a9, 0x170c, USBLP_QUIRK_BIDIR }, /* Canon, Inc. MP500 -+ Printer, https://bugs.launchpad.net/bugs/1032456 */ -+ { 0x04a9, 0x1717, USBLP_QUIRK_BIDIR }, /* Canon, Inc. MP510 -+ Printer, https://bugs.launchpad.net/bugs/1050009 */ -+ { 0x04a9, 0x173d, USBLP_QUIRK_BIDIR }, /* Canon, Inc. MP550 -+ Printer, http://www.cups.org/str.php?L4155 */ -+ { 0x04a9, 0x173e, USBLP_QUIRK_BIDIR }, /* Canon, Inc. MP560 -+ Printer, http://www.cups.org/str.php?L4155 */ -+ { 0x04f9, 0x001a, USBLP_QUIRK_NO_REATTACH }, /* Brother Industries, Ltd -+ HL-1430 Laser Printer, -+ https://bugs.launchpad.net/bugs/1038695 */ - { 0x04f9, 0x000d, USBLP_QUIRK_BIDIR | - USBLP_QUIRK_NO_REATTACH }, /* Brother Industries, Ltd -- HL-1440 Laser Printer */ -+ HL-1440 Laser Printer, -+ https://bugs.launchpad.net/bugs/1000253 */ -+ { 0x06bc, 0x000b, USBLP_QUIRK_NO_REATTACH }, /* Oki Data Corp. -+ Okipage 14ex Printer, -+ https://bugs.launchpad.net/bugs/872483 */ -+ { 0x06bc, 0x01c7, USBLP_QUIRK_NO_REATTACH }, /* Oki Data Corp. B410d, -+ https://bugs.launchpad.net/bugs/872483 */ - { 0x04b8, 0x0202, USBLP_QUIRK_BAD_CLASS }, /* Seiko Epson Receipt - Printer M129C */ - { 0x067b, 0x2305, USBLP_QUIRK_BIDIR | -- USBLP_QUIRK_NO_REATTACH }, -+ USBLP_QUIRK_NO_REATTACH | -+ USBLP_QUIRK_RESET }, -+ { 0x0924, 0x3ce9, USBLP_QUIRK_NO_REATTACH }, /* Xerox Phaser 3124 -+ https://bugzilla.redhat.com/show_bug.cgi?id=867392 */ - /* Prolific Technology, Inc. PL2305 Parallel Port -- (USB -> Parallel adapter) */ -+ (USB -> Parallel adapter), https://bugs.launchpad.net/bugs/987485 */ -+ { 0x04e8, 0x0000, USBLP_QUIRK_RESET }, /* All Samsung devices, -+ https://bugs.launchpad.net/bugs/1032456 */ -+ { 0x0a5f, 0x0000, USBLP_QUIRK_BIDIR }, /* All Zebra devices, -+ https://bugs.launchpad.net/bugs/1001028 */ - { 0, 0 } - }; - -@@ -256,7 +286,12 @@ print_device(const char *uri, /* I - De - } - - g.print_fd = print_fd; -- g.printer->opened_for_job = 1; -+ -+ /* -+ * Some devices need a reset after finishing a job, these devices are -+ * marked with the USBLP_QUIRK_RESET quirk. -+ */ -+ g.printer->reset_after_job = (g.printer->quirks & USBLP_QUIRK_RESET ? 1 : 0); - - /* - * If we are printing data from a print driver on stdin, ignore SIGTERM -@@ -772,7 +807,7 @@ close_device(usb_printer_t *printer) /* - * Reset the device to clean up after the job - */ - -- if (printer->opened_for_job == 1) -+ if (printer->reset_after_job == 1) - { - if ((errcode = libusb_reset_device(printer->handle)) < 0) - fprintf(stderr, -@@ -1288,7 +1323,7 @@ open_device(usb_printer_t *printer, /* I - } - - printer->usblp_attached = 0; -- printer->opened_for_job = 0; -+ printer->reset_after_job = 0; - - if (verbose) - fputs("STATE: +connecting-to-device\n", stderr); -@@ -1586,7 +1621,8 @@ static unsigned int quirks(int vendor, i - for (i = 0; quirk_printers[i].vendorId; i++) - { - if (vendor == quirk_printers[i].vendorId && -- product == quirk_printers[i].productId) -+ (quirk_printers[i].productId == 0x0000 || -+ product == quirk_printers[i].productId)) - return quirk_printers[i].quirks; - } - return 0; diff --git a/cups.spec b/cups.spec index ab67748..2d32abb 100644 --- a/cups.spec +++ b/cups.spec @@ -10,8 +10,8 @@ Summary: CUPS printing system Name: cups Epoch: 1 -Version: 1.6.1 -Release: 26%{?dist} +Version: 1.6.2 +Release: 1%{?dist} License: GPLv2 Group: System Environment/Daemons Url: http://www.cups.org/ @@ -40,28 +40,20 @@ Patch9: cups-lpr-help.patch Patch10: cups-peercred.patch Patch11: cups-pid.patch Patch12: cups-eggcups.patch -Patch13: cups-str4276.patch -Patch14: cups-driverd-timeout.patch -Patch15: cups-strict-ppd-line-length.patch -Patch16: cups-logrotate.patch -Patch17: cups-usb-paperout.patch -#Patch18: cups-build.patch -Patch19: cups-res_init.patch -Patch20: cups-filter-debug.patch -Patch21: cups-uri-compat.patch -Patch22: cups-directives.patch -Patch23: cups-str3382.patch -Patch24: cups-usblp-quirks.patch -Patch25: cups-0755.patch - -Patch27: cups-hp-deviceid-oid.patch -Patch28: cups-dnssd-deviceid.patch -Patch29: cups-ricoh-deviceid-oid.patch - -Patch30: cups-systemd-socket.patch - -Patch31: cups-str4223.patch -Patch32: cups-lpd-manpage.patch +Patch13: cups-driverd-timeout.patch +Patch14: cups-strict-ppd-line-length.patch +Patch15: cups-logrotate.patch +Patch16: cups-usb-paperout.patch +Patch17: cups-res_init.patch +Patch18: cups-filter-debug.patch +Patch19: cups-uri-compat.patch +Patch20: cups-str3382.patch +Patch21: cups-0755.patch +Patch22: cups-hp-deviceid-oid.patch +Patch23: cups-dnssd-deviceid.patch +Patch24: cups-ricoh-deviceid-oid.patch +Patch25: cups-systemd-socket.patch +Patch26: cups-lpd-manpage.patch Patch100: cups-lspp.patch @@ -200,52 +192,35 @@ Sends IPP requests to the specified URI and tests and/or displays the results. %patch11 -p1 -b .pid # Fix implementation of com.redhat.PrinterSpooler D-Bus object. %patch12 -p1 -b .eggcups -# Applied colorman fix from STR #4232 and STR #4276. -%patch13 -p1 -b .str4276 # Increase driverd timeout to 70s to accommodate foomatic (bug #744715). -%patch14 -p1 -b .driverd-timeout +%patch13 -p1 -b .driverd-timeout # Only enforce maximum PPD line length when in strict mode. -%patch15 -p1 -b .strict-ppd-line-length +%patch14 -p1 -b .strict-ppd-line-length # Re-open the log if it has been logrotated under us. -%patch16 -p1 -b .logrotate +%patch15 -p1 -b .logrotate # Support for errno==ENOSPACE-based USB paper-out reporting. -%patch17 -p1 -b .usb-paperout -# Simplify the DNSSD parts so they can build using the compat library. -#%%patch18 -p1 -b .build +%patch16 -p1 -b .usb-paperout # Re-initialise the resolver on failure in httpAddrGetList() (bug #567353). -%patch19 -p1 -b .res_init +%patch17 -p1 -b .res_init # Log extra debugging information if no filters are available. -%patch20 -p1 -b .filter-debug +%patch18 -p1 -b .filter-debug # Allow the usb backend to understand old-style URI formats. -%patch21 -p1 -b .uri-compat -# Remove obsolete browsing directives from cupsd.conf (bug #880826, STR #4157). -%patch22 -p1 -b .directives +%patch19 -p1 -b .uri-compat # Fix temporary filename creation. -%patch23 -p1 -b .str3382 -# Problem is a port reset which is done by the new USB backend of CUPS 1.5.4 and 1.6.x to clean up after the job. -# This patch adds a quirk handler for this reset so that it will not be done for all printers. -# (bug #847923, STR #4155, STR #4191) -# bug #867392 -%patch24 -p1 -b .usblp-quirks +%patch20 -p1 -b .str3382 # Use mode 0755 for binaries and libraries where appropriate. -%patch25 -p1 -b .0755 - +%patch21 -p1 -b .0755 # Add an SNMP query for HP's device ID OID (STR #3552). -%patch27 -p1 -b .hp-deviceid-oid +%patch22 -p1 -b .hp-deviceid-oid # Mark DNS-SD Device IDs that have been guessed at with "FZY:1;". -%patch28 -p1 -b .dnssd-deviceid +%patch23 -p1 -b .dnssd-deviceid # Add an SNMP query for Ricoh's device ID OID (STR #3552). -%patch29 -p1 -b .ricoh-deviceid-oid - +%patch24 -p1 -b .ricoh-deviceid-oid # Add support for systemd socket activation (patch from Lennart # Poettering). -%patch30 -p1 -b .systemd-socket - -# Apply upstream fix for CVE-2012-5519 (STR #4223, bug #875898). -%patch31 -p1 -b .str4223 - +%patch25 -p1 -b .systemd-socket # Talk about systemd in cups-lpd manpage (part of bug #884641). -%patch32 -p1 -b .lpd-manpage +%patch26 -p1 -b .lpd-manpage %if %lspp # LSPP support. @@ -349,7 +324,7 @@ rm -rf $RPM_BUILD_ROOT%{_mandir}/cat? $RPM_BUILD_ROOT%{_mandir}/*/cat? rm -f $RPM_BUILD_ROOT%{_datadir}/applications/cups.desktop rm -rf $RPM_BUILD_ROOT%{_datadir}/icons -# banners are also shipped with cups-filters +# banners can be shipped with cups-filters # but we don't use them yet (#919489) #rm -rf $RPM_BUILD_ROOT%%{_datadir}/cups/banners #rm -f $RPM_BUILD_ROOT%%{_datadir}/cups/data/testprint @@ -537,16 +512,22 @@ rm -f %{cups_serverbin}/backend/smb %config(noreplace) %{_sysconfdir}/logrotate.d/cups %dir %{_datadir}/%{name}/www %dir %{_datadir}/%{name}/www/ca +%dir %{_datadir}/%{name}/www/cs %dir %{_datadir}/%{name}/www/es +%dir %{_datadir}/%{name}/www/fr %dir %{_datadir}/%{name}/www/ja +%dir %{_datadir}/%{name}/www/ru %{_datadir}/%{name}/www/images %{_datadir}/%{name}/www/*.css %doc %{_datadir}/%{name}/www/index.html %doc %{_datadir}/%{name}/www/help %doc %{_datadir}/%{name}/www/robots.txt %doc %{_datadir}/%{name}/www/ca/index.html +%doc %{_datadir}/%{name}/www/cs/index.html %doc %{_datadir}/%{name}/www/es/index.html +%doc %{_datadir}/%{name}/www/fr/index.html %doc %{_datadir}/%{name}/www/ja/index.html +%doc %{_datadir}/%{name}/www/ru/index.html %{_unitdir}/%{name}.service %{_unitdir}/%{name}.socket %{_unitdir}/%{name}.path @@ -577,12 +558,18 @@ rm -f %{cups_serverbin}/backend/smb %{_datadir}/cups/data/testprint %dir %{_datadir}/cups/templates %dir %{_datadir}/cups/templates/ca +%dir %{_datadir}/cups/templates/cs %dir %{_datadir}/cups/templates/es +%dir %{_datadir}/cups/templates/fr %dir %{_datadir}/cups/templates/ja +%dir %{_datadir}/cups/templates/ru %{_datadir}/cups/templates/*.tmpl %{_datadir}/cups/templates/ca/*.tmpl +%{_datadir}/cups/templates/cs/*.tmpl %{_datadir}/cups/templates/es/*.tmpl +%{_datadir}/cups/templates/fr/*.tmpl %{_datadir}/cups/templates/ja/*.tmpl +%{_datadir}/cups/templates/ru/*.tmpl %dir %attr(1770,root,lp) %{_localstatedir}/spool/cups/tmp %dir %attr(0710,root,lp) %{_localstatedir}/spool/cups %dir %attr(0755,lp,sys) %{_localstatedir}/log/cups @@ -634,6 +621,9 @@ rm -f %{cups_serverbin}/backend/smb %{_mandir}/man5/ipptoolfile.5.gz %changelog +* Mon Mar 18 2013 Jiri Popelka - 1:1.6.2-1 +- 1.6.2 + * Wed Mar 13 2013 Jiri Popelka - 1:1.6.1-26 - ship banners again (#919489) diff --git a/sources b/sources index a744de6..3f710d0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -87ade07e3d1efd03c9c3add949cf9c00 cups-1.6.1-source.tar.bz2 +13c8b2b2336d42001abe4899766b62dc cups-1.6.2-source.tar.bz2