-diff -up cups-2.2.8/config.h.in.lspp cups-2.2.8/config.h.in
---- cups-2.2.8/config.h.in.lspp 2018-06-05 18:06:54.000000000 +0200
-+++ cups-2.2.8/config.h.in 2018-06-08 17:34:38.682653959 +0200
-@@ -730,4 +730,11 @@ static __inline int _cups_abs(int i) { r
+diff -up cups-2.3.0/config.h.in.lspp cups-2.3.0/config.h.in
+--- cups-2.3.0/config.h.in.lspp 2019-08-23 17:19:38.000000000 +0200
++++ cups-2.3.0/config.h.in 2019-10-07 12:24:43.058597468 +0200
+@@ -684,4 +684,11 @@ static __inline int _cups_abs(int i) { r
# endif /* __GNUC__ || __STDC_VERSION__ */
#endif /* !HAVE_ABS && !abs */
+
+
#endif /* !_CUPS_CONFIG_H_ */
-diff -up cups-2.2.8/config-scripts/cups-lspp.m4.lspp cups-2.2.8/config-scripts/cups-lspp.m4
---- cups-2.2.8/config-scripts/cups-lspp.m4.lspp 2018-06-08 17:34:38.682653959 +0200
-+++ cups-2.2.8/config-scripts/cups-lspp.m4 2018-06-08 17:34:38.682653959 +0200
+diff -up cups-2.3.0/config-scripts/cups-lspp.m4.lspp cups-2.3.0/config-scripts/cups-lspp.m4
+--- cups-2.3.0/config-scripts/cups-lspp.m4.lspp 2019-10-07 12:24:43.058597468 +0200
++++ cups-2.3.0/config-scripts/cups-lspp.m4 2019-10-07 12:24:43.058597468 +0200
@@ -0,0 +1,36 @@
+dnl
+dnl LSPP code for the Common UNIX Printing System (CUPS).
+ ;;
+ esac
+fi
-diff -up cups-2.2.8/configure.ac.lspp cups-2.2.8/configure.ac
---- cups-2.2.8/configure.ac.lspp 2018-06-05 18:06:54.000000000 +0200
-+++ cups-2.2.8/configure.ac 2018-06-08 17:34:38.682653959 +0200
-@@ -38,6 +38,8 @@ sinclude(config-scripts/cups-startup.m4)
+diff -up cups-2.3.0/configure.ac.lspp cups-2.3.0/configure.ac
+--- cups-2.3.0/configure.ac.lspp 2019-10-07 12:24:43.058597468 +0200
++++ cups-2.3.0/configure.ac 2019-10-07 12:39:20.122546282 +0200
+@@ -34,6 +34,8 @@ sinclude(config-scripts/cups-dnssd.m4)
+ sinclude(config-scripts/cups-startup.m4)
sinclude(config-scripts/cups-defaults.m4)
- sinclude(config-scripts/cups-scripting.m4)
+sinclude(config-scripts/cups-lspp.m4)
+
INSTALL_LANGUAGES=""
UNINSTALL_LANGUAGES=""
LANGFILES=""
-diff -up cups-2.2.8/filter/common.c.lspp cups-2.2.8/filter/common.c
---- cups-2.2.8/filter/common.c.lspp 2018-06-05 18:06:54.000000000 +0200
-+++ cups-2.2.8/filter/common.c 2018-06-08 17:34:38.682653959 +0200
-@@ -17,6 +17,12 @@
+diff -up cups-2.3.0/filter/common.c.lspp cups-2.3.0/filter/common.c
+--- cups-2.3.0/filter/common.c.lspp 2019-08-23 17:19:38.000000000 +0200
++++ cups-2.3.0/filter/common.c 2019-10-07 12:24:43.059597461 +0200
+@@ -11,6 +11,12 @@
* Include necessary headers...
*/
#include "common.h"
#include <locale.h>
-@@ -299,6 +305,18 @@ WriteLabelProlog(const char *label, /* I
+@@ -293,6 +299,18 @@ WriteLabelProlog(const char *label, /* I
{
const char *classification; /* CLASSIFICATION environment variable */
const char *ptr; /* Temporary string pointer */
/*
-@@ -321,6 +339,124 @@ WriteLabelProlog(const char *label, /* I
+@@ -315,6 +333,124 @@ WriteLabelProlog(const char *label, /* I
return;
}
/*
* Set the classification + page label string...
*/
-@@ -401,7 +537,10 @@ WriteLabelProlog(const char *label, /* I
+@@ -395,7 +531,10 @@ WriteLabelProlog(const char *label, /* I
printf(" %.0f moveto ESPpl show\n", top - 14.0);
puts("pop");
puts("}bind put");
/*
-diff -up cups-2.2.8/filter/pstops.c.lspp cups-2.2.8/filter/pstops.c
---- cups-2.2.8/filter/pstops.c.lspp 2018-06-05 18:06:54.000000000 +0200
-+++ cups-2.2.8/filter/pstops.c 2018-06-08 17:34:38.683653951 +0200
-@@ -3176,6 +3176,18 @@ write_label_prolog(pstops_doc_t *doc, /*
+diff -up cups-2.3.0/filter/pstops.c.lspp cups-2.3.0/filter/pstops.c
+--- cups-2.3.0/filter/pstops.c.lspp 2019-08-23 17:19:38.000000000 +0200
++++ cups-2.3.0/filter/pstops.c 2019-10-07 12:24:43.059597461 +0200
+@@ -3170,6 +3170,18 @@ write_label_prolog(pstops_doc_t *doc, /*
{
const char *classification; /* CLASSIFICATION environment variable */
const char *ptr; /* Temporary string pointer */
/*
-@@ -3198,6 +3210,124 @@ write_label_prolog(pstops_doc_t *doc, /*
+@@ -3192,6 +3204,124 @@ write_label_prolog(pstops_doc_t *doc, /*
return;
}
/*
* Set the classification + page label string...
*/
-@@ -3276,7 +3406,10 @@ write_label_prolog(pstops_doc_t *doc, /*
+@@ -3270,7 +3400,10 @@ write_label_prolog(pstops_doc_t *doc, /*
doc_printf(doc, " %.0f moveto ESPpl show\n", top - 14.0);
doc_puts(doc, "pop\n");
doc_puts(doc, "}bind put\n");
/*
-diff -up cups-2.2.8/Makedefs.in.lspp cups-2.2.8/Makedefs.in
---- cups-2.2.8/Makedefs.in.lspp 2018-06-05 18:06:54.000000000 +0200
-+++ cups-2.2.8/Makedefs.in 2018-06-08 17:34:38.683653951 +0200
-@@ -161,7 +161,7 @@ LDFLAGS = -L../cgi-bin -L../cups -L../f
- @LDFLAGS@ @RELROFLAGS@ @PIEFLAGS@ $(OPTIM)
- LINKCUPS = @LINKCUPS@ $(LIBGSSAPI) $(DNSSDLIBS) $(SSLLIBS) $(LIBZ)
- LINKCUPSIMAGE = @LINKCUPSIMAGE@
--LIBS = $(LINKCUPS) $(COMMONLIBS)
-+LIBS = $(LINKCUPS) $(COMMONLIBS) @LIBAUDIT@ @LIBSELINUX@
+diff -up cups-2.3.0/Makedefs.in.lspp cups-2.3.0/Makedefs.in
+--- cups-2.3.0/Makedefs.in.lspp 2019-10-07 12:24:43.059597461 +0200
++++ cups-2.3.0/Makedefs.in 2019-10-07 12:37:19.200565805 +0200
+@@ -174,7 +174,7 @@ IPPFIND_MAN = @IPPFIND_MAN@
+ LDFLAGS = @LDFLAGS@
+ LINKCUPS = @LINKCUPS@
+ LINKCUPSSTATIC = ../cups/$(LIBCUPSSTATIC) $(LIBS)
+-LIBS = $(LIBGSSAPI) $(DNSSDLIBS) $(SSLLIBS) $(LIBZ) $(COMMONLIBS)
++LIBS = $(LIBGSSAPI) $(DNSSDLIBS) $(SSLLIBS) $(LIBZ) $(COMMONLIBS) @LIBAUDIT@ @LIBSELINUX@
ONDEMANDFLAGS = @ONDEMANDFLAGS@
ONDEMANDLIBS = @ONDEMANDLIBS@
OPTIM = @OPTIM@
-diff -up cups-2.2.8/scheduler/client.c.lspp cups-2.2.8/scheduler/client.c
---- cups-2.2.8/scheduler/client.c.lspp 2018-06-05 18:06:54.000000000 +0200
-+++ cups-2.2.8/scheduler/client.c 2018-06-08 17:34:38.729653586 +0200
-@@ -22,12 +22,20 @@
+diff -up cups-2.3.0/scheduler/client.c.lspp cups-2.3.0/scheduler/client.c
+--- cups-2.3.0/scheduler/client.c.lspp 2019-08-23 17:19:38.000000000 +0200
++++ cups-2.3.0/scheduler/client.c 2019-10-07 12:33:10.459693580 +0200
+@@ -19,12 +19,20 @@
#define _HTTP_NO_PRIVATE
#include "cupsd.h"
/*
-@@ -268,6 +276,59 @@ cupsdAcceptClient(cupsd_listener_t *lis)
+@@ -265,6 +273,59 @@ cupsdAcceptClient(cupsd_listener_t *lis)
}
#endif /* HAVE_TCPD_H */
#ifdef AF_LOCAL
if (httpAddrFamily(httpGetAddress(con->http)) == AF_LOCAL)
{
-@@ -562,6 +623,13 @@ cupsdReadClient(cupsd_client_t *con) /*
+@@ -558,6 +619,13 @@ cupsdReadClient(cupsd_client_t *con) /*
+ struct stat filestats; /* File information */
mime_type_t *type; /* MIME type of file */
- cupsd_printer_t *p; /* Printer */
static unsigned request_id = 0; /* Request ID for temp files */
+#ifdef WITH_LSPP
+ security_context_t spoolcon; /* context of the job file */
status = HTTP_STATUS_CONTINUE;
-@@ -1938,6 +2006,73 @@ cupsdReadClient(cupsd_client_t *con) /*
+@@ -1679,6 +1747,73 @@ cupsdReadClient(cupsd_client_t *con) /*
fcntl(con->file, F_SETFD, fcntl(con->file, F_GETFD) | FD_CLOEXEC);
}
if (httpGetState(con->http) != HTTP_STATE_POST_SEND)
{
if (!httpWait(con->http, 0))
-@@ -3485,6 +3620,49 @@ is_path_absolute(const char *path) /* I
+@@ -3174,6 +3309,49 @@ is_path_absolute(const char *path) /* I
return (1);
}
/*
* 'pipe_command()' - Pipe the output of a command to the remote client.
-diff -up cups-2.2.8/scheduler/client.h.lspp cups-2.2.8/scheduler/client.h
---- cups-2.2.8/scheduler/client.h.lspp 2018-06-05 18:06:54.000000000 +0200
-+++ cups-2.2.8/scheduler/client.h 2018-06-08 17:34:38.729653586 +0200
-@@ -16,6 +16,13 @@
+diff -up cups-2.3.0/scheduler/client.h.lspp cups-2.3.0/scheduler/client.h
+--- cups-2.3.0/scheduler/client.h.lspp 2019-08-23 17:19:38.000000000 +0200
++++ cups-2.3.0/scheduler/client.h 2019-10-07 12:24:43.113597079 +0200
+@@ -13,6 +13,13 @@
#endif /* HAVE_AUTHORIZATION_H */
/*
* HTTP client structure...
*/
-@@ -66,6 +73,10 @@ struct cupsd_client_s
+@@ -63,6 +70,10 @@ struct cupsd_client_s
#ifdef HAVE_AUTHORIZATION_H
AuthorizationRef authref; /* Authorization ref */
#endif /* HAVE_AUTHORIZATION_H */
};
#define HTTP(con) ((con)->http)
-@@ -139,6 +150,9 @@ extern void cupsdStartListening(void);
+@@ -136,6 +147,9 @@ extern void cupsdStartListening(void);
extern void cupsdStopListening(void);
extern void cupsdUpdateCGI(void);
extern void cupsdWriteClient(cupsd_client_t *con);
#ifdef HAVE_SSL
extern int cupsdEndTLS(cupsd_client_t *con);
-diff -up cups-2.2.8/scheduler/conf.c.lspp cups-2.2.8/scheduler/conf.c
---- cups-2.2.8/scheduler/conf.c.lspp 2018-06-08 17:34:38.676654007 +0200
-+++ cups-2.2.8/scheduler/conf.c 2018-06-08 17:34:38.730653578 +0200
-@@ -40,6 +40,9 @@
+diff -up cups-2.3.0/scheduler/conf.c.lspp cups-2.3.0/scheduler/conf.c
+--- cups-2.3.0/scheduler/conf.c.lspp 2019-10-07 12:24:43.049597531 +0200
++++ cups-2.3.0/scheduler/conf.c 2019-10-07 12:24:43.113597079 +0200
+@@ -37,6 +37,9 @@
# define INADDR_NONE 0xffffffff
#endif /* !INADDR_NONE */
/*
-@@ -863,6 +873,25 @@ cupsdReadConfiguration(void)
+@@ -864,6 +874,25 @@ cupsdReadConfiguration(void)
RunUser = getuid();
cupsdLogMessage(CUPSD_LOG_INFO, "Remote access is %s.",
RemotePort ? "enabled" : "disabled");
-@@ -1274,7 +1303,19 @@ cupsdReadConfiguration(void)
+@@ -1275,7 +1304,19 @@ cupsdReadConfiguration(void)
cupsdClearString(&Classification);
if (Classification)
/*
* Check the MaxClients setting, and then allocate memory for it...
-@@ -3832,6 +3873,18 @@ read_location(cups_file_t *fp, /* I - C
+@@ -3830,6 +3871,18 @@ read_location(cups_file_t *fp, /* I - C
return ((FatalErrors & CUPSD_FATAL_CONFIG) ? 0 : linenum);
}
/*
* 'read_policy()' - Read a <Policy name> definition.
-diff -up cups-2.2.8/scheduler/conf.h.lspp cups-2.2.8/scheduler/conf.h
---- cups-2.2.8/scheduler/conf.h.lspp 2018-06-05 18:06:54.000000000 +0200
-+++ cups-2.2.8/scheduler/conf.h 2018-06-08 17:34:38.730653578 +0200
-@@ -246,6 +246,13 @@ VAR char *ServerKeychain VALUE(NULL);
+diff -up cups-2.3.0/scheduler/conf.h.lspp cups-2.3.0/scheduler/conf.h
+--- cups-2.3.0/scheduler/conf.h.lspp 2019-08-23 17:19:38.000000000 +0200
++++ cups-2.3.0/scheduler/conf.h 2019-10-07 12:24:43.113597079 +0200
+@@ -243,6 +243,13 @@ VAR char *ServerKeychain VALUE(NULL);
/* Keychain holding cert + key */
#endif /* HAVE_SSL */
#ifdef HAVE_ONDEMAND
VAR int IdleExitTimeout VALUE(60);
/* Time after which an idle cupsd will exit */
-@@ -264,6 +271,9 @@ VAR int HaveServerCreds VALUE(0);
+@@ -261,6 +268,9 @@ VAR int HaveServerCreds VALUE(0);
VAR gss_cred_id_t ServerCreds; /* Server's GSS credentials */
#endif /* HAVE_GSSAPI */
/*
* Prototypes...
-diff -up cups-2.2.8/scheduler/cupsd.h.lspp cups-2.2.8/scheduler/cupsd.h
---- cups-2.2.8/scheduler/cupsd.h.lspp 2018-06-05 18:06:54.000000000 +0200
-+++ cups-2.2.8/scheduler/cupsd.h 2018-06-08 17:34:38.730653578 +0200
-@@ -11,6 +11,8 @@
- * file is missing or damaged, see the license at "http://www.cups.org/".
+diff -up cups-2.3.0/scheduler/cupsd.h.lspp cups-2.3.0/scheduler/cupsd.h
+--- cups-2.3.0/scheduler/cupsd.h.lspp 2019-08-23 17:19:38.000000000 +0200
++++ cups-2.3.0/scheduler/cupsd.h 2019-10-07 12:31:38.458480578 +0200
+@@ -8,6 +8,8 @@
+ * information.
*/
+/* Copyright (C) 2005 Trusted Computer Solutions, Inc. */
/*
* Include necessary headers.
-@@ -36,13 +38,20 @@
+@@ -33,6 +35,14 @@
# include <unistd.h>
- #endif /* WIN32 */
+ #endif /* _WIN32 */
+#include "config.h"
+#ifdef WITH_LSPP
#include "mime.h"
#if defined(HAVE_CDSASSL)
- # include <CoreFoundation/CoreFoundation.h>
- #endif /* HAVE_CDSASSL */
-
--
- /*
- * Some OS's don't have hstrerror(), most notably Solaris...
- */
-diff -up cups-2.2.8/scheduler/ipp.c.lspp cups-2.2.8/scheduler/ipp.c
---- cups-2.2.8/scheduler/ipp.c.lspp 2018-06-08 17:34:38.652654197 +0200
-+++ cups-2.2.8/scheduler/ipp.c 2018-06-08 17:37:19.166378937 +0200
-@@ -14,6 +14,9 @@
- * missing or damaged, see the license at "http://www.cups.org/".
+diff -up cups-2.3.0/scheduler/ipp.c.lspp cups-2.3.0/scheduler/ipp.c
+--- cups-2.3.0/scheduler/ipp.c.lspp 2019-10-07 12:24:43.016597764 +0200
++++ cups-2.3.0/scheduler/ipp.c 2019-10-07 12:31:01.243798920 +0200
+@@ -11,6 +11,9 @@
+ * information.
*/
+/* Copyright (C) 2005 Trusted Computer Solutions, Inc. */
/*
* Include necessary headers...
*/
-@@ -37,6 +40,14 @@ extern int mbr_check_membership_by_id(uu
- # endif /* HAVE_MEMBERSHIPPRIV_H */
+@@ -27,6 +30,14 @@ extern int mbr_group_name_to_uuid(const
+ extern int mbr_check_membership_by_id(uuid_t user, gid_t group, int* ismember);
#endif /* __APPLE__ */
+#ifdef WITH_LSPP
/*
* Local functions...
-@@ -61,6 +72,9 @@ static void cancel_all_jobs(cupsd_client
+@@ -51,6 +62,9 @@ static void cancel_all_jobs(cupsd_client
static void cancel_job(cupsd_client_t *con, ipp_attribute_t *uri);
static void cancel_subscription(cupsd_client_t *con, int id);
static int check_rss_recipient(const char *recipient);
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,
-@@ -1250,6 +1264,21 @@ add_job(cupsd_client_t *con, /* I - Cl
+@@ -1240,6 +1254,21 @@ add_job(cupsd_client_t *con, /* I - Cl
"time-at-creation",
"time-at-processing"
};
cupsdLogMessage(CUPSD_LOG_DEBUG2, "add_job(%p[%d], %p(%s), %p(%s/%s))",
-@@ -1578,6 +1607,106 @@ add_job(cupsd_client_t *con, /* I - Cl
+@@ -1568,6 +1597,106 @@ add_job(cupsd_client_t *con, /* I - Cl
attr = ippFindAttribute(con->request, "requesting-user-name", IPP_TAG_NAME);
if ((job = cupsdAddJob(priority, printer->name)) == NULL)
{
send_ipp_status(con, IPP_INTERNAL_ERROR,
-@@ -1586,6 +1715,32 @@ add_job(cupsd_client_t *con, /* I - Cl
+@@ -1576,6 +1705,32 @@ add_job(cupsd_client_t *con, /* I - Cl
return (NULL);
}
job->dtype = printer->type & (CUPS_PRINTER_CLASS | CUPS_PRINTER_REMOTE);
job->attrs = con->request;
job->dirty = 1;
-@@ -1773,6 +1928,29 @@ add_job(cupsd_client_t *con, /* I - Cl
+@@ -1763,6 +1918,29 @@ add_job(cupsd_client_t *con, /* I - Cl
ippSetString(job->attrs, &attr, 0, printer->job_sheets[0]);
ippSetString(job->attrs, &attr, 1, printer->job_sheets[1]);
}
job->job_sheets = attr;
-@@ -1803,6 +1981,9 @@ add_job(cupsd_client_t *con, /* I - Cl
+@@ -1793,6 +1971,9 @@ add_job(cupsd_client_t *con, /* I - Cl
"job-sheets=\"%s,none\", "
"job-originating-user-name=\"%s\"",
Classification, job->username);
}
else if (attr->num_values == 2 &&
strcmp(attr->values[0].string.text,
-@@ -1821,6 +2002,9 @@ add_job(cupsd_client_t *con, /* I - Cl
+@@ -1811,6 +1992,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);
}
else if (strcmp(attr->values[0].string.text, Classification) &&
strcmp(attr->values[0].string.text, "none") &&
-@@ -1841,6 +2025,9 @@ add_job(cupsd_client_t *con, /* I - Cl
+@@ -1831,6 +2015,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);
}
}
else if (strcmp(attr->values[0].string.text, Classification) &&
-@@ -1881,8 +2068,52 @@ add_job(cupsd_client_t *con, /* I - Cl
+@@ -1871,8 +2058,52 @@ add_job(cupsd_client_t *con, /* I - Cl
"job-sheets=\"%s\", "
"job-originating-user-name=\"%s\"",
Classification, job->username);
/*
* See if we need to add the starting sheet...
-@@ -3656,6 +3887,128 @@ check_rss_recipient(
+@@ -3648,6 +3879,128 @@ check_rss_recipient(
}
/*
* 'check_quotas()' - Check quotas for a printer and user.
*/
-@@ -4112,6 +4465,15 @@ copy_banner(cupsd_client_t *con, /* I -
+@@ -4103,6 +4456,15 @@ copy_banner(cupsd_client_t *con, /* I -
char attrname[255], /* Name of attribute */
*s; /* Pointer into name */
ipp_attribute_t *attr; /* Attribute */
cupsdLogMessage(CUPSD_LOG_DEBUG2,
-@@ -4147,6 +4509,85 @@ copy_banner(cupsd_client_t *con, /* I -
+@@ -4138,6 +4500,85 @@ copy_banner(cupsd_client_t *con, /* I -
fchmod(cupsFileNumber(out), 0640);
fchown(cupsFileNumber(out), RunUser, Group);
/*
* Try the localized banner file under the subdirectory...
-@@ -4241,6 +4682,24 @@ copy_banner(cupsd_client_t *con, /* I -
+@@ -4232,6 +4673,24 @@ copy_banner(cupsd_client_t *con, /* I -
else
s = attrname;
if (!strcmp(s, "printer-name"))
{
cupsFilePuts(out, job->dest);
-@@ -6480,6 +6939,22 @@ get_job_attrs(cupsd_client_t *con, /* I
+@@ -6439,6 +6898,22 @@ get_job_attrs(cupsd_client_t *con, /* I
exclude = cupsdGetPrivateAttrs(policy, con, printer, job->username);
/*
* Copy attributes...
*/
-@@ -6877,6 +7352,11 @@ get_jobs(cupsd_client_t *con, /* I - C
+@@ -6836,6 +7311,11 @@ get_jobs(cupsd_client_t *con, /* I - C
if (username[0] && _cups_strcasecmp(username, job->username))
continue;
if (count > 0)
ippAddSeparator(con->response);
-@@ -11475,6 +11955,11 @@ validate_user(cupsd_job_t *job, /* I
+@@ -11445,6 +11925,11 @@ validate_user(cupsd_job_t *job, /* I
strlcpy(username, get_username(con), userlen);
/*
* Check the username against the owner...
*/
-diff -up cups-2.2.8/scheduler/job.c.lspp cups-2.2.8/scheduler/job.c
---- cups-2.2.8/scheduler/job.c.lspp 2018-06-08 17:34:38.657654158 +0200
-+++ cups-2.2.8/scheduler/job.c 2018-06-08 17:34:38.733653554 +0200
-@@ -11,6 +11,9 @@
- * missing or damaged, see the license at "http://www.cups.org/".
+diff -up cups-2.3.0/scheduler/job.c.lspp cups-2.3.0/scheduler/job.c
+--- cups-2.3.0/scheduler/job.c.lspp 2019-10-07 12:24:43.024597707 +0200
++++ cups-2.3.0/scheduler/job.c 2019-10-07 12:30:13.092210820 +0200
+@@ -8,6 +8,9 @@
+ * information.
*/
+/* Copyright (C) 2005 Trusted Computer Solutions, Inc. */
/*
* Include necessary headers...
*/
-@@ -26,6 +29,14 @@
+@@ -23,6 +26,14 @@
# endif /* HAVE_IOKIT_PWR_MGT_IOPMLIBPRIVATE_H */
#endif /* __APPLE__ */
/*
* Design Notes for Job Management
-@@ -547,6 +558,14 @@ cupsdContinueJob(cupsd_job_t *job) /* I
+@@ -544,6 +555,14 @@ cupsdContinueJob(cupsd_job_t *job) /* I
/* PRINTER_STATE_REASONS env var */
rip_max_cache[255];
/* RIP_MAX_CACHE env variable */
cupsdLogMessage(CUPSD_LOG_DEBUG2,
-@@ -1083,6 +1102,67 @@ cupsdContinueJob(cupsd_job_t *job) /* I
+@@ -1080,6 +1099,67 @@ cupsdContinueJob(cupsd_job_t *job) /* I
if (final_content_type[0])
envp[envc ++] = final_content_type;
if (Classification && !banner_page)
{
if ((attr = ippFindAttribute(job->attrs, "job-sheets",
-@@ -1862,6 +1942,22 @@ cupsdLoadJob(cupsd_job_t *job) /* I - J
+@@ -1858,6 +1938,22 @@ cupsdLoadJob(cupsd_job_t *job) /* I - J
ippSetString(job->attrs, &job->reasons, 0, "none");
}
job->impressions = ippFindAttribute(job->attrs, "job-impressions-completed", IPP_TAG_INTEGER);
job->sheets = ippFindAttribute(job->attrs, "job-media-sheets-completed", IPP_TAG_INTEGER);
job->job_sheets = ippFindAttribute(job->attrs, "job-sheets", IPP_TAG_NAME);
-@@ -2275,6 +2371,14 @@ cupsdSaveJob(cupsd_job_t *job) /* I - J
+@@ -2273,6 +2369,14 @@ cupsdSaveJob(cupsd_job_t *job) /* I - J
{
char filename[1024]; /* Job control filename */
cups_file_t *fp; /* Job file */
cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdSaveJob(job=%p(%d)): job->attrs=%p",
-@@ -2297,6 +2401,78 @@ cupsdSaveJob(cupsd_job_t *job) /* I - J
+@@ -2295,6 +2399,78 @@ cupsdSaveJob(cupsd_job_t *job) /* I - J
fchown(cupsFileNumber(fp), RunUser, Group);
job->attrs->state = IPP_IDLE;
if (ippWriteIO(fp, (ipp_iocb_t)cupsFileWrite, 1, NULL,
-@@ -3943,6 +4119,19 @@ get_options(cupsd_job_t *job, /* I - Jo
+@@ -3995,6 +4171,19 @@ get_options(cupsd_job_t *job, /* I - Jo
banner_page)
continue;
/*
* Otherwise add them to the list...
*/
-@@ -4704,6 +4893,18 @@ start_job(cupsd_job_t *job, /* I -
+@@ -4805,6 +4994,18 @@ start_job(cupsd_job_t *job, /* I -
cupsd_printer_t *printer) /* I - Printer to print job */
{
const char *filename; /* Support filename */
ipp_attribute_t *cancel_after = ippFindAttribute(job->attrs,
"job-cancel-after",
IPP_TAG_INTEGER);
-@@ -4892,6 +5093,113 @@ start_job(cupsd_job_t *job, /* I -
+@@ -4993,6 +5194,113 @@ start_job(cupsd_job_t *job, /* I -
fcntl(job->side_pipes[1], F_SETFD,
fcntl(job->side_pipes[1], F_GETFD) | FD_CLOEXEC);
/*
* Now start the first file in the job...
*/
-diff -up cups-2.2.8/scheduler/job.h.lspp cups-2.2.8/scheduler/job.h
---- cups-2.2.8/scheduler/job.h.lspp 2018-06-05 18:06:54.000000000 +0200
-+++ cups-2.2.8/scheduler/job.h 2018-06-08 17:34:38.733653554 +0200
-@@ -11,6 +11,13 @@
- * missing or damaged, see the license at "http://www.cups.org/".
+diff -up cups-2.3.0/scheduler/job.h.lspp cups-2.3.0/scheduler/job.h
+--- cups-2.3.0/scheduler/job.h.lspp 2019-08-23 17:19:38.000000000 +0200
++++ cups-2.3.0/scheduler/job.h 2019-10-07 12:29:54.364371023 +0200
+@@ -7,6 +7,13 @@
+ * Licensed under Apache License v2.0. See the file "LICENSE" for more information.
*/
+/* Copyright (C) 2005 Trusted Computer Solutions, Inc. */
/*
* Constants...
*/
-@@ -88,6 +95,10 @@ struct cupsd_job_s /**** Job request *
+@@ -84,6 +91,10 @@ struct cupsd_job_s /**** Job request *
int progress; /* Printing progress */
int num_keywords; /* Number of PPD keywords */
cups_option_t *keywords; /* PPD keywords */
};
typedef struct cupsd_joblog_s /**** Job log message ****/
-diff -up cups-2.2.8/scheduler/main.c.lspp cups-2.2.8/scheduler/main.c
---- cups-2.2.8/scheduler/main.c.lspp 2018-06-08 17:34:38.663654110 +0200
-+++ cups-2.2.8/scheduler/main.c 2018-06-08 17:34:38.734653546 +0200
-@@ -56,6 +56,9 @@
+diff -up cups-2.3.0/scheduler/main.c.lspp cups-2.3.0/scheduler/main.c
+--- cups-2.3.0/scheduler/main.c.lspp 2019-10-07 12:24:43.037597616 +0200
++++ cups-2.3.0/scheduler/main.c 2019-10-07 12:24:43.119597037 +0200
+@@ -57,6 +57,9 @@
# include <sys/param.h>
#endif /* HAVE_SYS_PARAM_H */
/*
* Local functions...
-@@ -122,6 +125,9 @@ main(int argc, /* I - Number of comm
+@@ -123,6 +126,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 */
/*
* Let the system know we are busy while we bring up cupsd...
*/
-@@ -1188,6 +1213,11 @@ main(int argc, /* I - Number of comm
+@@ -1201,6 +1226,11 @@ main(int argc, /* I - Number of comm
cupsdStopSelect();
return (!stop_scheduler);
}
-diff -up cups-2.2.8/scheduler/printers.c.lspp cups-2.2.8/scheduler/printers.c
---- cups-2.2.8/scheduler/printers.c.lspp 2018-06-05 18:06:54.000000000 +0200
-+++ cups-2.2.8/scheduler/printers.c 2018-06-08 17:34:38.734653546 +0200
-@@ -11,6 +11,8 @@
- * missing or damaged, see the license at "http://www.cups.org/".
+diff -up cups-2.3.0/scheduler/printers.c.lspp cups-2.3.0/scheduler/printers.c
+--- cups-2.3.0/scheduler/printers.c.lspp 2019-08-23 17:19:38.000000000 +0200
++++ cups-2.3.0/scheduler/printers.c 2019-10-07 12:29:17.956658129 +0200
+@@ -8,6 +8,8 @@
+ * information.
*/
+/* (c) Copyright 2005-2006 Hewlett-Packard Development Company, L.P. */
/*
* Include necessary headers...
*/
-@@ -35,6 +37,10 @@
+@@ -32,6 +34,10 @@
# include <asl.h>
#endif /* __APPLE__ */
/*
* Local functions...
-@@ -2202,6 +2208,13 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)
+@@ -2252,6 +2258,13 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)
ipp_attribute_t *attr; /* Attribute data */
char *name, /* Current user/group name */
*filter; /* Current filter */
+#endif /* WITH_LSPP */
- DEBUG_printf(("cupsdSetPrinterAttrs: entering name = %s, type = %x\n", p->name,
-@@ -2329,6 +2342,45 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)
+ /*
+@@ -2378,6 +2391,45 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)
attr->values[1].string.text = _cupsStrAlloc(Classification ?
Classification : p->job_sheets[1]);
}