From 6fc547202cf4722605c0c5f117fa096e94f008b8 Mon Sep 17 00:00:00 2001 From: Jiri Popelka Date: Wed, 8 Jan 2014 18:53:40 +0100 Subject: [PATCH] 1.7.1 --- .gitignore | 1 + cups-dbus-notifier.patch | 104 ------------ cups-gz-crc.patch | 14 -- cups-jobhistory.patch | 20 --- cups-journal.patch | 262 ----------------------------- cups-lspp.patch | 240 ++++++++++++-------------- cups-str4326.patch | 21 --- cups-str4327.patch | 30 ---- cups-stringpool-rdar15382819.patch | 93 ---------- cups-usb-timeout.patch | 30 ---- cups.spec | 52 ++---- sources | 2 +- 12 files changed, 131 insertions(+), 738 deletions(-) delete mode 100644 cups-dbus-notifier.patch delete mode 100644 cups-gz-crc.patch delete mode 100644 cups-jobhistory.patch delete mode 100644 cups-str4326.patch delete mode 100644 cups-str4327.patch delete mode 100644 cups-stringpool-rdar15382819.patch delete mode 100644 cups-usb-timeout.patch diff --git a/.gitignore b/.gitignore index 6b2a22e..936c971 100644 --- a/.gitignore +++ b/.gitignore @@ -57,3 +57,4 @@ cups-1.4.4-source.tar.bz2 /cups-1.7b1-source.tar.bz2 /cups-1.7rc1-source.tar.bz2 /cups-1.7.0-source.tar.bz2 +/cups-1.7.1-source.tar.bz2 diff --git a/cups-dbus-notifier.patch b/cups-dbus-notifier.patch deleted file mode 100644 index 82d417a..0000000 --- a/cups-dbus-notifier.patch +++ /dev/null @@ -1,104 +0,0 @@ -diff -up cups-1.7.0/notifier/dbus.c.dbus-notifier cups-1.7.0/notifier/dbus.c ---- cups-1.7.0/notifier/dbus.c.dbus-notifier 2012-10-01 04:01:10.000000000 +0100 -+++ cups-1.7.0/notifier/dbus.c 2014-01-07 14:57:59.563591055 +0000 -@@ -4,7 +4,7 @@ - * D-Bus notifier for CUPS. - * - * Copyright 2008-2012 by Apple Inc. -- * Copyright (C) 2011 Red Hat, Inc. -+ * Copyright (C) 2011, 2013 Red Hat, Inc. - * Copyright (C) 2007 Tim Waugh - * Copyright 1997-2005 by Easy Software Products. - * -@@ -154,9 +154,16 @@ enum - - - /* -+ * Global variables... -+ */ -+ -+static char lock_filename[1024]; /* Lock filename */ -+ -+/* - * Local functions... - */ - -+static void release_lock(void); - static int acquire_lock(int *fd, char *lockfile, size_t locksize); - - -@@ -176,8 +183,6 @@ main(int argc, /* I - Number of comm - DBusMessage *message; /* Message to send */ - DBusMessageIter iter; /* Iterator for message data */ - int lock_fd = -1; /* Lock file descriptor */ -- char lock_filename[1024]; -- /* Lock filename */ - - - /* -@@ -578,7 +583,7 @@ main(int argc, /* I - Number of comm - if (lock_fd >= 0) - { - close(lock_fd); -- unlink(lock_filename); -+ release_lock(); - } - - return (0); -@@ -586,6 +591,27 @@ main(int argc, /* I - Number of comm - - - /* -+ * 'release_lock()' - Release the singleton lock. -+ */ -+ -+static void -+release_lock(void) -+{ -+ unlink(lock_filename); -+} -+ -+ -+/* -+ * 'handle_sigterm()' - Handle SIGTERM signal. -+ */ -+static void -+handle_sigterm(int signum) -+{ -+ release_lock(); -+ _exit (0); -+} -+ -+/* - * 'acquire_lock()' - Acquire a lock so we only have a single notifier running. - */ - -@@ -594,7 +620,8 @@ acquire_lock(int *fd, /* O - Lock fi - char *lockfile, /* I - Lock filename buffer */ - size_t locksize) /* I - Size of filename buffer */ - { -- const char *tmpdir; /* Temporary directory */ -+ const char *tmpdir; /* Temporary directory */ -+ struct sigaction action; /* POSIX sigaction data */ - - - /* -@@ -612,8 +639,16 @@ acquire_lock(int *fd, /* O - Lock fi - - if ((*fd = open(lockfile, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR)) < 0) - return (-1); -- else -- return (0); -+ -+ /* -+ * Set a SIGTERM handler to make sure we release the lock if the -+ * scheduler decides to stop us. -+ */ -+ memset(&action, 0, sizeof(action)); -+ action.sa_handler = handle_sigterm; -+ sigaction(SIGTERM, &action, NULL); -+ -+ return (0); - } - #else /* !HAVE_DBUS */ - int diff --git a/cups-gz-crc.patch b/cups-gz-crc.patch deleted file mode 100644 index 699e5e4..0000000 --- a/cups-gz-crc.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -up cups-1.6.2/cups/file.c.gz-crc cups-1.6.2/cups/file.c ---- cups-1.6.2/cups/file.c.gz-crc 2013-07-11 12:06:49.920878639 +0100 -+++ cups-1.6.2/cups/file.c 2013-07-11 12:13:41.169628104 +0100 -@@ -2429,8 +2429,8 @@ cups_fill(cups_file_t *fp) /* I - CUPS - } - else - { -- tcrc = (((((trailer[3] << 8) | trailer[2]) << 8) | trailer[1]) << 8) | -- trailer[0]; -+ tcrc = (((uLong) ((trailer[3] << 8) | trailer[2])) << 16) | -+ (uLong) ((trailer[1] << 8) | trailer[0]); - - if (tcrc != fp->crc) - { diff --git a/cups-jobhistory.patch b/cups-jobhistory.patch deleted file mode 100644 index 391120d..0000000 --- a/cups-jobhistory.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff -up cups-1.7.0/scheduler/log.c.jobhistory cups-1.7.0/scheduler/log.c ---- cups-1.7.0/scheduler/log.c.jobhistory 2013-10-28 16:30:39.852015304 +0000 -+++ cups-1.7.0/scheduler/log.c 2013-10-28 16:30:48.502057711 +0000 -@@ -525,12 +525,13 @@ cupsdLogJob(cupsd_job_t *job, /* I - Jo - */ - - cupsd_joblog_t *temp; /* Copy of log message */ -+ size_t log_len = strlen(log_line); -+ /* Length of log message */ - -- -- if ((temp = malloc(sizeof(cupsd_joblog_t) + strlen(log_line))) != NULL) -+ if ((temp = malloc(sizeof(cupsd_joblog_t) + log_len)) != NULL) - { - temp->time = time(NULL); -- strlcpy(temp->message, log_line, sizeof(temp->message)); -+ memcpy(temp->message, log_line, log_len + 1); - } - - if (!job->history) diff --git a/cups-journal.patch b/cups-journal.patch index 0601269..aa6bb41 100644 --- a/cups-journal.patch +++ b/cups-journal.patch @@ -119,268 +119,6 @@ diff -up cups-1.7.0/scheduler/conf.h.journal cups-1.7.0/scheduler/conf.h extern int cupsdWriteErrorLog(int level, const char *message); -diff -up cups-1.7.0/scheduler/job.c.journal cups-1.7.0/scheduler/job.c ---- cups-1.7.0/scheduler/job.c.journal 2013-10-24 16:35:59.144969239 +0100 -+++ cups-1.7.0/scheduler/job.c 2013-10-24 16:35:59.178969392 +0100 -@@ -312,8 +312,7 @@ cupsdCheckJobs(void) - - if (job->kill_time && job->kill_time <= curtime) - { -- cupsdLogMessage(CUPSD_LOG_ERROR, "[Job %d] Stopping unresponsive job.", -- job->id); -+ cupsdLogJob(job, CUPSD_LOG_ERROR, "Stopping unresponsive job."); - - stop_job(job, CUPSD_JOB_FORCE); - continue; -@@ -1699,7 +1698,7 @@ cupsdLoadJob(cupsd_job_t *job) /* I - J - * Load job attributes... - */ - -- cupsdLogMessage(CUPSD_LOG_DEBUG, "[Job %d] Loading attributes...", job->id); -+ cupsdLogJob(job, CUPSD_LOG_DEBUG, "Loading attributes..."); - - snprintf(jobfile, sizeof(jobfile), "%s/c%05d", RequestRoot, job->id); - if ((fp = cupsdOpenConfFile(jobfile)) == NULL) -@@ -1707,9 +1706,8 @@ cupsdLoadJob(cupsd_job_t *job) /* I - J - - if (ippReadIO(fp, (ipp_iocb_t)cupsFileRead, 1, NULL, job->attrs) != IPP_DATA) - { -- cupsdLogMessage(CUPSD_LOG_ERROR, -- "[Job %d] Unable to read job control file \"%s\".", job->id, -- jobfile); -+ cupsdLogJob(job, CUPSD_LOG_ERROR, -+ "Unable to read job control file \"%s\".", jobfile); - cupsFileClose(fp); - goto error; - } -@@ -1722,18 +1720,16 @@ cupsdLoadJob(cupsd_job_t *job) /* I - J - - if (!ippFindAttribute(job->attrs, "time-at-creation", IPP_TAG_INTEGER)) - { -- cupsdLogMessage(CUPSD_LOG_ERROR, -- "[Job %d] Missing or bad time-at-creation attribute in " -- "control file.", job->id); -+ cupsdLogJob(job, CUPSD_LOG_ERROR, -+ "Missing or bad time-at-creation attribute in control file."); - goto error; - } - - if ((job->state = ippFindAttribute(job->attrs, "job-state", - IPP_TAG_ENUM)) == NULL) - { -- cupsdLogMessage(CUPSD_LOG_ERROR, -- "[Job %d] Missing or bad job-state attribute in control " -- "file.", job->id); -+ cupsdLogJob(job, CUPSD_LOG_ERROR, -+ "Missing or bad job-state attribute in control file."); - goto error; - } - -@@ -1773,18 +1769,17 @@ cupsdLoadJob(cupsd_job_t *job) /* I - J - if ((attr = ippFindAttribute(job->attrs, "job-printer-uri", - IPP_TAG_URI)) == NULL) - { -- cupsdLogMessage(CUPSD_LOG_ERROR, -- "[Job %d] No job-printer-uri attribute in control file.", -- job->id); -+ cupsdLogJob(job, CUPSD_LOG_ERROR, -+ "No job-printer-uri attribute in control file."); - goto error; - } - - if ((dest = cupsdValidateDest(attr->values[0].string.text, &(job->dtype), - &destptr)) == NULL) - { -- cupsdLogMessage(CUPSD_LOG_ERROR, -- "[Job %d] Unable to queue job for destination \"%s\".", -- job->id, attr->values[0].string.text); -+ cupsdLogJob(job, CUPSD_LOG_ERROR, -+ "Unable to queue job for destination \"%s\".", -+ attr->values[0].string.text); - goto error; - } - -@@ -1792,9 +1787,9 @@ cupsdLoadJob(cupsd_job_t *job) /* I - J - } - else if ((destptr = cupsdFindDest(job->dest)) == NULL) - { -- cupsdLogMessage(CUPSD_LOG_ERROR, -- "[Job %d] Unable to queue job for destination \"%s\".", -- job->id, job->dest); -+ cupsdLogJob(job, CUPSD_LOG_ERROR, -+ "Unable to queue job for destination \"%s\".", -+ job->dest); - goto error; - } - -@@ -1803,9 +1798,8 @@ cupsdLoadJob(cupsd_job_t *job) /* I - J - { - const char *reason; /* job-state-reason keyword */ - -- cupsdLogMessage(CUPSD_LOG_DEBUG, -- "[Job %d] Adding missing job-state-reasons attribute to " -- " control file.", job->id); -+ cupsdLogJob(job, CUPSD_LOG_DEBUG, -+ "Adding missing job-state-reasons attribute to control file."); - - switch (job->state_value) - { -@@ -1870,9 +1864,8 @@ cupsdLoadJob(cupsd_job_t *job) /* I - J - if ((attr = ippFindAttribute(job->attrs, "job-priority", - IPP_TAG_INTEGER)) == NULL) - { -- cupsdLogMessage(CUPSD_LOG_ERROR, -- "[Job %d] Missing or bad job-priority attribute in " -- "control file.", job->id); -+ cupsdLogJob(job, CUPSD_LOG_ERROR, -+ "Missing or bad job-priority attribute in control file."); - goto error; - } - -@@ -1884,9 +1877,9 @@ cupsdLoadJob(cupsd_job_t *job) /* I - J - if ((attr = ippFindAttribute(job->attrs, "job-originating-user-name", - IPP_TAG_NAME)) == NULL) - { -- cupsdLogMessage(CUPSD_LOG_ERROR, -- "[Job %d] Missing or bad job-originating-user-name " -- "attribute in control file.", job->id); -+ cupsdLogJob(job, CUPSD_LOG_ERROR, -+ "Missing or bad job-originating-user-name " -+ "attribute in control file."); - goto error; - } - -@@ -1931,9 +1924,8 @@ cupsdLoadJob(cupsd_job_t *job) /* I - J - if (access(jobfile, 0)) - break; - -- cupsdLogMessage(CUPSD_LOG_DEBUG, -- "[Job %d] Auto-typing document file \"%s\"...", job->id, -- jobfile); -+ cupsdLogJob(job, CUPSD_LOG_DEBUG, -+ "Auto-typing document file \"%s\"...", jobfile); - - if (fileid > job->num_files) - { -@@ -1959,9 +1951,8 @@ cupsdLoadJob(cupsd_job_t *job) /* I - J - - if (!compressions || !filetypes) - { -- cupsdLogMessage(CUPSD_LOG_ERROR, -- "[Job %d] Ran out of memory for job file types.", -- job->id); -+ cupsdLogJob(job, CUPSD_LOG_ERROR, -+ "Ran out of memory for job file types."); - - ippDelete(job->attrs); - job->attrs = NULL; -@@ -2269,8 +2260,7 @@ cupsdSaveJob(cupsd_job_t *job) /* I - J - if (ippWriteIO(fp, (ipp_iocb_t)cupsFileWrite, 1, NULL, - job->attrs) != IPP_DATA) - { -- cupsdLogMessage(CUPSD_LOG_ERROR, -- "[Job %d] Unable to write job control file.", job->id); -+ cupsdLogJob(job, CUPSD_LOG_ERROR, "Unable to write job control file."); - cupsFileClose(fp); - return; - } -@@ -2947,15 +2937,15 @@ dump_job_history(cupsd_job_t *job) /* I - snprintf(temp, sizeof(temp), - "[Job %d] The following messages were recorded from %s to %s", - job->id, start, end); -- cupsdWriteErrorLog(CUPSD_LOG_DEBUG, temp); -+ cupsdWriteErrorLogJob(job, CUPSD_LOG_DEBUG, temp); - - for (message = (cupsd_joblog_t *)cupsArrayFirst(job->history); - message; - message = (cupsd_joblog_t *)cupsArrayNext(job->history)) -- cupsdWriteErrorLog(CUPSD_LOG_DEBUG, message->message); -+ cupsdWriteErrorLogJob(job, CUPSD_LOG_DEBUG, message->message); - - snprintf(temp, sizeof(temp), "[Job %d] End of messages", job->id); -- cupsdWriteErrorLog(CUPSD_LOG_DEBUG, temp); -+ cupsdWriteErrorLogJob(job, CUPSD_LOG_DEBUG, temp); - - /* - * Log the printer state values... -@@ -2971,11 +2961,11 @@ dump_job_history(cupsd_job_t *job) /* I - printer->state == IPP_PRINTER_IDLE ? "idle" : - printer->state == IPP_PRINTER_PROCESSING ? "processing" : - "stopped"); -- cupsdWriteErrorLog(CUPSD_LOG_DEBUG, temp); -+ cupsdWriteErrorLogJob(job, CUPSD_LOG_DEBUG, temp); - - snprintf(temp, sizeof(temp), "[Job %d] printer-state-message=\"%s\"", - job->id, printer->state_message); -- cupsdWriteErrorLog(CUPSD_LOG_DEBUG, temp); -+ cupsdWriteErrorLogJob(job, CUPSD_LOG_DEBUG, temp); - - snprintf(temp, sizeof(temp), "[Job %d] printer-state-reasons=", job->id); - ptr = temp + strlen(temp); -@@ -2994,7 +2984,7 @@ dump_job_history(cupsd_job_t *job) /* I - ptr += strlen(ptr); - } - } -- cupsdWriteErrorLog(CUPSD_LOG_DEBUG, temp); -+ cupsdWriteErrorLogJob(job, CUPSD_LOG_DEBUG, temp); - } - - /* -@@ -4135,8 +4125,7 @@ load_job_cache(const char *filename) /* - job->status_pipes[0] = -1; - job->status_pipes[1] = -1; - -- cupsdLogMessage(CUPSD_LOG_DEBUG, "[Job %d] Loading from cache...", -- job->id); -+ cupsdLogJob(job, CUPSD_LOG_DEBUG, "Loading from cache..."); - } - else if (!job) - { -@@ -4205,8 +4194,7 @@ load_job_cache(const char *filename) /* - job->id); - if (access(jobfile, 0)) - { -- cupsdLogMessage(CUPSD_LOG_INFO, "[Job %d] Data files have gone away.", -- job->id); -+ cupsdLogJob(job, CUPSD_LOG_INFO, "Data files have gone away."); - job->num_files = 0; - continue; - } -@@ -4216,9 +4204,9 @@ load_job_cache(const char *filename) /* - - if (!job->filetypes || !job->compressions) - { -- cupsdLogMessage(CUPSD_LOG_EMERG, -- "[Job %d] Unable to allocate memory for %d files.", -- job->id, job->num_files); -+ cupsdLogJob(job, CUPSD_LOG_EMERG, -+ "Unable to allocate memory for %d files.", -+ job->num_files); - break; - } - } -@@ -4256,9 +4244,9 @@ load_job_cache(const char *filename) /* - * If the original MIME type is unknown, auto-type it! - */ - -- cupsdLogMessage(CUPSD_LOG_ERROR, -- "[Job %d] Unknown MIME type %s/%s for file %d.", -- job->id, super, type, number + 1); -+ cupsdLogJob(job, CUPSD_LOG_ERROR, -+ "Unknown MIME type %s/%s for file %d.", -+ super, type, number + 1); - - snprintf(jobfile, sizeof(jobfile), "%s/d%05d-%03d", RequestRoot, - job->id, number + 1); -@@ -4770,7 +4758,7 @@ unload_job(cupsd_job_t *job) /* I - Job - if (!job->attrs) - return; - -- cupsdLogMessage(CUPSD_LOG_DEBUG, "[Job %d] Unloading...", job->id); -+ cupsdLogJob(job, CUPSD_LOG_DEBUG, "Unloading..."); - - ippDelete(job->attrs); - diff -up cups-1.7.0/scheduler/log.c.journal cups-1.7.0/scheduler/log.c --- cups-1.7.0/scheduler/log.c.journal 2013-10-24 16:35:59.083968963 +0100 +++ cups-1.7.0/scheduler/log.c 2013-10-24 16:38:02.352526508 +0100 diff --git a/cups-lspp.patch b/cups-lspp.patch index 2c880ce..1ffb6a2 100644 --- a/cups-lspp.patch +++ b/cups-lspp.patch @@ -1,18 +1,23 @@ -diff -up cups-1.7.0/Makedefs.in.lspp cups-1.7.0/Makedefs.in ---- cups-1.7.0/Makedefs.in.lspp 2013-10-24 15:54:45.867523689 +0100 -+++ cups-1.7.0/Makedefs.in 2013-10-24 15:54:45.901523836 +0100 -@@ -148,7 +148,7 @@ LDFLAGS = -L../cgi-bin -L../cups -L../f - @LDFLAGS@ @RELROFLAGS@ @PIEFLAGS@ $(OPTIM) - LINKCUPS = @LINKCUPS@ $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(LIBZ) - LINKCUPSIMAGE = @LINKCUPSIMAGE@ --LIBS = $(LINKCUPS) $(COMMONLIBS) -+LIBS = $(LINKCUPS) $(COMMONLIBS) @LIBAUDIT@ @LIBSELINUX@ - OPTIM = @OPTIM@ - OPTIONS = - PAMLIBS = @PAMLIBS@ -diff -up cups-1.7.0/config-scripts/cups-lspp.m4.lspp cups-1.7.0/config-scripts/cups-lspp.m4 ---- cups-1.7.0/config-scripts/cups-lspp.m4.lspp 2013-10-24 15:54:45.900523831 +0100 -+++ cups-1.7.0/config-scripts/cups-lspp.m4 2013-10-24 15:54:45.900523831 +0100 +diff -up cups-1.7.1/config.h.in.lspp cups-1.7.1/config.h.in +--- cups-1.7.1/config.h.in.lspp 2014-01-08 18:43:27.282821790 +0100 ++++ cups-1.7.1/config.h.in 2014-01-08 18:43:27.295821610 +0100 +@@ -717,6 +717,13 @@ static __inline int _cups_abs(int i) { r + # endif /* __GNUC__ || __STDC_VERSION__ */ + #endif /* !HAVE_ABS && !abs */ + ++/* ++ * Are we trying to meet LSPP requirements? ++ */ ++ ++#undef WITH_LSPP ++ ++ + #endif /* !_CUPS_CONFIG_H_ */ + + /* +diff -up cups-1.7.1/config-scripts/cups-lspp.m4.lspp cups-1.7.1/config-scripts/cups-lspp.m4 +--- cups-1.7.1/config-scripts/cups-lspp.m4.lspp 2014-01-08 18:43:27.295821610 +0100 ++++ cups-1.7.1/config-scripts/cups-lspp.m4 2014-01-08 18:43:27.295821610 +0100 @@ -0,0 +1,36 @@ +dnl +dnl LSPP code for the Common UNIX Printing System (CUPS). @@ -50,26 +55,9 @@ diff -up cups-1.7.0/config-scripts/cups-lspp.m4.lspp cups-1.7.0/config-scripts/c + ;; + esac +fi -diff -up cups-1.7.0/config.h.in.lspp cups-1.7.0/config.h.in ---- cups-1.7.0/config.h.in.lspp 2013-10-24 15:54:45.865523680 +0100 -+++ cups-1.7.0/config.h.in 2013-10-24 15:54:45.900523831 +0100 -@@ -710,6 +710,13 @@ static __inline int _cups_abs(int i) { r - # endif /* __GNUC__ || __STDC_VERSION__ */ - #endif /* !HAVE_ABS && !abs */ - -+/* -+ * Are we trying to meet LSPP requirements? -+ */ -+ -+#undef WITH_LSPP -+ -+ - #endif /* !_CUPS_CONFIG_H_ */ - - /* -diff -up cups-1.7.0/configure.in.lspp cups-1.7.0/configure.in ---- cups-1.7.0/configure.in.lspp 2013-10-24 15:54:45.866523684 +0100 -+++ cups-1.7.0/configure.in 2013-10-24 15:54:45.900523831 +0100 +diff -up cups-1.7.1/configure.in.lspp cups-1.7.1/configure.in +--- cups-1.7.1/configure.in.lspp 2014-01-08 18:43:27.228822537 +0100 ++++ cups-1.7.1/configure.in 2014-01-08 18:43:27.296821596 +0100 @@ -37,6 +37,8 @@ sinclude(config-scripts/cups-systemd.m4) sinclude(config-scripts/cups-defaults.m4) sinclude(config-scripts/cups-scripting.m4) @@ -79,9 +67,9 @@ diff -up cups-1.7.0/configure.in.lspp cups-1.7.0/configure.in INSTALL_LANGUAGES="" UNINSTALL_LANGUAGES="" LANGFILES="" -diff -up cups-1.7.0/filter/common.c.lspp cups-1.7.0/filter/common.c ---- cups-1.7.0/filter/common.c.lspp 2013-05-29 12:51:34.000000000 +0100 -+++ cups-1.7.0/filter/common.c 2013-10-24 15:54:45.900523831 +0100 +diff -up cups-1.7.1/filter/common.c.lspp cups-1.7.1/filter/common.c +--- cups-1.7.1/filter/common.c.lspp 2013-05-29 13:51:34.000000000 +0200 ++++ cups-1.7.1/filter/common.c 2014-01-08 18:43:27.296821596 +0100 @@ -30,6 +30,12 @@ * Include necessary headers... */ @@ -250,9 +238,9 @@ diff -up cups-1.7.0/filter/common.c.lspp cups-1.7.0/filter/common.c /* -diff -up cups-1.7.0/filter/pstops.c.lspp cups-1.7.0/filter/pstops.c ---- cups-1.7.0/filter/pstops.c.lspp 2013-05-29 12:51:34.000000000 +0100 -+++ cups-1.7.0/filter/pstops.c 2013-10-24 15:54:45.901523836 +0100 +diff -up cups-1.7.1/filter/pstops.c.lspp cups-1.7.1/filter/pstops.c +--- cups-1.7.1/filter/pstops.c.lspp 2013-05-29 13:51:34.000000000 +0200 ++++ cups-1.7.1/filter/pstops.c 2014-01-08 18:43:27.297821582 +0100 @@ -3203,6 +3203,18 @@ write_label_prolog(pstops_doc_t *doc, /* { const char *classification; /* CLASSIFICATION environment variable */ @@ -408,9 +396,21 @@ diff -up cups-1.7.0/filter/pstops.c.lspp cups-1.7.0/filter/pstops.c /* -diff -up cups-1.7.0/scheduler/client.c.lspp cups-1.7.0/scheduler/client.c ---- cups-1.7.0/scheduler/client.c.lspp 2013-09-27 15:09:25.000000000 +0100 -+++ cups-1.7.0/scheduler/client.c 2013-10-24 15:54:45.902523841 +0100 +diff -up cups-1.7.1/Makedefs.in.lspp cups-1.7.1/Makedefs.in +--- cups-1.7.1/Makedefs.in.lspp 2014-01-08 18:43:27.282821790 +0100 ++++ cups-1.7.1/Makedefs.in 2014-01-08 18:43:27.295821610 +0100 +@@ -149,7 +149,7 @@ LDFLAGS = -L../cgi-bin -L../cups -L../f + @LDFLAGS@ @RELROFLAGS@ @PIEFLAGS@ $(OPTIM) + LINKCUPS = @LINKCUPS@ $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(LIBZ) + LINKCUPSIMAGE = @LINKCUPSIMAGE@ +-LIBS = $(LINKCUPS) $(COMMONLIBS) ++LIBS = $(LINKCUPS) $(COMMONLIBS) @LIBAUDIT@ @LIBSELINUX@ + OPTIM = @OPTIM@ + OPTIONS = + PAMLIBS = @PAMLIBS@ +diff -up cups-1.7.1/scheduler/client.c.lspp cups-1.7.1/scheduler/client.c +--- cups-1.7.1/scheduler/client.c.lspp 2013-09-27 16:09:25.000000000 +0200 ++++ cups-1.7.1/scheduler/client.c 2014-01-08 18:43:27.298821568 +0100 @@ -41,6 +41,7 @@ * valid_host() - Is the Host: field valid? * write_file() - Send a file via HTTP. @@ -629,9 +629,9 @@ diff -up cups-1.7.0/scheduler/client.c.lspp cups-1.7.0/scheduler/client.c /* * 'pipe_command()' - Pipe the output of a command to the remote client. -diff -up cups-1.7.0/scheduler/client.h.lspp cups-1.7.0/scheduler/client.h ---- cups-1.7.0/scheduler/client.h.lspp 2013-10-24 15:54:45.867523689 +0100 -+++ cups-1.7.0/scheduler/client.h 2013-10-24 15:54:45.903523845 +0100 +diff -up cups-1.7.1/scheduler/client.h.lspp cups-1.7.1/scheduler/client.h +--- cups-1.7.1/scheduler/client.h.lspp 2014-01-08 18:43:27.231822495 +0100 ++++ cups-1.7.1/scheduler/client.h 2014-01-08 18:43:27.298821568 +0100 @@ -18,6 +18,13 @@ #endif /* HAVE_AUTHORIZATION_H */ @@ -667,18 +667,10 @@ diff -up cups-1.7.0/scheduler/client.h.lspp cups-1.7.0/scheduler/client.h #ifdef HAVE_SSL extern int cupsdEndTLS(cupsd_client_t *con); -diff -up cups-1.7.0/scheduler/conf.c.lspp cups-1.7.0/scheduler/conf.c ---- cups-1.7.0/scheduler/conf.c.lspp 2013-10-24 15:54:45.828523519 +0100 -+++ cups-1.7.0/scheduler/conf.c 2013-10-24 15:54:45.903523845 +0100 -@@ -34,6 +34,7 @@ - * read_location() - Read a definition. - * read_policy() - Read a definition. - * set_policy_defaults() - Set default policy values as needed. -+ * is_lspp_config() - Is the system configured for LSPP - */ - - /* -@@ -59,6 +60,9 @@ +diff -up cups-1.7.1/scheduler/conf.c.lspp cups-1.7.1/scheduler/conf.c +--- cups-1.7.1/scheduler/conf.c.lspp 2014-01-08 18:43:27.291821665 +0100 ++++ cups-1.7.1/scheduler/conf.c 2014-01-08 18:43:27.300821540 +0100 +@@ -36,6 +36,9 @@ # define INADDR_NONE 0xffffffff #endif /* !INADDR_NONE */ @@ -688,7 +680,7 @@ diff -up cups-1.7.0/scheduler/conf.c.lspp cups-1.7.0/scheduler/conf.c /* * Configuration variable structure... -@@ -146,6 +150,10 @@ static const cupsd_var_t cupsd_vars[] = +@@ -123,6 +126,10 @@ static const cupsd_var_t cupsd_vars[] = { "ServerName", &ServerName, CUPSD_VARTYPE_STRING }, { "StrictConformance", &StrictConformance, CUPSD_VARTYPE_BOOLEAN }, { "Timeout", &Timeout, CUPSD_VARTYPE_TIME }, @@ -699,7 +691,7 @@ diff -up cups-1.7.0/scheduler/conf.c.lspp cups-1.7.0/scheduler/conf.c { "WebInterface", &WebInterface, CUPSD_VARTYPE_BOOLEAN } }; static const cupsd_var_t cupsfiles_vars[] = -@@ -546,6 +554,9 @@ cupsdReadConfiguration(void) +@@ -523,6 +530,9 @@ cupsdReadConfiguration(void) const char *tmpdir; /* TMPDIR environment variable */ struct stat tmpinfo; /* Temporary directory info */ cupsd_policy_t *p; /* Policy */ @@ -709,7 +701,7 @@ diff -up cups-1.7.0/scheduler/conf.c.lspp cups-1.7.0/scheduler/conf.c /* -@@ -852,6 +863,25 @@ cupsdReadConfiguration(void) +@@ -829,6 +839,25 @@ cupsdReadConfiguration(void) RunUser = getuid(); @@ -735,7 +727,7 @@ diff -up cups-1.7.0/scheduler/conf.c.lspp cups-1.7.0/scheduler/conf.c cupsdLogMessage(CUPSD_LOG_INFO, "Remote access is %s.", RemotePort ? "enabled" : "disabled"); -@@ -1254,7 +1284,19 @@ cupsdReadConfiguration(void) +@@ -1233,7 +1262,19 @@ cupsdReadConfiguration(void) cupsdClearString(&Classification); if (Classification) @@ -755,7 +747,7 @@ diff -up cups-1.7.0/scheduler/conf.c.lspp cups-1.7.0/scheduler/conf.c /* * Check the MaxClients setting, and then allocate memory for it... -@@ -3640,6 +3682,18 @@ read_location(cups_file_t *fp, /* I - C +@@ -3622,6 +3663,18 @@ read_location(cups_file_t *fp, /* I - C return ((FatalErrors & CUPSD_FATAL_CONFIG) ? 0 : linenum); } @@ -774,9 +766,9 @@ diff -up cups-1.7.0/scheduler/conf.c.lspp cups-1.7.0/scheduler/conf.c /* * 'read_policy()' - Read a definition. -diff -up cups-1.7.0/scheduler/conf.h.lspp cups-1.7.0/scheduler/conf.h ---- cups-1.7.0/scheduler/conf.h.lspp 2013-10-24 15:54:45.828523519 +0100 -+++ cups-1.7.0/scheduler/conf.h 2013-10-24 15:54:45.904523849 +0100 +diff -up cups-1.7.1/scheduler/conf.h.lspp cups-1.7.1/scheduler/conf.h +--- cups-1.7.1/scheduler/conf.h.lspp 2014-01-08 18:43:27.284821762 +0100 ++++ cups-1.7.1/scheduler/conf.h 2014-01-08 18:43:27.301821527 +0100 @@ -250,6 +250,13 @@ VAR int SSLOptions VALUE(CUPSD_SSL_NO /* SSL/TLS options */ #endif /* HAVE_SSL */ @@ -801,9 +793,9 @@ diff -up cups-1.7.0/scheduler/conf.h.lspp cups-1.7.0/scheduler/conf.h /* * Prototypes... -diff -up cups-1.7.0/scheduler/cupsd.h.lspp cups-1.7.0/scheduler/cupsd.h ---- cups-1.7.0/scheduler/cupsd.h.lspp 2013-10-24 15:54:45.886523771 +0100 -+++ cups-1.7.0/scheduler/cupsd.h 2013-10-24 15:54:45.904523849 +0100 +diff -up cups-1.7.1/scheduler/cupsd.h.lspp cups-1.7.1/scheduler/cupsd.h +--- cups-1.7.1/scheduler/cupsd.h.lspp 2014-01-08 18:43:27.264822039 +0100 ++++ cups-1.7.1/scheduler/cupsd.h 2014-01-08 18:43:27.301821527 +0100 @@ -13,6 +13,8 @@ * file is missing or damaged, see the license at "http://www.cups.org/". */ @@ -835,19 +827,11 @@ diff -up cups-1.7.0/scheduler/cupsd.h.lspp cups-1.7.0/scheduler/cupsd.h /* * Some OS's don't have hstrerror(), most notably Solaris... */ -diff -up cups-1.7.0/scheduler/ipp.c.lspp cups-1.7.0/scheduler/ipp.c ---- cups-1.7.0/scheduler/ipp.c.lspp 2013-10-24 15:54:45.846523598 +0100 -+++ cups-1.7.0/scheduler/ipp.c 2013-10-24 15:54:45.905523853 +0100 -@@ -35,6 +35,7 @@ - * cancel_all_jobs() - Cancel all or selected print jobs. - * cancel_job() - Cancel a print job. - * cancel_subscription() - Cancel a subscription. -+ * check_context() - Check the SELinux context for a user and job - * check_rss_recipient() - Check that we do not have a duplicate RSS - * feed URI. - * check_quotas() - Check quotas for a printer and user. -@@ -99,6 +100,9 @@ - * validate_user() - Validate the user for the request. +diff -up cups-1.7.1/scheduler/ipp.c.lspp cups-1.7.1/scheduler/ipp.c +--- cups-1.7.1/scheduler/ipp.c.lspp 2014-01-08 18:43:27.188823090 +0100 ++++ cups-1.7.1/scheduler/ipp.c 2014-01-08 18:46:34.235235319 +0100 +@@ -16,6 +16,9 @@ + * file is missing or damaged, see the license at "http://www.cups.org/". */ +/* Copyright (C) 2005 Trusted Computer Solutions, Inc. */ @@ -856,7 +840,7 @@ diff -up cups-1.7.0/scheduler/ipp.c.lspp cups-1.7.0/scheduler/ipp.c /* * Include necessary headers... */ -@@ -122,6 +126,14 @@ extern int mbr_check_membership_by_id(uu +@@ -39,6 +42,14 @@ extern int mbr_check_membership_by_id(uu # endif /* HAVE_MEMBERSHIPPRIV_H */ #endif /* __APPLE__ */ @@ -871,7 +855,7 @@ diff -up cups-1.7.0/scheduler/ipp.c.lspp cups-1.7.0/scheduler/ipp.c /* * Local functions... -@@ -146,6 +158,9 @@ static void cancel_all_jobs(cupsd_client +@@ -63,6 +74,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); @@ -881,7 +865,7 @@ diff -up cups-1.7.0/scheduler/ipp.c.lspp cups-1.7.0/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, -@@ -1318,6 +1333,21 @@ add_job(cupsd_client_t *con, /* I - Cl +@@ -1235,6 +1249,21 @@ add_job(cupsd_client_t *con, /* I - Cl "time-at-creation", "time-at-processing" }; @@ -903,7 +887,7 @@ diff -up cups-1.7.0/scheduler/ipp.c.lspp cups-1.7.0/scheduler/ipp.c cupsdLogMessage(CUPSD_LOG_DEBUG2, "add_job(%p[%d], %p(%s), %p(%s/%s))", -@@ -1635,6 +1665,106 @@ add_job(cupsd_client_t *con, /* I - Cl +@@ -1552,6 +1581,106 @@ add_job(cupsd_client_t *con, /* I - Cl return (NULL); } @@ -1010,7 +994,7 @@ diff -up cups-1.7.0/scheduler/ipp.c.lspp cups-1.7.0/scheduler/ipp.c if ((job = cupsdAddJob(priority, printer->name)) == NULL) { send_ipp_status(con, IPP_INTERNAL_ERROR, -@@ -1643,6 +1773,32 @@ add_job(cupsd_client_t *con, /* I - Cl +@@ -1560,6 +1689,32 @@ add_job(cupsd_client_t *con, /* I - Cl return (NULL); } @@ -1043,7 +1027,7 @@ diff -up cups-1.7.0/scheduler/ipp.c.lspp cups-1.7.0/scheduler/ipp.c job->dtype = printer->type & (CUPS_PRINTER_CLASS | CUPS_PRINTER_REMOTE); job->attrs = con->request; job->dirty = 1; -@@ -1852,6 +2008,29 @@ add_job(cupsd_client_t *con, /* I - Cl +@@ -1769,6 +1924,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]); } @@ -1073,7 +1057,7 @@ diff -up cups-1.7.0/scheduler/ipp.c.lspp cups-1.7.0/scheduler/ipp.c job->job_sheets = attr; -@@ -1882,6 +2061,9 @@ add_job(cupsd_client_t *con, /* I - Cl +@@ -1799,6 +1977,9 @@ add_job(cupsd_client_t *con, /* I - Cl "job-sheets=\"%s,none\", " "job-originating-user-name=\"%s\"", Classification, job->username); @@ -1083,7 +1067,7 @@ diff -up cups-1.7.0/scheduler/ipp.c.lspp cups-1.7.0/scheduler/ipp.c } else if (attr->num_values == 2 && strcmp(attr->values[0].string.text, -@@ -1900,6 +2082,9 @@ add_job(cupsd_client_t *con, /* I - Cl +@@ -1817,6 +1998,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); @@ -1093,7 +1077,7 @@ diff -up cups-1.7.0/scheduler/ipp.c.lspp cups-1.7.0/scheduler/ipp.c } else if (strcmp(attr->values[0].string.text, Classification) && strcmp(attr->values[0].string.text, "none") && -@@ -1920,6 +2105,9 @@ add_job(cupsd_client_t *con, /* I - Cl +@@ -1837,6 +2021,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); @@ -1103,7 +1087,7 @@ diff -up cups-1.7.0/scheduler/ipp.c.lspp cups-1.7.0/scheduler/ipp.c } } else if (strcmp(attr->values[0].string.text, Classification) && -@@ -1960,8 +2148,52 @@ add_job(cupsd_client_t *con, /* I - Cl +@@ -1877,8 +2064,52 @@ add_job(cupsd_client_t *con, /* I - Cl "job-sheets=\"%s\", " "job-originating-user-name=\"%s\"", Classification, job->username); @@ -1156,7 +1140,7 @@ diff -up cups-1.7.0/scheduler/ipp.c.lspp cups-1.7.0/scheduler/ipp.c /* * See if we need to add the starting sheet... -@@ -3733,6 +3965,111 @@ check_rss_recipient( +@@ -3650,6 +3881,111 @@ check_rss_recipient( } @@ -1268,7 +1252,7 @@ diff -up cups-1.7.0/scheduler/ipp.c.lspp cups-1.7.0/scheduler/ipp.c /* * 'check_quotas()' - Check quotas for a printer and user. */ -@@ -4189,6 +4526,15 @@ copy_banner(cupsd_client_t *con, /* I - +@@ -4106,6 +4442,15 @@ copy_banner(cupsd_client_t *con, /* I - char attrname[255], /* Name of attribute */ *s; /* Pointer into name */ ipp_attribute_t *attr; /* Attribute */ @@ -1284,7 +1268,7 @@ diff -up cups-1.7.0/scheduler/ipp.c.lspp cups-1.7.0/scheduler/ipp.c cupsdLogMessage(CUPSD_LOG_DEBUG2, -@@ -4224,6 +4570,82 @@ copy_banner(cupsd_client_t *con, /* I - +@@ -4141,6 +4486,82 @@ copy_banner(cupsd_client_t *con, /* I - fchmod(cupsFileNumber(out), 0640); fchown(cupsFileNumber(out), RunUser, Group); @@ -1367,7 +1351,7 @@ diff -up cups-1.7.0/scheduler/ipp.c.lspp cups-1.7.0/scheduler/ipp.c /* * Try the localized banner file under the subdirectory... -@@ -4318,6 +4740,24 @@ copy_banner(cupsd_client_t *con, /* I - +@@ -4235,6 +4656,24 @@ copy_banner(cupsd_client_t *con, /* I - else s = attrname; @@ -1392,7 +1376,7 @@ diff -up cups-1.7.0/scheduler/ipp.c.lspp cups-1.7.0/scheduler/ipp.c if (!strcmp(s, "printer-name")) { cupsFilePuts(out, job->dest); -@@ -6184,6 +6624,22 @@ get_job_attrs(cupsd_client_t *con, /* I +@@ -6101,6 +6540,22 @@ get_job_attrs(cupsd_client_t *con, /* I exclude = cupsdGetPrivateAttrs(policy, con, printer, job->username); @@ -1415,7 +1399,7 @@ diff -up cups-1.7.0/scheduler/ipp.c.lspp cups-1.7.0/scheduler/ipp.c /* * Copy attributes... */ -@@ -6526,6 +6982,11 @@ get_jobs(cupsd_client_t *con, /* I - C +@@ -6443,6 +6898,11 @@ get_jobs(cupsd_client_t *con, /* I - C if (username[0] && _cups_strcasecmp(username, job->username)) continue; @@ -1427,7 +1411,7 @@ diff -up cups-1.7.0/scheduler/ipp.c.lspp cups-1.7.0/scheduler/ipp.c if (count > 0) ippAddSeparator(con->response); -@@ -11096,6 +11557,11 @@ validate_user(cupsd_job_t *job, /* I +@@ -11013,6 +11473,11 @@ validate_user(cupsd_job_t *job, /* I strlcpy(username, get_username(con), userlen); @@ -1439,11 +1423,11 @@ diff -up cups-1.7.0/scheduler/ipp.c.lspp cups-1.7.0/scheduler/ipp.c /* * Check the username against the owner... */ -diff -up cups-1.7.0/scheduler/job.c.lspp cups-1.7.0/scheduler/job.c ---- cups-1.7.0/scheduler/job.c.lspp 2013-10-24 15:54:45.896523814 +0100 -+++ cups-1.7.0/scheduler/job.c 2013-10-24 15:54:45.906523858 +0100 -@@ -68,6 +68,9 @@ - * update_job_attrs() - Update the job-printer-* attributes. +diff -up cups-1.7.1/scheduler/job.c.lspp cups-1.7.1/scheduler/job.c +--- cups-1.7.1/scheduler/job.c.lspp 2014-01-08 18:43:27.279821831 +0100 ++++ cups-1.7.1/scheduler/job.c 2014-01-08 18:47:08.592759973 +0100 +@@ -13,6 +13,9 @@ + * file is missing or damaged, see the license at "http://www.cups.org/". */ +/* Copyright (C) 2005 Trusted Computer Solutions, Inc. */ @@ -1452,7 +1436,7 @@ diff -up cups-1.7.0/scheduler/job.c.lspp cups-1.7.0/scheduler/job.c /* * Include necessary headers... */ -@@ -83,6 +86,14 @@ +@@ -28,6 +31,14 @@ # endif /* HAVE_IOKIT_PWR_MGT_IOPMLIBPRIVATE_H */ #endif /* __APPLE__ */ @@ -1467,7 +1451,7 @@ diff -up cups-1.7.0/scheduler/job.c.lspp cups-1.7.0/scheduler/job.c /* * Design Notes for Job Management -@@ -580,6 +591,14 @@ cupsdContinueJob(cupsd_job_t *job) /* I +@@ -525,6 +536,14 @@ cupsdContinueJob(cupsd_job_t *job) /* I /* PRINTER_STATE_REASONS env var */ rip_max_cache[255]; /* RIP_MAX_CACHE env variable */ @@ -1482,7 +1466,7 @@ diff -up cups-1.7.0/scheduler/job.c.lspp cups-1.7.0/scheduler/job.c cupsdLogMessage(CUPSD_LOG_DEBUG2, -@@ -1090,6 +1109,67 @@ cupsdContinueJob(cupsd_job_t *job) /* I +@@ -1034,6 +1053,67 @@ cupsdContinueJob(cupsd_job_t *job) /* I if (final_content_type[0]) envp[envc ++] = final_content_type; @@ -1550,7 +1534,7 @@ diff -up cups-1.7.0/scheduler/job.c.lspp cups-1.7.0/scheduler/job.c if (Classification && !banner_page) { if ((attr = ippFindAttribute(job->attrs, "job-sheets", -@@ -1861,6 +1941,20 @@ cupsdLoadJob(cupsd_job_t *job) /* I - J +@@ -1800,6 +1880,20 @@ cupsdLoadJob(cupsd_job_t *job) /* I - J ippSetString(job->attrs, &job->reasons, 0, "none"); } @@ -1571,7 +1555,7 @@ diff -up cups-1.7.0/scheduler/job.c.lspp cups-1.7.0/scheduler/job.c job->sheets = ippFindAttribute(job->attrs, "job-media-sheets-completed", IPP_TAG_INTEGER); job->job_sheets = ippFindAttribute(job->attrs, "job-sheets", IPP_TAG_NAME); -@@ -2252,6 +2346,14 @@ cupsdSaveJob(cupsd_job_t *job) /* I - J +@@ -2188,6 +2282,14 @@ cupsdSaveJob(cupsd_job_t *job) /* I - J { char filename[1024]; /* Job control filename */ cups_file_t *fp; /* Job file */ @@ -1586,7 +1570,7 @@ diff -up cups-1.7.0/scheduler/job.c.lspp cups-1.7.0/scheduler/job.c cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdSaveJob(job=%p(%d)): job->attrs=%p", -@@ -2264,6 +2366,76 @@ cupsdSaveJob(cupsd_job_t *job) /* I - J +@@ -2200,6 +2302,76 @@ cupsdSaveJob(cupsd_job_t *job) /* I - J fchown(cupsFileNumber(fp), RunUser, Group); @@ -1663,7 +1647,7 @@ diff -up cups-1.7.0/scheduler/job.c.lspp cups-1.7.0/scheduler/job.c job->attrs->state = IPP_IDLE; if (ippWriteIO(fp, (ipp_iocb_t)cupsFileWrite, 1, NULL, -@@ -3813,6 +3985,18 @@ get_options(cupsd_job_t *job, /* I - Jo +@@ -3748,6 +3920,18 @@ get_options(cupsd_job_t *job, /* I - Jo banner_page) continue; @@ -1682,7 +1666,7 @@ diff -up cups-1.7.0/scheduler/job.c.lspp cups-1.7.0/scheduler/job.c /* * Otherwise add them to the list... */ -@@ -4539,6 +4723,18 @@ start_job(cupsd_job_t *job, /* I - +@@ -4472,6 +4656,18 @@ start_job(cupsd_job_t *job, /* I - cupsd_printer_t *printer) /* I - Printer to print job */ { const char *filename; /* Support filename */ @@ -1701,7 +1685,7 @@ diff -up cups-1.7.0/scheduler/job.c.lspp cups-1.7.0/scheduler/job.c cupsdLogMessage(CUPSD_LOG_DEBUG2, "start_job(job=%p(%d), printer=%p(%s))", -@@ -4702,6 +4898,108 @@ start_job(cupsd_job_t *job, /* I - +@@ -4635,6 +4831,108 @@ start_job(cupsd_job_t *job, /* I - fcntl(job->side_pipes[1], F_SETFD, fcntl(job->side_pipes[1], F_GETFD) | FD_CLOEXEC); @@ -1810,9 +1794,9 @@ diff -up cups-1.7.0/scheduler/job.c.lspp cups-1.7.0/scheduler/job.c /* * Now start the first file in the job... */ -diff -up cups-1.7.0/scheduler/job.h.lspp cups-1.7.0/scheduler/job.h ---- cups-1.7.0/scheduler/job.h.lspp 2013-05-29 12:51:34.000000000 +0100 -+++ cups-1.7.0/scheduler/job.h 2013-10-24 15:54:45.906523858 +0100 +diff -up cups-1.7.1/scheduler/job.h.lspp cups-1.7.1/scheduler/job.h +--- cups-1.7.1/scheduler/job.h.lspp 2013-05-29 13:51:34.000000000 +0200 ++++ cups-1.7.1/scheduler/job.h 2014-01-08 18:43:27.308821430 +0100 @@ -13,6 +13,13 @@ * file is missing or damaged, see the license at "http://www.cups.org/". */ @@ -1838,9 +1822,9 @@ diff -up cups-1.7.0/scheduler/job.h.lspp cups-1.7.0/scheduler/job.h }; typedef struct cupsd_joblog_s /**** Job log message ****/ -diff -up cups-1.7.0/scheduler/main.c.lspp cups-1.7.0/scheduler/main.c ---- cups-1.7.0/scheduler/main.c.lspp 2013-10-24 15:54:45.887523775 +0100 -+++ cups-1.7.0/scheduler/main.c 2013-10-24 15:54:45.907523862 +0100 +diff -up cups-1.7.1/scheduler/main.c.lspp cups-1.7.1/scheduler/main.c +--- cups-1.7.1/scheduler/main.c.lspp 2014-01-08 18:43:27.265822025 +0100 ++++ cups-1.7.1/scheduler/main.c 2014-01-08 18:43:27.308821430 +0100 @@ -38,6 +38,8 @@ * usage() - Show scheduler usage. */ @@ -1908,11 +1892,11 @@ diff -up cups-1.7.0/scheduler/main.c.lspp cups-1.7.0/scheduler/main.c return (!stop_scheduler); } -diff -up cups-1.7.0/scheduler/printers.c.lspp cups-1.7.0/scheduler/printers.c ---- cups-1.7.0/scheduler/printers.c.lspp 2013-10-24 15:54:45.876523727 +0100 -+++ cups-1.7.0/scheduler/printers.c 2013-10-24 15:54:45.907523862 +0100 -@@ -52,6 +52,8 @@ - * write_xml_string() - Write a string with XML escaping. +diff -up cups-1.7.1/scheduler/printers.c.lspp cups-1.7.1/scheduler/printers.c +--- cups-1.7.1/scheduler/printers.c.lspp 2014-01-08 18:43:27.161823463 +0100 ++++ cups-1.7.1/scheduler/printers.c 2014-01-08 18:47:33.449416072 +0100 +@@ -13,6 +13,8 @@ + * file is missing or damaged, see the license at "http://www.cups.org/". */ +/* (c) Copyright 2005-2006 Hewlett-Packard Development Company, L.P. */ @@ -1920,7 +1904,7 @@ diff -up cups-1.7.0/scheduler/printers.c.lspp cups-1.7.0/scheduler/printers.c /* * Include necessary headers... */ -@@ -76,6 +78,10 @@ +@@ -37,6 +39,10 @@ # include #endif /* __APPLE__ */ @@ -1931,7 +1915,7 @@ diff -up cups-1.7.0/scheduler/printers.c.lspp cups-1.7.0/scheduler/printers.c /* * Local functions... -@@ -2063,6 +2069,13 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p) +@@ -2023,6 +2029,13 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p) ipp_attribute_t *attr; /* Attribute data */ char *name, /* Current user/group name */ *filter; /* Current filter */ @@ -1945,7 +1929,7 @@ diff -up cups-1.7.0/scheduler/printers.c.lspp cups-1.7.0/scheduler/printers.c DEBUG_printf(("cupsdSetPrinterAttrs: entering name = %s, type = %x\n", p->name, -@@ -2185,6 +2198,45 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p) +@@ -2145,6 +2158,45 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p) attr->values[1].string.text = _cupsStrAlloc(Classification ? Classification : p->job_sheets[1]); } diff --git a/cups-str4326.patch b/cups-str4326.patch deleted file mode 100644 index cf46afe..0000000 --- a/cups-str4326.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -up cups-1.7.0/scheduler/ipp.c.str4326 cups-1.7.0/scheduler/ipp.c ---- cups-1.7.0/scheduler/ipp.c.str4326 2014-01-07 09:43:18.046423961 +0000 -+++ cups-1.7.0/scheduler/ipp.c 2014-01-07 09:44:21.774711070 +0000 -@@ -3,7 +3,7 @@ - * - * IPP routines for the CUPS scheduler. - * -- * Copyright 2007-2013 by Apple Inc. -+ * Copyright 2007-2014 by Apple Inc. - * Copyright 1997-2007 by Easy Software Products, all rights reserved. - * - * This file contains Kerberos support code, copyright 2006 by -@@ -6318,7 +6318,7 @@ get_jobs(cupsd_client_t *con, /* I - C - { - job_comparison = -1; - job_state = IPP_JOB_STOPPED; -- list = Jobs; -+ list = ActiveJobs; - } - else if (!strcmp(attr->values[0].string.text, "completed")) - { diff --git a/cups-str4327.patch b/cups-str4327.patch deleted file mode 100644 index f5cb51f..0000000 --- a/cups-str4327.patch +++ /dev/null @@ -1,30 +0,0 @@ -diff -up cups-1.7.0/cups/usersys.c.str4327 cups-1.7.0/cups/usersys.c ---- cups-1.7.0/cups/usersys.c.str4327 2013-07-10 15:08:39.000000000 +0100 -+++ cups-1.7.0/cups/usersys.c 2014-01-08 16:30:40.443026913 +0000 -@@ -875,7 +875,25 @@ _cupsSetDefaults(void) - cups_expiredcerts = getenv("CUPS_EXPIREDCERTS"); - - if ((cups_user = getenv("CUPS_USER")) == NULL) -- cups_user = getenv("USER"); -+ { -+ /* -+ * Try the USER environment variable... -+ */ -+ -+ if ((cups_user = getenv("USER")) != NULL) -+ { -+ /* -+ * Validate USER matches the current UID, otherwise don't allow it to -+ * override things... This makes sure that printing after doing su or -+ * sudo records the correct username. -+ */ -+ -+ struct passwd *pw; /* Account information */ -+ -+ if ((pw = getpwnam(cups_user)) == NULL || pw->pw_uid != getuid()) -+ cups_user = NULL; -+ } -+ } - - /* - * Then, if needed, read the ~/.cups/client.conf or /etc/cups/client.conf diff --git a/cups-stringpool-rdar15382819.patch b/cups-stringpool-rdar15382819.patch deleted file mode 100644 index 0a22a39..0000000 --- a/cups-stringpool-rdar15382819.patch +++ /dev/null @@ -1,93 +0,0 @@ -diff -up cups-1.7.0/scheduler/printers.c.stringpool-rdar15382819 cups-1.7.0/scheduler/printers.c ---- cups-1.7.0/scheduler/printers.c.stringpool-rdar15382819 2013-11-07 13:26:56.077499193 +0000 -+++ cups-1.7.0/scheduler/printers.c 2013-11-07 13:27:54.665787144 +0000 -@@ -1876,12 +1876,13 @@ void - cupsdSetPrinterAttr( - cupsd_printer_t *p, /* I - Printer */ - const char *name, /* I - Attribute name */ -- char *value) /* I - Attribute value string */ -+ const char *value) /* I - Attribute value string */ - { - ipp_attribute_t *attr; /* Attribute */ - int i, /* Looping var */ - count; /* Number of values */ -- char *ptr, /* Pointer into value */ -+ char *temp, /* Temporary copy of value string */ -+ *ptr, /* Pointer into value */ - *start, /* Start of value */ - quote; /* Quote character */ - ipp_tag_t value_tag; /* Value tag for this attribute */ -@@ -1898,10 +1899,21 @@ cupsdSetPrinterAttr( - } - - /* -+ * Copy the value string so we can do what we want with it... -+ */ -+ -+ if ((temp = strdup(value)) == NULL) -+ { -+ cupsdLogMessage(CUPSD_LOG_ERROR, -+ "Unable to duplicate value for \"%s\" attribute.", name); -+ return; -+ } -+ -+ /* - * Count the number of values... - */ - -- for (count = 1, quote = '\0', ptr = value; -+ for (count = 1, quote = '\0', ptr = temp; - *ptr; - ptr ++) - { -@@ -1949,15 +1961,15 @@ cupsdSetPrinterAttr( - return; - } - -- for (i = 0; i < count; i ++) -+ for (i = 0, start = temp; i < count; i ++) - { -- if ((ptr = strchr(value, ',')) != NULL) -+ if ((ptr = strchr(start, ',')) != NULL) - *ptr++ = '\0'; - -- attr->values[i].integer = strtol(value, NULL, 10); -+ attr->values[i].integer = strtol(start, NULL, 10); - - if (ptr) -- value = ptr; -+ start = ptr; - } - } - else -@@ -1999,7 +2011,7 @@ cupsdSetPrinterAttr( - return; - } - -- for (i = 0, quote = '\0', ptr = value; i < count; i ++) -+ for (i = 0, quote = '\0', ptr = temp; i < count; i ++) - { - for (start = ptr; *ptr; ptr ++) - { -@@ -2028,6 +2040,8 @@ cupsdSetPrinterAttr( - attr->values[i].string.text = _cupsStrAlloc(start); - } - } -+ -+ free(temp); - } - - -diff -up cups-1.7.0/scheduler/printers.h.stringpool-rdar15382819 cups-1.7.0/scheduler/printers.h ---- cups-1.7.0/scheduler/printers.h.stringpool-rdar15382819 2013-05-29 12:51:34.000000000 +0100 -+++ cups-1.7.0/scheduler/printers.h 2013-11-07 13:27:54.666787149 +0000 -@@ -166,7 +166,8 @@ extern int cupsdSetAuthInfoRequired(cup - ipp_attribute_t *attr); - extern void cupsdSetDeviceURI(cupsd_printer_t *p, const char *uri); - extern void cupsdSetPrinterAttr(cupsd_printer_t *p, -- const char *name, char *value); -+ const char *name, -+ const char *value); - extern void cupsdSetPrinterAttrs(cupsd_printer_t *p); - extern int cupsdSetPrinterReasons(cupsd_printer_t *p, - const char *s); diff --git a/cups-usb-timeout.patch b/cups-usb-timeout.patch deleted file mode 100644 index 2c95e09..0000000 --- a/cups-usb-timeout.patch +++ /dev/null @@ -1,30 +0,0 @@ -diff -up cups-1.7.0/backend/usb-libusb.c.usb-timeout cups-1.7.0/backend/usb-libusb.c ---- cups-1.7.0/backend/usb-libusb.c.usb-timeout 2013-07-17 16:51:43.000000000 +0100 -+++ cups-1.7.0/backend/usb-libusb.c 2013-11-28 16:44:03.785124015 +0000 -@@ -496,7 +496,7 @@ print_device(const char *uri, /* I - De - iostatus = libusb_bulk_transfer(g.printer->handle, - g.printer->write_endp, - print_buffer, g.print_bytes, -- &bytes, 60000); -+ &bytes, 72 * 60 * 60000); - /* - * Ignore timeout errors, but retain the number of bytes written to - * avoid sending duplicate data... -@@ -519,7 +519,7 @@ print_device(const char *uri, /* I - De - iostatus = libusb_bulk_transfer(g.printer->handle, - g.printer->write_endp, - print_buffer, g.print_bytes, -- &bytes, 60000); -+ &bytes, 72 * 60 * 60000); - } - - /* -@@ -534,7 +534,7 @@ print_device(const char *uri, /* I - De - iostatus = libusb_bulk_transfer(g.printer->handle, - g.printer->write_endp, - print_buffer, g.print_bytes, -- &bytes, 60000); -+ &bytes, 72 * 60 * 60000); - } - - if (iostatus) diff --git a/cups.spec b/cups.spec index f476b11..84ff5cc 100644 --- a/cups.spec +++ b/cups.spec @@ -10,8 +10,8 @@ Summary: CUPS printing system Name: cups Epoch: 1 -Version: 1.7.0 -Release: 11%{?dist} +Version: 1.7.1 +Release: 1%{?dist} License: GPLv2 Group: System Environment/Daemons Url: http://www.cups.org/ @@ -31,7 +31,6 @@ Source8: macros.cups Patch1: cups-no-gzip-man.patch Patch2: cups-system-auth.patch Patch3: cups-multilib.patch -Patch4: cups-str4327.patch Patch5: cups-banners.patch Patch6: cups-serverbin-compat.patch Patch7: cups-no-export-ssllibs.patch @@ -55,25 +54,19 @@ Patch24: cups-ricoh-deviceid-oid.patch Patch25: cups-systemd-socket.patch Patch26: cups-lpd-manpage.patch Patch27: cups-avahi-address.patch -Patch28: cups-usb-timeout.patch Patch29: cups-enum-all.patch -Patch30: cups-stringpool-rdar15382819.patch Patch31: cups-dymo-deviceid.patch Patch32: cups-freebind.patch Patch33: cups-no-gcry.patch Patch34: cups-libusb-quirks.patch Patch35: cups-use-ipp1.1.patch Patch36: cups-avahi-no-threaded.patch -Patch37: cups-gz-crc.patch -Patch39: cups-ipp-multifile.patch -Patch40: cups-full-relro.patch -Patch41: cups-web-devices-timeout.patch -Patch43: cups-final-content-type.patch -Patch44: cups-jobhistory.patch -Patch45: cups-journal.patch -Patch46: cups-synconclose.patch -Patch47: cups-dbus-notifier.patch -Patch48: cups-str4326.patch +Patch37: cups-ipp-multifile.patch +Patch38: cups-full-relro.patch +Patch39: cups-web-devices-timeout.patch +Patch40: cups-final-content-type.patch +Patch41: cups-journal.patch +Patch42: cups-synconclose.patch Patch100: cups-lspp.patch @@ -193,8 +186,6 @@ Sends IPP requests to the specified URI and tests and/or displays the results. %patch2 -p1 -b .system-auth # Prevent multilib conflict in cups-config script. %patch3 -p1 -b .multilib -# Apply upstream patch to improve cupsUser() (STR #4327). -%patch4 -p1 -b .str4327 # Ignore rpm save/new files in the banners directory. %patch5 -p1 -b .banners # Use compatibility fallback path for ServerBin. @@ -242,12 +233,8 @@ Sends IPP requests to the specified URI and tests and/or displays the results. %patch26 -p1 -b .lpd-manpage # Use IP address when resolving DNSSD URIs (bug #948288). %patch27 -p1 -b .avahi-address -# Prevent USB timeouts causing incorrect print output (bug #1026914). -%patch28 -p1 -b .usb-timeout # Return from cupsEnumDests() once all records have been returned. %patch29 -p1 -b .enum-all -# Prevent stringpool damage leading to memory leaks (bug #974048). -%patch30 -p1 -b .stringpool-rdar15382819 # Added IEEE 1284 Device ID for a Dymo device (bug #747866). %patch31 -p1 -b .dymo-deviceid # Use IP_FREEBIND socket option when binding listening sockets (bug #970809). @@ -260,27 +247,19 @@ Sends IPP requests to the specified URI and tests and/or displays the results. %patch35 -p1 -b .use-ipp1.1 # Don't use D-Bus from two threads (bug #979748). %patch36 -p1 -b .avahi-no-threaded -# Avoid sign-extending CRCs for gz decompression (bug #983486). -%patch37 -p1 -b .gz-crc # Fixes for jobs with multiple files and multiple formats. -%patch39 -p1 -b .ipp-multifile +%patch37 -p1 -b .ipp-multifile # Full relro (bug #996740). -%patch40 -p1 -b .full-relro +%patch38 -p1 -b .full-relro # Increase web interface get-devices timeout to 10s (bug #996664). -%patch41 -p1 -b .web-devices-timeout +%patch39 -p1 -b .web-devices-timeout # Reverted upstream change to FINAL_CONTENT_TYPE in order to fix # printing to remote CUPS servers (bug #1010580). -%patch43 -p1 -b .final-content-type -# Fix job history logging. -%patch44 -p1 -b .jobhistory +%patch40 -p1 -b .final-content-type # Allow "journal" log type for log output to system journal. -%patch45 -p1 -b .journal +%patch41 -p1 -b .journal # Set the default for SyncOnClose to Yes. -%patch46 -p1 -b .synconclose -# Avoid stale lockfile in dbus notifier (bug #1026949). -%patch47 -p1 -b .dbus-notifier -# Return jobs in rank order when handling IPP-Get-Jobs (STR #4326). -%patch48 -p1 -b .str4326 +%patch42 -p1 -b .synconclose %if %lspp # LSPP support. @@ -661,6 +640,9 @@ rm -f %{cups_serverbin}/backend/smb %{_mandir}/man5/ipptoolfile.5.gz %changelog +* Wed Jan 08 2014 Jiri Popelka - 1:1.7.1-1 +- 1.7.1 + * Wed Jan 8 2014 Tim Waugh - 1:1.7.0-11 - Apply upstream patch to improve cupsUser() (STR #4327). diff --git a/sources b/sources index b200646..1bf33da 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -5ab496a2ce27017fcdb3d7ec4818a75a cups-1.7.0-source.tar.bz2 +55277c40fd4b7183dc3671d39c5c42b7 cups-1.7.1-source.tar.bz2