2.0rc1
This commit is contained in:
parent
716a7a34ad
commit
6dd0746894
1
.gitignore
vendored
1
.gitignore
vendored
@ -62,3 +62,4 @@ cups-1.4.4-source.tar.bz2
|
||||
/cups-1.7.3-source.tar.bz2
|
||||
/cups-1.7.4-source.tar.bz2
|
||||
/cups-1.7.5-source.tar.bz2
|
||||
/cups-2.0rc1-source.tar.bz2
|
||||
|
@ -1,7 +1,7 @@
|
||||
diff -up cups-1.6.2/cups/http-support.c.avahi-address cups-1.6.2/cups/http-support.c
|
||||
--- cups-1.6.2/cups/http-support.c.avahi-address 2013-03-11 18:44:36.000000000 +0000
|
||||
+++ cups-1.6.2/cups/http-support.c 2013-06-28 13:42:15.834715511 +0100
|
||||
@@ -2121,7 +2121,7 @@ http_resolve_cb(
|
||||
diff -up cups-2.0rc1/cups/http-support.c.avahi-address cups-2.0rc1/cups/http-support.c
|
||||
--- cups-2.0rc1/cups/http-support.c.avahi-address 2014-08-28 17:37:22.000000000 +0200
|
||||
+++ cups-2.0rc1/cups/http-support.c 2014-09-12 15:31:45.062950696 +0200
|
||||
@@ -2342,7 +2342,7 @@ http_resolve_cb(
|
||||
const char *type, /* I - Registration type */
|
||||
const char *domain, /* I - Domain (unused) */
|
||||
const char *hostTarget, /* I - Hostname */
|
||||
@ -10,7 +10,7 @@ diff -up cups-1.6.2/cups/http-support.c.avahi-address cups-1.6.2/cups/http-suppo
|
||||
uint16_t port, /* I - Port number */
|
||||
AvahiStringList *txt, /* I - TXT record */
|
||||
AvahiLookupResultFlags flags, /* I - Lookup flags (unused) */
|
||||
@@ -2248,41 +2248,59 @@ http_resolve_cb(
|
||||
@@ -2495,39 +2495,62 @@ http_resolve_cb(
|
||||
* getting the IP address of the .local name and then do reverse-lookups...
|
||||
*/
|
||||
|
||||
@ -49,28 +49,28 @@ diff -up cups-1.6.2/cups/http-support.c.avahi-address cups-1.6.2/cups/http-suppo
|
||||
+
|
||||
+ if (!error)
|
||||
{
|
||||
- int error = getnameinfo(&(addr->addr.addr),
|
||||
- httpAddrLength(&(addr->addr)),
|
||||
- fqdn, sizeof(fqdn), NULL, 0, NI_NAMEREQD);
|
||||
- int error = getnameinfo(&(addr->addr.addr), (socklen_t)httpAddrLength(&(addr->addr)), fqdn, sizeof(fqdn), NULL, 0, NI_NAMEREQD);
|
||||
+ DEBUG_printf(("8http_resolve_cb: Found \"%s\".", fqdn));
|
||||
|
||||
- if (!error)
|
||||
- {
|
||||
- DEBUG_printf(("8http_resolve_cb: Found \"%s\".", fqdn));
|
||||
+ if ((hostptr = fqdn + strlen(fqdn) - 6) <= fqdn ||
|
||||
+ _cups_strcasecmp(hostptr, ".local"))
|
||||
{
|
||||
- DEBUG_printf(("8http_resolve_cb: Found \"%s\".", fqdn));
|
||||
-
|
||||
|
||||
- if ((hostptr = fqdn + strlen(fqdn) - 6) <= fqdn ||
|
||||
- _cups_strcasecmp(hostptr, ".local"))
|
||||
- {
|
||||
- hostTarget = fqdn;
|
||||
- break;
|
||||
- }
|
||||
+ {
|
||||
+ hostTarget = fqdn;
|
||||
}
|
||||
+ } else {
|
||||
+ avahi_address_snprint (fqdn, sizeof (fqdn), address);
|
||||
+ hostTarget = fqdn;
|
||||
+
|
||||
#ifdef DEBUG
|
||||
- else
|
||||
- DEBUG_printf(("8http_resolve_cb: \"%s\" did not resolve: %d",
|
||||
@ -80,7 +80,7 @@ diff -up cups-1.6.2/cups/http-support.c.avahi-address cups-1.6.2/cups/http-suppo
|
||||
+ fqdn, error));
|
||||
#endif /* DEBUG */
|
||||
}
|
||||
-
|
||||
|
||||
- httpAddrFreeList(addrlist);
|
||||
}
|
||||
+ } else {
|
||||
|
@ -1,6 +1,6 @@
|
||||
diff -up cups-1.7.2/scheduler/avahi.c.avahi-no-threaded cups-1.7.2/scheduler/avahi.c
|
||||
--- cups-1.7.2/scheduler/avahi.c.avahi-no-threaded 2014-04-14 13:56:52.632617316 +0200
|
||||
+++ cups-1.7.2/scheduler/avahi.c 2014-04-14 13:56:52.631617331 +0200
|
||||
diff -up cups-2.0rc1/scheduler/avahi.c.avahi-no-threaded cups-2.0rc1/scheduler/avahi.c
|
||||
--- cups-2.0rc1/scheduler/avahi.c.avahi-no-threaded 2014-09-12 15:45:28.772280006 +0200
|
||||
+++ cups-2.0rc1/scheduler/avahi.c 2014-09-12 15:45:28.772280006 +0200
|
||||
@@ -0,0 +1,441 @@
|
||||
+/*
|
||||
+ * "$Id$"
|
||||
@ -443,9 +443,9 @@ diff -up cups-1.7.2/scheduler/avahi.c.avahi-no-threaded cups-1.7.2/scheduler/ava
|
||||
+/*
|
||||
+ * End of "$Id$".
|
||||
+ */
|
||||
diff -up cups-1.7.2/scheduler/avahi.h.avahi-no-threaded cups-1.7.2/scheduler/avahi.h
|
||||
--- cups-1.7.2/scheduler/avahi.h.avahi-no-threaded 2014-04-14 13:56:52.632617316 +0200
|
||||
+++ cups-1.7.2/scheduler/avahi.h 2014-04-14 13:56:52.632617316 +0200
|
||||
diff -up cups-2.0rc1/scheduler/avahi.h.avahi-no-threaded cups-2.0rc1/scheduler/avahi.h
|
||||
--- cups-2.0rc1/scheduler/avahi.h.avahi-no-threaded 2014-09-12 15:45:28.772280006 +0200
|
||||
+++ cups-2.0rc1/scheduler/avahi.h 2014-09-12 15:45:28.772280006 +0200
|
||||
@@ -0,0 +1,69 @@
|
||||
+/*
|
||||
+ * "$Id$"
|
||||
@ -516,9 +516,9 @@ diff -up cups-1.7.2/scheduler/avahi.h.avahi-no-threaded cups-1.7.2/scheduler/ava
|
||||
+/*
|
||||
+ * End of "$Id$".
|
||||
+ */
|
||||
diff -up cups-1.7.2/scheduler/cupsd.h.avahi-no-threaded cups-1.7.2/scheduler/cupsd.h
|
||||
--- cups-1.7.2/scheduler/cupsd.h.avahi-no-threaded 2013-05-29 13:51:34.000000000 +0200
|
||||
+++ cups-1.7.2/scheduler/cupsd.h 2014-04-14 13:56:52.632617316 +0200
|
||||
diff -up cups-2.0rc1/scheduler/cupsd.h.avahi-no-threaded cups-2.0rc1/scheduler/cupsd.h
|
||||
--- cups-2.0rc1/scheduler/cupsd.h.avahi-no-threaded 2014-03-21 17:42:53.000000000 +0100
|
||||
+++ cups-2.0rc1/scheduler/cupsd.h 2014-09-12 15:47:02.886945551 +0200
|
||||
@@ -119,6 +119,7 @@ extern const char *cups_hstrerror(int);
|
||||
#include "colorman.h"
|
||||
#include "conf.h"
|
||||
@ -543,19 +543,18 @@ diff -up cups-1.7.2/scheduler/cupsd.h.avahi-no-threaded cups-1.7.2/scheduler/cup
|
||||
|
||||
/*
|
||||
* Globals...
|
||||
@@ -165,6 +175,11 @@ VAR int Launchd VALUE(0);
|
||||
/* Running from launchd */
|
||||
#endif /* HAVE_LAUNCH_H */
|
||||
@@ -163,6 +173,10 @@ VAR int OnDemand VALUE(0);
|
||||
/* Launched on demand */
|
||||
#endif /* HAVE_LAUNCHD || HAVE_SYSTEMD */
|
||||
|
||||
+#ifdef HAVE_AVAHI
|
||||
+VAR cups_array_t *Timeouts; /* Timed callbacks for main loop */
|
||||
+#endif /* HAVE_AVAHI */
|
||||
+
|
||||
+
|
||||
|
||||
/*
|
||||
* Prototypes...
|
||||
@@ -229,6 +244,17 @@ extern void cupsdStopSelect(void);
|
||||
@@ -226,6 +240,17 @@ extern void cupsdStopSelect(void);
|
||||
extern void cupsdStartServer(void);
|
||||
extern void cupsdStopServer(void);
|
||||
|
||||
@ -572,10 +571,10 @@ diff -up cups-1.7.2/scheduler/cupsd.h.avahi-no-threaded cups-1.7.2/scheduler/cup
|
||||
+#endif /* HAVE_AVAHI */
|
||||
|
||||
/*
|
||||
* End of "$Id: cupsd.h 10996 2013-05-29 11:51:34Z msweet $".
|
||||
diff -up cups-1.7.2/scheduler/dirsvc.c.avahi-no-threaded cups-1.7.2/scheduler/dirsvc.c
|
||||
--- cups-1.7.2/scheduler/dirsvc.c.avahi-no-threaded 2014-03-05 22:11:32.000000000 +0100
|
||||
+++ cups-1.7.2/scheduler/dirsvc.c 2014-04-14 14:21:11.121344106 +0200
|
||||
* End of "$Id: cupsd.h 11717 2014-03-21 16:42:53Z msweet $".
|
||||
diff -up cups-2.0rc1/scheduler/dirsvc.c.avahi-no-threaded cups-2.0rc1/scheduler/dirsvc.c
|
||||
--- cups-2.0rc1/scheduler/dirsvc.c.avahi-no-threaded 2014-05-09 22:57:11.000000000 +0200
|
||||
+++ cups-2.0rc1/scheduler/dirsvc.c 2014-09-12 15:45:28.773279992 +0200
|
||||
@@ -195,7 +195,7 @@ cupsdStartBrowsing(void)
|
||||
cupsdUpdateDNSSDName();
|
||||
|
||||
@ -607,7 +606,7 @@ diff -up cups-1.7.2/scheduler/dirsvc.c.avahi-no-threaded cups-1.7.2/scheduler/di
|
||||
}
|
||||
# endif /* HAVE_DNSSD */
|
||||
}
|
||||
@@ -606,7 +604,7 @@ dnssdClientCallback(
|
||||
@@ -608,7 +606,7 @@ dnssdClientCallback(
|
||||
* Renew Avahi client...
|
||||
*/
|
||||
|
||||
@ -616,7 +615,7 @@ diff -up cups-1.7.2/scheduler/dirsvc.c.avahi-no-threaded cups-1.7.2/scheduler/di
|
||||
|
||||
if (!DNSSDClient)
|
||||
{
|
||||
@@ -670,13 +668,7 @@ dnssdDeregisterInstance(
|
||||
@@ -672,13 +670,7 @@ dnssdDeregisterInstance(
|
||||
DNSServiceRefDeallocate(*srv);
|
||||
|
||||
# else /* HAVE_AVAHI */
|
||||
@ -630,7 +629,7 @@ diff -up cups-1.7.2/scheduler/dirsvc.c.avahi-no-threaded cups-1.7.2/scheduler/di
|
||||
# endif /* HAVE_DNSSD */
|
||||
|
||||
*srv = NULL;
|
||||
@@ -997,16 +989,10 @@ dnssdRegisterInstance(
|
||||
@@ -999,16 +991,10 @@ dnssdRegisterInstance(
|
||||
(void)commit;
|
||||
|
||||
# else /* HAVE_AVAHI */
|
||||
@ -647,7 +646,7 @@ diff -up cups-1.7.2/scheduler/dirsvc.c.avahi-no-threaded cups-1.7.2/scheduler/di
|
||||
cupsdLogMessage(CUPSD_LOG_WARN, "DNS-SD registration of \"%s\" failed: %s",
|
||||
name, dnssdErrorString(avahi_client_errno(DNSSDClient)));
|
||||
return (0);
|
||||
@@ -1121,9 +1107,6 @@ dnssdRegisterInstance(
|
||||
@@ -1123,9 +1109,6 @@ dnssdRegisterInstance(
|
||||
cupsdLogMessage(CUPSD_LOG_DEBUG, "DNS-SD commit of \"%s\" failed.",
|
||||
name);
|
||||
}
|
||||
@ -657,7 +656,7 @@ diff -up cups-1.7.2/scheduler/dirsvc.c.avahi-no-threaded cups-1.7.2/scheduler/di
|
||||
# endif /* HAVE_DNSSD */
|
||||
|
||||
if (error)
|
||||
@@ -1294,12 +1277,10 @@ dnssdStop(void)
|
||||
@@ -1296,12 +1279,10 @@ dnssdStop(void)
|
||||
DNSSDMaster = NULL;
|
||||
|
||||
# else /* HAVE_AVAHI */
|
||||
@ -671,9 +670,9 @@ diff -up cups-1.7.2/scheduler/dirsvc.c.avahi-no-threaded cups-1.7.2/scheduler/di
|
||||
DNSSDMaster = NULL;
|
||||
# endif /* HAVE_DNSSD */
|
||||
|
||||
diff -up cups-1.7.2/scheduler/dirsvc.h.avahi-no-threaded cups-1.7.2/scheduler/dirsvc.h
|
||||
--- cups-1.7.2/scheduler/dirsvc.h.avahi-no-threaded 2013-05-29 13:51:34.000000000 +0200
|
||||
+++ cups-1.7.2/scheduler/dirsvc.h 2014-04-14 13:56:52.633617302 +0200
|
||||
diff -up cups-2.0rc1/scheduler/dirsvc.h.avahi-no-threaded cups-2.0rc1/scheduler/dirsvc.h
|
||||
--- cups-2.0rc1/scheduler/dirsvc.h.avahi-no-threaded 2013-05-29 13:51:34.000000000 +0200
|
||||
+++ cups-2.0rc1/scheduler/dirsvc.h 2014-09-12 15:45:28.773279992 +0200
|
||||
@@ -51,7 +51,7 @@ VAR cups_array_t *DNSSDPrinters VALUE(NU
|
||||
VAR DNSServiceRef DNSSDMaster VALUE(NULL);
|
||||
/* Master DNS-SD service reference */
|
||||
@ -683,13 +682,13 @@ diff -up cups-1.7.2/scheduler/dirsvc.h.avahi-no-threaded cups-1.7.2/scheduler/di
|
||||
/* Master polling interface for Avahi */
|
||||
VAR AvahiClient *DNSSDClient VALUE(NULL);
|
||||
/* Client information */
|
||||
diff -up cups-1.7.2/scheduler/main.c.avahi-no-threaded cups-1.7.2/scheduler/main.c
|
||||
--- cups-1.7.2/scheduler/main.c.avahi-no-threaded 2014-04-14 13:56:52.600617782 +0200
|
||||
+++ cups-1.7.2/scheduler/main.c 2014-04-14 13:56:52.634617287 +0200
|
||||
@@ -134,6 +134,10 @@ main(int argc, /* I - Number of comm
|
||||
int launchd_idle_exit;
|
||||
diff -up cups-2.0rc1/scheduler/main.c.avahi-no-threaded cups-2.0rc1/scheduler/main.c
|
||||
--- cups-2.0rc1/scheduler/main.c.avahi-no-threaded 2014-09-12 15:45:28.736280516 +0200
|
||||
+++ cups-2.0rc1/scheduler/main.c 2014-09-12 15:47:43.433370643 +0200
|
||||
@@ -127,6 +127,10 @@ main(int argc, /* I - Number of comm
|
||||
int service_idle_exit;
|
||||
/* Idle exit on select timeout? */
|
||||
#endif /* HAVE_LAUNCHD */
|
||||
#endif /* HAVE_LAUNCHD || HAVE_SYSTEMD */
|
||||
+#ifdef HAVE_AVAHI
|
||||
+ cupsd_timeout_t *tmo; /* Next scheduled timed callback */
|
||||
+ long tmo_delay; /* Time before it must be called */
|
||||
@ -697,7 +696,7 @@ diff -up cups-1.7.2/scheduler/main.c.avahi-no-threaded cups-1.7.2/scheduler/main
|
||||
|
||||
|
||||
#ifdef HAVE_GETEUID
|
||||
@@ -583,6 +587,14 @@ main(int argc, /* I - Number of comm
|
||||
@@ -569,6 +573,14 @@ main(int argc, /* I - Number of comm
|
||||
|
||||
httpInitialize();
|
||||
|
||||
@ -712,7 +711,7 @@ diff -up cups-1.7.2/scheduler/main.c.avahi-no-threaded cups-1.7.2/scheduler/main
|
||||
cupsdStartServer();
|
||||
|
||||
/*
|
||||
@@ -904,6 +916,16 @@ main(int argc, /* I - Number of comm
|
||||
@@ -871,6 +883,16 @@ main(int argc, /* I - Number of comm
|
||||
}
|
||||
#endif /* __APPLE__ */
|
||||
|
||||
@ -729,7 +728,7 @@ diff -up cups-1.7.2/scheduler/main.c.avahi-no-threaded cups-1.7.2/scheduler/main
|
||||
#ifndef __APPLE__
|
||||
/*
|
||||
* Update the network interfaces once a minute...
|
||||
@@ -1884,6 +1906,10 @@ select_timeout(int fds) /* I - Number
|
||||
@@ -1562,6 +1584,10 @@ select_timeout(int fds) /* I - Number
|
||||
cupsd_job_t *job; /* Job information */
|
||||
cupsd_subscription_t *sub; /* Subscription information */
|
||||
const char *why; /* Debugging aid */
|
||||
@ -740,7 +739,7 @@ diff -up cups-1.7.2/scheduler/main.c.avahi-no-threaded cups-1.7.2/scheduler/main
|
||||
|
||||
|
||||
cupsdLogMessage(CUPSD_LOG_DEBUG2, "select_timeout: JobHistoryUpdate=%ld",
|
||||
@@ -1929,6 +1955,19 @@ select_timeout(int fds) /* I - Number
|
||||
@@ -1607,6 +1633,19 @@ select_timeout(int fds) /* I - Number
|
||||
}
|
||||
#endif /* __APPLE__ */
|
||||
|
||||
@ -760,9 +759,9 @@ diff -up cups-1.7.2/scheduler/main.c.avahi-no-threaded cups-1.7.2/scheduler/main
|
||||
/*
|
||||
* Check whether we are accepting new connections...
|
||||
*/
|
||||
diff -up cups-1.7.2/scheduler/Makefile.avahi-no-threaded cups-1.7.2/scheduler/Makefile
|
||||
--- cups-1.7.2/scheduler/Makefile.avahi-no-threaded 2014-04-14 13:56:52.600617782 +0200
|
||||
+++ cups-1.7.2/scheduler/Makefile 2014-04-14 13:56:52.631617331 +0200
|
||||
diff -up cups-2.0rc1/scheduler/Makefile.avahi-no-threaded cups-2.0rc1/scheduler/Makefile
|
||||
--- cups-2.0rc1/scheduler/Makefile.avahi-no-threaded 2014-08-29 13:27:18.000000000 +0200
|
||||
+++ cups-2.0rc1/scheduler/Makefile 2014-09-12 15:48:35.367634265 +0200
|
||||
@@ -17,6 +17,7 @@ include ../Makedefs
|
||||
|
||||
CUPSDOBJS = \
|
||||
@ -771,17 +770,19 @@ diff -up cups-1.7.2/scheduler/Makefile.avahi-no-threaded cups-1.7.2/scheduler/Ma
|
||||
banners.o \
|
||||
cert.o \
|
||||
classes.o \
|
||||
@@ -41,6 +42,7 @@ CUPSDOBJS = \
|
||||
@@ -40,7 +41,8 @@ CUPSDOBJS = \
|
||||
server.o \
|
||||
statbuf.o \
|
||||
subscriptions.o \
|
||||
sysman.o \
|
||||
+ timeout.o \
|
||||
tls.o
|
||||
- sysman.o
|
||||
+ sysman.o \
|
||||
+ timeout.o
|
||||
LIBOBJS = \
|
||||
filter.o \
|
||||
diff -up cups-1.7.2/scheduler/timeout.c.avahi-no-threaded cups-1.7.2/scheduler/timeout.c
|
||||
--- cups-1.7.2/scheduler/timeout.c.avahi-no-threaded 2014-04-14 13:56:52.634617287 +0200
|
||||
+++ cups-1.7.2/scheduler/timeout.c 2014-04-14 13:56:52.634617287 +0200
|
||||
mime.o \
|
||||
diff -up cups-2.0rc1/scheduler/timeout.c.avahi-no-threaded cups-2.0rc1/scheduler/timeout.c
|
||||
--- cups-2.0rc1/scheduler/timeout.c.avahi-no-threaded 2014-09-12 15:45:28.775279963 +0200
|
||||
+++ cups-2.0rc1/scheduler/timeout.c 2014-09-12 15:45:28.775279963 +0200
|
||||
@@ -0,0 +1,235 @@
|
||||
+/*
|
||||
+ * "$Id$"
|
||||
|
@ -1,7 +1,7 @@
|
||||
diff -up cups-1.6b1/backend/dnssd.c.dnssd-deviceid cups-1.6b1/backend/dnssd.c
|
||||
--- cups-1.6b1/backend/dnssd.c.dnssd-deviceid 2012-05-21 18:05:58.000000000 +0200
|
||||
+++ cups-1.6b1/backend/dnssd.c 2012-05-25 16:27:49.226874427 +0200
|
||||
@@ -1181,15 +1181,22 @@ query_callback(
|
||||
diff -up cups-2.0rc1/backend/dnssd.c.dnssd-deviceid cups-2.0rc1/backend/dnssd.c
|
||||
--- cups-2.0rc1/backend/dnssd.c.dnssd-deviceid 2014-06-30 16:27:01.000000000 +0200
|
||||
+++ cups-2.0rc1/backend/dnssd.c 2014-09-12 14:08:38.624252208 +0200
|
||||
@@ -1196,15 +1196,22 @@ query_callback(
|
||||
if (device->device_id)
|
||||
free(device->device_id);
|
||||
|
||||
@ -27,8 +27,8 @@ diff -up cups-1.6b1/backend/dnssd.c.dnssd-deviceid cups-1.6b1/backend/dnssd.c
|
||||
else if ((ptr = strchr(model, ' ')) != NULL)
|
||||
{
|
||||
/*
|
||||
@@ -1199,7 +1206,7 @@ query_callback(
|
||||
memcpy(make_and_model, model, ptr - model);
|
||||
@@ -1214,7 +1221,7 @@ query_callback(
|
||||
memcpy(make_and_model, model, (size_t)(ptr - model));
|
||||
make_and_model[ptr - model] = '\0';
|
||||
|
||||
- snprintf(device_id, sizeof(device_id), "MFG:%s;MDL:%s",
|
||||
|
@ -1,7 +1,54 @@
|
||||
diff -up cups-1.7.1/config.h.in.journal cups-1.7.1/config.h.in
|
||||
--- cups-1.7.1/config.h.in.journal 2014-02-17 16:48:19.089795987 +0000
|
||||
+++ cups-1.7.1/config.h.in 2014-02-17 16:48:19.136796218 +0000
|
||||
@@ -458,6 +458,13 @@
|
||||
diff -up cups-2.0rc1/conf/cups-files.conf.in.journal cups-2.0rc1/conf/cups-files.conf.in
|
||||
--- cups-2.0rc1/conf/cups-files.conf.in.journal 2014-03-03 17:46:23.000000000 +0100
|
||||
+++ cups-2.0rc1/conf/cups-files.conf.in 2014-09-12 17:47:14.668190332 +0200
|
||||
@@ -28,9 +28,10 @@ SystemGroup @CUPS_SYSTEM_GROUPS@
|
||||
#ConfigFilePerm 0@CUPS_CONFIG_FILE_PERM@
|
||||
#LogFilePerm 0@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.
|
||||
+# Location of the file logging all access to the scheduler; may be the
|
||||
+# name "syslog" or "journal". 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...
|
||||
@@ -42,10 +43,10 @@ AccessLog @CUPS_LOGDIR@/access_log
|
||||
# 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.
|
||||
+# Location of the file logging all messages produced by the scheduler
|
||||
+# and any helper programs; may be the name "syslog" or "journal". 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...
|
||||
@@ -54,10 +55,10 @@ ErrorLog @CUPS_LOGDIR@/error_log
|
||||
# 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.
|
||||
+# Location of the file logging all pages printed by the scheduler and
|
||||
+# any helper programs; may be the name "syslog" or "journal". 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...
|
||||
diff -up cups-2.0rc1/config.h.in.journal cups-2.0rc1/config.h.in
|
||||
--- cups-2.0rc1/config.h.in.journal 2014-08-30 03:51:22.000000000 +0200
|
||||
+++ cups-2.0rc1/config.h.in 2014-09-12 17:47:14.668190332 +0200
|
||||
@@ -470,6 +470,13 @@
|
||||
|
||||
|
||||
/*
|
||||
@ -15,14 +62,24 @@ diff -up cups-1.7.1/config.h.in.journal cups-1.7.1/config.h.in
|
||||
* Various scripting languages...
|
||||
*/
|
||||
|
||||
diff -up cups-1.7.1/config-scripts/cups-systemd.m4.journal cups-1.7.1/config-scripts/cups-systemd.m4
|
||||
--- cups-1.7.1/config-scripts/cups-systemd.m4.journal 2014-02-17 16:48:19.089795987 +0000
|
||||
+++ cups-1.7.1/config-scripts/cups-systemd.m4 2014-02-17 16:48:19.136796218 +0000
|
||||
@@ -22,6 +22,15 @@ if test "x$with_systemdsystemunitdir" !=
|
||||
diff -up cups-2.0rc1/config-scripts/cups-startup.m4.journal cups-2.0rc1/config-scripts/cups-startup.m4
|
||||
--- cups-2.0rc1/config-scripts/cups-startup.m4.journal 2014-03-27 02:15:48.000000000 +0100
|
||||
+++ cups-2.0rc1/config-scripts/cups-startup.m4 2014-09-12 17:48:58.435737311 +0200
|
||||
@@ -15,8 +15,10 @@ dnl
|
||||
|
||||
ONDEMANDFLAGS=""
|
||||
ONDEMANDLIBS=""
|
||||
+SDJLIBS=""
|
||||
AC_SUBST(ONDEMANDFLAGS)
|
||||
AC_SUBST(ONDEMANDLIBS)
|
||||
+AC_SUBST(SDJLIBS)
|
||||
|
||||
dnl Launchd is used on OS X/Darwin...
|
||||
AC_ARG_ENABLE(launchd, [ --disable-launchd disable launchd support])
|
||||
@@ -71,6 +73,15 @@ if test x$enable_systemd != xno; then
|
||||
fi
|
||||
fi
|
||||
|
||||
+SDJLIBS=""
|
||||
+AC_MSG_CHECKING(for libsystemd-journal)
|
||||
+if $PKGCONFIG --exists libsystemd-journal; then
|
||||
+ AC_MSG_RESULT(yes)
|
||||
@ -31,122 +88,107 @@ diff -up cups-1.7.1/config-scripts/cups-systemd.m4.journal cups-1.7.1/config-scr
|
||||
+else
|
||||
+ AC_MSG_RESULT(no)
|
||||
+fi
|
||||
if test -n "$with_systemdsystemunitdir" -a "x$with_systemdsystemunitdir" != xno ; then
|
||||
SYSTEMD_UNITS="cups.service cups.socket cups.path"
|
||||
else
|
||||
@@ -30,6 +39,7 @@ fi
|
||||
|
||||
AC_SUBST(SYSTEMD_UNITS)
|
||||
AC_SUBST(SDLIBS)
|
||||
+AC_SUBST(SDJLIBS)
|
||||
|
||||
dnl
|
||||
dnl "$Id$"
|
||||
diff -up cups-1.7.1/doc/help/ref-cups-files-conf.html.in.journal cups-1.7.1/doc/help/ref-cups-files-conf.html.in
|
||||
--- cups-1.7.1/doc/help/ref-cups-files-conf.html.in.journal 2014-02-17 17:06:11.652078495 +0000
|
||||
+++ cups-1.7.1/doc/help/ref-cups-files-conf.html.in 2014-02-17 17:11:50.675752398 +0000
|
||||
@@ -18,6 +18,7 @@
|
||||
AccessLog /var/log/cups/access_log
|
||||
AccessLog /var/log/cups/access_log-%s
|
||||
AccessLog syslog
|
||||
+AccessLog journal
|
||||
</PRE>
|
||||
|
||||
<H3>Description</H3>
|
||||
@@ -36,6 +37,9 @@ server activity.</P>
|
||||
<P>The special name "syslog" can be used to send the access
|
||||
information to the system log instead of a plain file.</P>
|
||||
|
||||
+<P>The special name "journal" can be used to send the access
|
||||
+information to the system log instead of a plain file.</P>
|
||||
+
|
||||
<P>The default access log file is
|
||||
<VAR>/var/log/access_log</VAR>.</P>
|
||||
dnl Solaris uses smf
|
||||
SMFMANIFESTDIR=""
|
||||
AC_SUBST(SMFMANIFESTDIR)
|
||||
diff -up cups-2.0rc1/doc/help/man-cups-files.conf.html.journal cups-2.0rc1/doc/help/man-cups-files.conf.html
|
||||
--- cups-2.0rc1/doc/help/man-cups-files.conf.html.journal 2014-06-13 02:01:23.000000000 +0200
|
||||
+++ cups-2.0rc1/doc/help/man-cups-files.conf.html 2014-09-12 17:47:14.669190318 +0200
|
||||
@@ -24,9 +24,11 @@ The following directives are understood
|
||||
<dt><b>AccessLog</b>
|
||||
<dd style="margin-left: 5.0em"><dt><b>AccessLog </b><i>filename</i>
|
||||
<dd style="margin-left: 5.0em"><dt><b>AccessLog syslog</b>
|
||||
+<dd style="margin-left: 5.0em"><dt><b>AccessLog journal</b>
|
||||
<dd style="margin-left: 5.0em">Defines the access log filename.
|
||||
Specifying a blank filename disables access log generation.
|
||||
The value "syslog" causes log entries to be sent to the system log daemon.
|
||||
+The value "journal" causes access information to be sent to the system log instead of a plain file.
|
||||
The server name may be included in filenames using the string "%s", for example:
|
||||
<pre class="man">
|
||||
|
||||
@@ -108,6 +112,7 @@ language needed.</P>
|
||||
ErrorLog /var/log/cups/error_log
|
||||
ErrorLog /var/log/cups/error_log-%s
|
||||
ErrorLog syslog
|
||||
+ErrorLog journal
|
||||
</PRE>
|
||||
@@ -51,9 +53,12 @@ The default is usually "/usr/share/doc/c
|
||||
<dt><b>ErrorLog</b>
|
||||
<dd style="margin-left: 5.0em"><dt><b>ErrorLog </b><i>filename</i>
|
||||
<dd style="margin-left: 5.0em"><dt><b>ErrorLog syslog</b>
|
||||
+<dd style="margin-left: 5.0em"><dt><b>ErrorLog journal</b>
|
||||
<dd style="margin-left: 5.0em">Defines the error log filename.
|
||||
Specifying a blank filename disables error log generation.
|
||||
The value "syslog" causes log entries to be sent to the system log daemon.
|
||||
+The value "journal" causes error information to be sent to the system journal instead of a plain file.
|
||||
+Information relating to a specific job is logged with the field <CODE>CUPS_JOB_ID</CODE> filled in.
|
||||
The server name may be included in filenames using the string "%s", for example:
|
||||
<pre class="man">
|
||||
|
||||
<H3>Description</H3>
|
||||
@@ -124,6 +129,11 @@ default error log file is <VAR>/var/log/
|
||||
<P>The special name "syslog" can be used to send the error
|
||||
information to the system log instead of a plain file.</P>
|
||||
|
||||
+<P>The special name "journal" can be used to send the error
|
||||
+information to the system journal instead of a plain file. Information
|
||||
+relating to a specific job is logged with the field
|
||||
+<CODE>CUPS_JOB_ID</CODE> filled in.</P>
|
||||
+
|
||||
|
||||
<H2 CLASS="title"><SPAN CLASS="info">CUPS 1.4/OS X 10.6</SPAN><A NAME="FatalErrors">FatalErrors</A></H2>
|
||||
|
||||
@@ -266,6 +276,7 @@ is 644.</P>
|
||||
PageLog /var/log/cups/page_log
|
||||
PageLog /var/log/cups/page_log-%s
|
||||
PageLog syslog
|
||||
+PageLog journal
|
||||
</PRE>
|
||||
|
||||
<H3>Description</H3>
|
||||
@@ -282,6 +293,11 @@ default page log file is <VAR>/var/log/c
|
||||
<P>The special name "syslog" can be used to send the page
|
||||
information to the system log instead of a plain file.</P>
|
||||
|
||||
+<P>The special name "journal" can be used to send the page information
|
||||
+to the system journal instead of a plain file. The fields
|
||||
+<CODE>CUPS_JOB_ID</CODE> and <CODE>CUPS_PAGE_NUMBER</CODE> will be
|
||||
+filled in.</P>
|
||||
+
|
||||
|
||||
<H2 CLASS="title"><A NAME="Printcap">Printcap</A></H2>
|
||||
|
||||
diff -up cups-1.7.1/Makedefs.in.journal cups-1.7.1/Makedefs.in
|
||||
--- cups-1.7.1/Makedefs.in.journal 2014-02-17 16:48:19.090795992 +0000
|
||||
+++ cups-1.7.1/Makedefs.in 2014-02-17 16:48:19.136796218 +0000
|
||||
@@ -143,6 +143,7 @@ IPPFIND_BIN = @IPPFIND_BIN@
|
||||
IPPFIND_MAN = @IPPFIND_MAN@
|
||||
LAUNCHDLIBS = @LAUNCHDLIBS@
|
||||
SDLIBS = @SDLIBS@
|
||||
@@ -96,8 +101,11 @@ The default group is operating system sp
|
||||
The default is "0644".
|
||||
<dt><b>PageLog </b>[ <i>filename</i> ]
|
||||
<dd style="margin-left: 5.0em"><dt><b>PageLog syslog</b>
|
||||
+<dd style="margin-left: 5.0em"><dt><b>PageLog journal</b>
|
||||
<dd style="margin-left: 5.0em">Defines the page log filename.
|
||||
The value "syslog" causes log entries to be sent to the system log daemon.
|
||||
+The value "journal" causes the page information to be sent to the system journal instead of a plain file.
|
||||
+The fields <CODE>CUPS_JOB_ID</CODE> and <CODE>CUPS_PAGE_NUMBER</CODE> will be filled in.
|
||||
Specifying a blank filename disables page log generation.
|
||||
The server name may be included in filenames using the string "%s", for example:
|
||||
<pre class="man">
|
||||
diff -up cups-2.0rc1/Makedefs.in.journal cups-2.0rc1/Makedefs.in
|
||||
--- cups-2.0rc1/Makedefs.in.journal 2014-09-12 17:47:14.617191046 +0200
|
||||
+++ cups-2.0rc1/Makedefs.in 2014-09-12 17:47:14.669190318 +0200
|
||||
@@ -148,6 +148,7 @@ LINKCUPSIMAGE = @LINKCUPSIMAGE@
|
||||
LIBS = $(LINKCUPS) $(COMMONLIBS)
|
||||
ONDEMANDFLAGS = @ONDEMANDFLAGS@
|
||||
ONDEMANDLIBS = @ONDEMANDLIBS@
|
||||
+SDJLIBS = @SDJLIBS@
|
||||
LDFLAGS = -L../cgi-bin -L../cups -L../filter -L../ppdc \
|
||||
-L../scheduler @LDARCHFLAGS@ \
|
||||
@LDFLAGS@ @RELROFLAGS@ @PIEFLAGS@ $(OPTIM)
|
||||
diff -up cups-1.7.1/man/cups-files.conf.man.in.journal cups-1.7.1/man/cups-files.conf.man.in
|
||||
--- cups-1.7.1/man/cups-files.conf.man.in.journal 2014-02-17 17:05:08.103764935 +0000
|
||||
+++ cups-1.7.1/man/cups-files.conf.man.in 2014-02-17 17:06:48.131258521 +0000
|
||||
@@ -29,6 +29,8 @@ on-line help for detailed descriptions:
|
||||
AccessLog filename
|
||||
OPTIM = @OPTIM@
|
||||
OPTIONS =
|
||||
PAMLIBS = @PAMLIBS@
|
||||
diff -up cups-2.0rc1/man/cups-files.conf.man.in.journal cups-2.0rc1/man/cups-files.conf.man.in
|
||||
--- cups-2.0rc1/man/cups-files.conf.man.in.journal 2014-06-13 02:01:23.000000000 +0200
|
||||
+++ cups-2.0rc1/man/cups-files.conf.man.in 2014-09-12 17:47:14.669190318 +0200
|
||||
@@ -33,9 +33,12 @@ The following directives are understood
|
||||
\fBAccessLog \fIfilename\fR
|
||||
.TP 5
|
||||
AccessLog syslog
|
||||
\fBAccessLog syslog\fR
|
||||
+.TP 5
|
||||
+AccessLog journal
|
||||
.br
|
||||
+\fBAccessLog journal\fR
|
||||
Defines the access log filename.
|
||||
Specifying a blank filename disables access log generation.
|
||||
The value "syslog" causes log entries to be sent to the system log daemon.
|
||||
+The value "journal" causes access information to be sent to the system log instead of a plain file.
|
||||
The server name may be included in filenames using the string "%s", for example:
|
||||
.nf
|
||||
|
||||
@@ -65,9 +68,13 @@ The default is usually "/usr/share/doc/c
|
||||
\fBErrorLog \fIfilename\fR
|
||||
.TP 5
|
||||
@@ -48,6 +50,8 @@ Specifies the root directory for the int
|
||||
ErrorLog filename
|
||||
.TP 5
|
||||
ErrorLog syslog
|
||||
\fBErrorLog syslog\fR
|
||||
+.TP 5
|
||||
+ErrorLog journal
|
||||
.br
|
||||
Specifies the error log filename.
|
||||
+\fBErrorLog journal\fR
|
||||
Defines the error log filename.
|
||||
Specifying a blank filename disables error log generation.
|
||||
The value "syslog" causes log entries to be sent to the system log daemon.
|
||||
+The value "journal" causes error information to be sent to the system journal instead of a plain file.
|
||||
+Information relating to a specific job is logged with the field \fICUPS_JOB_ID\fR filled in.
|
||||
The server name may be included in filenames using the string "%s", for example:
|
||||
.nf
|
||||
|
||||
@@ -125,8 +132,12 @@ The default is "0644".
|
||||
\fBPageLog \fR[ \fIfilename\fR ]
|
||||
.TP 5
|
||||
@@ -83,6 +87,8 @@ Specifies the permissions for all log fi
|
||||
PageLog filename
|
||||
.TP 5
|
||||
PageLog syslog
|
||||
\fBPageLog syslog\fR
|
||||
+.TP 5
|
||||
+PageLog journal
|
||||
.br
|
||||
Specifies the page log filename.
|
||||
.TP 5
|
||||
diff -up cups-1.7.1/scheduler/conf.c.journal cups-1.7.1/scheduler/conf.c
|
||||
--- cups-1.7.1/scheduler/conf.c.journal 2014-02-17 16:48:19.047795781 +0000
|
||||
+++ cups-1.7.1/scheduler/conf.c 2014-02-17 16:48:19.137796223 +0000
|
||||
+\fBPageLog journal\fR
|
||||
Defines the page log filename.
|
||||
The value "syslog" causes log entries to be sent to the system log daemon.
|
||||
+The value "journal" causes the page information to be sent to the system journal instead of a plain file.
|
||||
+The fields \fICUPS_JOB_ID\fR and \fICUPS_PAGE_NUMBER\fR will be filled in.
|
||||
Specifying a blank filename disables page log generation.
|
||||
The server name may be included in filenames using the string "%s", for example:
|
||||
.nf
|
||||
diff -up cups-2.0rc1/scheduler/conf.c.journal cups-2.0rc1/scheduler/conf.c
|
||||
--- cups-2.0rc1/scheduler/conf.c.journal 2014-09-12 17:47:14.563191802 +0200
|
||||
+++ cups-2.0rc1/scheduler/conf.c 2014-09-12 17:47:14.670190304 +0200
|
||||
@@ -950,9 +950,9 @@ cupsdReadConfiguration(void)
|
||||
*/
|
||||
|
||||
@ -177,10 +219,10 @@ diff -up cups-1.7.1/scheduler/conf.c.journal cups-1.7.1/scheduler/conf.c
|
||||
cupsdCheckLogFile(&PageFile, PageLog);
|
||||
|
||||
/*
|
||||
diff -up cups-1.7.1/scheduler/conf.h.journal cups-1.7.1/scheduler/conf.h
|
||||
--- cups-1.7.1/scheduler/conf.h.journal 2014-02-17 16:48:19.048795786 +0000
|
||||
+++ cups-1.7.1/scheduler/conf.h 2014-02-17 16:48:19.138796228 +0000
|
||||
@@ -297,6 +297,8 @@ extern int cupsdLogMessage(int level, co
|
||||
diff -up cups-2.0rc1/scheduler/conf.h.journal cups-2.0rc1/scheduler/conf.h
|
||||
--- cups-2.0rc1/scheduler/conf.h.journal 2014-09-12 17:47:14.563191802 +0200
|
||||
+++ cups-2.0rc1/scheduler/conf.h 2014-09-12 17:47:14.671190290 +0200
|
||||
@@ -298,6 +298,8 @@ extern int cupsdLogMessage(int level, co
|
||||
extern int cupsdLogPage(cupsd_job_t *job, const char *page);
|
||||
extern int cupsdLogRequest(cupsd_client_t *con, http_status_t code);
|
||||
extern int cupsdReadConfiguration(void);
|
||||
@ -189,18 +231,10 @@ diff -up cups-1.7.1/scheduler/conf.h.journal cups-1.7.1/scheduler/conf.h
|
||||
extern int cupsdWriteErrorLog(int level, const char *message);
|
||||
|
||||
|
||||
diff -up cups-1.7.1/scheduler/log.c.journal cups-1.7.1/scheduler/log.c
|
||||
--- cups-1.7.1/scheduler/log.c.journal 2014-02-17 16:48:19.073795909 +0000
|
||||
+++ cups-1.7.1/scheduler/log.c 2014-02-17 16:48:19.138796228 +0000
|
||||
@@ -21,6 +21,7 @@
|
||||
* cupsdLogMessage() - Log a message to the error log file.
|
||||
* cupsdLogPage() - Log a page to the page log file.
|
||||
* cupsdLogRequest() - Log an HTTP request in Common Log Format.
|
||||
+ * cupsdWriteErrorLogJob() - Write a job message to the ErrorLog.
|
||||
* cupsdWriteErrorLog() - Write a line to the ErrorLog.
|
||||
* format_log_line() - Format a line for a log file.
|
||||
*/
|
||||
@@ -35,6 +36,9 @@
|
||||
diff -up cups-2.0rc1/scheduler/log.c.journal cups-2.0rc1/scheduler/log.c
|
||||
--- cups-2.0rc1/scheduler/log.c.journal 2014-09-12 17:47:14.599191298 +0200
|
||||
+++ cups-2.0rc1/scheduler/log.c 2014-09-12 17:47:14.671190290 +0200
|
||||
@@ -23,6 +23,9 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
@ -210,7 +244,7 @@ diff -up cups-1.7.1/scheduler/log.c.journal cups-1.7.1/scheduler/log.c
|
||||
|
||||
|
||||
/*
|
||||
@@ -559,8 +563,17 @@ cupsdLogJob(cupsd_job_t *job, /* I - Jo
|
||||
@@ -603,8 +606,17 @@ cupsdLogJob(cupsd_job_t *job, /* I - Jo
|
||||
}
|
||||
else if (level <= LogLevel &&
|
||||
(level != CUPSD_LOG_INFO || LogLevel >= CUPSD_LOG_DEBUG))
|
||||
@ -230,7 +264,7 @@ diff -up cups-1.7.1/scheduler/log.c.journal cups-1.7.1/scheduler/log.c
|
||||
return (1);
|
||||
}
|
||||
else
|
||||
@@ -789,6 +802,15 @@ cupsdLogPage(cupsd_job_t *job, /* I - J
|
||||
@@ -860,6 +872,15 @@ cupsdLogPage(cupsd_job_t *job, /* I - J
|
||||
|
||||
*bufptr = '\0';
|
||||
|
||||
@ -246,7 +280,7 @@ diff -up cups-1.7.1/scheduler/log.c.journal cups-1.7.1/scheduler/log.c
|
||||
#ifdef HAVE_VSYSLOG
|
||||
/*
|
||||
* See if we are logging pages via syslog...
|
||||
@@ -964,7 +986,7 @@ cupsdLogRequest(cupsd_client_t *con, /*
|
||||
@@ -1037,7 +1058,7 @@ cupsdLogRequest(cupsd_client_t *con, /*
|
||||
* See if we are logging accesses via syslog...
|
||||
*/
|
||||
|
||||
@ -255,7 +289,7 @@ diff -up cups-1.7.1/scheduler/log.c.journal cups-1.7.1/scheduler/log.c
|
||||
{
|
||||
syslog(LOG_INFO,
|
||||
"REQUEST %s - %s \"%s %s HTTP/%d.%d\" %d " CUPS_LLFMT " %s %s\n",
|
||||
@@ -1018,8 +1040,9 @@ cupsdLogRequest(cupsd_client_t *con, /*
|
||||
@@ -1091,8 +1112,9 @@ cupsdLogRequest(cupsd_client_t *con, /*
|
||||
*/
|
||||
|
||||
int /* O - 1 on success, 0 on failure */
|
||||
@ -265,9 +299,9 @@ diff -up cups-1.7.1/scheduler/log.c.journal cups-1.7.1/scheduler/log.c
|
||||
+ int level, /* I - Log level */
|
||||
+ const char *message) /* I - Message string */
|
||||
{
|
||||
int ret = 1; /* Return value */
|
||||
static const char levels[] = /* Log levels... */
|
||||
{
|
||||
@@ -1036,12 +1059,25 @@ cupsdWriteErrorLog(int level, /*
|
||||
@@ -1110,12 +1132,25 @@ cupsdWriteErrorLog(int level, /*
|
||||
};
|
||||
|
||||
|
||||
@ -294,7 +328,7 @@ diff -up cups-1.7.1/scheduler/log.c.journal cups-1.7.1/scheduler/log.c
|
||||
{
|
||||
syslog(syslevels[level], "%s", message);
|
||||
return (1);
|
||||
@@ -1067,6 +1103,18 @@ cupsdWriteErrorLog(int level, /*
|
||||
@@ -1149,6 +1184,18 @@ cupsdWriteErrorLog(int level, /*
|
||||
}
|
||||
|
||||
|
||||
@ -313,70 +347,24 @@ diff -up cups-1.7.1/scheduler/log.c.journal cups-1.7.1/scheduler/log.c
|
||||
/*
|
||||
* 'format_log_line()' - Format a line for a log file.
|
||||
*
|
||||
diff -up cups-1.7.1/scheduler/Makefile.journal cups-1.7.1/scheduler/Makefile
|
||||
--- cups-1.7.1/scheduler/Makefile.journal 2014-02-17 16:48:19.124796159 +0000
|
||||
+++ cups-1.7.1/scheduler/Makefile 2014-02-17 16:48:19.137796223 +0000
|
||||
@@ -383,7 +383,7 @@ cupsd: $(CUPSDOBJS) $(LIBCUPSMIME) ../cu
|
||||
diff -up cups-2.0rc1/scheduler/Makefile.journal cups-2.0rc1/scheduler/Makefile
|
||||
--- cups-2.0rc1/scheduler/Makefile.journal 2014-09-12 17:47:14.653190542 +0200
|
||||
+++ cups-2.0rc1/scheduler/Makefile 2014-09-12 17:47:14.672190276 +0200
|
||||
@@ -382,7 +382,7 @@ cupsd: $(CUPSDOBJS) $(LIBCUPSMIME) ../cu
|
||||
$(CC) $(LDFLAGS) -o cupsd $(CUPSDOBJS) -L. -lcupsmime \
|
||||
$(LIBZ) $(SSLLIBS) $(LIBSLP) $(LIBLDAP) $(PAMLIBS) \
|
||||
$(LIBPAPER) $(LIBMALLOC) $(SERVERLIBS) $(DNSSDLIBS) $(LIBS) \
|
||||
- $(LIBGSSAPI) $(LIBWRAP) $(SDLIBS)
|
||||
+ $(LIBGSSAPI) $(LIBWRAP) $(SDLIBS) $(SDJLIBS)
|
||||
$(LIBPAPER) $(LIBMALLOC) $(SERVERLIBS) $(ONDEMANDLIBS) \
|
||||
- $(DNSSDLIBS) $(LIBS) $(LIBGSSAPI) $(LIBWRAP)
|
||||
+ $(DNSSDLIBS) $(LIBS) $(LIBGSSAPI) $(LIBWRAP) $(SDJLIBS)
|
||||
|
||||
cupsd-static: $(CUPSDOBJS) libcupsmime.a ../cups/$(LIBCUPSSTATIC)
|
||||
echo Linking $@...
|
||||
@@ -391,7 +391,7 @@ cupsd-static: $(CUPSDOBJS) libcupsmime.a
|
||||
@@ -390,7 +390,7 @@ cupsd-static: $(CUPSDOBJS) libcupsmime.a
|
||||
$(LIBZ) $(SSLLIBS) $(LIBSLP) $(LIBLDAP) $(PAMLIBS) \
|
||||
../cups/$(LIBCUPSSTATIC) $(COMMONLIBS) $(LIBZ) $(LIBPAPER) \
|
||||
$(LIBMALLOC) $(SERVERLIBS) $(DNSSDLIBS) $(LIBGSSAPI) \
|
||||
- $(LIBWRAP) $(SDLIBS)
|
||||
+ $(LIBWRAP) $(SDLIBS) $(SDJLIBS)
|
||||
$(LIBMALLOC) $(SERVERLIBS) $(ONDEMANDLIBS) $(DNSSDLIBS) \
|
||||
- $(LIBGSSAPI) $(LIBWRAP)
|
||||
+ $(LIBGSSAPI) $(LIBWRAP) $(SDJLIBS)
|
||||
|
||||
tls.o: tls-darwin.c tls-gnutls.c tls-openssl.c
|
||||
|
||||
--- cups-1.7.1/conf/cups-files.conf.in.journal 2014-04-04 13:12:13.923185140 +0100
|
||||
+++ cups-1.7.1/conf/cups-files.conf.in 2014-04-04 13:13:10.633430876 +0100
|
||||
@@ -30,9 +30,10 @@ SystemGroup @CUPS_SYSTEM_GROUPS@
|
||||
#ConfigFilePerm 0@CUPS_CONFIG_FILE_PERM@
|
||||
#LogFilePerm 0@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.
|
||||
+# Location of the file logging all access to the scheduler; may be the
|
||||
+# name "syslog" or "journal". 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...
|
||||
@@ -44,10 +45,10 @@ AccessLog @CUPS_LOGDIR@/access_log
|
||||
# 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.
|
||||
+# Location of the file logging all messages produced by the scheduler
|
||||
+# and any helper programs; may be the name "syslog" or "journal". 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...
|
||||
@@ -56,10 +57,10 @@ ErrorLog @CUPS_LOGDIR@/error_log
|
||||
# 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.
|
||||
+# Location of the file logging all pages printed by the scheduler and
|
||||
+# any helper programs; may be the name "syslog" or "journal". 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...
|
||||
#
|
||||
|
@ -1,66 +0,0 @@
|
||||
diff -up cups-1.7rc1/man/cups-lpd.man.in.lpd-manpage cups-1.7rc1/man/cups-lpd.man.in
|
||||
--- cups-1.7rc1/man/cups-lpd.man.in.lpd-manpage 2013-07-08 23:15:13.000000000 +0200
|
||||
+++ cups-1.7rc1/man/cups-lpd.man.in 2013-07-12 11:20:15.806737389 +0200
|
||||
@@ -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
|
||||
protocol. \fIcups-lpd\fR does not act as a standalone network
|
||||
-daemon but instead operates using the Internet "super-server"
|
||||
-\fIinetd(8)\fR or \fIxinetd(8)\fR. If you are using \fIinetd\fR,
|
||||
-add the following line to the \fIinetd.conf\fR file to enable the
|
||||
-\fIcups-lpd\fR mini-server:
|
||||
-.br
|
||||
-.nf
|
||||
-
|
||||
- printer stream tcp nowait lp /usr/lib/cups/daemon/cups-lpd cups-lpd \\
|
||||
- -o document-format=application/octet-stream
|
||||
-.fi
|
||||
-.LP
|
||||
-.LP
|
||||
-\fBNote:\fR If you are using Solaris 10 or higher, you must run
|
||||
-the \fIinetdconv(1m)\fR program to register the changes to the
|
||||
-inetd.conf file.
|
||||
-.LP
|
||||
-If you are using the newer \fIxinetd(8)\fR daemon, create a file
|
||||
-named \fI/etc/xinetd.d/cups\fR containing the following lines:
|
||||
-.br
|
||||
-.nf
|
||||
-
|
||||
- service printer
|
||||
- {
|
||||
- socket_type = stream
|
||||
- protocol = tcp
|
||||
- wait = no
|
||||
- user = lp
|
||||
- group = sys
|
||||
- passenv =
|
||||
- server = /usr/lib/cups/daemon/cups-lpd
|
||||
- server_args = -o document-format=application/octet-stream
|
||||
- }
|
||||
-.fi
|
||||
+daemon but instead operates as a socket-activatable \fIsystemd(1)\fR
|
||||
+service.
|
||||
.SH OPTIONS
|
||||
.TP 5
|
||||
-h hostname[:port]
|
||||
@@ -93,8 +62,7 @@ wrappers. Therefore, running \fIcups-lpd
|
||||
allow any computer on your network (and perhaps the entire
|
||||
Internet) to print to your server.
|
||||
.LP
|
||||
-While \fIxinetd\fR has built-in access control support, you
|
||||
-should use the TCP wrappers package with \fIinetd\fR to limit
|
||||
+You should use configure the firewall to limit TCP port 515
|
||||
access to only those computers that should be able to print
|
||||
through your server.
|
||||
.LP
|
||||
@@ -113,9 +81,7 @@ between LPD and IPP Protocols. Since man
|
||||
stray from this definition, remote status reporting to LPD
|
||||
clients may be unreliable.
|
||||
.SH SEE ALSO
|
||||
-\fIcups(1)\fR, \fIcupsd(8)\fR, \fIinetconv(1m)\fR,
|
||||
-\fIinetd(8)\fR, \fIxinetd(8)\fR,
|
||||
-.br
|
||||
+\fIcups(1)\fR, \fIcupsd(8)\fR, \fIsystemd(1)\fR,
|
||||
http://localhost:631/help
|
||||
.SH COPYRIGHT
|
||||
Copyright 2007-2013 by Apple Inc.
|
258
cups-lspp.patch
258
cups-lspp.patch
@ -1,7 +1,7 @@
|
||||
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
|
||||
diff -up cups-2.0rc1/config.h.in.lspp cups-2.0rc1/config.h.in
|
||||
--- cups-2.0rc1/config.h.in.lspp 2014-09-12 16:54:21.764812716 +0200
|
||||
+++ cups-2.0rc1/config.h.in 2014-09-12 16:54:21.775812560 +0200
|
||||
@@ -716,6 +716,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.7.1/config.h.in.lspp cups-1.7.1/config.h.in
|
||||
#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
|
||||
diff -up cups-2.0rc1/config-scripts/cups-lspp.m4.lspp cups-2.0rc1/config-scripts/cups-lspp.m4
|
||||
--- cups-2.0rc1/config-scripts/cups-lspp.m4.lspp 2014-09-12 16:54:21.776812546 +0200
|
||||
+++ cups-2.0rc1/config-scripts/cups-lspp.m4 2014-09-12 16:54:21.776812546 +0200
|
||||
@@ -0,0 +1,36 @@
|
||||
+dnl
|
||||
+dnl LSPP code for the Common UNIX Printing System (CUPS).
|
||||
@ -55,10 +55,10 @@ diff -up cups-1.7.1/config-scripts/cups-lspp.m4.lspp cups-1.7.1/config-scripts/c
|
||||
+ ;;
|
||||
+ esac
|
||||
+fi
|
||||
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)
|
||||
diff -up cups-2.0rc1/configure.ac.lspp cups-2.0rc1/configure.ac
|
||||
--- cups-2.0rc1/configure.ac.lspp 2014-04-21 14:22:03.000000000 +0200
|
||||
+++ cups-2.0rc1/configure.ac 2014-09-12 16:54:21.776812546 +0200
|
||||
@@ -36,6 +36,8 @@ sinclude(config-scripts/cups-startup.m4)
|
||||
sinclude(config-scripts/cups-defaults.m4)
|
||||
sinclude(config-scripts/cups-scripting.m4)
|
||||
|
||||
@ -67,10 +67,10 @@ diff -up cups-1.7.1/configure.in.lspp cups-1.7.1/configure.in
|
||||
INSTALL_LANGUAGES=""
|
||||
UNINSTALL_LANGUAGES=""
|
||||
LANGFILES=""
|
||||
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 @@
|
||||
diff -up cups-2.0rc1/filter/common.c.lspp cups-2.0rc1/filter/common.c
|
||||
--- cups-2.0rc1/filter/common.c.lspp 2014-02-06 19:33:34.000000000 +0100
|
||||
+++ cups-2.0rc1/filter/common.c 2014-09-12 16:54:21.776812546 +0200
|
||||
@@ -19,6 +19,12 @@
|
||||
* Include necessary headers...
|
||||
*/
|
||||
|
||||
@ -83,7 +83,7 @@ diff -up cups-1.7.1/filter/common.c.lspp cups-1.7.1/filter/common.c
|
||||
#include "common.h"
|
||||
#include <locale.h>
|
||||
|
||||
@@ -312,6 +318,18 @@ WriteLabelProlog(const char *label, /* I
|
||||
@@ -301,6 +307,18 @@ WriteLabelProlog(const char *label, /* I
|
||||
{
|
||||
const char *classification; /* CLASSIFICATION environment variable */
|
||||
const char *ptr; /* Temporary string pointer */
|
||||
@ -102,7 +102,7 @@ diff -up cups-1.7.1/filter/common.c.lspp cups-1.7.1/filter/common.c
|
||||
|
||||
|
||||
/*
|
||||
@@ -334,6 +352,124 @@ WriteLabelProlog(const char *label, /* I
|
||||
@@ -323,6 +341,124 @@ WriteLabelProlog(const char *label, /* I
|
||||
return;
|
||||
}
|
||||
|
||||
@ -227,7 +227,7 @@ diff -up cups-1.7.1/filter/common.c.lspp cups-1.7.1/filter/common.c
|
||||
/*
|
||||
* Set the classification + page label string...
|
||||
*/
|
||||
@@ -414,7 +550,10 @@ WriteLabelProlog(const char *label, /* I
|
||||
@@ -403,7 +539,10 @@ WriteLabelProlog(const char *label, /* I
|
||||
printf(" %.0f moveto ESPpl show\n", top - 14.0);
|
||||
puts("pop");
|
||||
puts("}bind put");
|
||||
@ -238,10 +238,10 @@ diff -up cups-1.7.1/filter/common.c.lspp cups-1.7.1/filter/common.c
|
||||
|
||||
|
||||
/*
|
||||
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, /*
|
||||
diff -up cups-2.0rc1/filter/pstops.c.lspp cups-2.0rc1/filter/pstops.c
|
||||
--- cups-2.0rc1/filter/pstops.c.lspp 2014-02-06 19:33:34.000000000 +0100
|
||||
+++ cups-2.0rc1/filter/pstops.c 2014-09-12 16:54:21.778812518 +0200
|
||||
@@ -3173,6 +3173,18 @@ write_label_prolog(pstops_doc_t *doc, /*
|
||||
{
|
||||
const char *classification; /* CLASSIFICATION environment variable */
|
||||
const char *ptr; /* Temporary string pointer */
|
||||
@ -260,7 +260,7 @@ diff -up cups-1.7.1/filter/pstops.c.lspp cups-1.7.1/filter/pstops.c
|
||||
|
||||
|
||||
/*
|
||||
@@ -3225,6 +3237,124 @@ write_label_prolog(pstops_doc_t *doc, /*
|
||||
@@ -3195,6 +3207,124 @@ write_label_prolog(pstops_doc_t *doc, /*
|
||||
return;
|
||||
}
|
||||
|
||||
@ -385,7 +385,7 @@ diff -up cups-1.7.1/filter/pstops.c.lspp cups-1.7.1/filter/pstops.c
|
||||
/*
|
||||
* Set the classification + page label string...
|
||||
*/
|
||||
@@ -3303,7 +3433,10 @@ write_label_prolog(pstops_doc_t *doc, /*
|
||||
@@ -3273,7 +3403,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");
|
||||
@ -396,30 +396,31 @@ diff -up cups-1.7.1/filter/pstops.c.lspp cups-1.7.1/filter/pstops.c
|
||||
|
||||
|
||||
/*
|
||||
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
|
||||
diff -up cups-2.0rc1/Makedefs.in.lspp cups-2.0rc1/Makedefs.in
|
||||
--- cups-2.0rc1/Makedefs.in.lspp 2014-09-12 16:54:21.778812518 +0200
|
||||
+++ cups-2.0rc1/Makedefs.in 2014-09-12 16:55:09.761134739 +0200
|
||||
@@ -145,7 +145,7 @@ LDFLAGS = -L../cgi-bin -L../cups -L../f
|
||||
@LDFLAGS@ @RELROFLAGS@ @PIEFLAGS@ $(OPTIM)
|
||||
LINKCUPS = @LINKCUPS@ $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(LIBZ)
|
||||
LINKCUPS = @LINKCUPS@ $(LIBGSSAPI) $(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
|
||||
@@ -49,6 +50,7 @@
|
||||
|
||||
ONDEMANDFLAGS = @ONDEMANDFLAGS@
|
||||
ONDEMANDLIBS = @ONDEMANDLIBS@
|
||||
SDJLIBS = @SDJLIBS@
|
||||
diff -up cups-2.0rc1/scheduler/client.c.lspp cups-2.0rc1/scheduler/client.c
|
||||
--- cups-2.0rc1/scheduler/client.c.lspp 2014-08-28 17:37:22.000000000 +0200
|
||||
+++ cups-2.0rc1/scheduler/client.c 2014-09-12 16:59:59.193046343 +0200
|
||||
@@ -24,6 +24,8 @@
|
||||
#define _HTTP_NO_PRIVATE
|
||||
#include "cupsd.h"
|
||||
|
||||
+#define _GNU_SOURCE
|
||||
+
|
||||
#ifdef __APPLE__
|
||||
# include <libproc.h>
|
||||
#endif /* __APPLE__ */
|
||||
@@ -56,6 +58,11 @@
|
||||
@@ -31,6 +33,11 @@
|
||||
# include <tcpd.h>
|
||||
#endif /* HAVE_TCPD_H */
|
||||
|
||||
@ -430,8 +431,8 @@ diff -up cups-1.7.1/scheduler/client.c.lspp cups-1.7.1/scheduler/client.c
|
||||
+#endif /* WITH_LSPP */
|
||||
|
||||
/*
|
||||
* Local globals...
|
||||
@@ -378,6 +385,57 @@ cupsdAcceptClient(cupsd_listener_t *lis)
|
||||
* Local functions...
|
||||
@@ -265,6 +272,57 @@ cupsdAcceptClient(cupsd_listener_t *lis)
|
||||
}
|
||||
#endif /* HAVE_TCPD_H */
|
||||
|
||||
@ -441,7 +442,7 @@ diff -up cups-1.7.1/scheduler/client.c.lspp cups-1.7.1/scheduler/client.c
|
||||
+ struct ucred cr;
|
||||
+ unsigned int cl=sizeof(cr);
|
||||
+
|
||||
+ if (getsockopt(con->http.fd, SOL_SOCKET, SO_PEERCRED, &cr, &cl) == 0)
|
||||
+ if (getsockopt(httpGetFd(con->http), SOL_SOCKET, SO_PEERCRED, &cr, &cl) == 0)
|
||||
+ {
|
||||
+ /*
|
||||
+ * client_pid_to_auid() can be racey
|
||||
@ -449,7 +450,7 @@ diff -up cups-1.7.1/scheduler/client.c.lspp cups-1.7.1/scheduler/client.c
|
||||
+ */
|
||||
+ if ((con->auid = client_pid_to_auid(cr.pid)) == -1)
|
||||
+ {
|
||||
+ close(con->http.fd);
|
||||
+ httpClose(con->http);
|
||||
+ cupsdLogMessage(CUPSD_LOG_ERROR, "cupsdAcceptClient: "
|
||||
+ "unable to determine client auid for client pid=%d", cr.pid);
|
||||
+ free(con);
|
||||
@ -460,7 +461,7 @@ diff -up cups-1.7.1/scheduler/client.c.lspp cups-1.7.1/scheduler/client.c
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ close(con->http.fd);
|
||||
+ httpClose(con->http);
|
||||
+ cupsdLogMessage(CUPSD_LOG_ERROR, "cupsdAcceptClient: getsockopt() failed");
|
||||
+ free(con);
|
||||
+ return;
|
||||
@ -469,9 +470,9 @@ diff -up cups-1.7.1/scheduler/client.c.lspp cups-1.7.1/scheduler/client.c
|
||||
+ /*
|
||||
+ * get the context of the peer connection
|
||||
+ */
|
||||
+ if (getpeercon(con->http.fd, &con->scon))
|
||||
+ if (getpeercon(httpGetFd(con->http), &con->scon))
|
||||
+ {
|
||||
+ close(con->http.fd);
|
||||
+ httpClose(con->http);
|
||||
+ cupsdLogMessage(CUPSD_LOG_ERROR, "cupsdAcceptClient: getpeercon() failed");
|
||||
+ free(con);
|
||||
+ return;
|
||||
@ -487,9 +488,9 @@ diff -up cups-1.7.1/scheduler/client.c.lspp cups-1.7.1/scheduler/client.c
|
||||
+#endif /* WITH_LSPP */
|
||||
+
|
||||
#ifdef AF_LOCAL
|
||||
if (con->http.hostaddr->addr.sa_family == AF_LOCAL)
|
||||
if (httpAddrFamily(httpGetAddress(con->http)) == AF_LOCAL)
|
||||
{
|
||||
@@ -714,6 +772,13 @@ cupsdReadClient(cupsd_client_t *con) /*
|
||||
@@ -555,6 +613,13 @@ cupsdReadClient(cupsd_client_t *con) /*
|
||||
mime_type_t *type; /* MIME type of file */
|
||||
cupsd_printer_t *p; /* Printer */
|
||||
static unsigned request_id = 0; /* Request ID for temp files */
|
||||
@ -502,8 +503,8 @@ diff -up cups-1.7.1/scheduler/client.c.lspp cups-1.7.1/scheduler/client.c
|
||||
+#endif /* WITH_LSPP */
|
||||
|
||||
|
||||
status = HTTP_CONTINUE;
|
||||
@@ -2231,6 +2296,67 @@ cupsdReadClient(cupsd_client_t *con) /*
|
||||
status = HTTP_STATUS_CONTINUE;
|
||||
@@ -1921,6 +1986,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);
|
||||
@ -512,7 +513,7 @@ diff -up cups-1.7.1/scheduler/client.c.lspp cups-1.7.1/scheduler/client.c
|
||||
+ {
|
||||
+ if (getfilecon(con->filename, &spoolcon) == -1)
|
||||
+ {
|
||||
+ cupsdSendError(con, HTTP_SERVER_ERROR, CUPSD_AUTH_NONE);
|
||||
+ cupsdSendError(con, HTTP_STATUS_SERVER_ERROR, CUPSD_AUTH_NONE);
|
||||
+ return (cupsdCloseClient(con));
|
||||
+ }
|
||||
+ clicon = context_new(con->scon);
|
||||
@ -520,7 +521,7 @@ diff -up cups-1.7.1/scheduler/client.c.lspp cups-1.7.1/scheduler/client.c
|
||||
+ freecon(spoolcon);
|
||||
+ if (!clicon || !tmpcon)
|
||||
+ {
|
||||
+ cupsdSendError(con, HTTP_SERVER_ERROR, CUPSD_AUTH_NONE);
|
||||
+ cupsdSendError(con, HTTP_STATUS_SERVER_ERROR, CUPSD_AUTH_NONE);
|
||||
+ if (clicon)
|
||||
+ context_free(clicon);
|
||||
+ if (tmpcon)
|
||||
@ -535,7 +536,7 @@ diff -up cups-1.7.1/scheduler/client.c.lspp cups-1.7.1/scheduler/client.c
|
||||
+ {
|
||||
+ if (context_range_set(tmpcon, cliclearance) == -1)
|
||||
+ {
|
||||
+ cupsdSendError(con, HTTP_SERVER_ERROR, CUPSD_AUTH_NONE);
|
||||
+ cupsdSendError(con, HTTP_STATUS_SERVER_ERROR, CUPSD_AUTH_NONE);
|
||||
+ free(clirange);
|
||||
+ context_free(tmpcon);
|
||||
+ context_free(clicon);
|
||||
@ -546,7 +547,7 @@ diff -up cups-1.7.1/scheduler/client.c.lspp cups-1.7.1/scheduler/client.c
|
||||
+ {
|
||||
+ if (context_range_set(tmpcon, (context_range_get(clicon))) == -1)
|
||||
+ {
|
||||
+ cupsdSendError(con, HTTP_SERVER_ERROR, CUPSD_AUTH_NONE);
|
||||
+ cupsdSendError(con, HTTP_STATUS_SERVER_ERROR, CUPSD_AUTH_NONE);
|
||||
+ free(clirange);
|
||||
+ context_free(tmpcon);
|
||||
+ context_free(clicon);
|
||||
@ -557,7 +558,7 @@ diff -up cups-1.7.1/scheduler/client.c.lspp cups-1.7.1/scheduler/client.c
|
||||
+ }
|
||||
+ if (setfilecon(con->filename, context_str(tmpcon)) == -1)
|
||||
+ {
|
||||
+ cupsdSendError(con, HTTP_SERVER_ERROR, CUPSD_AUTH_NONE);
|
||||
+ cupsdSendError(con, HTTP_STATUS_SERVER_ERROR, CUPSD_AUTH_NONE);
|
||||
+ context_free(tmpcon);
|
||||
+ context_free(clicon);
|
||||
+ return (cupsdCloseClient(con));
|
||||
@ -570,8 +571,8 @@ diff -up cups-1.7.1/scheduler/client.c.lspp cups-1.7.1/scheduler/client.c
|
||||
+#endif /* WITH_LSPP */
|
||||
}
|
||||
|
||||
if (con->http.state != HTTP_STATE_POST_SEND)
|
||||
@@ -3727,6 +3853,49 @@ is_path_absolute(const char *path) /* I
|
||||
if (httpGetState(con->http) != HTTP_STATE_POST_SEND)
|
||||
@@ -3423,6 +3549,49 @@ is_path_absolute(const char *path) /* I
|
||||
return (1);
|
||||
}
|
||||
|
||||
@ -621,9 +622,9 @@ diff -up cups-1.7.1/scheduler/client.c.lspp cups-1.7.1/scheduler/client.c
|
||||
|
||||
/*
|
||||
* 'pipe_command()' - Pipe the output of a command to the remote client.
|
||||
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
|
||||
diff -up cups-2.0rc1/scheduler/client.h.lspp cups-2.0rc1/scheduler/client.h
|
||||
--- cups-2.0rc1/scheduler/client.h.lspp 2014-03-21 17:42:53.000000000 +0100
|
||||
+++ cups-2.0rc1/scheduler/client.h 2014-09-12 17:00:39.110482947 +0200
|
||||
@@ -18,6 +18,13 @@
|
||||
#endif /* HAVE_AUTHORIZATION_H */
|
||||
|
||||
@ -638,7 +639,7 @@ diff -up cups-1.7.1/scheduler/client.h.lspp cups-1.7.1/scheduler/client.h
|
||||
/*
|
||||
* HTTP client structure...
|
||||
*/
|
||||
@@ -65,6 +72,10 @@ struct cupsd_client_s
|
||||
@@ -67,6 +74,10 @@ struct cupsd_client_s
|
||||
#ifdef HAVE_AUTHORIZATION_H
|
||||
AuthorizationRef authref; /* Authorization ref */
|
||||
#endif /* HAVE_AUTHORIZATION_H */
|
||||
@ -648,8 +649,8 @@ diff -up cups-1.7.1/scheduler/client.h.lspp cups-1.7.1/scheduler/client.h
|
||||
+#endif /* WITH_LSPP */
|
||||
};
|
||||
|
||||
#define HTTP(con) &((con)->http)
|
||||
@@ -137,6 +148,9 @@ extern void cupsdStartListening(void);
|
||||
#define HTTP(con) ((con)->http)
|
||||
@@ -140,6 +151,9 @@ extern void cupsdStartListening(void);
|
||||
extern void cupsdStopListening(void);
|
||||
extern void cupsdUpdateCGI(void);
|
||||
extern void cupsdWriteClient(cupsd_client_t *con);
|
||||
@ -659,9 +660,9 @@ diff -up cups-1.7.1/scheduler/client.h.lspp cups-1.7.1/scheduler/client.h
|
||||
|
||||
#ifdef HAVE_SSL
|
||||
extern int cupsdEndTLS(cupsd_client_t *con);
|
||||
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
|
||||
diff -up cups-2.0rc1/scheduler/conf.c.lspp cups-2.0rc1/scheduler/conf.c
|
||||
--- cups-2.0rc1/scheduler/conf.c.lspp 2014-09-12 16:54:21.772812603 +0200
|
||||
+++ cups-2.0rc1/scheduler/conf.c 2014-09-12 16:54:21.781812475 +0200
|
||||
@@ -36,6 +36,9 @@
|
||||
# define INADDR_NONE 0xffffffff
|
||||
#endif /* !INADDR_NONE */
|
||||
@ -672,7 +673,7 @@ diff -up cups-1.7.1/scheduler/conf.c.lspp cups-1.7.1/scheduler/conf.c
|
||||
|
||||
/*
|
||||
* Configuration variable structure...
|
||||
@@ -123,6 +126,10 @@ static const cupsd_var_t cupsd_vars[] =
|
||||
@@ -127,6 +130,10 @@ static const cupsd_var_t cupsd_vars[] =
|
||||
{ "ServerName", &ServerName, CUPSD_VARTYPE_STRING },
|
||||
{ "StrictConformance", &StrictConformance, CUPSD_VARTYPE_BOOLEAN },
|
||||
{ "Timeout", &Timeout, CUPSD_VARTYPE_TIME },
|
||||
@ -683,7 +684,7 @@ diff -up cups-1.7.1/scheduler/conf.c.lspp cups-1.7.1/scheduler/conf.c
|
||||
{ "WebInterface", &WebInterface, CUPSD_VARTYPE_BOOLEAN }
|
||||
};
|
||||
static const cupsd_var_t cupsfiles_vars[] =
|
||||
@@ -523,6 +530,9 @@ cupsdReadConfiguration(void)
|
||||
@@ -524,6 +531,9 @@ cupsdReadConfiguration(void)
|
||||
const char *tmpdir; /* TMPDIR environment variable */
|
||||
struct stat tmpinfo; /* Temporary directory info */
|
||||
cupsd_policy_t *p; /* Policy */
|
||||
@ -719,7 +720,7 @@ diff -up cups-1.7.1/scheduler/conf.c.lspp cups-1.7.1/scheduler/conf.c
|
||||
cupsdLogMessage(CUPSD_LOG_INFO, "Remote access is %s.",
|
||||
RemotePort ? "enabled" : "disabled");
|
||||
|
||||
@@ -1233,7 +1262,19 @@ cupsdReadConfiguration(void)
|
||||
@@ -1220,7 +1249,19 @@ cupsdReadConfiguration(void)
|
||||
cupsdClearString(&Classification);
|
||||
|
||||
if (Classification)
|
||||
@ -739,7 +740,7 @@ diff -up cups-1.7.1/scheduler/conf.c.lspp cups-1.7.1/scheduler/conf.c
|
||||
|
||||
/*
|
||||
* Check the MaxClients setting, and then allocate memory for it...
|
||||
@@ -3622,6 +3663,18 @@ read_location(cups_file_t *fp, /* I - C
|
||||
@@ -3646,6 +3687,18 @@ read_location(cups_file_t *fp, /* I - C
|
||||
return ((FatalErrors & CUPSD_FATAL_CONFIG) ? 0 : linenum);
|
||||
}
|
||||
|
||||
@ -758,11 +759,11 @@ diff -up cups-1.7.1/scheduler/conf.c.lspp cups-1.7.1/scheduler/conf.c
|
||||
|
||||
/*
|
||||
* 'read_policy()' - Read a <Policy name> definition.
|
||||
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 */
|
||||
diff -up cups-2.0rc1/scheduler/conf.h.lspp cups-2.0rc1/scheduler/conf.h
|
||||
--- cups-2.0rc1/scheduler/conf.h.lspp 2014-09-12 16:54:21.766812687 +0200
|
||||
+++ cups-2.0rc1/scheduler/conf.h 2014-09-12 17:01:30.718755326 +0200
|
||||
@@ -248,6 +248,13 @@ VAR char *ServerKeychain VALUE(NULL);
|
||||
/* Keychain holding cert + key */
|
||||
#endif /* HAVE_SSL */
|
||||
|
||||
+#ifdef WITH_LSPP
|
||||
@ -772,10 +773,10 @@ diff -up cups-1.7.1/scheduler/conf.h.lspp cups-1.7.1/scheduler/conf.h
|
||||
+ /* Put the label on each page */
|
||||
+#endif /* WITH_LSPP */
|
||||
+
|
||||
#ifdef HAVE_LAUNCHD
|
||||
VAR int LaunchdTimeout VALUE(10);
|
||||
#if defined(HAVE_LAUNCHD) || defined(HAVE_SYSTEMD)
|
||||
VAR int IdleExitTimeout VALUE(60);
|
||||
/* Time after which an idle cupsd will exit */
|
||||
@@ -268,6 +275,9 @@ int HaveServerCreds VALUE(0);
|
||||
@@ -266,6 +273,9 @@ int HaveServerCreds VALUE(0);
|
||||
gss_cred_id_t ServerCreds; /* Server's GSS credentials */
|
||||
#endif /* HAVE_GSSAPI */
|
||||
|
||||
@ -785,9 +786,9 @@ diff -up cups-1.7.1/scheduler/conf.h.lspp cups-1.7.1/scheduler/conf.h
|
||||
|
||||
/*
|
||||
* Prototypes...
|
||||
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
|
||||
diff -up cups-2.0rc1/scheduler/cupsd.h.lspp cups-2.0rc1/scheduler/cupsd.h
|
||||
--- cups-2.0rc1/scheduler/cupsd.h.lspp 2014-09-12 16:54:21.746812970 +0200
|
||||
+++ cups-2.0rc1/scheduler/cupsd.h 2014-09-12 17:02:02.351309341 +0200
|
||||
@@ -13,6 +13,8 @@
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
*/
|
||||
@ -819,9 +820,9 @@ diff -up cups-1.7.1/scheduler/cupsd.h.lspp cups-1.7.1/scheduler/cupsd.h
|
||||
/*
|
||||
* Some OS's don't have hstrerror(), most notably Solaris...
|
||||
*/
|
||||
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
|
||||
diff -up cups-2.0rc1/scheduler/ipp.c.lspp cups-2.0rc1/scheduler/ipp.c
|
||||
--- cups-2.0rc1/scheduler/ipp.c.lspp 2014-09-12 16:54:21.686813817 +0200
|
||||
+++ cups-2.0rc1/scheduler/ipp.c 2014-09-12 16:54:21.785812419 +0200
|
||||
@@ -16,6 +16,9 @@
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
*/
|
||||
@ -857,7 +858,7 @@ diff -up cups-1.7.1/scheduler/ipp.c.lspp cups-1.7.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,
|
||||
@@ -1235,6 +1249,21 @@ add_job(cupsd_client_t *con, /* I - Cl
|
||||
@@ -1215,6 +1229,21 @@ add_job(cupsd_client_t *con, /* I - Cl
|
||||
"time-at-creation",
|
||||
"time-at-processing"
|
||||
};
|
||||
@ -879,7 +880,7 @@ diff -up cups-1.7.1/scheduler/ipp.c.lspp cups-1.7.1/scheduler/ipp.c
|
||||
|
||||
|
||||
cupsdLogMessage(CUPSD_LOG_DEBUG2, "add_job(%p[%d], %p(%s), %p(%s/%s))",
|
||||
@@ -1552,6 +1581,106 @@ add_job(cupsd_client_t *con, /* I - Cl
|
||||
@@ -1531,6 +1560,106 @@ add_job(cupsd_client_t *con, /* I - Cl
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
@ -986,7 +987,7 @@ diff -up cups-1.7.1/scheduler/ipp.c.lspp cups-1.7.1/scheduler/ipp.c
|
||||
if ((job = cupsdAddJob(priority, printer->name)) == NULL)
|
||||
{
|
||||
send_ipp_status(con, IPP_INTERNAL_ERROR,
|
||||
@@ -1560,6 +1689,32 @@ add_job(cupsd_client_t *con, /* I - Cl
|
||||
@@ -1539,6 +1668,32 @@ add_job(cupsd_client_t *con, /* I - Cl
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
@ -1019,7 +1020,7 @@ diff -up cups-1.7.1/scheduler/ipp.c.lspp cups-1.7.1/scheduler/ipp.c
|
||||
job->dtype = printer->type & (CUPS_PRINTER_CLASS | CUPS_PRINTER_REMOTE);
|
||||
job->attrs = con->request;
|
||||
job->dirty = 1;
|
||||
@@ -1769,6 +1924,29 @@ add_job(cupsd_client_t *con, /* I - Cl
|
||||
@@ -1750,6 +1905,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]);
|
||||
}
|
||||
@ -1049,7 +1050,7 @@ diff -up cups-1.7.1/scheduler/ipp.c.lspp cups-1.7.1/scheduler/ipp.c
|
||||
|
||||
job->job_sheets = attr;
|
||||
|
||||
@@ -1799,6 +1977,9 @@ add_job(cupsd_client_t *con, /* I - Cl
|
||||
@@ -1780,6 +1958,9 @@ add_job(cupsd_client_t *con, /* I - Cl
|
||||
"job-sheets=\"%s,none\", "
|
||||
"job-originating-user-name=\"%s\"",
|
||||
Classification, job->username);
|
||||
@ -1059,7 +1060,7 @@ diff -up cups-1.7.1/scheduler/ipp.c.lspp cups-1.7.1/scheduler/ipp.c
|
||||
}
|
||||
else if (attr->num_values == 2 &&
|
||||
strcmp(attr->values[0].string.text,
|
||||
@@ -1817,6 +1998,9 @@ add_job(cupsd_client_t *con, /* I - Cl
|
||||
@@ -1798,6 +1979,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);
|
||||
@ -1069,7 +1070,7 @@ diff -up cups-1.7.1/scheduler/ipp.c.lspp cups-1.7.1/scheduler/ipp.c
|
||||
}
|
||||
else if (strcmp(attr->values[0].string.text, Classification) &&
|
||||
strcmp(attr->values[0].string.text, "none") &&
|
||||
@@ -1837,6 +2021,9 @@ add_job(cupsd_client_t *con, /* I - Cl
|
||||
@@ -1818,6 +2002,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);
|
||||
@ -1079,7 +1080,7 @@ diff -up cups-1.7.1/scheduler/ipp.c.lspp cups-1.7.1/scheduler/ipp.c
|
||||
}
|
||||
}
|
||||
else if (strcmp(attr->values[0].string.text, Classification) &&
|
||||
@@ -1877,8 +2064,52 @@ add_job(cupsd_client_t *con, /* I - Cl
|
||||
@@ -1858,8 +2045,52 @@ add_job(cupsd_client_t *con, /* I - Cl
|
||||
"job-sheets=\"%s\", "
|
||||
"job-originating-user-name=\"%s\"",
|
||||
Classification, job->username);
|
||||
@ -1132,7 +1133,7 @@ diff -up cups-1.7.1/scheduler/ipp.c.lspp cups-1.7.1/scheduler/ipp.c
|
||||
|
||||
/*
|
||||
* See if we need to add the starting sheet...
|
||||
@@ -3650,6 +3881,111 @@ check_rss_recipient(
|
||||
@@ -3630,6 +3861,111 @@ check_rss_recipient(
|
||||
}
|
||||
|
||||
|
||||
@ -1244,7 +1245,7 @@ diff -up cups-1.7.1/scheduler/ipp.c.lspp cups-1.7.1/scheduler/ipp.c
|
||||
/*
|
||||
* 'check_quotas()' - Check quotas for a printer and user.
|
||||
*/
|
||||
@@ -4106,6 +4442,15 @@ copy_banner(cupsd_client_t *con, /* I -
|
||||
@@ -4086,6 +4422,15 @@ copy_banner(cupsd_client_t *con, /* I -
|
||||
char attrname[255], /* Name of attribute */
|
||||
*s; /* Pointer into name */
|
||||
ipp_attribute_t *attr; /* Attribute */
|
||||
@ -1260,7 +1261,7 @@ diff -up cups-1.7.1/scheduler/ipp.c.lspp cups-1.7.1/scheduler/ipp.c
|
||||
|
||||
|
||||
cupsdLogMessage(CUPSD_LOG_DEBUG2,
|
||||
@@ -4141,6 +4486,82 @@ copy_banner(cupsd_client_t *con, /* I -
|
||||
@@ -4121,6 +4466,82 @@ copy_banner(cupsd_client_t *con, /* I -
|
||||
|
||||
fchmod(cupsFileNumber(out), 0640);
|
||||
fchown(cupsFileNumber(out), RunUser, Group);
|
||||
@ -1343,7 +1344,7 @@ diff -up cups-1.7.1/scheduler/ipp.c.lspp cups-1.7.1/scheduler/ipp.c
|
||||
|
||||
/*
|
||||
* Try the localized banner file under the subdirectory...
|
||||
@@ -4235,6 +4656,24 @@ copy_banner(cupsd_client_t *con, /* I -
|
||||
@@ -4215,6 +4636,24 @@ copy_banner(cupsd_client_t *con, /* I -
|
||||
else
|
||||
s = attrname;
|
||||
|
||||
@ -1368,7 +1369,7 @@ diff -up cups-1.7.1/scheduler/ipp.c.lspp cups-1.7.1/scheduler/ipp.c
|
||||
if (!strcmp(s, "printer-name"))
|
||||
{
|
||||
cupsFilePuts(out, job->dest);
|
||||
@@ -6101,6 +6540,22 @@ get_job_attrs(cupsd_client_t *con, /* I
|
||||
@@ -6125,6 +6564,22 @@ get_job_attrs(cupsd_client_t *con, /* I
|
||||
|
||||
exclude = cupsdGetPrivateAttrs(policy, con, printer, job->username);
|
||||
|
||||
@ -1391,7 +1392,7 @@ diff -up cups-1.7.1/scheduler/ipp.c.lspp cups-1.7.1/scheduler/ipp.c
|
||||
/*
|
||||
* Copy attributes...
|
||||
*/
|
||||
@@ -6443,6 +6898,11 @@ get_jobs(cupsd_client_t *con, /* I - C
|
||||
@@ -6524,6 +6979,11 @@ get_jobs(cupsd_client_t *con, /* I - C
|
||||
if (username[0] && _cups_strcasecmp(username, job->username))
|
||||
continue;
|
||||
|
||||
@ -1403,7 +1404,7 @@ diff -up cups-1.7.1/scheduler/ipp.c.lspp cups-1.7.1/scheduler/ipp.c
|
||||
if (count > 0)
|
||||
ippAddSeparator(con->response);
|
||||
|
||||
@@ -11013,6 +11473,11 @@ validate_user(cupsd_job_t *job, /* I
|
||||
@@ -11093,6 +11553,11 @@ validate_user(cupsd_job_t *job, /* I
|
||||
|
||||
strlcpy(username, get_username(con), userlen);
|
||||
|
||||
@ -1415,9 +1416,9 @@ diff -up cups-1.7.1/scheduler/ipp.c.lspp cups-1.7.1/scheduler/ipp.c
|
||||
/*
|
||||
* Check the username against the owner...
|
||||
*/
|
||||
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
|
||||
diff -up cups-2.0rc1/scheduler/job.c.lspp cups-2.0rc1/scheduler/job.c
|
||||
--- cups-2.0rc1/scheduler/job.c.lspp 2014-09-12 16:54:21.761812758 +0200
|
||||
+++ cups-2.0rc1/scheduler/job.c 2014-09-12 17:03:06.012411787 +0200
|
||||
@@ -13,6 +13,9 @@
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
*/
|
||||
@ -1443,7 +1444,7 @@ diff -up cups-1.7.1/scheduler/job.c.lspp cups-1.7.1/scheduler/job.c
|
||||
|
||||
/*
|
||||
* Design Notes for Job Management
|
||||
@@ -525,6 +536,14 @@ cupsdContinueJob(cupsd_job_t *job) /* I
|
||||
@@ -528,6 +539,14 @@ cupsdContinueJob(cupsd_job_t *job) /* I
|
||||
/* PRINTER_STATE_REASONS env var */
|
||||
rip_max_cache[255];
|
||||
/* RIP_MAX_CACHE env variable */
|
||||
@ -1458,7 +1459,7 @@ diff -up cups-1.7.1/scheduler/job.c.lspp cups-1.7.1/scheduler/job.c
|
||||
|
||||
|
||||
cupsdLogMessage(CUPSD_LOG_DEBUG2,
|
||||
@@ -1034,6 +1053,67 @@ cupsdContinueJob(cupsd_job_t *job) /* I
|
||||
@@ -1059,6 +1078,67 @@ cupsdContinueJob(cupsd_job_t *job) /* I
|
||||
if (final_content_type[0])
|
||||
envp[envc ++] = final_content_type;
|
||||
|
||||
@ -1526,7 +1527,7 @@ diff -up cups-1.7.1/scheduler/job.c.lspp cups-1.7.1/scheduler/job.c
|
||||
if (Classification && !banner_page)
|
||||
{
|
||||
if ((attr = ippFindAttribute(job->attrs, "job-sheets",
|
||||
@@ -1800,6 +1880,20 @@ cupsdLoadJob(cupsd_job_t *job) /* I - J
|
||||
@@ -1852,6 +1932,20 @@ cupsdLoadJob(cupsd_job_t *job) /* I - J
|
||||
ippSetString(job->attrs, &job->reasons, 0, "none");
|
||||
}
|
||||
|
||||
@ -1547,7 +1548,7 @@ diff -up cups-1.7.1/scheduler/job.c.lspp cups-1.7.1/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);
|
||||
@@ -2188,6 +2282,14 @@ cupsdSaveJob(cupsd_job_t *job) /* I - J
|
||||
@@ -2253,6 +2347,14 @@ cupsdSaveJob(cupsd_job_t *job) /* I - J
|
||||
{
|
||||
char filename[1024]; /* Job control filename */
|
||||
cups_file_t *fp; /* Job file */
|
||||
@ -1562,7 +1563,7 @@ diff -up cups-1.7.1/scheduler/job.c.lspp cups-1.7.1/scheduler/job.c
|
||||
|
||||
|
||||
cupsdLogMessage(CUPSD_LOG_DEBUG2, "cupsdSaveJob(job=%p(%d)): job->attrs=%p",
|
||||
@@ -2200,6 +2302,76 @@ cupsdSaveJob(cupsd_job_t *job) /* I - J
|
||||
@@ -2265,6 +2367,76 @@ cupsdSaveJob(cupsd_job_t *job) /* I - J
|
||||
|
||||
fchown(cupsFileNumber(fp), RunUser, Group);
|
||||
|
||||
@ -1639,7 +1640,7 @@ diff -up cups-1.7.1/scheduler/job.c.lspp cups-1.7.1/scheduler/job.c
|
||||
job->attrs->state = IPP_IDLE;
|
||||
|
||||
if (ippWriteIO(fp, (ipp_iocb_t)cupsFileWrite, 1, NULL,
|
||||
@@ -3748,6 +3920,18 @@ get_options(cupsd_job_t *job, /* I - Jo
|
||||
@@ -3847,6 +4019,18 @@ get_options(cupsd_job_t *job, /* I - Jo
|
||||
banner_page)
|
||||
continue;
|
||||
|
||||
@ -1658,7 +1659,7 @@ diff -up cups-1.7.1/scheduler/job.c.lspp cups-1.7.1/scheduler/job.c
|
||||
/*
|
||||
* Otherwise add them to the list...
|
||||
*/
|
||||
@@ -4472,6 +4656,18 @@ start_job(cupsd_job_t *job, /* I -
|
||||
@@ -4596,6 +4780,19 @@ start_job(cupsd_job_t *job, /* I -
|
||||
cupsd_printer_t *printer) /* I - Printer to print job */
|
||||
{
|
||||
const char *filename; /* Support filename */
|
||||
@ -1674,10 +1675,11 @@ diff -up cups-1.7.1/scheduler/job.c.lspp cups-1.7.1/scheduler/job.c
|
||||
+ security_class_t tclass; /* Object class for the SELinux check */
|
||||
+ access_vector_t avr; /* Access method being requested */
|
||||
+#endif /* WITH_LSPP */
|
||||
|
||||
|
||||
cupsdLogMessage(CUPSD_LOG_DEBUG2, "start_job(job=%p(%d), printer=%p(%s))",
|
||||
@@ -4635,6 +4831,108 @@ start_job(cupsd_job_t *job, /* I -
|
||||
+
|
||||
ipp_attribute_t *cancel_after = ippFindAttribute(job->attrs,
|
||||
"job-cancel-after",
|
||||
IPP_TAG_INTEGER);
|
||||
@@ -4772,6 +4969,108 @@ start_job(cupsd_job_t *job, /* I -
|
||||
fcntl(job->side_pipes[1], F_SETFD,
|
||||
fcntl(job->side_pipes[1], F_GETFD) | FD_CLOEXEC);
|
||||
|
||||
@ -1786,9 +1788,9 @@ diff -up cups-1.7.1/scheduler/job.c.lspp cups-1.7.1/scheduler/job.c
|
||||
/*
|
||||
* Now start the first file in the job...
|
||||
*/
|
||||
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
|
||||
diff -up cups-2.0rc1/scheduler/job.h.lspp cups-2.0rc1/scheduler/job.h
|
||||
--- cups-2.0rc1/scheduler/job.h.lspp 2014-07-31 02:02:30.000000000 +0200
|
||||
+++ cups-2.0rc1/scheduler/job.h 2014-09-12 17:03:32.752034787 +0200
|
||||
@@ -13,6 +13,13 @@
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
*/
|
||||
@ -1803,7 +1805,7 @@ diff -up cups-1.7.1/scheduler/job.h.lspp cups-1.7.1/scheduler/job.h
|
||||
/*
|
||||
* Constants...
|
||||
*/
|
||||
@@ -82,6 +89,10 @@ struct cupsd_job_s /**** Job request *
|
||||
@@ -89,6 +96,10 @@ struct cupsd_job_s /**** Job request *
|
||||
int progress; /* Printing progress */
|
||||
int num_keywords; /* Number of PPD keywords */
|
||||
cups_option_t *keywords; /* PPD keywords */
|
||||
@ -1814,10 +1816,10 @@ diff -up cups-1.7.1/scheduler/job.h.lspp cups-1.7.1/scheduler/job.h
|
||||
};
|
||||
|
||||
typedef struct cupsd_joblog_s /**** Job log message ****/
|
||||
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
|
||||
@@ -80,6 +82,9 @@
|
||||
diff -up cups-2.0rc1/scheduler/main.c.lspp cups-2.0rc1/scheduler/main.c
|
||||
--- cups-2.0rc1/scheduler/main.c.lspp 2014-09-12 16:54:21.748812942 +0200
|
||||
+++ cups-2.0rc1/scheduler/main.c 2014-09-12 16:54:21.788812377 +0200
|
||||
@@ -56,6 +56,9 @@ extern int launch_activate_socket(const
|
||||
# include <sys/param.h>
|
||||
#endif /* HAVE_SYS_PARAM_H */
|
||||
|
||||
@ -1827,7 +1829,7 @@ diff -up cups-1.7.1/scheduler/main.c.lspp cups-1.7.1/scheduler/main.c
|
||||
|
||||
/*
|
||||
* Local functions...
|
||||
@@ -143,6 +148,9 @@ main(int argc, /* I - Number of comm
|
||||
@@ -116,6 +119,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 */
|
||||
@ -1837,7 +1839,7 @@ diff -up cups-1.7.1/scheduler/main.c.lspp cups-1.7.1/scheduler/main.c
|
||||
int run_as_child = 0;
|
||||
/* Needed for background fork/exec */
|
||||
#ifdef __APPLE__
|
||||
@@ -519,6 +527,25 @@ main(int argc, /* I - Number of comm
|
||||
@@ -490,6 +496,25 @@ main(int argc, /* I - Number of comm
|
||||
#endif /* DEBUG */
|
||||
}
|
||||
|
||||
@ -1863,7 +1865,7 @@ diff -up cups-1.7.1/scheduler/main.c.lspp cups-1.7.1/scheduler/main.c
|
||||
/*
|
||||
* Set the timezone info...
|
||||
*/
|
||||
@@ -1197,6 +1224,11 @@ main(int argc, /* I - Number of comm
|
||||
@@ -1149,6 +1174,11 @@ main(int argc, /* I - Number of comm
|
||||
|
||||
cupsdStopSelect();
|
||||
|
||||
@ -1875,9 +1877,9 @@ diff -up cups-1.7.1/scheduler/main.c.lspp cups-1.7.1/scheduler/main.c
|
||||
return (!stop_scheduler);
|
||||
}
|
||||
|
||||
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
|
||||
diff -up cups-2.0rc1/scheduler/printers.c.lspp cups-2.0rc1/scheduler/printers.c
|
||||
--- cups-2.0rc1/scheduler/printers.c.lspp 2014-09-12 16:54:21.655814255 +0200
|
||||
+++ cups-2.0rc1/scheduler/printers.c 2014-09-12 16:54:21.789812362 +0200
|
||||
@@ -13,6 +13,8 @@
|
||||
* file is missing or damaged, see the license at "http://www.cups.org/".
|
||||
*/
|
||||
@ -1898,7 +1900,7 @@ diff -up cups-1.7.1/scheduler/printers.c.lspp cups-1.7.1/scheduler/printers.c
|
||||
|
||||
/*
|
||||
* Local functions...
|
||||
@@ -2023,6 +2029,13 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)
|
||||
@@ -2026,6 +2032,13 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)
|
||||
ipp_attribute_t *attr; /* Attribute data */
|
||||
char *name, /* Current user/group name */
|
||||
*filter; /* Current filter */
|
||||
@ -1912,7 +1914,7 @@ diff -up cups-1.7.1/scheduler/printers.c.lspp cups-1.7.1/scheduler/printers.c
|
||||
|
||||
|
||||
DEBUG_printf(("cupsdSetPrinterAttrs: entering name = %s, type = %x\n", p->name,
|
||||
@@ -2145,6 +2158,45 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)
|
||||
@@ -2146,6 +2159,45 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)
|
||||
attr->values[1].string.text = _cupsStrAlloc(Classification ?
|
||||
Classification : p->job_sheets[1]);
|
||||
}
|
||||
|
@ -1,37 +1,12 @@
|
||||
diff -up cups-1.7b1/config-scripts/cups-ssl.m4.no-gcry cups-1.7b1/config-scripts/cups-ssl.m4
|
||||
--- cups-1.7b1/config-scripts/cups-ssl.m4.no-gcry 2013-06-24 12:14:44.514018538 +0100
|
||||
+++ cups-1.7b1/config-scripts/cups-ssl.m4 2013-06-24 12:15:35.805243614 +0100
|
||||
@@ -66,7 +66,6 @@ if test x$enable_ssl != xno; then
|
||||
diff -up cups-2.0rc1/config-scripts/cups-ssl.m4.no-gcry cups-2.0rc1/config-scripts/cups-ssl.m4
|
||||
--- cups-2.0rc1/config-scripts/cups-ssl.m4.no-gcry 2014-09-12 15:41:23.324760213 +0200
|
||||
+++ cups-2.0rc1/config-scripts/cups-ssl.m4 2014-09-12 15:43:13.124203363 +0200
|
||||
@@ -60,7 +60,6 @@ if test x$enable_ssl != xno; then
|
||||
dnl Then look for GNU TLS...
|
||||
if test $have_ssl = 0 -a "x$enable_gnutls" != "xno" -a "x$PKGCONFIG" != x; then
|
||||
AC_PATH_PROG(LIBGNUTLSCONFIG,libgnutls-config)
|
||||
- AC_PATH_PROG(LIBGCRYPTCONFIG,libgcrypt-config)
|
||||
AC_PATH_TOOL(LIBGNUTLSCONFIG,libgnutls-config)
|
||||
- AC_PATH_TOOL(LIBGCRYPTCONFIG,libgcrypt-config)
|
||||
if $PKGCONFIG --exists gnutls; then
|
||||
have_ssl=1
|
||||
SSLLIBS=`$PKGCONFIG --libs gnutls`
|
||||
@@ -84,14 +83,6 @@ if test x$enable_ssl != xno; then
|
||||
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`"
|
||||
- elif test "x$LIBGCRYPTCONFIG" != x; then
|
||||
- SSLLIBS="$SSLLIBS `$LIBGCRYPTCONFIG --libs`"
|
||||
- SSLFLAGS="$SSLFLAGS `$LIBGCRYPTCONFIG --cflags`"
|
||||
- fi
|
||||
fi
|
||||
fi
|
||||
|
||||
diff -up cups-1.7b1/cups/http-private.h.no-gcry cups-1.7b1/cups/http-private.h
|
||||
--- cups-1.7b1/cups/http-private.h.no-gcry 2013-06-24 12:15:57.833339957 +0100
|
||||
+++ cups-1.7b1/cups/http-private.h 2013-06-24 12:16:06.175376393 +0100
|
||||
@@ -80,7 +80,6 @@ typedef int socklen_t;
|
||||
# elif defined HAVE_GNUTLS
|
||||
# include <gnutls/gnutls.h>
|
||||
# include <gnutls/x509.h>
|
||||
-# include <gcrypt.h>
|
||||
# elif defined(HAVE_CDSASSL)
|
||||
# include <CoreFoundation/CoreFoundation.h>
|
||||
# include <Security/Security.h>
|
||||
diff -up cups-2.0rc1/cups/http-private.h.no-gcry cups-2.0rc1/cups/http-private.h
|
||||
|
@ -1,399 +0,0 @@
|
||||
diff -up cups-1.7.5/scheduler/ipp.c.str2913 cups-1.7.5/scheduler/ipp.c
|
||||
--- cups-1.7.5/scheduler/ipp.c.str2913 2014-08-20 17:19:25.216908923 +0100
|
||||
+++ cups-1.7.5/scheduler/ipp.c 2014-08-20 17:21:45.641812985 +0100
|
||||
@@ -1531,8 +1531,7 @@ add_job(cupsd_client_t *con, /* I - Cl
|
||||
}
|
||||
|
||||
if ((attr = ippFindAttribute(con->request, "job-name", IPP_TAG_ZERO)) == NULL)
|
||||
- ippAddString(con->request, IPP_TAG_JOB, IPP_TAG_NAME, "job-name", NULL,
|
||||
- "Untitled");
|
||||
+ ippAddString(con->request, IPP_TAG_JOB, IPP_TAG_NAME, "job-name", NULL, "Untitled");
|
||||
else if ((attr->value_tag != IPP_TAG_NAME &&
|
||||
attr->value_tag != IPP_TAG_NAMELANG) ||
|
||||
attr->num_values != 1)
|
||||
@@ -1612,6 +1611,9 @@ add_job(cupsd_client_t *con, /* I - Cl
|
||||
ippDeleteAttribute(job->attrs, auth_info);
|
||||
}
|
||||
|
||||
+ if ((attr = ippFindAttribute(con->request, "job-name", IPP_TAG_NAME)) != NULL)
|
||||
+ cupsdSetString(&(job->name), attr->values[0].string.text);
|
||||
+
|
||||
if ((attr = ippFindAttribute(job->attrs, "job-originating-host-name",
|
||||
IPP_TAG_ZERO)) != NULL)
|
||||
{
|
||||
@@ -1706,8 +1708,7 @@ add_job(cupsd_client_t *con, /* I - Cl
|
||||
ippAddString(job->attrs, IPP_TAG_JOB, IPP_TAG_URI, "job-printer-uri", NULL,
|
||||
printer->uri);
|
||||
|
||||
- if ((attr = ippFindAttribute(job->attrs, "job-k-octets",
|
||||
- IPP_TAG_INTEGER)) != NULL)
|
||||
+ if ((attr = ippFindAttribute(job->attrs, "job-k-octets", IPP_TAG_INTEGER)) != NULL)
|
||||
attr->values[0].integer = 0;
|
||||
else
|
||||
ippAddInteger(job->attrs, IPP_TAG_JOB, IPP_TAG_INTEGER, "job-k-octets", 0);
|
||||
@@ -4357,8 +4358,9 @@ copy_banner(cupsd_client_t *con, /* I -
|
||||
|
||||
kbytes = (cupsFileTell(out) + 1023) / 1024;
|
||||
|
||||
- if ((attr = ippFindAttribute(job->attrs, "job-k-octets",
|
||||
- IPP_TAG_INTEGER)) != NULL)
|
||||
+ job->koctets += kbytes;
|
||||
+
|
||||
+ if ((attr = ippFindAttribute(job->attrs, "job-k-octets", IPP_TAG_INTEGER)) != NULL)
|
||||
attr->values[0].integer += kbytes;
|
||||
|
||||
cupsFileClose(out);
|
||||
@@ -4780,7 +4782,55 @@ copy_job_attrs(cupsd_client_t *con, /* I
|
||||
"job-uri", NULL, job_uri);
|
||||
}
|
||||
|
||||
- copy_attrs(con->response, job->attrs, ra, IPP_TAG_JOB, 0, exclude);
|
||||
+ if (job->attrs)
|
||||
+ {
|
||||
+ copy_attrs(con->response, job->attrs, ra, IPP_TAG_JOB, 0, exclude);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ /*
|
||||
+ * Generate attributes from the job structure...
|
||||
+ */
|
||||
+
|
||||
+ if (!ra || cupsArrayFind(ra, "job-id"))
|
||||
+ ippAddInteger(con->response, IPP_TAG_JOB, IPP_TAG_INTEGER, "job-id", job->id);
|
||||
+
|
||||
+ if (!ra || cupsArrayFind(ra, "job-k-octets"))
|
||||
+ ippAddInteger(con->response, IPP_TAG_JOB, IPP_TAG_INTEGER, "job-k-octets", job->koctets);
|
||||
+
|
||||
+ if (job->name && (!ra || cupsArrayFind(ra, "job-name")))
|
||||
+ ippAddString(con->response, IPP_TAG_JOB, IPP_TAG_NAME, "job-name", NULL, job->name);
|
||||
+
|
||||
+ if (job->username && (!ra || cupsArrayFind(ra, "job-originating-user-name")))
|
||||
+ ippAddString(con->response, IPP_TAG_JOB, IPP_TAG_NAME, "job-originating-user-name", NULL, job->username);
|
||||
+
|
||||
+ if (!ra || cupsArrayFind(ra, "job-state"))
|
||||
+ ippAddInteger(con->response, IPP_TAG_JOB, IPP_TAG_ENUM, "job-state", (int)job->state_value);
|
||||
+
|
||||
+ if (!ra || cupsArrayFind(ra, "job-state-reasons"))
|
||||
+ {
|
||||
+ switch (job->state_value)
|
||||
+ {
|
||||
+ default : /* Should never get here for processing, pending, held, or stopped jobs since they don't get unloaded... */
|
||||
+ break;
|
||||
+ case IPP_JSTATE_ABORTED :
|
||||
+ ippAddString(con->response, IPP_TAG_JOB, IPP_TAG_KEYWORD, "job-state-reasons", NULL, "job-aborted-by-system");
|
||||
+ break;
|
||||
+ case IPP_JSTATE_CANCELED :
|
||||
+ ippAddString(con->response, IPP_TAG_JOB, IPP_TAG_KEYWORD, "job-state-reasons", NULL, "job-canceled-by-user");
|
||||
+ break;
|
||||
+ case IPP_JSTATE_COMPLETED :
|
||||
+ ippAddString(con->response, IPP_TAG_JOB, IPP_TAG_KEYWORD, "job-state-reasons", NULL, "job-completed-successfully");
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (job->completed_time && (!ra || cupsArrayFind(ra, "time-at-completed")))
|
||||
+ ippAddInteger(con->response, IPP_TAG_JOB, IPP_TAG_INTEGER, "time-at-completed", (int)job->completed_time);
|
||||
+
|
||||
+ if (job->completed_time && (!ra || cupsArrayFind(ra, "time-at-creation")))
|
||||
+ ippAddInteger(con->response, IPP_TAG_JOB, IPP_TAG_INTEGER, "time-at-creation", (int)job->creation_time);
|
||||
+ }
|
||||
}
|
||||
|
||||
|
||||
@@ -6133,9 +6183,13 @@ get_jobs(cupsd_client_t *con, /* I - C
|
||||
int port; /* Port portion of URI */
|
||||
int job_comparison; /* Job comparison */
|
||||
ipp_jstate_t job_state; /* job-state value */
|
||||
- int first_job_id; /* First job ID */
|
||||
- int limit; /* Maximum number of jobs to return */
|
||||
+ int first_job_id = 1, /* First job ID */
|
||||
+ first_index = 1, /* First index */
|
||||
+ current_index = 0; /* Current index */
|
||||
+ int limit = 0; /* Maximum number of jobs to return */
|
||||
int count; /* Number of jobs that match */
|
||||
+ int need_load_job = 0; /* Do we need to load the job? */
|
||||
+ const char *job_attr; /* Job attribute requested */
|
||||
ipp_attribute_t *job_ids; /* job-ids attribute */
|
||||
cupsd_job_t *job; /* Current job pointer */
|
||||
cupsd_printer_t *printer; /* Printer */
|
||||
@@ -6301,8 +6355,7 @@ get_jobs(cupsd_client_t *con, /* I - C
|
||||
* See if they want to limit the number of jobs reported...
|
||||
*/
|
||||
|
||||
- if ((attr = ippFindAttribute(con->request, "limit",
|
||||
- IPP_TAG_INTEGER)) != NULL)
|
||||
+ if ((attr = ippFindAttribute(con->request, "limit", IPP_TAG_INTEGER)) != NULL)
|
||||
{
|
||||
if (job_ids)
|
||||
{
|
||||
@@ -6314,11 +6367,20 @@ get_jobs(cupsd_client_t *con, /* I - C
|
||||
|
||||
limit = attr->values[0].integer;
|
||||
}
|
||||
- else
|
||||
- limit = 0;
|
||||
|
||||
- if ((attr = ippFindAttribute(con->request, "first-job-id",
|
||||
- IPP_TAG_INTEGER)) != NULL)
|
||||
+ if ((attr = ippFindAttribute(con->request, "first-index", IPP_TAG_INTEGER)) != NULL)
|
||||
+ {
|
||||
+ if (job_ids)
|
||||
+ {
|
||||
+ send_ipp_status(con, IPP_CONFLICT,
|
||||
+ _("The %s attribute cannot be provided with job-ids."),
|
||||
+ "first-index");
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ first_index = attr->values[0].integer;
|
||||
+ }
|
||||
+ else if ((attr = ippFindAttribute(con->request, "first-job-id", IPP_TAG_INTEGER)) != NULL)
|
||||
{
|
||||
if (job_ids)
|
||||
{
|
||||
@@ -6330,15 +6392,12 @@ get_jobs(cupsd_client_t *con, /* I - C
|
||||
|
||||
first_job_id = attr->values[0].integer;
|
||||
}
|
||||
- else
|
||||
- first_job_id = 1;
|
||||
|
||||
/*
|
||||
* See if we only want to see jobs for a specific user...
|
||||
*/
|
||||
|
||||
- if ((attr = ippFindAttribute(con->request, "my-jobs",
|
||||
- IPP_TAG_BOOLEAN)) != NULL && job_ids)
|
||||
+ if ((attr = ippFindAttribute(con->request, "my-jobs", IPP_TAG_BOOLEAN)) != NULL && job_ids)
|
||||
{
|
||||
send_ipp_status(con, IPP_CONFLICT,
|
||||
_("The %s attribute cannot be provided with job-ids."),
|
||||
@@ -6351,6 +6410,43 @@ get_jobs(cupsd_client_t *con, /* I - C
|
||||
username[0] = '\0';
|
||||
|
||||
ra = create_requested_array(con->request);
|
||||
+ for (job_attr = (char *)cupsArrayFirst(ra); job_attr; job_attr = (char *)cupsArrayNext(ra))
|
||||
+ if (strcmp(job_attr, "job-id") &&
|
||||
+ strcmp(job_attr, "job-k-octets") &&
|
||||
+ strcmp(job_attr, "job-media-progress") &&
|
||||
+ strcmp(job_attr, "job-more-info") &&
|
||||
+ strcmp(job_attr, "job-name") &&
|
||||
+ strcmp(job_attr, "job-originating-user-name") &&
|
||||
+ strcmp(job_attr, "job-preserved") &&
|
||||
+ strcmp(job_attr, "job-printer-up-time") &&
|
||||
+ strcmp(job_attr, "job-printer-uri") &&
|
||||
+ strcmp(job_attr, "job-state") &&
|
||||
+ strcmp(job_attr, "job-state-reasons") &&
|
||||
+ strcmp(job_attr, "job-uri") &&
|
||||
+ strcmp(job_attr, "time-at-completed") &&
|
||||
+ strcmp(job_attr, "time-at-creation") &&
|
||||
+ strcmp(job_attr, "number-of-documents"))
|
||||
+ {
|
||||
+ need_load_job = 1;
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ if (need_load_job && (limit == 0 || limit > 500) && (list == Jobs || delete_list))
|
||||
+ {
|
||||
+ /*
|
||||
+ * Limit expensive Get-Jobs for job history to 500 jobs...
|
||||
+ */
|
||||
+
|
||||
+ ippAddInteger(con->response, IPP_TAG_OPERATION, IPP_TAG_INTEGER, "limit", 500);
|
||||
+
|
||||
+ if (limit)
|
||||
+ ippAddInteger(con->response, IPP_TAG_UNSUPPORTED_GROUP, IPP_TAG_INTEGER, "limit", limit);
|
||||
+
|
||||
+ limit = 500;
|
||||
+
|
||||
+ cupsdLogMessage(CUPSD_LOG_INFO,
|
||||
+ "Limiting Get-Jobs response to %d jobs.", limit);
|
||||
+ }
|
||||
|
||||
/*
|
||||
* OK, build a list of jobs for this printer...
|
||||
@@ -6377,13 +6473,15 @@ get_jobs(cupsd_client_t *con, /* I - C
|
||||
{
|
||||
job = cupsdFindJob(job_ids->values[i].integer);
|
||||
|
||||
- cupsdLoadJob(job);
|
||||
-
|
||||
- if (!job->attrs)
|
||||
+ if (need_load_job && !job->attrs)
|
||||
{
|
||||
- cupsdLogMessage(CUPSD_LOG_DEBUG2, "get_jobs: No attributes for job %d",
|
||||
- job->id);
|
||||
- continue;
|
||||
+ cupsdLoadJob(job);
|
||||
+
|
||||
+ if (!job->attrs)
|
||||
+ {
|
||||
+ cupsdLogMessage(CUPSD_LOG_DEBUG2, "get_jobs: No attributes for job %d", job->id);
|
||||
+ continue;
|
||||
+ }
|
||||
}
|
||||
|
||||
if (i > 0)
|
||||
@@ -6433,13 +6531,19 @@ get_jobs(cupsd_client_t *con, /* I - C
|
||||
if (job->id < first_job_id)
|
||||
continue;
|
||||
|
||||
- cupsdLoadJob(job);
|
||||
+ current_index ++;
|
||||
+ if (current_index < first_index)
|
||||
+ continue;
|
||||
|
||||
- if (!job->attrs)
|
||||
+ if (need_load_job && !job->attrs)
|
||||
{
|
||||
- cupsdLogMessage(CUPSD_LOG_DEBUG2, "get_jobs: No attributes for job %d",
|
||||
- job->id);
|
||||
- continue;
|
||||
+ cupsdLoadJob(job);
|
||||
+
|
||||
+ if (!job->attrs)
|
||||
+ {
|
||||
+ cupsdLogMessage(CUPSD_LOG_DEBUG2, "get_jobs: No attributes for job %d", job->id);
|
||||
+ continue;
|
||||
+ }
|
||||
}
|
||||
|
||||
if (username[0] && _cups_strcasecmp(username, job->username))
|
||||
@@ -8173,8 +8277,9 @@ print_job(cupsd_client_t *con, /* I -
|
||||
|
||||
cupsdUpdateQuota(printer, job->username, 0, kbytes);
|
||||
|
||||
- if ((attr = ippFindAttribute(job->attrs, "job-k-octets",
|
||||
- IPP_TAG_INTEGER)) != NULL)
|
||||
+ job->koctets += kbytes;
|
||||
+
|
||||
+ if ((attr = ippFindAttribute(job->attrs, "job-k-octets", IPP_TAG_INTEGER)) != NULL)
|
||||
attr->values[0].integer += kbytes;
|
||||
|
||||
/*
|
||||
@@ -9410,8 +9515,9 @@ send_document(cupsd_client_t *con, /* I
|
||||
|
||||
cupsdUpdateQuota(printer, job->username, 0, kbytes);
|
||||
|
||||
- if ((attr = ippFindAttribute(job->attrs, "job-k-octets",
|
||||
- IPP_TAG_INTEGER)) != NULL)
|
||||
+ job->koctets += kbytes;
|
||||
+
|
||||
+ if ((attr = ippFindAttribute(job->attrs, "job-k-octets", IPP_TAG_INTEGER)) != NULL)
|
||||
attr->values[0].integer += kbytes;
|
||||
|
||||
snprintf(filename, sizeof(filename), "%s/d%05d-%03d", RequestRoot, job->id,
|
||||
diff -up cups-1.7.5/scheduler/job.c.str2913 cups-1.7.5/scheduler/job.c
|
||||
--- cups-1.7.5/scheduler/job.c.str2913 2014-08-20 17:19:25.261909213 +0100
|
||||
+++ cups-1.7.5/scheduler/job.c 2014-08-20 17:19:25.272909284 +0100
|
||||
@@ -1707,9 +1707,10 @@ cupsdLoadJob(cupsd_job_t *job) /* I - J
|
||||
job->file_time = 0;
|
||||
job->history_time = 0;
|
||||
|
||||
- if (job->state_value >= IPP_JOB_CANCELED &&
|
||||
- (attr = ippFindAttribute(job->attrs, "time-at-completed",
|
||||
- IPP_TAG_INTEGER)) != NULL)
|
||||
+ if ((attr = ippFindAttribute(job->attrs, "time-at-creation", IPP_TAG_INTEGER)) != NULL)
|
||||
+ job->creation_time = attr->values[0].integer;
|
||||
+
|
||||
+ if (job->state_value >= IPP_JOB_CANCELED && (attr = ippFindAttribute(job->attrs, "time-at-completed", IPP_TAG_INTEGER)) != NULL)
|
||||
{
|
||||
job->completed_time = attr->values[0].integer;
|
||||
|
||||
@@ -1858,6 +1859,12 @@ cupsdLoadJob(cupsd_job_t *job) /* I - J
|
||||
cupsdSetString(&job->username, attr->values[0].string.text);
|
||||
}
|
||||
|
||||
+ if (!job->name)
|
||||
+ {
|
||||
+ if ((attr = ippFindAttribute(job->attrs, "job-name", IPP_TAG_NAME)) != NULL)
|
||||
+ cupsdSetString(&job->name, attr->values[0].string.text);
|
||||
+ }
|
||||
+
|
||||
/*
|
||||
* Set the job hold-until time and state...
|
||||
*/
|
||||
@@ -1882,6 +1889,9 @@ cupsdLoadJob(cupsd_job_t *job) /* I - J
|
||||
job->state_value = IPP_JOB_PENDING;
|
||||
}
|
||||
|
||||
+ if ((attr = ippFindAttribute(job->attrs, "job-k-octets", IPP_TAG_INTEGER)) != NULL)
|
||||
+ job->koctets = attr->values[0].integer;
|
||||
+
|
||||
if (!job->num_files)
|
||||
{
|
||||
/*
|
||||
@@ -2190,14 +2200,18 @@ cupsdSaveAllJobs(void)
|
||||
{
|
||||
cupsFilePrintf(fp, "<Job %d>\n", job->id);
|
||||
cupsFilePrintf(fp, "State %d\n", job->state_value);
|
||||
+ cupsFilePrintf(fp, "Created %ld\n", (long)job->creation_time);
|
||||
if (job->completed_time)
|
||||
cupsFilePrintf(fp, "Completed %ld\n", (long)job->completed_time);
|
||||
cupsFilePrintf(fp, "Priority %d\n", job->priority);
|
||||
if (job->hold_until)
|
||||
cupsFilePrintf(fp, "HoldUntil %ld\n", (long)job->hold_until);
|
||||
cupsFilePrintf(fp, "Username %s\n", job->username);
|
||||
+ if (job->name)
|
||||
+ cupsFilePutConf(fp, "Name", job->name);
|
||||
cupsFilePrintf(fp, "Destination %s\n", job->dest);
|
||||
cupsFilePrintf(fp, "DestType %d\n", job->dtype);
|
||||
+ cupsFilePrintf(fp, "KOctets %d\n", job->koctets);
|
||||
cupsFilePrintf(fp, "NumFiles %d\n", job->num_files);
|
||||
for (i = 0; i < job->num_files; i ++)
|
||||
cupsFilePrintf(fp, "File %d %s/%s %d\n", i + 1, job->filetypes[i]->super,
|
||||
@@ -4138,7 +4152,7 @@ load_job_cache(const char *filename) /*
|
||||
cupsArrayAdd(ActiveJobs, job);
|
||||
else if (job->state_value > IPP_JOB_STOPPED)
|
||||
{
|
||||
- if (!job->completed_time)
|
||||
+ if (!job->completed_time || !job->creation_time || !job->name || !job->koctets)
|
||||
{
|
||||
cupsdLoadJob(job);
|
||||
unload_job(job);
|
||||
@@ -4161,6 +4175,14 @@ load_job_cache(const char *filename) /*
|
||||
else if (job->state_value > IPP_JOB_COMPLETED)
|
||||
job->state_value = IPP_JOB_COMPLETED;
|
||||
}
|
||||
+ else if (!_cups_strcasecmp(line, "Name"))
|
||||
+ {
|
||||
+ cupsdSetString(&(job->name), value);
|
||||
+ }
|
||||
+ else if (!_cups_strcasecmp(line, "Created"))
|
||||
+ {
|
||||
+ job->creation_time = strtol(value, NULL, 10);
|
||||
+ }
|
||||
else if (!_cups_strcasecmp(line, "Completed"))
|
||||
{
|
||||
job->completed_time = strtol(value, NULL, 10);
|
||||
@@ -4185,6 +4207,10 @@ load_job_cache(const char *filename) /*
|
||||
{
|
||||
job->dtype = (cups_ptype_t)atoi(value);
|
||||
}
|
||||
+ else if (!_cups_strcasecmp(line, "KOctets"))
|
||||
+ {
|
||||
+ job->koctets = atoi(value);
|
||||
+ }
|
||||
else if (!_cups_strcasecmp(line, "NumFiles"))
|
||||
{
|
||||
job->num_files = atoi(value);
|
||||
diff -up cups-1.7.5/scheduler/job.h.str2913 cups-1.7.5/scheduler/job.h
|
||||
--- cups-1.7.5/scheduler/job.h.str2913 2014-08-20 17:19:25.196908795 +0100
|
||||
+++ cups-1.7.5/scheduler/job.h 2014-08-20 17:19:25.273909291 +0100
|
||||
@@ -39,6 +39,8 @@ struct cupsd_job_s /**** Job request *
|
||||
* waiting on files */
|
||||
char *username; /* Printing user */
|
||||
char *dest; /* Destination printer or class */
|
||||
+ char *name; /* Job name/title */
|
||||
+ int koctets; /* job-k-octets */
|
||||
cups_ptype_t dtype; /* Destination type */
|
||||
cupsd_printer_t *printer; /* Printer this job is assigned to */
|
||||
int num_files; /* Number of files in job */
|
||||
@@ -47,6 +49,7 @@ struct cupsd_job_s /**** Job request *
|
||||
ipp_attribute_t *sheets; /* job-media-sheets-completed */
|
||||
time_t access_time, /* Last access time */
|
||||
cancel_time, /* When to cancel/send SIGTERM */
|
||||
+ creation_time, /* When job was created */
|
||||
completed_time, /* When job was completed (0 if not) */
|
||||
file_time, /* Job file retain time */
|
||||
history_time, /* Job history retain time */
|
@ -1,7 +1,7 @@
|
||||
diff -up cups-1.5b1/cups/tempfile.c.str3382 cups-1.5b1/cups/tempfile.c
|
||||
--- cups-1.5b1/cups/tempfile.c.str3382 2010-03-24 01:45:34.000000000 +0100
|
||||
+++ cups-1.5b1/cups/tempfile.c 2011-05-24 16:04:47.000000000 +0200
|
||||
@@ -33,6 +33,7 @@
|
||||
diff -up cups-2.0rc1/cups/tempfile.c.str3382 cups-2.0rc1/cups/tempfile.c
|
||||
--- cups-2.0rc1/cups/tempfile.c.str3382 2014-07-31 02:58:00.000000000 +0200
|
||||
+++ cups-2.0rc1/cups/tempfile.c 2014-09-12 14:06:42.560887827 +0200
|
||||
@@ -27,6 +27,7 @@
|
||||
# include <io.h>
|
||||
#else
|
||||
# include <unistd.h>
|
||||
@ -9,7 +9,7 @@ diff -up cups-1.5b1/cups/tempfile.c.str3382 cups-1.5b1/cups/tempfile.c
|
||||
#endif /* WIN32 || __EMX__ */
|
||||
|
||||
|
||||
@@ -54,7 +55,7 @@ cupsTempFd(char *filename, /* I - Point
|
||||
@@ -48,7 +49,7 @@ cupsTempFd(char *filename, /* I - Point
|
||||
char tmppath[1024]; /* Windows temporary directory */
|
||||
DWORD curtime; /* Current time */
|
||||
#else
|
||||
@ -18,10 +18,10 @@ diff -up cups-1.5b1/cups/tempfile.c.str3382 cups-1.5b1/cups/tempfile.c
|
||||
#endif /* WIN32 */
|
||||
|
||||
|
||||
@@ -105,33 +106,25 @@ cupsTempFd(char *filename, /* I - Point
|
||||
@@ -98,32 +99,24 @@ cupsTempFd(char *filename, /* I - Point
|
||||
*/
|
||||
|
||||
snprintf(filename, len - 1, "%s/%05lx%08lx", tmpdir,
|
||||
GetCurrentProcessId(), curtime);
|
||||
snprintf(filename, (size_t)len - 1, "%s/%05lx%08lx", tmpdir, GetCurrentProcessId(), curtime);
|
||||
-#else
|
||||
- /*
|
||||
- * Get the current time of day...
|
||||
@ -33,8 +33,7 @@ diff -up cups-1.5b1/cups/tempfile.c.str3382 cups-1.5b1/cups/tempfile.c
|
||||
- * Format a string using the hex time values...
|
||||
- */
|
||||
-
|
||||
- snprintf(filename, len - 1, "%s/%05x%08x", tmpdir, (unsigned)getpid(),
|
||||
- (unsigned)(curtime.tv_sec + curtime.tv_usec + tries));
|
||||
- snprintf(filename, (size_t)len - 1, "%s/%05x%08x", tmpdir, (unsigned)getpid(), (unsigned)(curtime.tv_sec + curtime.tv_usec + tries));
|
||||
-#endif /* WIN32 */
|
||||
|
||||
/*
|
||||
@ -49,7 +48,6 @@ diff -up cups-1.5b1/cups/tempfile.c.str3382 cups-1.5b1/cups/tempfile.c
|
||||
- fd = open(filename, O_RDWR | O_CREAT | O_EXCL | O_NOFOLLOW, 0600);
|
||||
#else
|
||||
- fd = open(filename, O_RDWR | O_CREAT | O_EXCL, 0600);
|
||||
+
|
||||
+ /*
|
||||
+ * Use the standard mkstemp() call to make a temporary filename
|
||||
+ * securely. -- andrew.wood@jdplc.com
|
||||
|
@ -1,271 +0,0 @@
|
||||
diff -up cups-1.7.5/CHANGES.txt.str4396 cups-1.7.5/CHANGES.txt
|
||||
diff -up cups-1.7.5/scheduler/ipp.c.str4396 cups-1.7.5/scheduler/ipp.c
|
||||
--- cups-1.7.5/scheduler/ipp.c.str4396 2014-08-20 16:56:29.012022421 +0100
|
||||
+++ cups-1.7.5/scheduler/ipp.c 2014-08-20 16:56:38.535084011 +0100
|
||||
@@ -6595,6 +6595,7 @@ get_jobs(cupsd_client_t *con, /* I - C
|
||||
cupsd_job_t *job; /* Current job pointer */
|
||||
cupsd_printer_t *printer; /* Printer */
|
||||
cups_array_t *list; /* Which job list... */
|
||||
+ int delete_list = 0; /* Delete the list afterwards? */
|
||||
cups_array_t *ra, /* Requested attributes array */
|
||||
*exclude; /* Private attributes array */
|
||||
cupsd_policy_t *policy; /* Current policy */
|
||||
@@ -6694,13 +6695,15 @@ get_jobs(cupsd_client_t *con, /* I - C
|
||||
{
|
||||
job_comparison = 1;
|
||||
job_state = IPP_JOB_CANCELED;
|
||||
- list = Jobs;
|
||||
+ list = cupsdGetCompletedJobs(printer);
|
||||
+ delete_list = 1;
|
||||
}
|
||||
else if (!strcmp(attr->values[0].string.text, "aborted"))
|
||||
{
|
||||
job_comparison = 0;
|
||||
job_state = IPP_JOB_ABORTED;
|
||||
- list = Jobs;
|
||||
+ list = cupsdGetCompletedJobs(printer);
|
||||
+ delete_list = 1;
|
||||
}
|
||||
else if (!strcmp(attr->values[0].string.text, "all"))
|
||||
{
|
||||
@@ -6712,7 +6715,8 @@ get_jobs(cupsd_client_t *con, /* I - C
|
||||
{
|
||||
job_comparison = 0;
|
||||
job_state = IPP_JOB_CANCELED;
|
||||
- list = Jobs;
|
||||
+ list = cupsdGetCompletedJobs(printer);
|
||||
+ delete_list = 1;
|
||||
}
|
||||
else if (!strcmp(attr->values[0].string.text, "pending"))
|
||||
{
|
||||
@@ -6919,6 +6923,9 @@ get_jobs(cupsd_client_t *con, /* I - C
|
||||
|
||||
cupsArrayDelete(ra);
|
||||
|
||||
+ if (delete_list)
|
||||
+ cupsArrayDelete(list);
|
||||
+
|
||||
con->response->request.status.status_code = IPP_OK;
|
||||
}
|
||||
|
||||
diff -up cups-1.7.5/scheduler/job.c.str4396 cups-1.7.5/scheduler/job.c
|
||||
--- cups-1.7.5/scheduler/job.c.str4396 2014-08-20 16:56:29.013022427 +0100
|
||||
+++ cups-1.7.5/scheduler/job.c 2014-08-20 16:56:38.537084024 +0100
|
||||
@@ -130,6 +130,7 @@ static mime_filter_t gziptoany_filter =
|
||||
*/
|
||||
|
||||
static int compare_active_jobs(void *first, void *second, void *data);
|
||||
+static int compare_completed_jobs(void *first, void *second, void *data);
|
||||
static int compare_jobs(void *first, void *second, void *data);
|
||||
static void dump_job_history(cupsd_job_t *job);
|
||||
static void finalize_job(cupsd_job_t *job, int set_job_state);
|
||||
@@ -1568,6 +1569,30 @@ cupsdFindJob(int id) /* I - Job ID */
|
||||
|
||||
|
||||
/*
|
||||
+ * 'cupsdGetCompletedJobs()'- Generate a completed jobs list.
|
||||
+ */
|
||||
+
|
||||
+cups_array_t * /* O - Array of jobs */
|
||||
+cupsdGetCompletedJobs(
|
||||
+ cupsd_printer_t *p) /* I - Printer */
|
||||
+{
|
||||
+ cups_array_t *list; /* Array of jobs */
|
||||
+ cupsd_job_t *job; /* Current job */
|
||||
+
|
||||
+
|
||||
+ list = cupsArrayNew(compare_completed_jobs, NULL);
|
||||
+
|
||||
+ for (job = (cupsd_job_t *)cupsArrayFirst(Jobs);
|
||||
+ job;
|
||||
+ job = (cupsd_job_t *)cupsArrayNext(Jobs))
|
||||
+ if ((!p || !_cups_strcasecmp(p->name, job->dest)) && job->state_value >= IPP_JOB_STOPPED && job->completed_time)
|
||||
+ cupsArrayAdd(list, job);
|
||||
+
|
||||
+ return (list);
|
||||
+}
|
||||
+
|
||||
+
|
||||
+/*
|
||||
* 'cupsdGetPrinterJobCount()' - Get the number of pending, processing,
|
||||
* or held jobs in a printer or class.
|
||||
*/
|
||||
@@ -1766,6 +1791,8 @@ cupsdLoadJob(cupsd_job_t *job) /* I - J
|
||||
(attr = ippFindAttribute(job->attrs, "time-at-completed",
|
||||
IPP_TAG_INTEGER)) != NULL)
|
||||
{
|
||||
+ job->completed_time = attr->values[0].integer;
|
||||
+
|
||||
if (JobHistory < INT_MAX)
|
||||
job->history_time = attr->values[0].integer + JobHistory;
|
||||
else
|
||||
@@ -2257,8 +2284,11 @@ cupsdSaveAllJobs(void)
|
||||
{
|
||||
cupsFilePrintf(fp, "<Job %d>\n", job->id);
|
||||
cupsFilePrintf(fp, "State %d\n", job->state_value);
|
||||
+ if (job->completed_time)
|
||||
+ cupsFilePrintf(fp, "Completed %ld\n", (long)job->completed_time);
|
||||
cupsFilePrintf(fp, "Priority %d\n", job->priority);
|
||||
- cupsFilePrintf(fp, "HoldUntil %d\n", (int)job->hold_until);
|
||||
+ if (job->hold_until)
|
||||
+ cupsFilePrintf(fp, "HoldUntil %ld\n", (long)job->hold_until);
|
||||
cupsFilePrintf(fp, "Username %s\n", job->username);
|
||||
cupsFilePrintf(fp, "Destination %s\n", job->dest);
|
||||
cupsFilePrintf(fp, "DestType %d\n", job->dtype);
|
||||
@@ -2993,6 +3023,28 @@ compare_active_jobs(void *first, /* I -
|
||||
|
||||
|
||||
/*
|
||||
+ * 'compare_completed_jobs()' - Compare the job IDs and completion times of two jobs.
|
||||
+ */
|
||||
+
|
||||
+static int /* O - Difference */
|
||||
+compare_completed_jobs(void *first, /* I - First job */
|
||||
+ void *second, /* I - Second job */
|
||||
+ void *data) /* I - App data (not used) */
|
||||
+{
|
||||
+ int diff; /* Difference */
|
||||
+
|
||||
+
|
||||
+ (void)data;
|
||||
+
|
||||
+ if ((diff = ((cupsd_job_t *)second)->completed_time -
|
||||
+ ((cupsd_job_t *)first)->completed_time) != 0)
|
||||
+ return (diff);
|
||||
+ else
|
||||
+ return (((cupsd_job_t *)first)->id - ((cupsd_job_t *)second)->id);
|
||||
+}
|
||||
+
|
||||
+
|
||||
+/*
|
||||
* 'compare_jobs()' - Compare the job IDs of two jobs.
|
||||
*/
|
||||
|
||||
@@ -4268,6 +4320,14 @@ load_job_cache(const char *filename) /*
|
||||
|
||||
if (job->state_value <= IPP_JOB_STOPPED && cupsdLoadJob(job))
|
||||
cupsArrayAdd(ActiveJobs, job);
|
||||
+ else if (job->state_value > IPP_JOB_STOPPED)
|
||||
+ {
|
||||
+ if (!job->completed_time)
|
||||
+ {
|
||||
+ cupsdLoadJob(job);
|
||||
+ unload_job(job);
|
||||
+ }
|
||||
+ }
|
||||
|
||||
job = NULL;
|
||||
}
|
||||
@@ -4285,9 +4345,13 @@ load_job_cache(const char *filename) /*
|
||||
else if (job->state_value > IPP_JOB_COMPLETED)
|
||||
job->state_value = IPP_JOB_COMPLETED;
|
||||
}
|
||||
+ else if (!_cups_strcasecmp(line, "Completed"))
|
||||
+ {
|
||||
+ job->completed_time = strtol(value, NULL, 10);
|
||||
+ }
|
||||
else if (!_cups_strcasecmp(line, "HoldUntil"))
|
||||
{
|
||||
- job->hold_until = atoi(value);
|
||||
+ job->hold_until = strtol(value, NULL, 10);
|
||||
}
|
||||
else if (!_cups_strcasecmp(line, "Priority"))
|
||||
{
|
||||
@@ -4625,6 +4689,8 @@ set_time(cupsd_job_t *job, /* I - Job t
|
||||
|
||||
if (!strcmp(name, "time-at-completed"))
|
||||
{
|
||||
+ job->completed_time = curtime;
|
||||
+
|
||||
if (JobHistory < INT_MAX && attr)
|
||||
job->history_time = attr->values[0].integer + JobHistory;
|
||||
else
|
||||
diff -up cups-1.7.5/scheduler/job.h.str4396 cups-1.7.5/scheduler/job.h
|
||||
--- cups-1.7.5/scheduler/job.h.str4396 2014-08-20 16:56:29.013022427 +0100
|
||||
+++ cups-1.7.5/scheduler/job.h 2014-08-20 16:56:38.538084031 +0100
|
||||
@@ -54,6 +54,7 @@ struct cupsd_job_s /**** Job request *
|
||||
ipp_attribute_t *sheets; /* job-media-sheets-completed */
|
||||
time_t access_time, /* Last access time */
|
||||
cancel_time, /* When to cancel/send SIGTERM */
|
||||
+ completed_time, /* When job was completed (0 if not) */
|
||||
file_time, /* Job file retain time */
|
||||
history_time, /* Job history retain time */
|
||||
hold_until, /* Hold expiration date/time */
|
||||
@@ -156,6 +157,7 @@ extern void cupsdDeleteJob(cupsd_job_t
|
||||
cupsd_jobaction_t action);
|
||||
extern cupsd_job_t *cupsdFindJob(int id);
|
||||
extern void cupsdFreeAllJobs(void);
|
||||
+extern cups_array_t *cupsdGetCompletedJobs(cupsd_printer_t *p);
|
||||
extern int cupsdGetPrinterJobCount(const char *dest);
|
||||
extern int cupsdGetUserJobCount(const char *username);
|
||||
extern void cupsdLoadAllJobs(void);
|
||||
diff -up cups-1.7.5/systemv/lpstat.c.str4396 cups-1.7.5/systemv/lpstat.c
|
||||
--- cups-1.7.5/systemv/lpstat.c.str4396 2014-05-22 14:59:21.000000000 +0100
|
||||
+++ cups-1.7.5/systemv/lpstat.c 2014-08-20 16:56:38.539084037 +0100
|
||||
@@ -1316,7 +1316,8 @@ show_jobs(const char *dests, /* I - Des
|
||||
const char *dest, /* Pointer into job-printer-uri */
|
||||
*username, /* Pointer to job-originating-user-name */
|
||||
*title, /* Pointer to job-name */
|
||||
- *message; /* Pointer to job-printer-state-message */
|
||||
+ *message, /* Pointer to job-printer-state-message */
|
||||
+ *time_at; /* time-at-xxx attribute name to use */
|
||||
int rank, /* Rank in queue */
|
||||
jobid, /* job-id */
|
||||
size; /* job-k-octets */
|
||||
@@ -1332,7 +1333,8 @@ show_jobs(const char *dests, /* I - Des
|
||||
"job-printer-state-message",
|
||||
"job-printer-uri",
|
||||
"job-state-reasons",
|
||||
- "time-at-creation"
|
||||
+ "time-at-creation",
|
||||
+ "time-at-completed"
|
||||
};
|
||||
|
||||
|
||||
@@ -1398,6 +1400,13 @@ show_jobs(const char *dests, /* I - Des
|
||||
* Loop through the job list and display them...
|
||||
*/
|
||||
|
||||
+ if (!strcmp(which, "aborted") ||
|
||||
+ !strcmp(which, "canceled") ||
|
||||
+ !strcmp(which, "completed"))
|
||||
+ time_at = "time-at-completed";
|
||||
+ else
|
||||
+ time_at = "time-at-creation";
|
||||
+
|
||||
rank = -1;
|
||||
|
||||
for (attr = response->attrs; attr != NULL; attr = attr->next)
|
||||
@@ -1433,8 +1442,7 @@ show_jobs(const char *dests, /* I - Des
|
||||
else if (!strcmp(attr->name, "job-k-octets") &&
|
||||
attr->value_tag == IPP_TAG_INTEGER)
|
||||
size = attr->values[0].integer;
|
||||
- else if (!strcmp(attr->name, "time-at-creation") &&
|
||||
- attr->value_tag == IPP_TAG_INTEGER)
|
||||
+ else if (!strcmp(attr->name, time_at) && attr->value_tag == IPP_TAG_INTEGER)
|
||||
jobtime = attr->values[0].integer;
|
||||
else if (!strcmp(attr->name, "job-printer-state-message") &&
|
||||
attr->value_tag == IPP_TAG_TEXT)
|
||||
diff -up cups-1.7.5/test/5.5-lp.sh.str4396 cups-1.7.5/test/5.5-lp.sh
|
||||
--- cups-1.7.5/test/5.5-lp.sh.str4396 2013-11-06 20:09:03.000000000 +0000
|
||||
+++ cups-1.7.5/test/5.5-lp.sh 2014-08-20 16:56:38.540084044 +0100
|
||||
@@ -79,6 +79,19 @@ echo ""
|
||||
|
||||
./waitjobs.sh
|
||||
|
||||
+echo "LPSTAT Completed Jobs Order Test"
|
||||
+echo ""
|
||||
+echo " lpstat -W completed -o"
|
||||
+$VALGRIND ../systemv/lpstat -W completed -o | tee $BASE/lpstat-completed.txt
|
||||
+if test "`uniq -d $BASE/lpstat-completed.txt`" != ""; then
|
||||
+ echo " FAILED"
|
||||
+ exit 1
|
||||
+else
|
||||
+ echo " PASSED"
|
||||
+fi
|
||||
+echo ""
|
||||
+
|
||||
+
|
||||
#
|
||||
# End of "$Id: 5.5-lp.sh 11396 2013-11-06 20:09:03Z msweet $".
|
||||
#
|
@ -1,177 +0,0 @@
|
||||
diff -up cups-1.7.5/notifier/rss.c.str4461 cups-1.7.5/notifier/rss.c
|
||||
--- cups-1.7.5/notifier/rss.c.str4461 2013-05-29 12:51:34.000000000 +0100
|
||||
+++ cups-1.7.5/notifier/rss.c 2014-09-01 10:16:34.088149082 +0100
|
||||
@@ -1,27 +1,16 @@
|
||||
/*
|
||||
* "$Id: rss.c 10996 2013-05-29 11:51:34Z msweet $"
|
||||
*
|
||||
- * RSS notifier for CUPS.
|
||||
+ * RSS notifier for CUPS.
|
||||
*
|
||||
- * Copyright 2007-2012 by Apple Inc.
|
||||
- * Copyright 2007 by Easy Software Products.
|
||||
+ * Copyright 2007-2014 by Apple Inc.
|
||||
+ * Copyright 2007 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/".
|
||||
- *
|
||||
- * Contents:
|
||||
- *
|
||||
- * main() - Main entry for the test notifier.
|
||||
- * compare_rss() - Compare two messages.
|
||||
- * delete_message() - Free all memory used by a message.
|
||||
- * load_rss() - Load an existing RSS feed file.
|
||||
- * new_message() - Create a new RSS message.
|
||||
- * password_cb() - Return the cached password.
|
||||
- * save_rss() - Save messages to a RSS file.
|
||||
- * xml_escape() - Copy a string, escaping &, <, and > as needed.
|
||||
+ * 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/".
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -29,6 +18,7 @@
|
||||
*/
|
||||
|
||||
#include <cups/cups.h>
|
||||
+#include <sys/stat.h>
|
||||
#include <cups/language.h>
|
||||
#include <cups/string-private.h>
|
||||
#include <cups/array.h>
|
||||
@@ -629,6 +619,8 @@ save_rss(cups_array_t *rss, /* I - RSS
|
||||
return (0);
|
||||
}
|
||||
|
||||
+ fchmod(fileno(fp), 0644);
|
||||
+
|
||||
fputs("<?xml version=\"1.0\"?>\n", fp);
|
||||
fputs("<rss version=\"2.0\">\n", fp);
|
||||
fputs(" <channel>\n", fp);
|
||||
diff -up cups-1.7.5/scheduler/client.c.str4461 cups-1.7.5/scheduler/client.c
|
||||
--- cups-1.7.5/scheduler/client.c.str4461 2014-07-22 15:03:19.000000000 +0100
|
||||
+++ cups-1.7.5/scheduler/client.c 2014-09-01 10:15:51.970947105 +0100
|
||||
@@ -3263,6 +3263,7 @@ get_file(cupsd_client_t *con, /* I - C
|
||||
char *ptr; /* Pointer info filename */
|
||||
int plen; /* Remaining length after pointer */
|
||||
char language[7]; /* Language subdirectory, if any */
|
||||
+ int perm_check = 1; /* Do permissions check? */
|
||||
|
||||
|
||||
/*
|
||||
@@ -3272,17 +3273,27 @@ get_file(cupsd_client_t *con, /* I - C
|
||||
language[0] = '\0';
|
||||
|
||||
if (!strncmp(con->uri, "/ppd/", 5) && !strchr(con->uri + 5, '/'))
|
||||
+ {
|
||||
snprintf(filename, len, "%s%s", ServerRoot, con->uri);
|
||||
+
|
||||
+ perm_check = 0;
|
||||
+ }
|
||||
else if (!strncmp(con->uri, "/icons/", 7) && !strchr(con->uri + 7, '/'))
|
||||
{
|
||||
snprintf(filename, len, "%s/%s", CacheDir, con->uri + 7);
|
||||
if (access(filename, F_OK) < 0)
|
||||
snprintf(filename, len, "%s/images/generic.png", DocumentRoot);
|
||||
+
|
||||
+ perm_check = 0;
|
||||
}
|
||||
else if (!strncmp(con->uri, "/rss/", 5) && !strchr(con->uri + 5, '/'))
|
||||
snprintf(filename, len, "%s/rss/%s", CacheDir, con->uri + 5);
|
||||
- else if (!strncmp(con->uri, "/admin/conf/", 12))
|
||||
- snprintf(filename, len, "%s%s", ServerRoot, con->uri + 11);
|
||||
+ else if (!strcmp(con->uri, "/admin/conf/cupsd.conf"))
|
||||
+ {
|
||||
+ strlcpy(filename, ConfigurationFile, len);
|
||||
+
|
||||
+ perm_check = 0;
|
||||
+ }
|
||||
else if (!strncmp(con->uri, "/admin/log/", 11))
|
||||
{
|
||||
if (!strncmp(con->uri + 11, "access_log", 10) && AccessLog[0] == '/')
|
||||
@@ -3293,6 +3304,8 @@ get_file(cupsd_client_t *con, /* I - C
|
||||
strlcpy(filename, PageLog, len);
|
||||
else
|
||||
return (NULL);
|
||||
+
|
||||
+ perm_check = 0;
|
||||
}
|
||||
else if (con->language)
|
||||
{
|
||||
@@ -3358,7 +3371,7 @@ get_file(cupsd_client_t *con, /* I - C
|
||||
* not allow access...
|
||||
*/
|
||||
|
||||
- if (!status && !(filestats->st_mode & S_IROTH))
|
||||
+ if (!status && perm_check && !(filestats->st_mode & S_IROTH))
|
||||
{
|
||||
cupsdLogMessage(CUPSD_LOG_INFO, "[Client %d] Files/directories such as \"%s\" must be world-readable.", con->http.fd, filename);
|
||||
return (NULL);
|
||||
@@ -3466,7 +3479,7 @@ get_file(cupsd_client_t *con, /* I - C
|
||||
* not allow access...
|
||||
*/
|
||||
|
||||
- if (!status && !(filestats->st_mode & S_IROTH))
|
||||
+ if (!status && perm_check && !(filestats->st_mode & S_IROTH))
|
||||
{
|
||||
cupsdLogMessage(CUPSD_LOG_INFO, "[Client %d] Files/directories such as \"%s\" must be world-readable.", con->http.fd, filename);
|
||||
return (NULL);
|
||||
diff -up cups-1.7.5/scheduler/conf.c.str4461 cups-1.7.5/scheduler/conf.c
|
||||
--- cups-1.7.5/scheduler/conf.c.str4461 2014-09-01 10:15:51.968947096 +0100
|
||||
+++ cups-1.7.5/scheduler/conf.c 2014-09-01 10:16:52.624237974 +0100
|
||||
@@ -1092,7 +1092,7 @@ cupsdReadConfiguration(void)
|
||||
|
||||
if ((cupsdCheckPermissions(RequestRoot, NULL, 0710, RunUser,
|
||||
Group, 1, 1) < 0 ||
|
||||
- cupsdCheckPermissions(CacheDir, NULL, 0775, RunUser,
|
||||
+ cupsdCheckPermissions(CacheDir, NULL, 0770, RunUser,
|
||||
Group, 1, 1) < 0 ||
|
||||
cupsdCheckPermissions(temp, NULL, 0775, RunUser,
|
||||
Group, 1, 1) < 0 ||
|
||||
diff -up cups-1.7.5/scheduler/ipp.c.str4461 cups-1.7.5/scheduler/ipp.c
|
||||
--- cups-1.7.5/scheduler/ipp.c.str4461 2014-09-01 10:15:51.848946520 +0100
|
||||
+++ cups-1.7.5/scheduler/ipp.c 2014-09-01 10:15:51.972947115 +0100
|
||||
@@ -2743,7 +2743,6 @@ add_printer(cupsd_client_t *con, /* I -
|
||||
|
||||
cupsdLogMessage(CUPSD_LOG_DEBUG,
|
||||
"Copied PPD file successfully");
|
||||
- chmod(dstfile, 0644);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4650,7 +4649,7 @@ copy_model(cupsd_client_t *con, /* I -
|
||||
* Open the destination file for a copy...
|
||||
*/
|
||||
|
||||
- if ((dst = cupsFileOpen(to, "wb")) == NULL)
|
||||
+ if ((dst = cupsdCreateConfFile(to, ConfigFilePerm)) == NULL)
|
||||
{
|
||||
cupsFreeOptions(num_defaults, defaults);
|
||||
cupsFileClose(src);
|
||||
@@ -4705,7 +4704,7 @@ copy_model(cupsd_client_t *con, /* I -
|
||||
|
||||
unlink(tempfile);
|
||||
|
||||
- return (cupsFileClose(dst));
|
||||
+ return (cupsdCloseCreatedConfFile(dst, to));
|
||||
}
|
||||
|
||||
|
||||
diff -up cups-1.7.5/scheduler/Makefile.str4461 cups-1.7.5/scheduler/Makefile
|
||||
--- cups-1.7.5/scheduler/Makefile.str4461 2014-09-01 10:15:51.965947081 +0100
|
||||
+++ cups-1.7.5/scheduler/Makefile 2014-09-01 10:16:52.624237974 +0100
|
||||
@@ -174,7 +174,7 @@ install-data:
|
||||
echo Creating $(REQUESTS)/tmp...
|
||||
$(INSTALL_DIR) -m 1770 -g $(CUPS_GROUP) $(REQUESTS)/tmp
|
||||
echo Creating $(CACHEDIR)...
|
||||
- $(INSTALL_DIR) -m 775 -g $(CUPS_GROUP) $(CACHEDIR)
|
||||
+ $(INSTALL_DIR) -m 770 -g $(CUPS_GROUP) $(CACHEDIR)
|
||||
if test "x$(INITDIR)" != x; then \
|
||||
echo Installing init scripts...; \
|
||||
$(INSTALL_DIR) -m 755 $(BUILDROOT)$(INITDIR)/init.d; \
|
@ -1,24 +0,0 @@
|
||||
diff -up cups-1.7.5/cgi-bin/admin.c.str4475 cups-1.7.5/cgi-bin/admin.c
|
||||
--- cups-1.7.5/cgi-bin/admin.c.str4475 2014-09-01 13:03:51.295152124 +0100
|
||||
+++ cups-1.7.5/cgi-bin/admin.c 2014-09-01 13:03:59.367197078 +0100
|
||||
@@ -1917,7 +1917,7 @@ do_config_server(http_t *http) /* I - H
|
||||
}
|
||||
else
|
||||
{
|
||||
- cgiSetVariable("refresh_page", "5;URL=/admin/?OP=redirect");
|
||||
+ cgiSetVariable("refresh_page", "5;URL=/admin/");
|
||||
|
||||
cgiStartHTML(cgiText(_("Edit Configuration File")));
|
||||
cgiCopyTemplateLang("restart.tmpl");
|
||||
diff -up cups-1.7.5/templates/restart.tmpl.str4475 cups-1.7.5/templates/restart.tmpl
|
||||
--- cups-1.7.5/templates/restart.tmpl.str4475 2008-10-08 23:50:16.000000000 +0100
|
||||
+++ cups-1.7.5/templates/restart.tmpl 2014-09-01 13:03:59.368197084 +0100
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<H2 CLASS="title">Change Settings</H2>
|
||||
|
||||
-<P><IMG SRC="/images/wait.gif" WIDTH="16" HEIGHT="16" ALIGN="ABSMIDDLE"
|
||||
+<P><IMG SRC="data:image/gif;base64,R0lGODlhEAAQAIQAAP///wAAAPDw8IqKiuDg4EZGRnp6egAAAFhYWCQkJKysrL6+vhQUFJycnAQEBDY2NmhoaP///////////////////////////////////////////////////////////yH/C05FVFNDQVBFMi4wAwEAAAAh+QQABQD/ACwAAAAAEAAQAAAFdyAgAgIJIeWoAkRCCMdBkKtIHIngyMKsErPBYbADpkSCwhDmQCBethRB6Vj4kFCkQPG4IlWDgrNRIwnO4UKBXDufzQvDMaoSDBgFb886MiQadgNABAokfCwzBA8LCg0Egl8jAggGAA1kBIA1BAYzlyILczULC2UhACH5BAEFAB8ALAAAAAAQABAAAAV2ICACAmlAZTmOREEIyUEQjLKKxPHADhEvqxlgcGgkGI1DYSVAIAWMx+lwSKkICJ0QsHi9RgKBwnVTiRQQgwF4I4UFDQQEwi6/3YSGWRRmjhEETAJfIgMFCnAKM0KDV4EEEAQLiF18TAYNXDaSe3x6mjidN1s3IQAh+QQBBQAfACwAAAAAEAAQAAAFeCAgAgLZDGU5jgRECEUiCI+yioSDwDJyLKsXoHFQxBSHAoAAFBhqtMJg8DgQBgfrEsJAEAg4YhZIEiwgKtHiMBgtpg3wbUZXGO7kOb1MUKRFMysCChAoggJCIg0GC2aNe4gqQldfL4l/Ag1AXySJgn5LcoE3QXI3IQAh+QQBBQAfACwAAAAAEAAQAAAFdiAgAgLZNGU5joQhCEjxIssqEo8bC9BRjy9Ag7GILQ4QEoE0gBAEBcOpcBA0DoxSK/e8LRIHn+i1cK0IyKdg0VAoljYIg+GgnRrwVS/8IAkICyosBIQpBAMoKy9dImxPhS+GKkFrkX+TigtLlIyKXUF+NjagNiEAIfkEAQUAHwAsAAAAABAAEAAABWwgIAICaRhlOY4EIgjH8R7LKhKHGwsMvb4AAy3WODBIBBKCsYA9TjuhDNDKEVSERezQEL0WrhXucRUQGuik7bFlngzqVW9LMl9XWvLdjFaJtDFqZ1cEZUB0dUgvL3dgP4WJZn4jkomWNpSTIyEAIfkEAQUAHwAsAAAAABAAEAAABX4gIAICuSxlOY6CIgiD8RrEKgqGOwxwUrMlAoSwIzAGpJpgoSDAGifDY5kopBYDlEpAQBwevxfBtRIUGi8xwWkDNBCIwmC9Vq0aiQQDQuK+VgQPDXV9hCJjBwcFYU5pLwwHXQcMKSmNLQcIAExlbH8JBwttaX0ABAcNbWVbKyEAIfkEAQUAHwAsAAAAABAAEAAABXkgIAICSRBlOY7CIghN8zbEKsKoIjdFzZaEgUBHKChMJtRwcWpAWoWnifm6ESAMhO8lQK0EEAV3rFopIBCEcGwDKAqPh4HUrY4ICHH1dSoTFgcHUiZjBhAJB2AHDykpKAwHAwdzf19KkASIPl9cDgcnDkdtNwiMJCshACH5BAEFAB8ALAAAAAAQABAAAAV3ICACAkkQZTmOAiosiyAoxCq+KPxCNVsSMRgBsiClWrLTSWFoIQZHl6pleBh6suxKMIhlvzbAwkBWfFWrBQTxNLq2RG2yhSUkDs2b63AYDAoJXAcFRwADeAkJDX0AQCsEfAQMDAIPBz0rCgcxky0JRWE1AmwpKyEAIfkEAQUAHwAsAAAAABAAEAAABXkgIAICKZzkqJ4nQZxLqZKv4NqNLKK2/Q4Ek4lFXChsg5ypJjs1II3gEDUSRInEGYAw6B6zM4JhrDAtEosVkLUtHA7RHaHAGJQEjsODcEg0FBAFVgkQJQ1pAwcDDw8KcFtSInwJAowCCA6RIwqZAgkPNgVpWndjdyohACH5BAEFAB8ALAAAAAAQABAAAAV5ICACAimc5KieLEuUKvm2xAKLqDCfC2GaO9eL0LABWTiBYmA06W6kHgvCqEJiAIJiu3gcvgUsscHUERm+kaCxyxa+zRPk0SgJEgfIvbAdIAQLCAYlCj4DBw0IBQsMCjIqBAcPAooCBg9pKgsJLwUFOhCZKyQDA3YqIQAh+QQBBQAfACwAAAAAEAAQAAAFdSAgAgIpnOSonmxbqiThCrJKEHFbo8JxDDOZYFFb+A41E4H4OhkOipXwBElYITDAckFEOBgMQ3arkMkUBdxIUGZpEb7kaQBRlASPg0FQQHAbEEMGDSVEAA1QBhAED1E0NgwFAooCDWljaQIQCE5qMHcNhCkjIQAh+QQBBQAfACwAAAAAEAAQAAAFeSAgAgIpnOSoLgxxvqgKLEcCC65KEAByKK8cSpA4DAiHQ/DkKhGKh4ZCtCyZGo6F6iYYPAqFgYy02xkSaLEMV34tELyRYNEsCQyHlvWkGCzsPgMCEAY7Cg04Uk48LAsDhRA8MVQPEF0GAgqYYwSRlycNcWskCkApIyEAOw==" WIDTH="16" HEIGHT="16" ALIGN="ABSMIDDLE"
|
||||
ALT="Busy Indicator"> Please stand by while the server restarts...</P>
|
||||
|
||||
</DIV>
|
@ -1,8 +1,8 @@
|
||||
diff -up cups-1.5b1/cups/ppd.c.strict-ppd-line-length cups-1.5b1/cups/ppd.c
|
||||
--- cups-1.5b1/cups/ppd.c.strict-ppd-line-length 2011-05-20 05:49:49.000000000 +0200
|
||||
+++ cups-1.5b1/cups/ppd.c 2011-05-24 15:46:13.000000000 +0200
|
||||
@@ -2786,7 +2786,7 @@ ppd_read(cups_file_t *fp, /* I - Fil
|
||||
*lineptr++ = ch;
|
||||
diff -up cups-2.0rc1/cups/ppd.c.strict-ppd-line-length cups-2.0rc1/cups/ppd.c
|
||||
--- cups-2.0rc1/cups/ppd.c.strict-ppd-line-length 2014-02-06 19:33:34.000000000 +0100
|
||||
+++ cups-2.0rc1/cups/ppd.c 2014-09-12 18:07:44.227773710 +0200
|
||||
@@ -2872,7 +2872,7 @@ ppd_read(cups_file_t *fp, /* I - Fil
|
||||
*lineptr++ = (char)ch;
|
||||
col ++;
|
||||
|
||||
- if (col > (PPD_MAX_LINE - 1))
|
||||
@ -10,7 +10,7 @@ diff -up cups-1.5b1/cups/ppd.c.strict-ppd-line-length cups-1.5b1/cups/ppd.c
|
||||
{
|
||||
/*
|
||||
* Line is too long...
|
||||
@@ -2847,7 +2847,7 @@ ppd_read(cups_file_t *fp, /* I - Fil
|
||||
@@ -2933,7 +2933,7 @@ ppd_read(cups_file_t *fp, /* I - Fil
|
||||
{
|
||||
col ++;
|
||||
|
||||
@ -19,7 +19,7 @@ diff -up cups-1.5b1/cups/ppd.c.strict-ppd-line-length cups-1.5b1/cups/ppd.c
|
||||
{
|
||||
/*
|
||||
* Line is too long...
|
||||
@@ -2906,7 +2906,7 @@ ppd_read(cups_file_t *fp, /* I - Fil
|
||||
@@ -2992,7 +2992,7 @@ ppd_read(cups_file_t *fp, /* I - Fil
|
||||
{
|
||||
col ++;
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
--- cups-1.7.0/conf/cups-files.conf.in.synconclose 2013-11-04 11:43:27.989512747 +0000
|
||||
+++ cups-1.7.0/conf/cups-files.conf.in 2013-11-04 11:43:37.830557404 +0000
|
||||
@@ -9,7 +9,7 @@
|
||||
diff -up cups-2.0rc1/conf/cups-files.conf.in.synconclose cups-2.0rc1/conf/cups-files.conf.in
|
||||
--- cups-2.0rc1/conf/cups-files.conf.in.synconclose 2014-09-12 16:48:36.510689633 +0200
|
||||
+++ cups-2.0rc1/conf/cups-files.conf.in 2014-09-12 16:48:36.517689534 +0200
|
||||
@@ -7,7 +7,7 @@
|
||||
#FatalErrors @CUPS_FATAL_ERRORS@
|
||||
|
||||
# Do we call fsync() after writing configuration or status files?
|
||||
@ -9,50 +10,36 @@
|
||||
|
||||
# Default user and group for filters/backends/helper programs; this cannot be
|
||||
# any user or group that resolves to ID 0 for security reasons...
|
||||
diff -up cups-1.7.0/doc/help/man-cups-files.conf.html.synconclose cups-1.7.0/doc/help/man-cups-files.conf.html
|
||||
--- cups-1.7.0/doc/help/man-cups-files.conf.html.synconclose 2013-10-31 11:19:11.927824302 +0000
|
||||
+++ cups-1.7.0/doc/help/man-cups-files.conf.html 2013-10-31 11:19:24.061871113 +0000
|
||||
@@ -146,7 +146,7 @@ be found.
|
||||
<dt>SyncOnClose No
|
||||
</dt>
|
||||
<dd>Specifies whether the scheduler calls <i>fsync(2)</i> after writing configuration
|
||||
-or state files. The default is No.
|
||||
+or state files. The default is Yes.
|
||||
</dd>
|
||||
<dt>SystemGroup group-name [group-name ...]
|
||||
</dt>
|
||||
diff -up cups-1.7.0/doc/help/ref-cups-files-conf.html.in.synconclose cups-1.7.0/doc/help/ref-cups-files-conf.html.in
|
||||
--- cups-1.7.0/doc/help/ref-cups-files-conf.html.in.synconclose 2013-10-31 11:19:33.382907073 +0000
|
||||
+++ cups-1.7.0/doc/help/ref-cups-files-conf.html.in 2013-10-31 11:20:31.567131557 +0000
|
||||
@@ -442,8 +442,8 @@ SyncOnClose Yes
|
||||
|
||||
<P>The <CODE>SyncOnClose</CODE> directive determines whether the scheduler
|
||||
flushes changes to configuration and state files to disk. The default is
|
||||
-<CODE>No</CODE> which relies on the operating system to schedule a suitable
|
||||
-time to write changes to disk.</P>
|
||||
+<CODE>Yes</CODE>. The option <CODE>No</CODE> relies on the operating
|
||||
+system to schedule a suitable time to write changes to disk.</P>
|
||||
|
||||
<BLOCKQUOTE><B>Note:</B>
|
||||
|
||||
diff -up cups-1.7.0/man/cups-files.conf.man.in.synconclose cups-1.7.0/man/cups-files.conf.man.in
|
||||
--- cups-1.7.0/man/cups-files.conf.man.in.synconclose 2013-10-31 11:18:43.928716290 +0000
|
||||
+++ cups-1.7.0/man/cups-files.conf.man.in 2013-10-31 11:19:00.870781647 +0000
|
||||
@@ -126,7 +126,7 @@ SyncOnClose Yes
|
||||
diff -up cups-2.0rc1/doc/help/man-cups-files.conf.html.synconclose cups-2.0rc1/doc/help/man-cups-files.conf.html
|
||||
--- cups-2.0rc1/doc/help/man-cups-files.conf.html.synconclose 2014-09-12 16:48:36.517689534 +0200
|
||||
+++ cups-2.0rc1/doc/help/man-cups-files.conf.html 2014-09-12 16:49:20.643066238 +0200
|
||||
@@ -140,7 +140,7 @@ The default is "/etc/cups".
|
||||
<dd style="margin-left: 5.0em">Specifies whether the scheduler calls
|
||||
<b>fsync</b>(2)
|
||||
after writing configuration or state files.
|
||||
-The default is "No".
|
||||
+The default is "Yes".
|
||||
<dt><b>SystemGroup </b><i>group-name </i>[ ... <i>group-name</i> ]
|
||||
<dd style="margin-left: 5.0em">Specifies the group(s) to use for <i>@SYSTEM</i> group authentication.
|
||||
The default contains "admin", "lpadmin", "root", "sys", and/or "system".
|
||||
diff -up cups-2.0rc1/man/cups-files.conf.man.in.synconclose cups-2.0rc1/man/cups-files.conf.man.in
|
||||
--- cups-2.0rc1/man/cups-files.conf.man.in.synconclose 2014-09-12 16:48:36.518689520 +0200
|
||||
+++ cups-2.0rc1/man/cups-files.conf.man.in 2014-09-12 16:49:52.793612092 +0200
|
||||
@@ -182,7 +182,7 @@ The default is "/etc/cups".
|
||||
Specifies whether the scheduler calls
|
||||
.BR fsync (2)
|
||||
after writing configuration or state files.
|
||||
-The default is "No".
|
||||
+The default is "Yes".
|
||||
.TP 5
|
||||
SyncOnClose No
|
||||
Specifies whether the scheduler calls \fIfsync(2)\fR after writing configuration
|
||||
-or state files. The default is No.
|
||||
+or state files. The default is Yes.
|
||||
.TP 5
|
||||
SystemGroup group-name [group-name ...]
|
||||
.br
|
||||
diff -up cups-1.7.0/scheduler/conf.c.synconclose cups-1.7.0/scheduler/conf.c
|
||||
--- cups-1.7.0/scheduler/conf.c.synconclose 2013-10-31 11:20:45.560185549 +0000
|
||||
+++ cups-1.7.0/scheduler/conf.c 2013-10-31 11:20:56.679228452 +0000
|
||||
@@ -738,7 +738,7 @@ cupsdReadConfiguration(void)
|
||||
ReloadTimeout = DEFAULT_KEEPALIVE;
|
||||
\fBSystemGroup \fIgroup-name \fR[ ... \fIgroup-name\fR ]
|
||||
Specifies the group(s) to use for \fI@SYSTEM\fR group authentication.
|
||||
diff -up cups-2.0rc1/scheduler/conf.c.synconclose cups-2.0rc1/scheduler/conf.c
|
||||
--- cups-2.0rc1/scheduler/conf.c.synconclose 2014-09-12 16:48:36.519689506 +0200
|
||||
+++ cups-2.0rc1/scheduler/conf.c 2014-09-12 16:50:24.289167199 +0200
|
||||
@@ -715,7 +715,7 @@ cupsdReadConfiguration(void)
|
||||
RootCertDuration = 300;
|
||||
Sandboxing = CUPSD_SANDBOXING_STRICT;
|
||||
StrictConformance = FALSE;
|
||||
- SyncOnClose = FALSE;
|
||||
+ SyncOnClose = TRUE;
|
||||
|
@ -1,85 +1,7 @@
|
||||
diff -up cups-1.7.2/config.h.in.systemd-socket cups-1.7.2/config.h.in
|
||||
--- cups-1.7.2/config.h.in.systemd-socket 2014-02-27 16:57:59.000000000 +0100
|
||||
+++ cups-1.7.2/config.h.in 2014-04-17 14:05:04.104472016 +0200
|
||||
@@ -451,6 +451,13 @@
|
||||
|
||||
|
||||
/*
|
||||
+ * Do we have systemd support?
|
||||
+ */
|
||||
+
|
||||
+#undef HAVE_SYSTEMD
|
||||
+
|
||||
+
|
||||
+/*
|
||||
* Various scripting languages...
|
||||
*/
|
||||
|
||||
diff -up cups-1.7.2/config-scripts/cups-systemd.m4.systemd-socket cups-1.7.2/config-scripts/cups-systemd.m4
|
||||
--- cups-1.7.2/config-scripts/cups-systemd.m4.systemd-socket 2014-04-17 14:05:04.104472016 +0200
|
||||
+++ cups-1.7.2/config-scripts/cups-systemd.m4 2014-04-17 14:05:04.104472016 +0200
|
||||
@@ -0,0 +1,36 @@
|
||||
+dnl
|
||||
+dnl "$Id$"
|
||||
+dnl
|
||||
+dnl systemd stuff for CUPS.
|
||||
+
|
||||
+dnl Find whether systemd is available
|
||||
+
|
||||
+SDLIBS=""
|
||||
+AC_ARG_WITH([systemdsystemunitdir],
|
||||
+ AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]),
|
||||
+ [], [with_systemdsystemunitdir=$($PKGCONFIG --variable=systemdsystemunitdir systemd)])
|
||||
+if test "x$with_systemdsystemunitdir" != xno; then
|
||||
+ AC_MSG_CHECKING(for libsystemd-daemon)
|
||||
+ if $PKGCONFIG --exists libsystemd-daemon; then
|
||||
+ AC_MSG_RESULT(yes)
|
||||
+ SDCFLAGS=`$PKGCONFIG --cflags libsystemd-daemon`
|
||||
+ SDLIBS=`$PKGCONFIG --libs libsystemd-daemon`
|
||||
+ AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
|
||||
+ AC_DEFINE(HAVE_SYSTEMD)
|
||||
+ else
|
||||
+ AC_MSG_RESULT(no)
|
||||
+ fi
|
||||
+fi
|
||||
+
|
||||
+if test -n "$with_systemdsystemunitdir" -a "x$with_systemdsystemunitdir" != xno ; then
|
||||
+ SYSTEMD_UNITS="cups.service cups.socket cups.path"
|
||||
+else
|
||||
+ SYSTEMD_UNITS=""
|
||||
+fi
|
||||
+
|
||||
+AC_SUBST(SYSTEMD_UNITS)
|
||||
+AC_SUBST(SDLIBS)
|
||||
+
|
||||
+dnl
|
||||
+dnl "$Id$"
|
||||
+dnl
|
||||
diff -up cups-1.7.2/configure.in.systemd-socket cups-1.7.2/configure.in
|
||||
--- cups-1.7.2/configure.in.systemd-socket 2013-07-08 23:15:13.000000000 +0200
|
||||
+++ cups-1.7.2/configure.in 2014-04-17 14:05:04.104472016 +0200
|
||||
@@ -33,6 +33,7 @@ sinclude(config-scripts/cups-pam.m4)
|
||||
sinclude(config-scripts/cups-largefile.m4)
|
||||
sinclude(config-scripts/cups-dnssd.m4)
|
||||
sinclude(config-scripts/cups-launchd.m4)
|
||||
+sinclude(config-scripts/cups-systemd.m4)
|
||||
sinclude(config-scripts/cups-defaults.m4)
|
||||
sinclude(config-scripts/cups-scripting.m4)
|
||||
|
||||
@@ -67,6 +68,9 @@ AC_OUTPUT(Makedefs
|
||||
conf/snmp.conf
|
||||
cups-config
|
||||
data/testprint
|
||||
+ data/cups.service
|
||||
+ data/cups.socket
|
||||
+ data/cups.path
|
||||
desktop/cups.desktop
|
||||
doc/help/ref-cups-files-conf.html
|
||||
doc/help/ref-cupsd-conf.html
|
||||
diff -up cups-1.7.2/cups/usersys.c.systemd-socket cups-1.7.2/cups/usersys.c
|
||||
--- cups-1.7.2/cups/usersys.c.systemd-socket 2014-03-05 22:22:12.000000000 +0100
|
||||
+++ cups-1.7.2/cups/usersys.c 2014-04-17 14:05:04.105472002 +0200
|
||||
@@ -1050,7 +1050,7 @@ cups_read_client_conf(
|
||||
diff -up cups-2.0rc1/cups/usersys.c.systemd-socket cups-2.0rc1/cups/usersys.c
|
||||
--- cups-2.0rc1/cups/usersys.c.systemd-socket 2014-08-28 17:37:22.000000000 +0200
|
||||
+++ cups-2.0rc1/cups/usersys.c 2014-09-12 14:35:37.462374923 +0200
|
||||
@@ -1028,7 +1028,7 @@ cups_read_client_conf(
|
||||
struct stat sockinfo; /* Domain socket information */
|
||||
|
||||
if (!stat(CUPS_DEFAULT_DOMAINSOCKET, &sockinfo) &&
|
||||
@ -88,169 +10,13 @@ diff -up cups-1.7.2/cups/usersys.c.systemd-socket cups-1.7.2/cups/usersys.c
|
||||
cups_server = CUPS_DEFAULT_DOMAINSOCKET;
|
||||
else
|
||||
#endif /* CUPS_DEFAULT_DOMAINSOCKET */
|
||||
diff -up cups-1.7.2/data/cups.path.in.systemd-socket cups-1.7.2/data/cups.path.in
|
||||
--- cups-1.7.2/data/cups.path.in.systemd-socket 2014-04-17 14:05:04.105472002 +0200
|
||||
+++ cups-1.7.2/data/cups.path.in 2014-04-17 14:05:04.105472002 +0200
|
||||
@@ -0,0 +1,8 @@
|
||||
+[Unit]
|
||||
+Description=CUPS Printer Service Spool
|
||||
+
|
||||
+[Path]
|
||||
+PathExistsGlob=@CUPS_REQUESTS@/d*
|
||||
+
|
||||
+[Install]
|
||||
+WantedBy=multi-user.target
|
||||
diff -up cups-1.7.2/data/cups.service.in.systemd-socket cups-1.7.2/data/cups.service.in
|
||||
--- cups-1.7.2/data/cups.service.in.systemd-socket 2014-04-17 14:05:04.105472002 +0200
|
||||
+++ cups-1.7.2/data/cups.service.in 2014-04-17 14:05:04.105472002 +0200
|
||||
@@ -0,0 +1,11 @@
|
||||
+[Unit]
|
||||
+Description=CUPS Printing Service
|
||||
+
|
||||
+[Service]
|
||||
+Type=notify
|
||||
+ExecStart=@sbindir@/cupsd -f
|
||||
+PrivateTmp=true
|
||||
+
|
||||
+[Install]
|
||||
+Also=cups.socket cups.path
|
||||
+WantedBy=printer.target
|
||||
diff -up cups-1.7.2/data/cups.socket.in.systemd-socket cups-1.7.2/data/cups.socket.in
|
||||
--- cups-1.7.2/data/cups.socket.in.systemd-socket 2014-04-17 14:05:04.105472002 +0200
|
||||
+++ cups-1.7.2/data/cups.socket.in 2014-04-17 14:05:04.105472002 +0200
|
||||
@@ -0,0 +1,8 @@
|
||||
+[Unit]
|
||||
+Description=CUPS Printing Service Sockets
|
||||
+
|
||||
+[Socket]
|
||||
+ListenStream=@CUPS_DEFAULT_DOMAINSOCKET@
|
||||
+
|
||||
+[Install]
|
||||
+WantedBy=sockets.target
|
||||
diff -up cups-1.7.2/data/Makefile.systemd-socket cups-1.7.2/data/Makefile
|
||||
--- cups-1.7.2/data/Makefile.systemd-socket 2013-05-29 13:51:34.000000000 +0200
|
||||
+++ cups-1.7.2/data/Makefile 2014-04-17 14:05:04.106471988 +0200
|
||||
@@ -100,6 +100,12 @@ install-data:
|
||||
$(INSTALL_DATA) $$file $(DATADIR)/ppdc; \
|
||||
done
|
||||
$(INSTALL_DIR) -m 755 $(DATADIR)/profiles
|
||||
+ if test "x$(SYSTEMD_UNITS)" != "x" ; then \
|
||||
+ $(INSTALL_DIR) -m 755 $(SYSTEMDUNITDIR); \
|
||||
+ for file in $(SYSTEMD_UNITS); do \
|
||||
+ $(INSTALL_DATA) $$file $(SYSTEMDUNITDIR); \
|
||||
+ done; \
|
||||
+ fi
|
||||
|
||||
|
||||
#
|
||||
@@ -143,6 +149,9 @@ uninstall:
|
||||
-$(RMDIR) $(DATADIR)/data
|
||||
-$(RMDIR) $(DATADIR)/banners
|
||||
-$(RMDIR) $(DATADIR)
|
||||
+ for file in $(SYSTEMD_UNITS); do \
|
||||
+ $(RM) $(SYSTEMDUNITDIR)/$$file; \
|
||||
+ done
|
||||
|
||||
|
||||
#
|
||||
diff -up cups-1.7.2/Makedefs.in.systemd-socket cups-1.7.2/Makedefs.in
|
||||
--- cups-1.7.2/Makedefs.in.systemd-socket 2014-04-17 14:05:04.092472182 +0200
|
||||
+++ cups-1.7.2/Makedefs.in 2014-04-17 14:05:04.106471988 +0200
|
||||
@@ -134,6 +134,7 @@ CXXFLAGS = @CPPFLAGS@ @CXXFLAGS@
|
||||
CXXLIBS = @CXXLIBS@
|
||||
DBUS_NOTIFIER = @DBUS_NOTIFIER@
|
||||
DBUS_NOTIFIERLIBS = @DBUS_NOTIFIERLIBS@
|
||||
+SYSTEMD_UNITS = @SYSTEMD_UNITS@
|
||||
DNSSD_BACKEND = @DNSSD_BACKEND@
|
||||
DSOFLAGS = -L../cups @DSOFLAGS@
|
||||
DSOLIBS = @DSOLIBS@ $(COMMONLIBS)
|
||||
@@ -141,6 +142,7 @@ DNSSDLIBS = @DNSSDLIBS@
|
||||
IPPFIND_BIN = @IPPFIND_BIN@
|
||||
IPPFIND_MAN = @IPPFIND_MAN@
|
||||
LAUNCHDLIBS = @LAUNCHDLIBS@
|
||||
+SDLIBS = @SDLIBS@
|
||||
LDFLAGS = -L../cgi-bin -L../cups -L../filter -L../ppdc \
|
||||
-L../scheduler @LDARCHFLAGS@ \
|
||||
@LDFLAGS@ @RELROFLAGS@ @PIEFLAGS@ $(OPTIM)
|
||||
@@ -232,6 +234,7 @@ PAMFILE = @PAMFILE@
|
||||
|
||||
DEFAULT_LAUNCHD_CONF = @DEFAULT_LAUNCHD_CONF@
|
||||
DBUSDIR = @DBUSDIR@
|
||||
+SYSTEMDUNITDIR = $(BUILDROOT)@systemdsystemunitdir@
|
||||
|
||||
|
||||
#
|
||||
diff -up cups-1.7.2/scheduler/client.h.systemd-socket cups-1.7.2/scheduler/client.h
|
||||
--- cups-1.7.2/scheduler/client.h.systemd-socket 2013-08-02 00:23:18.000000000 +0200
|
||||
+++ cups-1.7.2/scheduler/client.h 2014-04-17 14:05:04.106471988 +0200
|
||||
@@ -79,6 +79,9 @@ typedef struct
|
||||
int fd; /* File descriptor for this server */
|
||||
http_addr_t address; /* Bind address of socket */
|
||||
http_encryption_t encryption; /* To encrypt or not to encrypt... */
|
||||
+#ifdef HAVE_SYSTEMD
|
||||
+ int is_systemd; /* Is this a systemd socket? */
|
||||
+#endif /* HAVE_SYSTEMD */
|
||||
} cupsd_listener_t;
|
||||
|
||||
|
||||
diff -up cups-1.7.2/scheduler/listen.c.systemd-socket cups-1.7.2/scheduler/listen.c
|
||||
--- cups-1.7.2/scheduler/listen.c.systemd-socket 2013-05-29 13:51:34.000000000 +0200
|
||||
+++ cups-1.7.2/scheduler/listen.c 2014-04-17 14:05:04.107471974 +0200
|
||||
@@ -401,7 +401,11 @@ cupsdStopListening(void)
|
||||
lis;
|
||||
lis = (cupsd_listener_t *)cupsArrayNext(Listeners))
|
||||
{
|
||||
- if (lis->fd != -1)
|
||||
+ if (lis->fd != -1
|
||||
+#ifdef HAVE_SYSTEMD
|
||||
+ && !lis->is_systemd
|
||||
+#endif /* HAVE_SYSTEMD */
|
||||
+ )
|
||||
{
|
||||
#ifdef WIN32
|
||||
closesocket(lis->fd);
|
||||
diff -up cups-1.7.2/scheduler/main.c.systemd-socket cups-1.7.2/scheduler/main.c
|
||||
--- cups-1.7.2/scheduler/main.c.systemd-socket 2014-04-17 14:05:04.052472738 +0200
|
||||
+++ cups-1.7.2/scheduler/main.c 2014-04-17 14:09:39.102634667 +0200
|
||||
@@ -39,6 +39,10 @@
|
||||
# endif /* !LAUNCH_JOBKEY_SERVICEIPC */
|
||||
#endif /* HAVE_LAUNCH_H */
|
||||
|
||||
+#ifdef HAVE_SYSTEMD
|
||||
+#include <systemd/sd-daemon.h>
|
||||
+#endif /* HAVE_SYSTEMD */
|
||||
+
|
||||
#if defined(HAVE_MALLOC_H) && defined(HAVE_MALLINFO)
|
||||
# include <malloc.h>
|
||||
#endif /* HAVE_MALLOC_H && HAVE_MALLINFO */
|
||||
@@ -64,6 +68,9 @@
|
||||
static void launchd_checkin(void);
|
||||
static void launchd_checkout(void);
|
||||
#endif /* HAVE_LAUNCHD */
|
||||
+#ifdef HAVE_SYSTEMD
|
||||
+static void systemd_checkin(void);
|
||||
+#endif /* HAVE_SYSTEMD */
|
||||
static void parent_handler(int sig);
|
||||
static void process_children(void);
|
||||
static void sigchld_handler(int sig);
|
||||
@@ -563,6 +570,13 @@ main(int argc, /* I - Number of comm
|
||||
}
|
||||
#endif /* HAVE_LAUNCHD */
|
||||
|
||||
+#ifdef HAVE_SYSTEMD
|
||||
+ /*
|
||||
+ * If we were started by systemd get the listen sockets file descriptors...
|
||||
+ */
|
||||
+ systemd_checkin();
|
||||
+#endif /* HAVE_SYSTEMD */
|
||||
+
|
||||
/*
|
||||
* Startup the server...
|
||||
*/
|
||||
@@ -654,6 +668,12 @@ main(int argc, /* I - Number of comm
|
||||
"Scheduler started via launchd.");
|
||||
diff -up cups-2.0rc1/scheduler/main.c.systemd-socket cups-2.0rc1/scheduler/main.c
|
||||
--- cups-2.0rc1/scheduler/main.c.systemd-socket 2014-09-12 14:59:08.000000000 +0200
|
||||
+++ cups-2.0rc1/scheduler/main.c 2014-09-12 14:59:23.229299751 +0200
|
||||
@@ -653,6 +653,12 @@ main(int argc, /* I - Number of comm
|
||||
cupsdAddEvent(CUPSD_EVENT_SERVER_STARTED, NULL, NULL, "Scheduler started on demand.");
|
||||
else
|
||||
#endif /* HAVE_LAUNCHD */
|
||||
#endif /* HAVE_LAUNCHD || HAVE_SYSTEMD */
|
||||
+#ifdef HAVE_SYSTEMD
|
||||
+ sd_notifyf(0, "READY=1\n"
|
||||
+ "STATUS=Scheduler is running...\n"
|
||||
@ -258,145 +24,45 @@ diff -up cups-1.7.2/scheduler/main.c.systemd-socket cups-1.7.2/scheduler/main.c
|
||||
+ (unsigned long) getpid());
|
||||
+#endif /* HAVE_SYSTEMD */
|
||||
if (fg)
|
||||
cupsdAddEvent(CUPSD_EVENT_SERVER_STARTED, NULL, NULL,
|
||||
"Scheduler started in foreground.");
|
||||
@@ -751,6 +771,15 @@ main(int argc, /* I - Number of comm
|
||||
}
|
||||
#endif /* HAVE_LAUNCHD */
|
||||
cupsdAddEvent(CUPSD_EVENT_SERVER_STARTED, NULL, NULL, "Scheduler started in foreground.");
|
||||
else
|
||||
diff -up cups-2.0rc1/scheduler/org.cups.cupsd.path.in.systemd-socket cups-2.0rc1/scheduler/org.cups.cupsd.path.in
|
||||
--- cups-2.0rc1/scheduler/org.cups.cupsd.path.in.systemd-socket 2014-09-12 14:42:57.942162725 +0200
|
||||
+++ cups-2.0rc1/scheduler/org.cups.cupsd.path.in 2014-09-12 14:42:54.254214614 +0200
|
||||
@@ -2,7 +2,7 @@
|
||||
Description=CUPS Scheduler
|
||||
|
||||
+#ifdef HAVE_SYSTEMD
|
||||
+ /*
|
||||
+ * If we were started by systemd get the listen sockets file
|
||||
+ * descriptors...
|
||||
+ */
|
||||
+
|
||||
+ systemd_checkin();
|
||||
+#endif /* HAVE_SYSTEMD */
|
||||
+
|
||||
/*
|
||||
* Startup the server...
|
||||
*/
|
||||
@@ -1500,6 +1529,102 @@ launchd_checkout(void)
|
||||
}
|
||||
#endif /* HAVE_LAUNCHD */
|
||||
[Path]
|
||||
-PathExists=@CUPS_CACHEDIR@/org.cups.cupsd
|
||||
+PathExistsGlob=@CUPS_REQUESTS@/d*
|
||||
|
||||
+#ifdef HAVE_SYSTEMD
|
||||
+static void
|
||||
+systemd_checkin(void)
|
||||
+{
|
||||
+ int n, fd;
|
||||
+
|
||||
+ n = sd_listen_fds(0);
|
||||
+ if (n < 0)
|
||||
+ {
|
||||
+ cupsdLogMessage(CUPSD_LOG_ERROR,
|
||||
+ "systemd_checkin: Failed to acquire sockets from systemd - %s",
|
||||
+ strerror(-n));
|
||||
+ exit(EXIT_FAILURE);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ if (n == 0)
|
||||
+ return;
|
||||
+
|
||||
+ for (fd = SD_LISTEN_FDS_START; fd < SD_LISTEN_FDS_START + n; fd ++)
|
||||
+ {
|
||||
+ http_addr_t addr;
|
||||
+ socklen_t addrlen = sizeof (addr);
|
||||
+ int r;
|
||||
+ cupsd_listener_t *lis;
|
||||
+ char s[256];
|
||||
+
|
||||
+ r = sd_is_socket(fd, AF_UNSPEC, SOCK_STREAM, 1);
|
||||
+ if (r < 0)
|
||||
+ {
|
||||
+ cupsdLogMessage(CUPSD_LOG_ERROR,
|
||||
+ "systemd_checkin: Unable to verify socket type - %s",
|
||||
+ strerror(-r));
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ if (!r)
|
||||
+ {
|
||||
+ cupsdLogMessage(CUPSD_LOG_ERROR,
|
||||
+ "systemd_checkin: Socket not of the right type");
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ if (getsockname(fd, (struct sockaddr*) &addr, &addrlen))
|
||||
+ {
|
||||
+ cupsdLogMessage(CUPSD_LOG_ERROR,
|
||||
+ "systemd_checkin: Unable to get local address - %s",
|
||||
+ strerror(errno));
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ /*
|
||||
+ * Try to match the systemd socket address to one of the listeners...
|
||||
+ */
|
||||
+
|
||||
+ for (lis = (cupsd_listener_t *)cupsArrayFirst(Listeners);
|
||||
+ lis;
|
||||
+ lis = (cupsd_listener_t *)cupsArrayNext(Listeners))
|
||||
+ if (httpAddrEqual(&lis->address, &addr))
|
||||
+ break;
|
||||
+
|
||||
+ if (lis)
|
||||
+ {
|
||||
+ cupsdLogMessage(CUPSD_LOG_DEBUG,
|
||||
+ "systemd_checkin: Matched existing listener %s with fd %d...",
|
||||
+ httpAddrString(&(lis->address), s, sizeof(s)), fd);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ cupsdLogMessage(CUPSD_LOG_DEBUG,
|
||||
+ "systemd_checkin: Adding new listener %s with fd %d...",
|
||||
+ httpAddrString(&addr, s, sizeof(s)), fd);
|
||||
+
|
||||
+ if ((lis = calloc(1, sizeof(cupsd_listener_t))) == NULL)
|
||||
+ {
|
||||
+ cupsdLogMessage(CUPSD_LOG_ERROR,
|
||||
+ "systemd_checkin: Unable to allocate listener - "
|
||||
+ "%s.", strerror(errno));
|
||||
+ exit(EXIT_FAILURE);
|
||||
+ }
|
||||
+
|
||||
+ cupsArrayAdd(Listeners, lis);
|
||||
+
|
||||
+ memcpy(&lis->address, &addr, sizeof(lis->address));
|
||||
+ }
|
||||
+
|
||||
+ lis->fd = fd;
|
||||
+ lis->is_systemd = 1;
|
||||
+
|
||||
+# ifdef HAVE_SSL
|
||||
+ if (_httpAddrPort(&(lis->address)) == 443)
|
||||
+ lis->encryption = HTTP_ENCRYPT_ALWAYS;
|
||||
+# endif /* HAVE_SSL */
|
||||
+ }
|
||||
+}
|
||||
+#endif /* HAVE_SYSTEMD */
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
diff -up cups-2.0rc1/scheduler/org.cups.cupsd.service.in.systemd-socket cups-2.0rc1/scheduler/org.cups.cupsd.service.in
|
||||
--- cups-2.0rc1/scheduler/org.cups.cupsd.service.in.systemd-socket 2014-09-12 14:40:13.000000000 +0200
|
||||
+++ cups-2.0rc1/scheduler/org.cups.cupsd.service.in 2014-09-12 14:43:17.534887056 +0200
|
||||
@@ -2,8 +2,8 @@
|
||||
Description=CUPS Scheduler
|
||||
|
||||
/*
|
||||
* 'parent_handler()' - Catch USR1/CHLD signals...
|
||||
diff -up cups-1.7.2/scheduler/Makefile.systemd-socket cups-1.7.2/scheduler/Makefile
|
||||
--- cups-1.7.2/scheduler/Makefile.systemd-socket 2013-05-29 13:51:34.000000000 +0200
|
||||
+++ cups-1.7.2/scheduler/Makefile 2014-04-17 14:05:04.108471960 +0200
|
||||
@@ -381,7 +381,7 @@ cupsd: $(CUPSDOBJS) $(LIBCUPSMIME) ../cu
|
||||
$(CC) $(LDFLAGS) -o cupsd $(CUPSDOBJS) -L. -lcupsmime \
|
||||
$(LIBZ) $(SSLLIBS) $(LIBSLP) $(LIBLDAP) $(PAMLIBS) \
|
||||
$(LIBPAPER) $(LIBMALLOC) $(SERVERLIBS) $(DNSSDLIBS) $(LIBS) \
|
||||
- $(LIBGSSAPI) $(LIBWRAP)
|
||||
+ $(LIBGSSAPI) $(LIBWRAP) $(SDLIBS)
|
||||
[Service]
|
||||
-ExecStart=@sbindir@/cupsd -l
|
||||
-Type=simple
|
||||
+ExecStart=@sbindir@/cupsd -f
|
||||
+Type=notify
|
||||
|
||||
cupsd-static: $(CUPSDOBJS) libcupsmime.a ../cups/$(LIBCUPSSTATIC)
|
||||
echo Linking $@...
|
||||
@@ -389,7 +389,7 @@ cupsd-static: $(CUPSDOBJS) libcupsmime.a
|
||||
$(LIBZ) $(SSLLIBS) $(LIBSLP) $(LIBLDAP) $(PAMLIBS) \
|
||||
../cups/$(LIBCUPSSTATIC) $(COMMONLIBS) $(LIBZ) $(LIBPAPER) \
|
||||
$(LIBMALLOC) $(SERVERLIBS) $(DNSSDLIBS) $(LIBGSSAPI) \
|
||||
- $(LIBWRAP)
|
||||
+ $(LIBWRAP) $(SDLIBS)
|
||||
[Install]
|
||||
Also=org.cups.cupsd.socket org.cups.cupsd.path
|
||||
diff -up cups-2.0rc1/scheduler/org.cups.cupsd.socket.in.systemd-socket cups-2.0rc1/scheduler/org.cups.cupsd.socket.in
|
||||
--- cups-2.0rc1/scheduler/org.cups.cupsd.socket.in.systemd-socket 2014-03-21 17:42:53.000000000 +0100
|
||||
+++ cups-2.0rc1/scheduler/org.cups.cupsd.socket.in 2014-09-12 14:43:37.510605998 +0200
|
||||
@@ -3,10 +3,6 @@ Description=CUPS Scheduler
|
||||
|
||||
tls.o: tls-darwin.c tls-gnutls.c tls-openssl.c
|
||||
[Socket]
|
||||
ListenStream=@CUPS_DEFAULT_DOMAINSOCKET@
|
||||
-ListenStream=[::1]:631
|
||||
-ListenStream=127.0.0.1:631
|
||||
-BindIPv6Only=ipv6-only
|
||||
-ReusePort=true
|
||||
|
||||
[Install]
|
||||
WantedBy=sockets.target
|
||||
|
87
cups.spec
87
cups.spec
@ -7,14 +7,19 @@
|
||||
# but we use lib for compatibility with 3rd party drivers (at upstream request).
|
||||
%global cups_serverbin %{_exec_prefix}/lib/cups
|
||||
|
||||
%global prever rc1
|
||||
|
||||
#%%global VERSION %%{version}
|
||||
%global VERSION %{version}%{prever}
|
||||
|
||||
Summary: CUPS printing system
|
||||
Name: cups
|
||||
Epoch: 1
|
||||
Version: 1.7.5
|
||||
Release: 7%{?dist}
|
||||
Version: 2.0
|
||||
Release: 0.1.%{prever}%{?dist}
|
||||
License: GPLv2
|
||||
Url: http://www.cups.org/
|
||||
Source: http://www.cups.org/software/%{version}/cups-%{version}-source.tar.bz2
|
||||
Source: http://www.cups.org/software/%{VERSION}/cups-%{VERSION}-source.tar.bz2
|
||||
# Pixmap for desktop file
|
||||
Source2: cupsprinter.png
|
||||
# socket unit for cups-lpd service
|
||||
@ -30,7 +35,7 @@ Source8: macros.cups
|
||||
Patch1: cups-no-gzip-man.patch
|
||||
Patch2: cups-system-auth.patch
|
||||
Patch3: cups-multilib.patch
|
||||
Patch4: cups-str4396.patch
|
||||
|
||||
Patch5: cups-banners.patch
|
||||
Patch6: cups-serverbin-compat.patch
|
||||
Patch7: cups-no-export-ssllibs.patch
|
||||
@ -52,7 +57,7 @@ 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
|
||||
|
||||
Patch27: cups-avahi-address.patch
|
||||
Patch28: cups-enum-all.patch
|
||||
Patch29: cups-dymo-deviceid.patch
|
||||
@ -66,9 +71,6 @@ Patch36: cups-web-devices-timeout.patch
|
||||
Patch37: cups-final-content-type.patch
|
||||
Patch38: cups-journal.patch
|
||||
Patch39: cups-synconclose.patch
|
||||
Patch40: cups-str4461.patch
|
||||
Patch41: cups-str2913.patch
|
||||
Patch42: cups-str4475.patch
|
||||
|
||||
Patch100: cups-lspp.patch
|
||||
|
||||
@ -189,15 +191,15 @@ lpd emulation.
|
||||
Sends IPP requests to the specified URI and tests and/or displays the results.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%setup -q -n cups-%{VERSION}
|
||||
|
||||
# Don't gzip man pages in the Makefile, let rpmbuild do it.
|
||||
%patch1 -p1 -b .no-gzip-man
|
||||
# Use the system pam configuration.
|
||||
%patch2 -p1 -b .system-auth
|
||||
# Prevent multilib conflict in cups-config script.
|
||||
%patch3 -p1 -b .multilib
|
||||
# Upstream patch for STR #4396, pre-requisite for STR #2913 patch.
|
||||
%patch4 -p1 -b .str4396
|
||||
|
||||
# Ignore rpm save/new files in the banners directory.
|
||||
%patch5 -p1 -b .banners
|
||||
# Use compatibility fallback path for ServerBin.
|
||||
@ -238,11 +240,9 @@ Sends IPP requests to the specified URI and tests and/or displays the results.
|
||||
%patch23 -p1 -b .dnssd-deviceid
|
||||
# Add an SNMP query for Ricoh's device ID OID (STR #3552).
|
||||
%patch24 -p1 -b .ricoh-deviceid-oid
|
||||
# Add support for systemd socket activation (patch from Lennart
|
||||
# Poettering).
|
||||
# Make cups.service Type=notify (bug #1088918).
|
||||
%patch25 -p1 -b .systemd-socket
|
||||
# Talk about systemd in cups-lpd manpage (part of bug #884641).
|
||||
%patch26 -p1 -b .lpd-manpage
|
||||
|
||||
# Use IP address when resolving DNSSD URIs (bug #948288).
|
||||
%patch27 -p1 -b .avahi-address
|
||||
# Return from cupsEnumDests() once all records have been returned.
|
||||
@ -250,7 +250,7 @@ Sends IPP requests to the specified URI and tests and/or displays the results.
|
||||
# Added IEEE 1284 Device ID for a Dymo device (bug #747866).
|
||||
%patch29 -p1 -b .dymo-deviceid
|
||||
# Use IP_FREEBIND socket option when binding listening sockets (bug #970809).
|
||||
%patch30 -p1 -b .freebind
|
||||
#%%patch30 -p1 -b .freebind
|
||||
# Don't link against libgcrypt needlessly.
|
||||
%patch31 -p1 -b .no-gcry
|
||||
# Added libusb quirk for Canon PIXMA MP540 (bug #967873).
|
||||
@ -270,13 +270,6 @@ Sends IPP requests to the specified URI and tests and/or displays the results.
|
||||
%patch38 -p1 -b .journal
|
||||
# Set the default for SyncOnClose to Yes.
|
||||
%patch39 -p1 -b .synconclose
|
||||
# Fix conf/log file reading for authenticated users (STR #4461).
|
||||
%patch40 -p1 -b .str4461
|
||||
# Upstream patch for STR #2913 to limit Get-Jobs replies to 500 jobs
|
||||
# (bug #421671).
|
||||
%patch41 -p1 -b .str2913
|
||||
# Fix icon display in web interface during server restart (STR #4475).
|
||||
%patch42 -p1 -b .str4475
|
||||
|
||||
%if %lspp
|
||||
# LSPP support.
|
||||
@ -346,10 +339,14 @@ mv lpc.8 lpc-cups.8
|
||||
popd
|
||||
%endif
|
||||
|
||||
mv $RPM_BUILD_ROOT%{_unitdir}/org.cups.cupsd.path $RPM_BUILD_ROOT%{_unitdir}/cups.path
|
||||
mv $RPM_BUILD_ROOT%{_unitdir}/org.cups.cupsd.service $RPM_BUILD_ROOT%{_unitdir}/cups.service
|
||||
mv $RPM_BUILD_ROOT%{_unitdir}/org.cups.cupsd.socket $RPM_BUILD_ROOT%{_unitdir}/cups.socket
|
||||
|
||||
mkdir -p $RPM_BUILD_ROOT%{_datadir}/pixmaps $RPM_BUILD_ROOT%{_sysconfdir}/X11/sysconfig $RPM_BUILD_ROOT%{_sysconfdir}/X11/applnk/System $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d
|
||||
install -p -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/pixmaps
|
||||
install -p -m 644 %{SOURCE3} %{buildroot}%{_unitdir}
|
||||
install -p -m 644 %{SOURCE4} %{buildroot}%{_unitdir}
|
||||
install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT%{_unitdir}
|
||||
install -p -m 644 %{SOURCE4} $RPM_BUILD_ROOT%{_unitdir}
|
||||
install -p -m 644 %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/cups
|
||||
install -p -m 755 %{SOURCE7} $RPM_BUILD_ROOT%{cups_serverbin}/backend/ncp
|
||||
|
||||
@ -542,29 +539,12 @@ rm -f %{cups_serverbin}/backend/smb
|
||||
%config(noreplace) %{_sysconfdir}/pam.d/cups
|
||||
%config(noreplace) %{_sysconfdir}/logrotate.d/cups
|
||||
%dir %{_datadir}/%{name}/www
|
||||
%dir %{_datadir}/%{name}/www/ca
|
||||
%dir %{_datadir}/%{name}/www/cs
|
||||
%dir %{_datadir}/%{name}/www/de
|
||||
%dir %{_datadir}/%{name}/www/es
|
||||
%dir %{_datadir}/%{name}/www/fr
|
||||
%dir %{_datadir}/%{name}/www/it
|
||||
%dir %{_datadir}/%{name}/www/ja
|
||||
%dir %{_datadir}/%{name}/www/pt_BR
|
||||
%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/de/index.html
|
||||
%doc %{_datadir}/%{name}/www/es/index.html
|
||||
%doc %{_datadir}/%{name}/www/fr/index.html
|
||||
%doc %{_datadir}/%{name}/www/it/index.html
|
||||
%doc %{_datadir}/%{name}/www/ja/index.html
|
||||
%doc %{_datadir}/%{name}/www/pt_BR/index.html
|
||||
%doc %{_datadir}/%{name}/www/ru/index.html
|
||||
%doc %{_datadir}/%{name}/www/apple-touch-icon.png
|
||||
%dir %{_datadir}/%{name}/usb
|
||||
%{_datadir}/%{name}/usb/org.cups.usb-quirks
|
||||
%{_unitdir}/%{name}.service
|
||||
@ -598,25 +578,7 @@ rm -f %{cups_serverbin}/backend/smb
|
||||
# client subpackage
|
||||
%exclude %{_sbindir}/lpc.cups
|
||||
%dir %{_datadir}/cups/templates
|
||||
%dir %{_datadir}/cups/templates/ca
|
||||
%dir %{_datadir}/cups/templates/cs
|
||||
%dir %{_datadir}/cups/templates/de
|
||||
%dir %{_datadir}/cups/templates/es
|
||||
%dir %{_datadir}/cups/templates/fr
|
||||
%dir %{_datadir}/cups/templates/it
|
||||
%dir %{_datadir}/cups/templates/ja
|
||||
%dir %{_datadir}/cups/templates/pt_BR
|
||||
%dir %{_datadir}/cups/templates/ru
|
||||
%{_datadir}/cups/templates/*.tmpl
|
||||
%{_datadir}/cups/templates/ca/*.tmpl
|
||||
%{_datadir}/cups/templates/cs/*.tmpl
|
||||
%{_datadir}/cups/templates/de/*.tmpl
|
||||
%{_datadir}/cups/templates/es/*.tmpl
|
||||
%{_datadir}/cups/templates/fr/*.tmpl
|
||||
%{_datadir}/cups/templates/it/*.tmpl
|
||||
%{_datadir}/cups/templates/ja/*.tmpl
|
||||
%{_datadir}/cups/templates/pt_BR/*.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
|
||||
@ -678,6 +640,9 @@ rm -f %{cups_serverbin}/backend/smb
|
||||
%{_mandir}/man5/ipptoolfile.5.gz
|
||||
|
||||
%changelog
|
||||
* Fri Sep 12 2014 Jiri Popelka <jpopelka@redhat.com> - 1:2.0-0.1.rc1
|
||||
- 2.0rc1
|
||||
|
||||
* Mon Sep 1 2014 Tim Waugh <twaugh@redhat.com> - 1:1.7.5-7
|
||||
- Fix icon display in web interface during server restart (STR #4475).
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user