Skip to content

Commit

Permalink
Import CUPS v1.7.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Sweet committed Mar 15, 2016
1 parent a51f28e commit 215ef63
Show file tree
Hide file tree
Showing 37 changed files with 205 additions and 175 deletions.
33 changes: 28 additions & 5 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -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)
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion INSTALL.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion README.txt
Original file line number Diff line number Diff line change
@@ -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...
Expand Down
43 changes: 15 additions & 28 deletions backend/dnssd.c
Original file line number Diff line number Diff line change
@@ -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:https://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:https://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.
*/

/*
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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 $".
*/
8 changes: 4 additions & 4 deletions backend/ipp.c
Original file line number Diff line number Diff line change
@@ -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.
*
Expand Down Expand Up @@ -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"))
{
Expand Down Expand Up @@ -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 $".
*/
10 changes: 5 additions & 5 deletions backend/lpd.c
Original file line number Diff line number Diff line change
@@ -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.
*
Expand Down Expand Up @@ -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"))
{
Expand Down Expand Up @@ -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);

/*
Expand Down Expand Up @@ -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 $".
*/
16 changes: 8 additions & 8 deletions backend/network.c
Original file line number Diff line number Diff line change
@@ -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.
*
Expand Down Expand Up @@ -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)
{
Expand Down Expand Up @@ -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;
Expand All @@ -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 $".
*/
3 changes: 3 additions & 0 deletions backend/org.cups.usb-quirks
Original file line number Diff line number Diff line change
Expand Up @@ -212,3 +212,6 @@

# Lexmark E238 (<rdar:https://problem/14493054>)
0x043d 0x00d7 no-reattach

# Lexmark E238 (STR #4448)
0x043d 0x009a no-reattach
8 changes: 4 additions & 4 deletions backend/socket.c
Original file line number Diff line number Diff line change
@@ -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.
*
Expand Down Expand Up @@ -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"))
{
Expand Down Expand Up @@ -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 $".
*/
7 changes: 5 additions & 2 deletions config-scripts/cups-common.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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'`"
Expand Down Expand Up @@ -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)
Expand All @@ -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
Expand Down
7 changes: 5 additions & 2 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -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'`"
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
12 changes: 4 additions & 8 deletions cups/cups.h
Original file line number Diff line number Diff line change
@@ -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.
*
Expand Down Expand Up @@ -30,10 +30,6 @@
typedef off_t ssize_t; /* @private@ */
# endif /* WIN32 && !__CUPS_SSIZE_T_DEFINED */

# ifdef __BLOCKS__
# include <dispatch/dispatch.h>
# endif /* __BLOCKS__ */

# include "file.h"
# include "ipp.h"
# include "language.h"
Expand All @@ -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
Expand Down Expand Up @@ -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 $".
*/

0 comments on commit 215ef63

Please sign in to comment.