From 215ef638307fa5678879e0efa1782851bdee5a0a Mon Sep 17 00:00:00 2001 From: Michael Sweet Date: Tue, 15 Mar 2016 10:37:23 -0400 Subject: [PATCH] Import CUPS v1.7.4 --- CHANGES.txt | 33 ++++++++++++++++++---- INSTALL.txt | 2 +- README.txt | 2 +- backend/dnssd.c | 43 ++++++++++------------------- backend/ipp.c | 8 +++--- backend/lpd.c | 10 +++---- backend/network.c | 16 +++++------ backend/org.cups.usb-quirks | 3 ++ backend/socket.c | 8 +++--- config-scripts/cups-common.m4 | 7 +++-- configure | 7 +++-- cups/cups.h | 12 +++----- cups/usersys.c | 52 ++++++++++++++--------------------- doc/ca/index.html.in | 6 ++-- doc/cs/index.html.in | 6 ++-- doc/de/index.html.in | 6 ++-- doc/es/index.html.in | 6 ++-- doc/fr/index.html.in | 6 ++-- doc/index.html.in | 6 ++-- doc/it/index.html.in | 6 ++-- doc/ja/index.html.in | 6 ++-- doc/ru/index.html.in | 6 ++-- packaging/cups.spec | 17 +++++++++--- packaging/cups.spec.in | 13 +++++++-- scheduler/client.c | 37 +++++++++++++++++++++---- scheduler/conf.c | 6 ++-- scheduler/dirsvc.c | 10 ++++--- templates/ca/printer.tmpl | 4 +-- templates/cs/printer.tmpl | 4 +-- templates/de/printer.tmpl | 4 +-- templates/es/printer.tmpl | 4 +-- templates/fr/printer.tmpl | 4 +-- templates/it/printer.tmpl | 4 +-- templates/ja/printer.tmpl | 4 +-- templates/printer.tmpl | 4 +-- templates/pt_BR/printer.tmpl | 4 +-- templates/ru/printer.tmpl | 4 +-- 37 files changed, 205 insertions(+), 175 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index d5aab1589..26076645f 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,6 +1,33 @@ -CHANGES.txt - 1.7.3 - 2014-05-27 +CHANGES.txt - 1.7.4 - 2014-07-08 -------------------------------- +CHANGES IN CUPS V1.7.4 + + - Security: The web interface incorrectly served symlinked files and + files that were not world-readable, potentially leading to a + disclosure of information (STR #4450) + - The CUPS headers incorrectly needed libdispatch for blocks support + (STR #4397) + - CUPS did not compile when Avahi or mDNSResponder was not present + (STR #4402, STR #4424) + - The "snmp" option did not work with the network backends (STR #4422) + - The User directive in client.conf did not override the USER + environment variable (STR #4426) + - The web interface now properly shows a "Go" button for all text-based + browsers (STR #4425) + - The MaxJobTime directive now properly supports time values (STR #4434) + - The RPM spec file did not work due to the new Brazilian Portuguese + localization (STR #4436) + - Fixed an "IPP read error" issue (STR #4440) + - Fixed the --disable-libusb configure option (STR #4439) + - Fixed the debug output from the DNS-SD backend when using Avahi + (STR #4444) + - Fixed a bug in the CUPS_SC_GET_DEVICE_ID handling by the network + backends (STR #4447) + - Added USB quirk rule for Lexmark E230 (STR #4448) + - The LPD backend did not work with some versions of glibc (STR #4452) + + CHANGES IN CUPS V1.7.3 - Added Brazilian Portuguese translation (STR #4409) @@ -15,12 +42,8 @@ CHANGES IN CUPS V1.7.3 - Fixed an authentication race condition in cupsSendRequest (STR #4403) - The scheduler did not add the "job-hold-until-specified" reason when holding a job using the lp command (STR #4405) - - The CUPS headers incorrectly needed libdispatch for blocks support - (STR #4397) - The configure script incorrectly added libgcrypt as a GNU TLS dependency (STR #4399) - - CUPS did not compile when Avahi or mDNSResponder was not present - (STR #4402) - cupsGetDestMediaCount did not work for CUPS_MEDIA_FLAGS DEFAULT (STR #4414) - Auto-typing of PWG Raster files did not work (STR #4417) diff --git a/INSTALL.txt b/INSTALL.txt index c6dd36bdd..05d3b39b8 100644 --- a/INSTALL.txt +++ b/INSTALL.txt @@ -1,4 +1,4 @@ -INSTALL - CUPS v1.7.3 - 2014-05-27 +INSTALL - CUPS v1.7.4 - 2014-06-10 ---------------------------------- This file describes how to compile and install CUPS from source code. For more diff --git a/README.txt b/README.txt index 6680ac529..489dc2a1e 100644 --- a/README.txt +++ b/README.txt @@ -1,4 +1,4 @@ -README - CUPS v1.7.3 - 2014-05-27 +README - CUPS v1.7.4 - 2014-06-10 --------------------------------- Looking for compile instructions? Read the file "INSTALL.txt" instead... diff --git a/backend/dnssd.c b/backend/dnssd.c index f5c0a21e4..742f9124c 100644 --- a/backend/dnssd.c +++ b/backend/dnssd.c @@ -1,33 +1,17 @@ /* - * "$Id: dnssd.c 11623 2014-02-19 20:18:10Z msweet $" + * "$Id: dnssd.c 11971 2014-07-01 14:38:29Z msweet $" * - * DNS-SD discovery backend for CUPS. + * DNS-SD discovery backend for CUPS. * - * Copyright 2008-2012 by Apple Inc. + * Copyright 2008-2014 by Apple Inc. * - * 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" - * "LICENSE" which should have been included with this file. If this - * file is missing or damaged, see the license at "http://www.cups.org/". + * 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" + * "LICENSE" which should have been included with this file. If this + * file is missing or damaged, see the license at "http://www.cups.org/". * - * This file is subject to the Apple OS-Developed Software exception. - * - * Contents: - * - * main() - Browse for printers. - * browse_callback() - Browse devices. - * browse_local_callback() - Browse local devices. - * client_callback() - Avahi client callback function. - * compare_devices() - Compare two devices. - * exec_backend() - Execute the backend that corresponds to the - * resolved service name. - * device_type() - Get DNS-SD type enumeration from string. - * get_device() - Create or update a device. - * query_callback() - Process query data. - * find_device() - Find a device from its name and domain. - * sigterm_handler() - Handle termination signals. - * unquote() - Unquote a name string. + * This file is subject to the Apple OS-Developed Software exception. */ /* @@ -924,8 +908,11 @@ get_device(cups_array_t *devices, /* I - Device array */ * Yes, add the device... */ - fprintf(stderr, "DEBUG: Found \"%s.%s%s\"...\n", serviceName, regtype, - replyDomain); +#ifdef HAVE_DNSSD + fprintf(stderr, "DEBUG: Found \"%s.%s%s\"...\n", serviceName, regtype, replyDomain); +#else /* HAVE_AVAHI */ + fprintf(stderr, "DEBUG: Found \"%s.%s.%s\"...\n", serviceName, regtype, replyDomain); +#endif /* HAVE_DNSSD */ device = calloc(sizeof(cups_device_t), 1); device->name = strdup(serviceName); @@ -1329,5 +1316,5 @@ unquote(char *dst, /* I - Destination buffer */ /* - * End of "$Id: dnssd.c 11623 2014-02-19 20:18:10Z msweet $". + * End of "$Id: dnssd.c 11971 2014-07-01 14:38:29Z msweet $". */ diff --git a/backend/ipp.c b/backend/ipp.c index b8cc8a245..bfca6a8ed 100644 --- a/backend/ipp.c +++ b/backend/ipp.c @@ -1,5 +1,5 @@ /* - * "$Id: ipp.c 11890 2014-05-22 13:59:21Z msweet $" + * "$Id: ipp.c 11909 2014-06-09 18:58:16Z msweet $" * * IPP backend for CUPS. * @@ -528,8 +528,8 @@ main(int argc, /* I - Number of command-line args */ */ snmp_enabled = !value[0] || !_cups_strcasecmp(value, "on") || - _cups_strcasecmp(value, "yes") || - _cups_strcasecmp(value, "true"); + !_cups_strcasecmp(value, "yes") || + !_cups_strcasecmp(value, "true"); } else if (!_cups_strcasecmp(name, "version")) { @@ -3709,5 +3709,5 @@ update_reasons(ipp_attribute_t *attr, /* I - printer-state-reasons or NULL */ } /* - * End of "$Id: ipp.c 11890 2014-05-22 13:59:21Z msweet $". + * End of "$Id: ipp.c 11909 2014-06-09 18:58:16Z msweet $". */ diff --git a/backend/lpd.c b/backend/lpd.c index 6e4ab3657..9490950a7 100644 --- a/backend/lpd.c +++ b/backend/lpd.c @@ -1,5 +1,5 @@ /* - * "$Id: lpd.c 10996 2013-05-29 11:51:34Z msweet $" + * "$Id: lpd.c 12005 2014-07-08 15:46:59Z msweet $" * * Line Printer Daemon backend for CUPS. * @@ -393,8 +393,8 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */ */ snmp_enabled = !value[0] || !_cups_strcasecmp(value, "on") || - _cups_strcasecmp(value, "yes") || - _cups_strcasecmp(value, "true"); + !_cups_strcasecmp(value, "yes") || + !_cups_strcasecmp(value, "true"); } else if (!_cups_strcasecmp(name, "timeout")) { @@ -1276,7 +1276,7 @@ rresvport_af(int *port, /* IO - Port number to bind to */ * Try binding the port to the socket; return if all is OK... */ - if (!bind(fd, (struct sockaddr *)&addr, sizeof(addr))) + if (!bind(fd, (struct sockaddr *)&addr, httpAddrSize(&addr))) return (fd); /* @@ -1331,5 +1331,5 @@ sigterm_handler(int sig) /* I - Signal */ /* - * End of "$Id: lpd.c 10996 2013-05-29 11:51:34Z msweet $". + * End of "$Id: lpd.c 12005 2014-07-08 15:46:59Z msweet $". */ diff --git a/backend/network.c b/backend/network.c index 4227319c4..9e557dd75 100644 --- a/backend/network.c +++ b/backend/network.c @@ -1,5 +1,5 @@ /* - * "$Id: network.c 3755 2012-03-30 05:59:14Z msweet $" + * "$Id: network.c 11971 2014-07-01 14:38:29Z msweet $" * * Common backend network APIs for CUPS. * @@ -268,6 +268,12 @@ backendNetworkSideCB( datalen = 0; break; + case CUPS_SC_CMD_GET_CONNECTED : + status = CUPS_SC_STATUS_OK; + data[0] = device_fd != -1; + datalen = 1; + break; + case CUPS_SC_CMD_GET_DEVICE_ID : if (snmp_fd >= 0) { @@ -305,12 +311,6 @@ backendNetworkSideCB( break; } - case CUPS_SC_CMD_GET_CONNECTED : - status = CUPS_SC_STATUS_OK; - data[0] = device_fd != -1; - datalen = 1; - break; - default : status = CUPS_SC_STATUS_NOT_IMPLEMENTED; datalen = 0; @@ -322,5 +322,5 @@ backendNetworkSideCB( /* - * End of "$Id: network.c 3755 2012-03-30 05:59:14Z msweet $". + * End of "$Id: network.c 11971 2014-07-01 14:38:29Z msweet $". */ diff --git a/backend/org.cups.usb-quirks b/backend/org.cups.usb-quirks index 567d715d0..5a7b2e09a 100644 --- a/backend/org.cups.usb-quirks +++ b/backend/org.cups.usb-quirks @@ -212,3 +212,6 @@ # Lexmark E238 () 0x043d 0x00d7 no-reattach + +# Lexmark E238 (STR #4448) +0x043d 0x009a no-reattach diff --git a/backend/socket.c b/backend/socket.c index 8b7dc380c..821b53a8a 100644 --- a/backend/socket.c +++ b/backend/socket.c @@ -1,5 +1,5 @@ /* - * "$Id: socket.c 10996 2013-05-29 11:51:34Z msweet $" + * "$Id: socket.c 11909 2014-06-09 18:58:16Z msweet $" * * AppSocket backend for CUPS. * @@ -250,8 +250,8 @@ main(int argc, /* I - Number of command-line arguments (6 or 7) */ */ snmp_enabled = !value[0] || !_cups_strcasecmp(value, "on") || - _cups_strcasecmp(value, "yes") || - _cups_strcasecmp(value, "true"); + !_cups_strcasecmp(value, "yes") || + !_cups_strcasecmp(value, "true"); } else if (!_cups_strcasecmp(name, "contimeout")) { @@ -520,5 +520,5 @@ wait_bc(int device_fd, /* I - Socket */ /* - * End of "$Id: socket.c 10996 2013-05-29 11:51:34Z msweet $". + * End of "$Id: socket.c 11909 2014-06-09 18:58:16Z msweet $". */ diff --git a/config-scripts/cups-common.m4 b/config-scripts/cups-common.m4 index f48387703..a8e016b67 100644 --- a/config-scripts/cups-common.m4 +++ b/config-scripts/cups-common.m4 @@ -20,7 +20,7 @@ dnl Set the name of the config header file... AC_CONFIG_HEADER(config.h) dnl Version number information... -CUPS_VERSION=1.7.3 +CUPS_VERSION=1.7.4 CUPS_REVISION= #if test -z "$CUPS_REVISION" -a -d .svn; then # CUPS_REVISION="-r`svnversion . | awk -F: '{print $NF}' | sed -e '1,$s/[[a-zA-Z]]*//g'`" @@ -230,7 +230,7 @@ AC_SUBST(LIBUSB) AC_SUBST(USBQUIRKS) if test "x$PKGCONFIG" != x; then - if test x$enable_libusb = xyes -o $uname != Darwin; then + if test x$enable_libusb != xno -a $uname != Darwin; then AC_MSG_CHECKING(for libusb-1.0) if $PKGCONFIG --exists libusb-1.0; then AC_MSG_RESULT(yes) @@ -240,6 +240,9 @@ if test "x$PKGCONFIG" != x; then USBQUIRKS="\$(DATADIR)/usb" else AC_MSG_RESULT(no) + if test x$enable_libusb = xyes; then + AC_MSG_ERROR(libusb required for --enable-libusb.) + fi fi fi elif test x$enable_libusb = xyes; then diff --git a/configure b/configure index ad9d18e63..e27240704 100755 --- a/configure +++ b/configure @@ -2517,7 +2517,7 @@ esac ac_config_headers="$ac_config_headers config.h" -CUPS_VERSION=1.7.3 +CUPS_VERSION=1.7.4 CUPS_REVISION= #if test -z "$CUPS_REVISION" -a -d .svn; then # CUPS_REVISION="-r`svnversion . | awk -F: '{print $NF}' | sed -e '1,$s/[[a-zA-Z]]*//g'`" @@ -5238,7 +5238,7 @@ USBQUIRKS="" if test "x$PKGCONFIG" != x; then - if test x$enable_libusb = xyes -o $uname != Darwin; then + if test x$enable_libusb != xno -a $uname != Darwin; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libusb-1.0" >&5 $as_echo_n "checking for libusb-1.0... " >&6; } if $PKGCONFIG --exists libusb-1.0; then @@ -5252,6 +5252,9 @@ $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + if test x$enable_libusb = xyes; then + as_fn_error $? "libusb required for --enable-libusb." "$LINENO" 5 + fi fi fi elif test x$enable_libusb = xyes; then diff --git a/cups/cups.h b/cups/cups.h index 94a4c1ea0..2af4f533d 100644 --- a/cups/cups.h +++ b/cups/cups.h @@ -1,5 +1,5 @@ /* - * "$Id: cups.h 11812 2014-04-10 15:47:53Z msweet $" + * "$Id: cups.h 11978 2014-07-02 10:35:09Z msweet $" * * API definitions for CUPS. * @@ -30,10 +30,6 @@ typedef off_t ssize_t; /* @private@ */ # endif /* WIN32 && !__CUPS_SSIZE_T_DEFINED */ -# ifdef __BLOCKS__ -# include -# endif /* __BLOCKS__ */ - # include "file.h" # include "ipp.h" # include "language.h" @@ -53,10 +49,10 @@ extern "C" { * Constants... */ -# define CUPS_VERSION 1.0703 +# define CUPS_VERSION 1.0704 # define CUPS_VERSION_MAJOR 1 # define CUPS_VERSION_MINOR 7 -# define CUPS_VERSION_PATCH 3 +# define CUPS_VERSION_PATCH 4 # define CUPS_BC_FD 3 /* Back-channel file descriptor for @@ -627,5 +623,5 @@ extern const char *cupsUserAgent(void) _CUPS_API_1_7; #endif /* !_CUPS_CUPS_H_ */ /* - * End of "$Id: cups.h 11812 2014-04-10 15:47:53Z msweet $". + * End of "$Id: cups.h 11978 2014-07-02 10:35:09Z msweet $". */ diff --git a/cups/usersys.c b/cups/usersys.c index 457af4ab1..a5b2c93ca 100644 --- a/cups/usersys.c +++ b/cups/usersys.c @@ -1,9 +1,9 @@ /* - * "$Id: usersys.c 11689 2014-03-05 21:22:12Z msweet $" + * "$Id: usersys.c 11909 2014-06-09 18:58:16Z msweet $" * * User, system, and password routines for CUPS. * - * Copyright 2007-2013 by Apple Inc. + * Copyright 2007-2014 by Apple Inc. * Copyright 1997-2006 by Easy Software Products. * * These coded instructions, statements, and computer programs are the @@ -851,29 +851,7 @@ _cupsSetDefaults(void) cups_anyroot = getenv("CUPS_ANYROOT"); cups_expiredroot = getenv("CUPS_EXPIREDROOT"); cups_expiredcerts = getenv("CUPS_EXPIREDCERTS"); - - if ((cups_user = getenv("CUPS_USER")) == NULL) - { -#ifndef WIN32 - /* - * Try the USER environment variable... - */ - - if ((cups_user = getenv("USER")) != NULL) - { - /* - * Validate USER matches the current UID, otherwise don't allow it to - * override things... This makes sure that printing after doing su or - * sudo records the correct username. - */ - - struct passwd *pw; /* Account information */ - - if ((pw = getpwnam(cups_user)) == NULL || pw->pw_uid != getuid()) - cups_user = NULL; - } -#endif /* !WIN32 */ - } + cups_user = getenv("CUPS_USER"); /* * Then, if needed, read the ~/.cups/client.conf or /etc/cups/client.conf @@ -1089,20 +1067,30 @@ cups_read_client_conf( if (!GetUserName(cg->user, &size)) #else /* - * Get the user name corresponding to the current UID... + * Try the USER environment variable as the default username... */ - struct passwd *pwd; /* User/password entry */ + const char *envuser = getenv("USER"); + /* Default username */ + struct passwd *pw = NULL; /* Account information */ - setpwent(); - if ((pwd = getpwuid(getuid())) != NULL) + if (envuser) { /* - * Found a match! + * Validate USER matches the current UID, otherwise don't allow it to + * override things... This makes sure that printing after doing su or + * sudo records the correct username. */ - strlcpy(cg->user, pwd->pw_name, sizeof(cg->user)); + if ((pw = getpwnam(envuser)) != NULL && pw->pw_uid != getuid()) + pw = NULL; } + + if (!pw) + pw = getpwuid(getuid()); + + if (pw) + strlcpy(cg->user, pw->pw_name, sizeof(cg->user)); else #endif /* WIN32 */ { @@ -1141,5 +1129,5 @@ cups_read_client_conf( /* - * End of "$Id: usersys.c 11689 2014-03-05 21:22:12Z msweet $". + * End of "$Id: usersys.c 11909 2014-06-09 18:58:16Z msweet $". */ diff --git a/doc/ca/index.html.in b/doc/ca/index.html.in index 9ca3f8fc6..87d18e57f 100644 --- a/doc/ca/index.html.in +++ b/doc/ca/index.html.in @@ -52,7 +52,7 @@ HEIGHT="128" ALT="CUPS">

Novetats del CUPS 1.4

-

Fòrum d'usuaris

+

Fòrum d'usuaris

@@ -72,8 +72,6 @@ HEIGHT="128" ALT="CUPS">

Referència del cupsd.conf

-

Cerca de controladors d'impressora

-

CUPS per desenvolupadors

@@ -92,7 +90,7 @@ HEIGHT="128" ALT="CUPS">

Referència del fitxer d'inf. del compilador del controlador per PPD

-

Fòrum de desenvolupadors

+

Fòrum de desenvolupadors

diff --git a/doc/cs/index.html.in b/doc/cs/index.html.in index a5641f6f8..5d2a8d021 100644 --- a/doc/cs/index.html.in +++ b/doc/cs/index.html.in @@ -52,7 +52,7 @@ HEIGHT="128" ALT="CUPS">

Co je nového v CUPS 1.6

-

Uživatelské fórum

+

Uživatelské fórum

@@ -72,8 +72,6 @@ HEIGHT="128" ALT="CUPS">

Konfigurační soubor cupsd.conf

-

Hedat ovladače tiskárny

-

CUPS pro vývojáře

@@ -92,7 +90,7 @@ HEIGHT="128" ALT="CUPS">

PPD kompilátor Driver Information File Reference

-

Vývojářské fórum

+

Vývojářské fórum

diff --git a/doc/de/index.html.in b/doc/de/index.html.in index 0a3db7da3..5dd6e2d6a 100644 --- a/doc/de/index.html.in +++ b/doc/de/index.html.in @@ -52,7 +52,7 @@ HEIGHT="128" ALT="CUPS">

Neues in CUPS 1.7

-

Benutzerforum

+

Benutzerforum

@@ -72,8 +72,6 @@ HEIGHT="128" ALT="CUPS">

cupsd.conf Referenz

-

Druckertreiber finden

-

CUPS für Entwickler

@@ -92,7 +90,7 @@ HEIGHT="128" ALT="CUPS">

PPD Compiler Treiber Dateireferenz

-

Entwicklerforum

+

Entwicklerforum

diff --git a/doc/es/index.html.in b/doc/es/index.html.in index d62bce48e..e7dc3a502 100644 --- a/doc/es/index.html.in +++ b/doc/es/index.html.in @@ -52,7 +52,7 @@ HEIGHT="128" ALT="CUPS">

Qué hay de nuevo en CUPS 1.6

-

Foro de usuarios

+

Foro de usuarios

@@ -72,8 +72,6 @@ HEIGHT="128" ALT="CUPS">

Referencia de cupsd.conf

-

Encontrar controladores de impresora

-

CUPS para desarrolladores

@@ -92,7 +90,7 @@ HEIGHT="128" ALT="CUPS">

Referencia del archivo de información del compilador de controladores PPD

-

Foro de desarrollo

+

Foro de desarrollo

diff --git a/doc/fr/index.html.in b/doc/fr/index.html.in index 23ca4f9c0..73d5458aa 100644 --- a/doc/fr/index.html.in +++ b/doc/fr/index.html.in @@ -52,7 +52,7 @@ HEIGHT="128" ALT="CUPS">

Quoi de neuf dans CUPS 1.6

-

Forum utilisateur

+

Forum utilisateur

@@ -72,8 +72,6 @@ HEIGHT="128" ALT="CUPS">

Références sur cupsd.conf

-

Trouver des pilotes d'imprimantes

-

CUPS pour les développeurs

@@ -92,7 +90,7 @@ HEIGHT="128" ALT="CUPS">

PPD Compiler Driver Information File Reference

-

Forum développeurs

+

Forum développeurs

diff --git a/doc/index.html.in b/doc/index.html.in index 460c33ba9..763637246 100644 --- a/doc/index.html.in +++ b/doc/index.html.in @@ -52,7 +52,7 @@ HEIGHT="128" ALT="CUPS">

What's New in CUPS 1.7

-

User Forum

+

User Forum

@@ -72,8 +72,6 @@ HEIGHT="128" ALT="CUPS">

cupsd.conf Reference

-

Find Printer Drivers

-

CUPS for Developers

@@ -92,7 +90,7 @@ HEIGHT="128" ALT="CUPS">

PPD Compiler Driver Information File Reference

-

Developer Forum

+

Developer Forum

diff --git a/doc/it/index.html.in b/doc/it/index.html.in index 8f0c1e883..d17bc84ae 100644 --- a/doc/it/index.html.in +++ b/doc/it/index.html.in @@ -52,7 +52,7 @@ HEIGHT="128" ALT="CUPS">

Le novità introdotte da CUPS 1.7

-

Forum dell'utente

+

Forum dell'utente

@@ -72,8 +72,6 @@ HEIGHT="128" ALT="CUPS">

Riferimenti a cupsd.conf

-

Trovare i driver delle stampanti

-

CUPS per gli sviluppatori

@@ -92,7 +90,7 @@ HEIGHT="128" ALT="CUPS">

File di riferimento del compilatore di driver PPD

-

Forum dello sviluppatore

+

Forum dello sviluppatore

diff --git a/doc/ja/index.html.in b/doc/ja/index.html.in index 73219abcf..e2ccad31a 100644 --- a/doc/ja/index.html.in +++ b/doc/ja/index.html.in @@ -52,7 +52,7 @@ HEIGHT="128" ALT="CUPS">

CUPS 1.6 の新機能

-

ユーザーフォーラム

+

ユーザーフォーラム

@@ -72,8 +72,6 @@ HEIGHT="128" ALT="CUPS">

cupsd.conf リファレンス

-

プリンタードライバーの検索

-

開発者向け

@@ -92,7 +90,7 @@ HEIGHT="128" ALT="CUPS">

PPD コンパイラー用ドライバー情報ファイル リファレンス

-

開発者フォーラム

+

開発者フォーラム

diff --git a/doc/ru/index.html.in b/doc/ru/index.html.in index 6ab2e52a9..fa07ae85e 100644 --- a/doc/ru/index.html.in +++ b/doc/ru/index.html.in @@ -50,7 +50,7 @@ HEIGHT="128" ALT="CUPS">

Что нового в CUPS 1.6

-

Форум пользователей

+

Форум пользователей

@@ -70,8 +70,6 @@ HEIGHT="128" ALT="CUPS">

Справочник по cupsd.conf

-

Поиск драйверов принтера

-

CUPS для разработчиков

@@ -90,7 +88,7 @@ HEIGHT="128" ALT="CUPS">

Справочник по компилятору PPD

-

Форум разработчиков

+

Форум разработчиков

diff --git a/packaging/cups.spec b/packaging/cups.spec index eb933e228..c6da18713 100644 --- a/packaging/cups.spec +++ b/packaging/cups.spec @@ -1,5 +1,5 @@ # -# "$Id: cups.spec.in 11897 2014-05-27 15:02:42Z msweet $" +# "$Id: cups.spec.in 11946 2014-06-24 18:01:58Z msweet $" # # RPM "spec" file for CUPS. # @@ -21,6 +21,11 @@ # dnssd - Enable/disable DNS-SD support (default = enable) # libusb1 - Enable/disable LIBUSB 1.0 support (default = enable) # static - Enable/disable static libraries (default = enable) +# +# Note: Older Linux distributions use the name "libusbx-devel" or just +# "libusb-devel" for LIBUSB 1.0. There is absolutely nothing we can +# do to make this spec file build as-is on those distributions, you'll +# need to change the "BuildRequires" line accordingly... %{!?_with_dbus: %{!?_without_dbus: %define _with_dbus --with-dbus}} %{?_with_dbus: %define _dbus --enable-dbus} @@ -40,12 +45,12 @@ Summary: CUPS Name: cups -Version: 1.7.3 +Version: 1.7.4 Release: 1 Epoch: 1 License: GPL Group: System Environment/Daemons -Source: http://www.cups.org/software/1.7.3/cups-1.7.3-source.tar.bz2 +Source: http://www.cups.org/software/1.7.4/cups-1.7.4-source.tar.bz2 Url: http://www.cups.org Packager: Anonymous Vendor: Apple Inc. @@ -283,6 +288,8 @@ rm -rf $RPM_BUILD_ROOT /usr/share/doc/cups/it/* %dir /usr/share/doc/cups/ja /usr/share/doc/cups/ja/* +%dir /usr/share/doc/cups/pt_BR +/usr/share/doc/cups/pt_BR/* %dir /usr/share/doc/cups/ru /usr/share/doc/cups/ru/* @@ -300,6 +307,8 @@ rm -rf $RPM_BUILD_ROOT /usr/share/locale/it/cups_it.po %dir /usr/share/locale/ja /usr/share/locale/ja/cups_ja.po +%dir /usr/share/locale/pt_BR +/usr/share/locale/pt_BR/cups_pt_BR.po %dir /usr/share/locale/ru /usr/share/locale/ru/cups_ru.po @@ -396,5 +405,5 @@ rm -rf $RPM_BUILD_ROOT # -# End of "$Id: cups.spec.in 11897 2014-05-27 15:02:42Z msweet $". +# End of "$Id: cups.spec.in 11946 2014-06-24 18:01:58Z msweet $". # diff --git a/packaging/cups.spec.in b/packaging/cups.spec.in index d298fa55e..da6538a83 100644 --- a/packaging/cups.spec.in +++ b/packaging/cups.spec.in @@ -1,5 +1,5 @@ # -# "$Id: cups.spec.in 11897 2014-05-27 15:02:42Z msweet $" +# "$Id: cups.spec.in 11946 2014-06-24 18:01:58Z msweet $" # # RPM "spec" file for CUPS. # @@ -21,6 +21,11 @@ # dnssd - Enable/disable DNS-SD support (default = enable) # libusb1 - Enable/disable LIBUSB 1.0 support (default = enable) # static - Enable/disable static libraries (default = enable) +# +# Note: Older Linux distributions use the name "libusbx-devel" or just +# "libusb-devel" for LIBUSB 1.0. There is absolutely nothing we can +# do to make this spec file build as-is on those distributions, you'll +# need to change the "BuildRequires" line accordingly... %{!?_with_dbus: %{!?_without_dbus: %define _with_dbus --with-dbus}} %{?_with_dbus: %define _dbus --enable-dbus} @@ -283,6 +288,8 @@ rm -rf $RPM_BUILD_ROOT /usr/share/doc/cups/it/* %dir /usr/share/doc/cups/ja /usr/share/doc/cups/ja/* +%dir /usr/share/doc/cups/pt_BR +/usr/share/doc/cups/pt_BR/* %dir /usr/share/doc/cups/ru /usr/share/doc/cups/ru/* @@ -300,6 +307,8 @@ rm -rf $RPM_BUILD_ROOT /usr/share/locale/it/cups_it.po %dir /usr/share/locale/ja /usr/share/locale/ja/cups_ja.po +%dir /usr/share/locale/pt_BR +/usr/share/locale/pt_BR/cups_pt_BR.po %dir /usr/share/locale/ru /usr/share/locale/ru/cups_ru.po @@ -396,5 +405,5 @@ rm -rf $RPM_BUILD_ROOT # -# End of "$Id: cups.spec.in 11897 2014-05-27 15:02:42Z msweet $". +# End of "$Id: cups.spec.in 11946 2014-06-24 18:01:58Z msweet $". # diff --git a/scheduler/client.c b/scheduler/client.c index e875d35bd..e87f9efcc 100644 --- a/scheduler/client.c +++ b/scheduler/client.c @@ -1,5 +1,5 @@ /* - * "$Id: client.c 11642 2014-02-27 15:57:59Z msweet $" + * "$Id: client.c 12009 2014-07-09 17:02:38Z msweet $" * * Client routines for the CUPS scheduler. * @@ -2143,6 +2143,9 @@ cupsdReadClient(cupsd_client_t *con) /* I - Client to read from */ * Grab any request data from the connection... */ + if (!httpWait(HTTP(con), 0)) + return; + if ((ipp_state = ippRead(&(con->http), con->request)) == IPP_ERROR) { cupsdLogMessage(CUPSD_LOG_ERROR, @@ -2210,7 +2213,8 @@ cupsdReadClient(cupsd_client_t *con) /* I - Client to read from */ { if (!httpWait(HTTP(con), 0)) return; - else if ((bytes = httpRead2(HTTP(con), line, sizeof(line))) < 0) + + if ((bytes = httpRead2(HTTP(con), line, sizeof(line))) < 0) { if (con->http.error && con->http.error != EPIPE) cupsdLogMessage(CUPSD_LOG_DEBUG, @@ -3323,7 +3327,7 @@ get_file(cupsd_client_t *con, /* I - Client connection */ if ((ptr = strchr(filename, '?')) != NULL) *ptr = '\0'; - if ((status = stat(filename, filestats)) != 0) + if ((status = lstat(filename, filestats)) != 0) { /* * Drop the language prefix and try the root directory... @@ -3335,12 +3339,33 @@ get_file(cupsd_client_t *con, /* I - Client connection */ if ((ptr = strchr(filename, '?')) != NULL) *ptr = '\0'; - status = stat(filename, filestats); + status = lstat(filename, filestats); } } /* - * If we're found a directory, get the index.html file instead... + * If we've found a symlink, 404 the sucker to avoid disclosing information. + */ + + if (!status && S_ISLNK(filestats->st_mode)) + { + cupsdLogMessage(CUPSD_LOG_INFO, "[Client %d] Symlinks such as \"%s\" are not allowed.", con->http.fd, filename); + return (NULL); + } + + /* + * Similarly, if the file/directory does not have world read permissions, do + * not allow access... + */ + + if (!status && !(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); + } + + /* + * If we've found a directory, get the index.html file instead... */ if (!status && S_ISDIR(filestats->st_mode)) @@ -4370,5 +4395,5 @@ write_pipe(cupsd_client_t *con) /* I - Client connection */ /* - * End of "$Id: client.c 11642 2014-02-27 15:57:59Z msweet $". + * End of "$Id: client.c 12009 2014-07-09 17:02:38Z msweet $". */ diff --git a/scheduler/conf.c b/scheduler/conf.c index 63f613cee..bef190a04 100644 --- a/scheduler/conf.c +++ b/scheduler/conf.c @@ -1,5 +1,5 @@ /* - * "$Id: conf.c 11488 2013-12-22 05:04:41Z msweet $" + * "$Id: conf.c 11932 2014-06-16 16:13:06Z msweet $" * * Configuration routines for the CUPS scheduler. * @@ -104,7 +104,7 @@ static const cupsd_var_t cupsd_vars[] = { "MaxJobs", &MaxJobs, CUPSD_VARTYPE_INTEGER }, { "MaxJobsPerPrinter", &MaxJobsPerPrinter, CUPSD_VARTYPE_INTEGER }, { "MaxJobsPerUser", &MaxJobsPerUser, CUPSD_VARTYPE_INTEGER }, - { "MaxJobTime", &MaxJobTime, CUPSD_VARTYPE_INTEGER }, + { "MaxJobTime", &MaxJobTime, CUPSD_VARTYPE_TIME }, { "MaxLeaseDuration", &MaxLeaseDuration, CUPSD_VARTYPE_TIME }, { "MaxLogSize", &MaxLogSize, CUPSD_VARTYPE_INTEGER }, { "MaxRequestSize", &MaxRequestSize, CUPSD_VARTYPE_INTEGER }, @@ -4063,5 +4063,5 @@ set_policy_defaults(cupsd_policy_t *pol)/* I - Policy */ /* - * End of "$Id: conf.c 11488 2013-12-22 05:04:41Z msweet $". + * End of "$Id: conf.c 11932 2014-06-16 16:13:06Z msweet $". */ diff --git a/scheduler/dirsvc.c b/scheduler/dirsvc.c index 105b6c72c..20cd61be0 100644 --- a/scheduler/dirsvc.c +++ b/scheduler/dirsvc.c @@ -1,5 +1,5 @@ /* - * "$Id: dirsvc.c 11688 2014-03-05 21:11:32Z msweet $" + * "$Id: dirsvc.c 11906 2014-06-09 18:33:24Z msweet $" * * Directory services routines for the CUPS scheduler. * @@ -237,11 +237,13 @@ cupsdStartBrowsing(void) if (BrowseLocalProtocols & BROWSE_SMB) update_smb(1); +#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI) /* * Register the individual printers */ dnssdRegisterAllPrinters(0); +#endif /* HAVE_DNSSD || HAVE_AVAHI */ } @@ -255,6 +257,7 @@ cupsdStopBrowsing(void) if (!Browsing || !BrowseLocalProtocols) return; +#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI) /* * De-register the individual printers */ @@ -265,7 +268,6 @@ cupsdStopBrowsing(void) * Shut down browsing sockets... */ -#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI) if ((BrowseLocalProtocols & BROWSE_DNSSD) && DNSSDMaster) dnssdStop(); #endif /* HAVE_DNSSD || HAVE_AVAHI */ @@ -1548,7 +1550,7 @@ get_auth_info_required( if (i) *bufptr++ = ','; - strlcpy(bufptr, p->auth_info_required[i], bufsize - (bufptr - buffer)); + strlcpy(bufptr, p->auth_info_required[i], bufsize - (size_t)(bufptr - buffer)); bufptr += strlen(bufptr); } @@ -1814,5 +1816,5 @@ update_smb(int onoff) /* I - 1 = turn on, 0 = turn off */ /* - * End of "$Id: dirsvc.c 11688 2014-03-05 21:11:32Z msweet $". + * End of "$Id: dirsvc.c 11906 2014-06-09 18:33:24Z msweet $". */ diff --git a/templates/ca/printer.tmpl b/templates/ca/printer.tmpl index 2500001a9..7e026cb0d 100644 --- a/templates/ca/printer.tmpl +++ b/templates/ca/printer.tmpl @@ -17,7 +17,7 @@ - +
@@ -31,7 +31,7 @@ - +
diff --git a/templates/cs/printer.tmpl b/templates/cs/printer.tmpl index 3cddce205..7e605c565 100644 --- a/templates/cs/printer.tmpl +++ b/templates/cs/printer.tmpl @@ -17,7 +17,7 @@ - + @@ -31,7 +31,7 @@ - +
diff --git a/templates/de/printer.tmpl b/templates/de/printer.tmpl index 2872ebb68..3b702b119 100644 --- a/templates/de/printer.tmpl +++ b/templates/de/printer.tmpl @@ -17,7 +17,7 @@ - + @@ -31,7 +31,7 @@ - +
diff --git a/templates/es/printer.tmpl b/templates/es/printer.tmpl index f7642ac0c..0ea10492f 100644 --- a/templates/es/printer.tmpl +++ b/templates/es/printer.tmpl @@ -17,7 +17,7 @@ - + @@ -31,7 +31,7 @@ - +
diff --git a/templates/fr/printer.tmpl b/templates/fr/printer.tmpl index b5e89f0df..ee5088369 100644 --- a/templates/fr/printer.tmpl +++ b/templates/fr/printer.tmpl @@ -17,7 +17,7 @@ - + @@ -31,7 +31,7 @@ - +
diff --git a/templates/it/printer.tmpl b/templates/it/printer.tmpl index 7c6cc7ca6..dea4d9cc4 100644 --- a/templates/it/printer.tmpl +++ b/templates/it/printer.tmpl @@ -17,7 +17,7 @@ - + @@ -31,7 +31,7 @@ - +
diff --git a/templates/ja/printer.tmpl b/templates/ja/printer.tmpl index a95b71e41..8d7655052 100644 --- a/templates/ja/printer.tmpl +++ b/templates/ja/printer.tmpl @@ -17,7 +17,7 @@ - + @@ -31,7 +31,7 @@ - +
diff --git a/templates/printer.tmpl b/templates/printer.tmpl index 78fc08bea..6e814b03d 100644 --- a/templates/printer.tmpl +++ b/templates/printer.tmpl @@ -17,7 +17,7 @@ - + @@ -31,7 +31,7 @@ - +
diff --git a/templates/pt_BR/printer.tmpl b/templates/pt_BR/printer.tmpl index 0bd7f08c4..b5ceb234d 100644 --- a/templates/pt_BR/printer.tmpl +++ b/templates/pt_BR/printer.tmpl @@ -17,7 +17,7 @@ - + @@ -31,7 +31,7 @@ - +
diff --git a/templates/ru/printer.tmpl b/templates/ru/printer.tmpl index 90bc7b3d9..289a2c68e 100644 --- a/templates/ru/printer.tmpl +++ b/templates/ru/printer.tmpl @@ -17,7 +17,7 @@ - + @@ -31,7 +31,7 @@ - +
-- 2.39.5