automatic version update by autodist [release 2.4.11-1mamba;Sat Oct 05 2024]
This commit is contained in:
parent
016d98ec82
commit
291089267e
@ -1,249 +0,0 @@
|
|||||||
--- cups-1.4.4/cups/http.c 2010-06-16 07:27:41.000000000 +0200
|
|
||||||
+++ cups-1.4.4-str3461-1.4.patch.reverted/cups/http.c 2010-06-25 11:02:31.000000000 +0200
|
|
||||||
@@ -83,12 +83,10 @@
|
|
||||||
* http_debug_hex() - Do a hex dump of a buffer.
|
|
||||||
* http_field() - Return the field index for a field name.
|
|
||||||
* http_read_ssl() - Read from a SSL/TLS connection.
|
|
||||||
- * http_locking_cb() - Lock/unlock a thread's mutex.
|
|
||||||
* http_send() - Send a request with all fields and the trailing
|
|
||||||
* blank line.
|
|
||||||
* http_setup_ssl() - Set up SSL/TLS support on a connection.
|
|
||||||
* http_shutdown_ssl() - Shut down SSL/TLS on a connection.
|
|
||||||
- * http_threadid_cb() - Return the current thread ID.
|
|
||||||
* http_upgrade() - Force upgrade to TLS encryption.
|
|
||||||
* http_write() - Write a buffer to a HTTP connection.
|
|
||||||
* http_write_chunk() - Write a chunked buffer.
|
|
||||||
@@ -146,19 +144,6 @@ static int http_setup_ssl(http_t *http)
|
|
||||||
static void http_shutdown_ssl(http_t *http);
|
|
||||||
static int http_upgrade(http_t *http);
|
|
||||||
static int http_write_ssl(http_t *http, const char *buf, int len);
|
|
||||||
-
|
|
||||||
-# ifdef HAVE_GNUTLS
|
|
||||||
-# ifdef HAVE_PTHREAD_H
|
|
||||||
-GCRY_THREAD_OPTION_PTHREAD_IMPL;
|
|
||||||
-# endif /* HAVE_PTHREAD_H */
|
|
||||||
-
|
|
||||||
-# elif defined(HAVE_LIBSSL) && defined(HAVE_PTHREAD_H)
|
|
||||||
-static pthread_mutex_t *http_locks; /* OpenSSL lock mutexes */
|
|
||||||
-
|
|
||||||
-static void http_locking_cb(int mode, int type, const char *file,
|
|
||||||
- int line);
|
|
||||||
-static unsigned long http_threadid_cb(void);
|
|
||||||
-# endif /* HAVE_GNUTLS */
|
|
||||||
#endif /* HAVE_SSL */
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1188,22 +1173,21 @@ httpHead(http_t *http, /* I - Conne
|
|
||||||
void
|
|
||||||
httpInitialize(void)
|
|
||||||
{
|
|
||||||
- static int initialized = 0; /* Have we been called before? */
|
|
||||||
-#ifdef WIN32
|
|
||||||
- WSADATA winsockdata; /* WinSock data */
|
|
||||||
-#endif /* WIN32 */
|
|
||||||
#ifdef HAVE_LIBSSL
|
|
||||||
- int i; /* Looping var */
|
|
||||||
- unsigned char data[1024]; /* Seed data */
|
|
||||||
+# ifndef WIN32
|
|
||||||
+ struct timeval curtime; /* Current time in microseconds */
|
|
||||||
+# endif /* !WIN32 */
|
|
||||||
+ int i; /* Looping var */
|
|
||||||
+ unsigned char data[1024]; /* Seed data */
|
|
||||||
#endif /* HAVE_LIBSSL */
|
|
||||||
|
|
||||||
-
|
|
||||||
- if (initialized)
|
|
||||||
- return;
|
|
||||||
-
|
|
||||||
#ifdef WIN32
|
|
||||||
- WSAStartup(MAKEWORD(2,2), &winsockdata);
|
|
||||||
+ WSADATA winsockdata; /* WinSock data */
|
|
||||||
|
|
||||||
+
|
|
||||||
+ static int initialized = 0; /* Has WinSock been initialized? */
|
|
||||||
+ if (!initialized)
|
|
||||||
+ WSAStartup(MAKEWORD(1,1), &winsockdata);
|
|
||||||
#elif !defined(SO_NOSIGPIPE)
|
|
||||||
/*
|
|
||||||
* Ignore SIGPIPE signals...
|
|
||||||
@@ -1226,56 +1210,29 @@ httpInitialize(void)
|
|
||||||
#endif /* WIN32 */
|
|
||||||
|
|
||||||
#ifdef HAVE_GNUTLS
|
|
||||||
- /*
|
|
||||||
- * Make sure we handle threading properly...
|
|
||||||
- */
|
|
||||||
-
|
|
||||||
-# ifdef HAVE_PTHREAD_H
|
|
||||||
- gcry_control(GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread);
|
|
||||||
-# endif /* HAVE_PTHREAD_H */
|
|
||||||
-
|
|
||||||
- /*
|
|
||||||
- * Initialize GNU TLS...
|
|
||||||
- */
|
|
||||||
-
|
|
||||||
gnutls_global_init();
|
|
||||||
+#endif /* HAVE_GNUTLS */
|
|
||||||
|
|
||||||
-#elif defined(HAVE_LIBSSL)
|
|
||||||
- /*
|
|
||||||
- * Initialize OpenSSL...
|
|
||||||
- */
|
|
||||||
-
|
|
||||||
+#ifdef HAVE_LIBSSL
|
|
||||||
SSL_load_error_strings();
|
|
||||||
SSL_library_init();
|
|
||||||
|
|
||||||
/*
|
|
||||||
- * Set the threading callbacks...
|
|
||||||
- */
|
|
||||||
-
|
|
||||||
-# ifdef HAVE_PTHREAD_H
|
|
||||||
- http_locks = calloc(CRYPTO_num_locks(), sizeof(pthread_mutex_t));
|
|
||||||
-
|
|
||||||
- for (i = 0; i < CRYPTO_num_locks(); i ++)
|
|
||||||
- pthread_mutex_init(http_locks + i, NULL);
|
|
||||||
-
|
|
||||||
- CRYPTO_set_id_callback(http_threadid_cb);
|
|
||||||
- CRYPTO_set_locking_callback(http_locking_cb);
|
|
||||||
-# endif /* HAVE_PTHREAD_H */
|
|
||||||
-
|
|
||||||
- /*
|
|
||||||
* Using the current time is a dubious random seed, but on some systems
|
|
||||||
* it is the best we can do (on others, this seed isn't even used...)
|
|
||||||
*/
|
|
||||||
|
|
||||||
- CUPS_SRAND(time(NULL));
|
|
||||||
+# ifdef WIN32
|
|
||||||
+# else
|
|
||||||
+ gettimeofday(&curtime, NULL);
|
|
||||||
+ srand(curtime.tv_sec + curtime.tv_usec);
|
|
||||||
+# endif /* WIN32 */
|
|
||||||
|
|
||||||
for (i = 0; i < sizeof(data); i ++)
|
|
||||||
- data[i] = CUPS_RAND();
|
|
||||||
+ data[i] = rand();
|
|
||||||
|
|
||||||
RAND_seed(data, sizeof(data));
|
|
||||||
-#endif /* HAVE_GNUTLS */
|
|
||||||
-
|
|
||||||
- initialized = 1;
|
|
||||||
+#endif /* HAVE_LIBSSL */
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@@ -2834,25 +2791,6 @@ http_read_ssl(http_t *http, /* I - Conn
|
|
||||||
#endif /* HAVE_SSL */
|
|
||||||
|
|
||||||
|
|
||||||
-#if defined(HAVE_LIBSSL) && defined(HAVE_PTHREAD_H)
|
|
||||||
-/*
|
|
||||||
- * 'http_locking_cb()' - Lock/unlock a thread's mutex.
|
|
||||||
- */
|
|
||||||
-
|
|
||||||
-static void
|
|
||||||
-http_locking_cb(int mode, /* I - Lock mode */
|
|
||||||
- int type, /* I - Lock type */
|
|
||||||
- const char *file, /* I - Source file */
|
|
||||||
- int line) /* I - Line number */
|
|
||||||
-{
|
|
||||||
- if (mode & CRYPTO_LOCK)
|
|
||||||
- pthread_mutex_lock(http_locks + type);
|
|
||||||
- else
|
|
||||||
- pthread_mutex_unlock(http_locks + type);
|
|
||||||
-}
|
|
||||||
-#endif /* HAVE_LIBSSL && HAVE_PTHREAD_H */
|
|
||||||
-
|
|
||||||
-
|
|
||||||
/*
|
|
||||||
* 'http_send()' - Send a request with all fields and the trailing blank line.
|
|
||||||
*/
|
|
||||||
@@ -3224,19 +3162,6 @@ http_shutdown_ssl(http_t *http) /* I -
|
|
||||||
#endif /* HAVE_SSL */
|
|
||||||
|
|
||||||
|
|
||||||
-#if defined(HAVE_LIBSSL) && defined(HAVE_PTHREAD_H)
|
|
||||||
-/*
|
|
||||||
- * 'http_threadid_cb()' - Return the current thread ID.
|
|
||||||
- */
|
|
||||||
-
|
|
||||||
-static unsigned long /* O - Thread ID */
|
|
||||||
-http_threadid_cb(void)
|
|
||||||
-{
|
|
||||||
- return ((unsigned long)pthread_self());
|
|
||||||
-}
|
|
||||||
-#endif /* HAVE_LIBSSL && HAVE_PTHREAD_H */
|
|
||||||
-
|
|
||||||
-
|
|
||||||
#ifdef HAVE_SSL
|
|
||||||
/*
|
|
||||||
* 'http_upgrade()' - Force upgrade to TLS encryption.
|
|
||||||
diff -rup cups-1.4.4/cups/http-private.h cups-1.4.4-str3461-1.4.patch.reverted/cups/http-private.h
|
|
||||||
--- cups-1.4.4/cups/http-private.h 2010-04-12 06:03:53.000000000 +0200
|
|
||||||
+++ cups-1.4.4-str3461-1.4.patch.reverted/cups/http-private.h 2010-06-25 11:03:34.000000000 +0200
|
|
||||||
@@ -98,7 +98,6 @@ extern BIO_METHOD *_httpBIOMethods(void)
|
|
||||||
* The GNU TLS library is more of a "bare metal" SSL/TLS library...
|
|
||||||
*/
|
|
||||||
# include <gnutls/gnutls.h>
|
|
||||||
-# include <gcrypt.h>
|
|
||||||
|
|
||||||
typedef struct
|
|
||||||
{
|
|
||||||
diff -rup cups-1.4.4/scheduler/main.c cups-1.4.4-str3461-1.4.patch.reverted/scheduler/main.c
|
|
||||||
--- cups-1.4.4/scheduler/main.c 2010-04-23 20:56:34.000000000 +0200
|
|
||||||
+++ cups-1.4.4-str3461-1.4.patch.reverted/scheduler/main.c 2010-06-25 11:14:07.000000000 +0200
|
|
||||||
@@ -549,8 +549,6 @@ main(int argc, /* I - Number of comm
|
|
||||||
* Startup the server...
|
|
||||||
*/
|
|
||||||
|
|
||||||
- httpInitialize();
|
|
||||||
-
|
|
||||||
cupsdStartServer();
|
|
||||||
|
|
||||||
/*
|
|
||||||
diff -rup cups-1.4.4/scheduler/server.c cups-1.4.4-str3461-1.4.patch.reverted/scheduler/server.c
|
|
||||||
--- cups-1.4.4/scheduler/server.c 2010-04-12 06:03:53.000000000 +0200
|
|
||||||
+++ cups-1.4.4-str3461-1.4.patch.reverted/scheduler/server.c 2010-06-25 11:12:52.000000000 +0200
|
|
||||||
@@ -44,6 +44,42 @@ static int started = 0;
|
|
||||||
void
|
|
||||||
cupsdStartServer(void)
|
|
||||||
{
|
|
||||||
+#ifdef HAVE_LIBSSL
|
|
||||||
+ int i; /* Looping var */
|
|
||||||
+ struct timeval curtime; /* Current time in microseconds */
|
|
||||||
+ unsigned char data[1024]; /* Seed data */
|
|
||||||
+#endif /* HAVE_LIBSSL */
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+#ifdef HAVE_LIBSSL
|
|
||||||
+ /*
|
|
||||||
+ * Initialize the encryption libraries...
|
|
||||||
+ */
|
|
||||||
+
|
|
||||||
+ SSL_library_init();
|
|
||||||
+ SSL_load_error_strings();
|
|
||||||
+
|
|
||||||
+ /*
|
|
||||||
+ * Using the current time is a dubious random seed, but on some systems
|
|
||||||
+ * it is the best we can do (on others, this seed isn't even used...)
|
|
||||||
+ */
|
|
||||||
+
|
|
||||||
+ gettimeofday(&curtime, NULL);
|
|
||||||
+ srand(curtime.tv_sec + curtime.tv_usec);
|
|
||||||
+
|
|
||||||
+ for (i = 0; i < sizeof(data); i ++)
|
|
||||||
+ data[i] = rand(); /* Yes, this is a poor source of random data... */
|
|
||||||
+
|
|
||||||
+ RAND_seed(&data, sizeof(data));
|
|
||||||
+#elif defined(HAVE_GNUTLS)
|
|
||||||
+ /*
|
|
||||||
+ * Initialize the encryption libraries...
|
|
||||||
+ */
|
|
||||||
+
|
|
||||||
+ gnutls_global_init();
|
|
||||||
+#endif /* HAVE_LIBSSL */
|
|
||||||
+
|
|
||||||
+
|
|
||||||
/*
|
|
||||||
* Create the default security profile...
|
|
||||||
*/
|
|
@ -1,13 +0,0 @@
|
|||||||
diff -Nru cups-1.5.0.orig/conf/cupsd.conf.in cups-1.5.0/conf/cupsd.conf.in
|
|
||||||
--- cups-1.5.0.orig/conf/cupsd.conf.in 2010-12-09 22:24:51.000000000 +0100
|
|
||||||
+++ cups-1.5.0/conf/cupsd.conf.in 2011-10-03 17:51:25.767950175 +0200
|
|
||||||
@@ -29,6 +29,9 @@
|
|
||||||
# Web interface setting...
|
|
||||||
WebInterface @CUPS_WEBIF@
|
|
||||||
|
|
||||||
+# Default error policy
|
|
||||||
+ErrorPolicy retry-job
|
|
||||||
+
|
|
||||||
# Restrict access to the server...
|
|
||||||
<Location />
|
|
||||||
Order allow,deny
|
|
@ -1,85 +0,0 @@
|
|||||||
--- backend/usb-libusb.c 2012-07-24 18:37:15.312013467 +0200
|
|
||||||
+++ backend/usb-libusb.c 2012-08-20 13:17:53.565679124 +0200
|
|
||||||
@@ -70,7 +70,7 @@
|
|
||||||
read_endp, /* Read endpoint */
|
|
||||||
protocol, /* Protocol: 1 = Uni-di, 2 = Bi-di. */
|
|
||||||
usblp_attached, /* "usblp" kernel module attached? */
|
|
||||||
- opened_for_job; /* Set to 1 by print_device() */
|
|
||||||
+ reset_after_job; /* Set to 1 by print_device() */
|
|
||||||
unsigned int quirks; /* Quirks flags */
|
|
||||||
struct libusb_device_handle *handle; /* Open handle to device */
|
|
||||||
} usb_printer_t;
|
|
||||||
@@ -122,6 +122,8 @@
|
|
||||||
#define USBLP_QUIRK_USB_INIT 0x2 /* needs vendor USB init string */
|
|
||||||
#define USBLP_QUIRK_BAD_CLASS 0x4 /* descriptor uses vendor-specific
|
|
||||||
Class or SubClass */
|
|
||||||
+#define USBLP_QUIRK_RESET 0x4000 /* After printing do a reset
|
|
||||||
+ for clean-up */
|
|
||||||
#define USBLP_QUIRK_NO_REATTACH 0x8000 /* After printing we cannot re-attach
|
|
||||||
the usblp kernel module */
|
|
||||||
|
|
||||||
@@ -141,15 +143,21 @@
|
|
||||||
{ 0x0409, 0xf1be, USBLP_QUIRK_BIDIR }, /* NEC Picty800 (HP OEM) */
|
|
||||||
{ 0x0482, 0x0010, USBLP_QUIRK_BIDIR }, /* Kyocera Mita FS 820,
|
|
||||||
by zut <kernel@zut.de> */
|
|
||||||
+ { 0x04a9, 0x10a2, USBLP_QUIRK_BIDIR }, /* Canon, Inc. PIXMA iP4200
|
|
||||||
+ Printer, http://www.cups.org/str.php?L4155 */
|
|
||||||
+ { 0x04a9, 0x10b6, USBLP_QUIRK_BIDIR }, /* Canon, Inc. PIXMA iP4300
|
|
||||||
+ Printer, https://bugs.launchpad.net/bugs/1032385 */
|
|
||||||
{ 0x04f9, 0x000d, USBLP_QUIRK_BIDIR |
|
|
||||||
USBLP_QUIRK_NO_REATTACH }, /* Brother Industries, Ltd
|
|
||||||
HL-1440 Laser Printer */
|
|
||||||
{ 0x04b8, 0x0202, USBLP_QUIRK_BAD_CLASS }, /* Seiko Epson Receipt
|
|
||||||
Printer M129C */
|
|
||||||
{ 0x067b, 0x2305, USBLP_QUIRK_BIDIR |
|
|
||||||
- USBLP_QUIRK_NO_REATTACH },
|
|
||||||
+ USBLP_QUIRK_NO_REATTACH |
|
|
||||||
+ USBLP_QUIRK_RESET },
|
|
||||||
/* Prolific Technology, Inc. PL2305 Parallel Port
|
|
||||||
(USB -> Parallel adapter) */
|
|
||||||
+ { 0x04e8, 0x0000, USBLP_QUIRK_RESET }, /* All Samsung devices */
|
|
||||||
{ 0, 0 }
|
|
||||||
};
|
|
||||||
|
|
||||||
@@ -256,7 +264,12 @@
|
|
||||||
}
|
|
||||||
|
|
||||||
g.print_fd = print_fd;
|
|
||||||
- g.printer->opened_for_job = 1;
|
|
||||||
+
|
|
||||||
+ /*
|
|
||||||
+ * Some devices need a reset after finishing a job, these devices are
|
|
||||||
+ * marked with the USBLP_QUIRK_RESET quirk.
|
|
||||||
+ */
|
|
||||||
+ g.printer->reset_after_job = (g.printer->quirks & USBLP_QUIRK_RESET ? 1 : 0);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* If we are printing data from a print driver on stdin, ignore SIGTERM
|
|
||||||
@@ -772,7 +785,7 @@
|
|
||||||
* Reset the device to clean up after the job
|
|
||||||
*/
|
|
||||||
|
|
||||||
- if (printer->opened_for_job == 1)
|
|
||||||
+ if (printer->reset_after_job == 1)
|
|
||||||
{
|
|
||||||
if ((errcode = libusb_reset_device(printer->handle)) < 0)
|
|
||||||
fprintf(stderr,
|
|
||||||
@@ -1288,7 +1301,7 @@
|
|
||||||
}
|
|
||||||
|
|
||||||
printer->usblp_attached = 0;
|
|
||||||
- printer->opened_for_job = 0;
|
|
||||||
+ printer->reset_after_job = 0;
|
|
||||||
|
|
||||||
if (verbose)
|
|
||||||
fputs("STATE: +connecting-to-device\n", stderr);
|
|
||||||
@@ -1586,7 +1599,8 @@
|
|
||||||
for (i = 0; quirk_printers[i].vendorId; i++)
|
|
||||||
{
|
|
||||||
if (vendor == quirk_printers[i].vendorId &&
|
|
||||||
- product == quirk_printers[i].productId)
|
|
||||||
+ (quirk_printers[i].productId == 0x0000 ||
|
|
||||||
+ product == quirk_printers[i].productId))
|
|
||||||
return quirk_printers[i].quirks;
|
|
||||||
}
|
|
||||||
return 0;
|
|
@ -1,11 +0,0 @@
|
|||||||
--- cups-1.7.0/config-scripts/cups-directories.m4.orig 2013-10-25 12:46:35.823499667 +0200
|
|
||||||
+++ cups-1.7.0/config-scripts/cups-directories.m4 2013-10-25 12:46:43.520422900 +0200
|
|
||||||
@@ -420,7 +420,7 @@
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
# All others
|
|
||||||
- CUPS_STATEDIR="$localstatedir/run/cups"
|
|
||||||
+ CUPS_STATEDIR="/run/cups"
|
|
||||||
;;
|
|
||||||
esac])
|
|
||||||
AC_DEFINE_UNQUOTED(CUPS_STATEDIR, "$CUPS_STATEDIR")
|
|
@ -1,60 +0,0 @@
|
|||||||
From 455c52a027ab3548953372a0b7bdb0008420e9ba Mon Sep 17 00:00:00 2001
|
|
||||||
From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com>
|
|
||||||
Date: Fri, 8 Jun 2018 22:29:50 +0200
|
|
||||||
Subject: [PATCH] Fix validation rejecting all NAME and TEXT attrs
|
|
||||||
|
|
||||||
When the UTF-8 validation loop finishes successfully, `*ptr` points at
|
|
||||||
the `'\0'` at the end of the string. The code misinterpreted this as a
|
|
||||||
control character (`*ptr < ' '`) and failed the validation.
|
|
||||||
|
|
||||||
Fixes https://github.com/apple/cups/issues/5325
|
|
||||||
---
|
|
||||||
cups/ipp.c | 24 ++++++++++--------------
|
|
||||||
1 file changed, 10 insertions(+), 14 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/cups/ipp.c b/cups/ipp.c
|
|
||||||
index 95d53cc44..204c71fcd 100644
|
|
||||||
--- a/cups/ipp.c
|
|
||||||
+++ b/cups/ipp.c
|
|
||||||
@@ -5030,15 +5030,13 @@ ippValidateAttribute(
|
|
||||||
else if (*ptr & 0x80)
|
|
||||||
break;
|
|
||||||
else if ((*ptr < ' ' && *ptr != '\n' && *ptr != '\r' && *ptr != '\t') || *ptr == 0x7f)
|
|
||||||
- break;
|
|
||||||
+ {
|
|
||||||
+ ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST, _("\"%s\": Bad text value \"%s\" - bad control character (PWG 5100.14 section 8.3)."), attr->name, attr->values[i].string.text);
|
|
||||||
+ return (0);
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
|
|
||||||
- if (*ptr < ' ' || *ptr == 0x7f)
|
|
||||||
- {
|
|
||||||
- ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST, _("\"%s\": Bad text value \"%s\" - bad control character (PWG 5100.14 section 8.3)."), attr->name, attr->values[i].string.text);
|
|
||||||
- return (0);
|
|
||||||
- }
|
|
||||||
- else if (*ptr)
|
|
||||||
+ if (*ptr)
|
|
||||||
{
|
|
||||||
ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST, _("\"%s\": Bad text value \"%s\" - bad UTF-8 sequence (RFC 8011 section 5.1.2)."), attr->name, attr->values[i].string.text);
|
|
||||||
return (0);
|
|
||||||
@@ -5088,15 +5086,13 @@ ippValidateAttribute(
|
|
||||||
else if (*ptr & 0x80)
|
|
||||||
break;
|
|
||||||
else if (*ptr < ' ' || *ptr == 0x7f)
|
|
||||||
- break;
|
|
||||||
+ {
|
|
||||||
+ ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST, _("\"%s\": Bad name value \"%s\" - bad control character (PWG 5100.14 section 8.1)."), attr->name, attr->values[i].string.text);
|
|
||||||
+ return (0);
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
|
|
||||||
- if (*ptr < ' ' || *ptr == 0x7f)
|
|
||||||
- {
|
|
||||||
- ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST, _("\"%s\": Bad name value \"%s\" - bad control character (PWG 5100.14 section 8.1)."), attr->name, attr->values[i].string.text);
|
|
||||||
- return (0);
|
|
||||||
- }
|
|
||||||
- else if (*ptr)
|
|
||||||
+ if (*ptr)
|
|
||||||
{
|
|
||||||
ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST, _("\"%s\": Bad name value \"%s\" - bad UTF-8 sequence (RFC 8011 section 5.1.3)."), attr->name, attr->values[i].string.text);
|
|
||||||
return (0);
|
|
213
cups-initscript
213
cups-initscript
@ -1,213 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
#
|
|
||||||
# "$Id: cups.sh.in,v 1.22 2002/12/17 18:56:27 swdev Exp $"
|
|
||||||
#
|
|
||||||
# Startup/shutdown script for the Common UNIX Printing System (CUPS).
|
|
||||||
#
|
|
||||||
# Copyright 1997-2003 by Easy Software Products, all rights reserved.
|
|
||||||
#
|
|
||||||
# These coded instructions, statements, and computer programs are the
|
|
||||||
# property of Easy Software Products 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 missing or damaged please contact Easy Software Products
|
|
||||||
# at:
|
|
||||||
#
|
|
||||||
# Attn: CUPS Licensing Information
|
|
||||||
# Easy Software Products
|
|
||||||
# 44141 Airport View Drive, Suite 204
|
|
||||||
# Hollywood, Maryland 20636-3111 USA
|
|
||||||
#
|
|
||||||
# Voice: (301) 373-9603
|
|
||||||
# EMail: cups-info@cups.org
|
|
||||||
# WWW: http://www.cups.org
|
|
||||||
#
|
|
||||||
|
|
||||||
#### OS-Dependent Information
|
|
||||||
|
|
||||||
#
|
|
||||||
# Linux chkconfig stuff:
|
|
||||||
#
|
|
||||||
# chkconfig: 235 99 00
|
|
||||||
# description: Startup/shutdown script for the Common UNIX \
|
|
||||||
# Printing System (CUPS).
|
|
||||||
#
|
|
||||||
|
|
||||||
#
|
|
||||||
# NetBSD 1.5+ rcorder script lines. The format of the following two
|
|
||||||
# lines is very strict -- please don't add additional spaces!
|
|
||||||
#
|
|
||||||
# PROVIDE: cups
|
|
||||||
# REQUIRE: DAEMON
|
|
||||||
#
|
|
||||||
|
|
||||||
|
|
||||||
#### OS-Dependent Configuration
|
|
||||||
|
|
||||||
case "`uname`" in
|
|
||||||
IRIX*)
|
|
||||||
IS_ON=/sbin/chkconfig
|
|
||||||
|
|
||||||
if $IS_ON verbose; then
|
|
||||||
ECHO=echo
|
|
||||||
else
|
|
||||||
ECHO=:
|
|
||||||
fi
|
|
||||||
ECHO_OK=:
|
|
||||||
ECHO_ERROR=:
|
|
||||||
;;
|
|
||||||
|
|
||||||
*BSD*)
|
|
||||||
IS_ON=:
|
|
||||||
ECHO=echo
|
|
||||||
ECHO_OK=:
|
|
||||||
ECHO_ERROR=:
|
|
||||||
;;
|
|
||||||
|
|
||||||
Darwin*)
|
|
||||||
. /etc/rc.common
|
|
||||||
|
|
||||||
if test "${CUPS:=-YES-}" = "-NO-"; then
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
IS_ON=:
|
|
||||||
ECHO=ConsoleMessage
|
|
||||||
ECHO_OK=:
|
|
||||||
ECHO_ERROR=:
|
|
||||||
;;
|
|
||||||
|
|
||||||
Linux*)
|
|
||||||
IS_ON=/bin/true
|
|
||||||
if test -f /etc/init.d/functions; then
|
|
||||||
. /etc/init.d/functions
|
|
||||||
ECHO=echo
|
|
||||||
ECHO_OK="echo_success"
|
|
||||||
ECHO_ERROR="echo_failure"
|
|
||||||
else
|
|
||||||
ECHO=echo
|
|
||||||
ECHO_OK=:
|
|
||||||
ECHO_ERROR=:
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
|
|
||||||
*)
|
|
||||||
IS_ON=/bin/true
|
|
||||||
ECHO=echo
|
|
||||||
ECHO_OK=:
|
|
||||||
ECHO_ERROR=:
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
#### OS-Independent Stuff
|
|
||||||
|
|
||||||
#
|
|
||||||
# Set the timezone, if possible... This allows the
|
|
||||||
# scheduler and all child processes to know the local
|
|
||||||
# timezone when reporting dates and times to the user.
|
|
||||||
# If no timezone information is found, then Greenwich
|
|
||||||
# Mean Time (GMT) will probably be used.
|
|
||||||
#
|
|
||||||
|
|
||||||
for file in /etc/TIMEZONE /etc/rc.config /etc/sysconfig/clock; do
|
|
||||||
if test -f $file; then
|
|
||||||
. $file
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
if test "x$ZONE" != x; then
|
|
||||||
TZ="$ZONE"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "x$TIMEZONE" != x; then
|
|
||||||
TZ="$TIMEZONE"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "x$TZ" != x; then
|
|
||||||
export TZ
|
|
||||||
fi
|
|
||||||
|
|
||||||
#
|
|
||||||
# See if the CUPS server (cupsd) is running...
|
|
||||||
#
|
|
||||||
|
|
||||||
case "`uname`" in
|
|
||||||
HP-UX* | AIX* | SINIX*)
|
|
||||||
pid=`ps -e | awk '{if (match($4, ".*/cupsd$") || $4 == "cupsd") print $1}'`
|
|
||||||
;;
|
|
||||||
IRIX* | SunOS*)
|
|
||||||
pid=`ps -e | nawk '{if (match($4, ".*/cupsd$") || $4 == "cupsd") print $1}'`
|
|
||||||
;;
|
|
||||||
UnixWare*)
|
|
||||||
pid=`ps -e | awk '{if (match($6, ".*/cupsd$") || $6 == "cupsd") print $1}'`
|
|
||||||
. /etc/TIMEZONE
|
|
||||||
;;
|
|
||||||
OSF1*)
|
|
||||||
pid=`ps -e | awk '{if (match($5, ".*/cupsd$") || $5 == "cupsd") print $1}'`
|
|
||||||
;;
|
|
||||||
Linux* | *BSD* | Darwin*)
|
|
||||||
pid=`ps ax | awk '{if (match($5, ".*/cupsd$") || $5 == "cupsd") print $1}'`
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
pid=""
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
#
|
|
||||||
# Start or stop the CUPS server based upon the first argument to the script.
|
|
||||||
#
|
|
||||||
|
|
||||||
case $1 in
|
|
||||||
start | restart | reload)
|
|
||||||
echo -n "Starting cups:"
|
|
||||||
if $IS_ON cups; then
|
|
||||||
if test "$pid" != ""; then
|
|
||||||
kill -HUP $pid
|
|
||||||
else
|
|
||||||
prefix=/usr
|
|
||||||
exec_prefix=/usr
|
|
||||||
${exec_prefix}/sbin/cupsd
|
|
||||||
if test $? != 0; then
|
|
||||||
$ECHO_FAIL
|
|
||||||
$ECHO "cups: unable to $1 scheduler."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
$ECHO_OK
|
|
||||||
echo
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
|
|
||||||
stop)
|
|
||||||
if test "$pid" != ""; then
|
|
||||||
echo -n "Stopping cups:"
|
|
||||||
kill $pid
|
|
||||||
$ECHO_OK
|
|
||||||
echo
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
|
|
||||||
status)
|
|
||||||
if test "$pid" != ""; then
|
|
||||||
echo "cups: scheduler is running."
|
|
||||||
else
|
|
||||||
echo "cups: scheduler is not running."
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
|
|
||||||
*)
|
|
||||||
echo "Usage: cups {reload|restart|start|status|stop}"
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
#
|
|
||||||
# Exit with no errors.
|
|
||||||
#
|
|
||||||
|
|
||||||
exit 0
|
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# End of "$Id: cups.sh.in,v 1.22 2002/12/17 18:56:27 swdev Exp $".
|
|
||||||
#
|
|
@ -1,9 +0,0 @@
|
|||||||
[Unit]
|
|
||||||
Description=Cups-LPD Activation Socket
|
|
||||||
|
|
||||||
[Socket]
|
|
||||||
ListenStream=515
|
|
||||||
Accept=true
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=sockets.target
|
|
@ -1,8 +0,0 @@
|
|||||||
[Unit]
|
|
||||||
Description=Lpd Protocol Communicator With CUPS
|
|
||||||
After=local-fs.target
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
User=lp
|
|
||||||
ExecStart=/usr/lib/cups/daemon/cups-lpd
|
|
||||||
StandardInput=socket
|
|
@ -1,8 +0,0 @@
|
|||||||
[Unit]
|
|
||||||
Description=CUPS Printer Service Spool
|
|
||||||
|
|
||||||
[Path]
|
|
||||||
PathExistsGlob=/var/spool/cups/d*
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=multi-user.target
|
|
11
cups.service
11
cups.service
@ -1,11 +0,0 @@
|
|||||||
[Unit]
|
|
||||||
Description=CUPS Printing Service
|
|
||||||
Before=cups-browsed.service
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
ExecStart=/usr/sbin/cupsd -f
|
|
||||||
PrivateTmp=true
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
Also=cups.socket cups.path
|
|
||||||
WantedBy=printer.target
|
|
10
cups.socket
10
cups.socket
@ -1,10 +0,0 @@
|
|||||||
[Unit]
|
|
||||||
Description=CUPS Printing Service Sockets
|
|
||||||
|
|
||||||
[Socket]
|
|
||||||
ListenStream=/run/cups/cups.sock
|
|
||||||
ListenStream=631
|
|
||||||
BindIPv6Only=ipv6-only
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=sockets.target
|
|
40
cups.spec
40
cups.spec
@ -6,8 +6,8 @@
|
|||||||
%define libname libcups
|
%define libname libcups
|
||||||
|
|
||||||
Name: cups
|
Name: cups
|
||||||
Version: 2.4.10
|
Version: 2.4.11
|
||||||
Release: 2mamba
|
Release: 1mamba
|
||||||
Summary: Common UNIX Printing System
|
Summary: Common UNIX Printing System
|
||||||
Group: System/Spooling
|
Group: System/Spooling
|
||||||
Vendor: openmamba
|
Vendor: openmamba
|
||||||
@ -16,17 +16,6 @@ Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
|
|||||||
URL: http://www.cups.org
|
URL: http://www.cups.org
|
||||||
Source0: https://github.com/OpenPrinting/cups.git/v%{version}/cups-%{version}.tar.bz2
|
Source0: https://github.com/OpenPrinting/cups.git/v%{version}/cups-%{version}.tar.bz2
|
||||||
Source1: cups-pamd
|
Source1: cups-pamd
|
||||||
Source2: cups-initscript
|
|
||||||
Source3: cups.service
|
|
||||||
Source4: cups.socket
|
|
||||||
Source5: cups.path
|
|
||||||
Source6: cups-lpd.socket
|
|
||||||
Source7: cups-lpd@.service
|
|
||||||
Patch0: %{name}-1.4.4-str3461-1.4.patch
|
|
||||||
Patch1: %{name}-1.5.0-set_retry_job_default_ErrorPolicy.patch
|
|
||||||
Patch2: cups-1.6.1-usb-backend-reset-after-job-only-for-specific-devices-3.patch
|
|
||||||
Patch3: cups-1.7.0-statedir.patch
|
|
||||||
Patch4: cups-2.2.8-fix-balidation-rejecting-all-names.patch
|
|
||||||
License: GPL
|
License: GPL
|
||||||
## AUTOBUILDREQ-BEGIN
|
## AUTOBUILDREQ-BEGIN
|
||||||
BuildRequires: glibc-devel
|
BuildRequires: glibc-devel
|
||||||
@ -70,7 +59,6 @@ Requires: %{libname} = %{version}-%{release}
|
|||||||
%description -n %{libname}-devel
|
%description -n %{libname}-devel
|
||||||
The Common UNIX Printing System ("CUPS") is a cross-platform printing solution for all UNIX environments.
|
The Common UNIX Printing System ("CUPS") is a cross-platform printing solution for all UNIX environments.
|
||||||
It is based on the "Internet Printing Protocol" and provides complete printing services to most PostScript and raster printers.
|
It is based on the "Internet Printing Protocol" and provides complete printing services to most PostScript and raster printers.
|
||||||
|
|
||||||
This is the development package.
|
This is the development package.
|
||||||
|
|
||||||
%package -n %{libname}
|
%package -n %{libname}
|
||||||
@ -81,10 +69,10 @@ Group: System/Libraries
|
|||||||
The Common UNIX Printing System ("CUPS") is a cross-platform printing solution for all UNIX environments.
|
The Common UNIX Printing System ("CUPS") is a cross-platform printing solution for all UNIX environments.
|
||||||
It is based on the "Internet Printing Protocol" and provides complete printing services to most PostScript and raster printers.
|
It is based on the "Internet Printing Protocol" and provides complete printing services to most PostScript and raster printers.
|
||||||
|
|
||||||
|
%debug_package
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
#%patch1 -p1
|
|
||||||
#%patch3 -p1
|
|
||||||
autoconf
|
autoconf
|
||||||
|
|
||||||
%build
|
%build
|
||||||
@ -129,13 +117,6 @@ done
|
|||||||
install -m0644 cups/string-private.h %{buildroot}%{_includedir}/cups/string-private.h
|
install -m0644 cups/string-private.h %{buildroot}%{_includedir}/cups/string-private.h
|
||||||
install -m0644 cups/debug-private.h %{buildroot}%{_includedir}/cups/debug-private.h
|
install -m0644 cups/debug-private.h %{buildroot}%{_includedir}/cups/debug-private.h
|
||||||
|
|
||||||
## systemd
|
|
||||||
#install -D -m0644 %{SOURCE3} %{buildroot}%{_unitdir}/cups.service
|
|
||||||
#install -D -m0644 %{SOURCE4} %{buildroot}%{_unitdir}/cups.socket
|
|
||||||
#install -D -m0644 %{SOURCE5} %{buildroot}%{_unitdir}/cups.path
|
|
||||||
#install -D -m0644 %{SOURCE6} %{buildroot}%{_unitdir}/cups-lpd.socket
|
|
||||||
#install -D -m0644 %{SOURCE7} %{buildroot}%{_unitdir}/cups-lpd@.service
|
|
||||||
|
|
||||||
# basic cups client configuration file
|
# basic cups client configuration file
|
||||||
echo "ServerName /run/cups/cups.sock" > %{buildroot}%{_sysconfdir}/cups/client.conf
|
echo "ServerName /run/cups/cups.sock" > %{buildroot}%{_sysconfdir}/cups/client.conf
|
||||||
|
|
||||||
@ -157,8 +138,6 @@ chmod 755 %{buildroot}%{_libdir}/*.a
|
|||||||
%clean
|
%clean
|
||||||
[ "%{buildroot}" != / ] && rm -rf %{buildroot}
|
[ "%{buildroot}" != / ] && rm -rf %{buildroot}
|
||||||
|
|
||||||
%post -n %{libname} -p /sbin/ldconfig
|
|
||||||
%postun -n %{libname} -p /sbin/ldconfig
|
|
||||||
|
|
||||||
%pre
|
%pre
|
||||||
/usr/sbin/groupadd lp -g %{lp_gid} &>/dev/null
|
/usr/sbin/groupadd lp -g %{lp_gid} &>/dev/null
|
||||||
@ -219,20 +198,16 @@ fi
|
|||||||
%files -f %{name}.lang
|
%files -f %{name}.lang
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%{_sysconfdir}/dbus-1/system.d/cups.conf
|
%{_sysconfdir}/dbus-1/system.d/cups.conf
|
||||||
#%{_sysconfdir}/xinetd.d/cups-lpd
|
|
||||||
#%{_sysconfdir}/init.d/cups
|
|
||||||
%attr(0775,root,lpadmin) %dir %{_sysconfdir}/cups
|
%attr(0775,root,lpadmin) %dir %{_sysconfdir}/cups
|
||||||
%config(noreplace) %attr(-,root,lpadmin) %{_sysconfdir}/cups/*
|
%config(noreplace) %attr(-,root,lpadmin) %{_sysconfdir}/cups/*
|
||||||
%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/pam.d/cups
|
%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/pam.d/cups
|
||||||
%{_bindir}/cancel
|
%{_bindir}/cancel
|
||||||
%{_bindir}/cupstestppd
|
%{_bindir}/cupstestppd
|
||||||
#%{_bindir}/cupstestdsc
|
|
||||||
%{_bindir}/ippeveprinter
|
%{_bindir}/ippeveprinter
|
||||||
%{_bindir}/ippfind
|
%{_bindir}/ippfind
|
||||||
%{_bindir}/ipptool
|
%{_bindir}/ipptool
|
||||||
%{_bindir}/lp
|
%{_bindir}/lp
|
||||||
%{_bindir}/lpoptions
|
%{_bindir}/lpoptions
|
||||||
#%attr(4755,lp,lp) %{_bindir}/lppasswd
|
|
||||||
%{_bindir}/lpq
|
%{_bindir}/lpq
|
||||||
%{_bindir}/lpr
|
%{_bindir}/lpr
|
||||||
%{_bindir}/lprm
|
%{_bindir}/lprm
|
||||||
@ -242,9 +217,7 @@ fi
|
|||||||
%{_bindir}/ppdi
|
%{_bindir}/ppdi
|
||||||
%{_bindir}/ppdmerge
|
%{_bindir}/ppdmerge
|
||||||
%{_bindir}/ppdpo
|
%{_bindir}/ppdpo
|
||||||
#%{_sbindir}/accept
|
|
||||||
%{_sbindir}/cupsaccept
|
%{_sbindir}/cupsaccept
|
||||||
#%{_sbindir}/cupsaddsmb
|
|
||||||
%{_sbindir}/cupsctl
|
%{_sbindir}/cupsctl
|
||||||
%{_sbindir}/cupsd
|
%{_sbindir}/cupsd
|
||||||
%{_sbindir}/cupsdisable
|
%{_sbindir}/cupsdisable
|
||||||
@ -255,13 +228,13 @@ fi
|
|||||||
%{_sbindir}/lpc
|
%{_sbindir}/lpc
|
||||||
%{_sbindir}/lpinfo
|
%{_sbindir}/lpinfo
|
||||||
%{_sbindir}/lpmove
|
%{_sbindir}/lpmove
|
||||||
#%{_sbindir}/reject
|
|
||||||
%{_presetdir}/50-cups.preset
|
%{_presetdir}/50-cups.preset
|
||||||
%{_unitdir}/cups.path
|
%{_unitdir}/cups.path
|
||||||
%{_unitdir}/cups.service
|
%{_unitdir}/cups.service
|
||||||
%{_unitdir}/cups.socket
|
%{_unitdir}/cups.socket
|
||||||
%{_unitdir}/cups-lpd.socket
|
%{_unitdir}/cups-lpd.socket
|
||||||
%{_unitdir}/cups-lpd@.service
|
%{_unitdir}/cups-lpd@.service
|
||||||
|
%{_unitdir}/system-cups.slice
|
||||||
%{_datadir}/applications/cups.desktop
|
%{_datadir}/applications/cups.desktop
|
||||||
%{_datadir}/icons/hicolor/*/apps/cups.png
|
%{_datadir}/icons/hicolor/*/apps/cups.png
|
||||||
%dir %{_datadir}/cups
|
%dir %{_datadir}/cups
|
||||||
@ -305,6 +278,9 @@ fi
|
|||||||
#%doc CHANGES.txt README.txt
|
#%doc CHANGES.txt README.txt
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sat Oct 05 2024 Automatic Build System <autodist@openmamba.org> 2.4.11-1mamba
|
||||||
|
- automatic version update by autodist
|
||||||
|
|
||||||
* Sun Jun 23 2024 Silvan Calarco <silvan.calarco@mambasoft.it> 2.4.10-2mamba
|
* Sun Jun 23 2024 Silvan Calarco <silvan.calarco@mambasoft.it> 2.4.10-2mamba
|
||||||
- provide user and groups lp and lpadmin
|
- provide user and groups lp and lpadmin
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user