Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/.gitignore b/.gitignore
- index dd9be570a..a5e32e600 100644
- --- a/.gitignore
- +++ b/.gitignore
- @@ -65,6 +65,7 @@ cups/testppd
- cups/testpwg
- cups/testraster
- cups/testsnmp
- +cups/testthreads
- cups/tlscheck
- desktop/cups.desktop
- doc/index.html
- @@ -79,14 +80,6 @@ filter/rastertopwg
- locale/checkpo
- locale/po2strings
- locale/strings2po
- -man/client.conf.man
- -man/cups-files.conf.man
- -man/cups-lpd.man
- -man/cups-snmp.man
- -man/cupsaddsmb.man
- -man/cupsd.conf.man
- -man/cupsd.man
- -man/lpoptions.man
- man/mantohtml
- monitor/bcp
- monitor/tbcp
- diff --git a/.lgtm.yml b/.lgtm.yml
- new file mode 100644
- index 000000000..626551724
- --- /dev/null
- +++ b/.lgtm.yml
- @@ -0,0 +1,4 @@
- +queries:
- + - exclude: cpp/integer-multiplication-cast-to-long
- + - exclude: cpp/missing-header-guard
- + - exclude: cpp/short-global-name
- diff --git a/CHANGES.md b/CHANGES.md
- index ce57fe2fc..2afa7686a 100644
- --- a/CHANGES.md
- +++ b/CHANGES.md
- @@ -1,7 +1,43 @@
- -CHANGES - 2.3.0 - 2019-08-23
- +CHANGES - 2.3.1 - 2019-12-04
- ============================
- +Changes in CUPS v2.3.1
- +----------------------
- +
- +- Documentation updates (Issue #5661, #5674, #5682)
- +- Fixed a crash bug in the web interface (Issue #5621)
- +- The PPD cache code now looks up page sizes using their dimensions
- + (Issue #5633)
- +- PPD files containing "custom" option keywords did not work (Issue #5639)
- +- Added a workaround for the scheduler's systemd support (Issue #5640)
- +- On Windows, TLS certificates generated on February 29 would likely fail
- + (Issue #5643)
- +- Added a DigestOptions directive for the `client.conf` file to control whether
- + MD5-based Digest authentication is allowed (Issue #5647)
- +- Fixed a bug in the handling of printer resource files (Issue #5652)
- +- The libusb-based USB backend now reports an error when the distribution
- + permissions are wrong (Issue #5658)
- +- Added paint can labels to Dymo driver (Issue #5662)
- +- The `ippeveprinter` program now supports authentication (Issue #5665)
- +- The `ippeveprinter` program now advertises DNS-SD services on the correct
- + interfaces, and provides a way to turn them off (Issue #5666)
- +- The `--with-dbusdir` option was ignored by the configure script (Issue #5671)
- +- Sandboxed applications were not able to get the default printer (Issue #5676)
- +- Log file access controls were not preserved by `cupsctl` (Issue #5677)
- +- Default printers set with `lpoptions` did not work in all cases (Issue #5681,
- + Issue #5683, Issue #5684)
- +- Fixed an error in the jobs web interface template (Issue #5694)
- +- Fixed an off-by-one error in `ippEnumString` (Issue #5695)
- +- The IPP backend did not detect all cases where a job should be retried using
- +- Fixed a few issues with the Apple Raster support (rdar://55301114)
- + a raster format (rdar://56021091)
- +- Fixed spelling of "fold-accordion".
- +- Fixed the default common name for TLS certificates used by `ippeveprinter`.
- +- Fixed the option names used for IPP Everywhere finishing options.
- +- Added support for the second roll of the DYMO Twin/DUO label printers.
- +
- +
- Changes in CUPS v2.3.0
- ----------------------
- diff --git a/README.md b/README.md
- index 3d3ddb9a4..ee1125b34 100644
- --- a/README.md
- +++ b/README.md
- @@ -1,4 +1,4 @@
- -README - CUPS v2.3.0 - 2019-08-21
- +README - CUPS v2.3.1 - 2019-10-07
- =================================
- INTRODUCTION
- @@ -65,11 +65,11 @@ in your browser to access the printer administration tools:
- *Do not* use the hostname for your machine - it will not work with the default
- CUPS configuration. To enable administration access on other addresses, check
- -the `Allow Remote Administration` box and click on the `Change Settings button.
- +the `Allow Remote Administration` box and click on the `Change Settings` button.
- You will be asked for the administration password (root or any other user in the
- -sys/system/root/admin/lpadmin group on your system) when performing any
- -administrative function.
- +"sys", "system", "root", "admin", or "lpadmin" group on your system) when
- +performing any administrative function.
- SETTING UP PRINTER QUEUES FROM THE COMMAND-LINE
- @@ -79,7 +79,7 @@ CUPS currently uses PPD (PostScript Printer Description) files that describe
- printer capabilities and driver programs needed for each printer. The
- `everywhere` PPD is used for nearly all modern networks printers sold since
- about 2009. For example, the following command creates a print queue for a
- -printer at address 11.22.33.44:
- +printer at address "11.22.33.44":
- lpadmin -p printername -E -v ipp://11.22.33.44/ipp/print -m everywhere
- diff --git a/backend/ipp.c b/backend/ipp.c
- index 8226acc7b..60a4ef20f 100644
- --- a/backend/ipp.c
- +++ b/backend/ipp.c
- @@ -1450,6 +1450,8 @@ main(int argc, /* I - Number of command-line args */
- monitor.printer_state = IPP_PSTATE_IDLE;
- monitor.retryable = argc == 6 && document_format && strcmp(document_format, "image/pwg-raster") && strcmp(document_format, "image/urf");
- + fprintf(stderr, "DEBUG: retryable=%d\n", monitor.retryable);
- +
- if (create_job)
- {
- monitor.job_name = argv[3];
- @@ -1867,21 +1869,29 @@ main(int argc, /* I - Number of command-line args */
- response = cupsGetResponse(http, resource);
- ippDelete(request);
- - fprintf(stderr, "DEBUG: Send-Document: %s (%s)\n",
- - ippErrorString(cupsLastError()), cupsLastErrorString());
- + fprintf(stderr, "DEBUG: Send-Document: %s (%s)\n", ippErrorString(cupsLastError()), cupsLastErrorString());
- debug_attributes(response);
- - ippDelete(response);
- if (cupsLastError() > IPP_STATUS_OK_CONFLICTING && !job_canceled)
- {
- + ipp_attribute_t *reasons = ippFindAttribute(response, "job-state-reasons", IPP_TAG_KEYWORD);
- + /* job-state-reasons values */
- +
- ipp_status = cupsLastError();
- - _cupsLangPrintFilter(stderr, "ERROR",
- - _("Unable to add document to print job."));
- + if (ippContainsString(reasons, "document-format-error"))
- + ipp_status = IPP_STATUS_ERROR_DOCUMENT_FORMAT_ERROR;
- + else if (ippContainsString(reasons, "document-unprintable"))
- + ipp_status = IPP_STATUS_ERROR_DOCUMENT_UNPRINTABLE;
- +
- + ippDelete(response);
- + _cupsLangPrintFilter(stderr, "ERROR", _("Unable to add document to print job."));
- break;
- }
- else
- {
- + ippDelete(response);
- +
- password_tries = 0;
- if (num_files == 0 || fd < 0)
- @@ -1898,7 +1908,7 @@ main(int argc, /* I - Number of command-line args */
- fprintf(stderr, "PAGE: 1 %d\n", copies_sup ? atoi(argv[4]) : 1);
- copies_remaining --;
- }
- - else if ((ipp_status == IPP_STATUS_ERROR_DOCUMENT_FORMAT_NOT_SUPPORTED || ipp_status == IPP_STATUS_ERROR_DOCUMENT_UNPRINTABLE) &&
- + else if ((ipp_status == IPP_STATUS_ERROR_DOCUMENT_FORMAT_NOT_SUPPORTED || ipp_status == IPP_STATUS_ERROR_DOCUMENT_FORMAT_ERROR || ipp_status == IPP_STATUS_ERROR_DOCUMENT_UNPRINTABLE) &&
- argc == 6 &&
- document_format && strcmp(document_format, "image/pwg-raster") && strcmp(document_format, "image/urf"))
- {
- @@ -2114,11 +2124,10 @@ main(int argc, /* I - Number of command-line args */
- job_sheets->values[0].integer);
- /*
- - * Stop polling if the job is finished or pending-held for 30 seconds...
- + * Stop polling if the job is finished or pending-held...
- */
- - if (job_state->values[0].integer > IPP_JSTATE_STOPPED ||
- - (job_state->values[0].integer == IPP_JSTATE_HELD && time(NULL) > waittime))
- + if (job_state->values[0].integer > IPP_JSTATE_STOPPED || job_state->values[0].integer == IPP_JSTATE_HELD)
- {
- ippDelete(response);
- break;
- diff --git a/backend/lpd.c b/backend/lpd.c
- index 45cdde8e7..efc7a9acc 100644
- --- a/backend/lpd.c
- +++ b/backend/lpd.c
- @@ -71,7 +71,11 @@ static int abort_job = 0; /* Non-zero if we get SIGTERM */
- */
- static int cups_rresvport(int *port, int family);
- -static int lpd_command(int lpd_fd, char *format, ...);
- +static int lpd_command(int lpd_fd, char *format, ...)
- +# ifdef __GNUC__
- +__attribute__ ((__format__ (__printf__, 2, 3)))
- +# endif /* __GNUC__ */
- +;
- static int lpd_queue(const char *hostname, http_addrlist_t *addrlist, const char *printer, int print_fd, int snmp_fd, int mode, const char *user, const char *title, int copies, int banner, int format, int order, int reserve, int manual_copies, int timeout, int contimeout, const char *orighost) _CUPS_NONNULL((1,2,3,7,8,17));
- static ssize_t lpd_write(int lpd_fd, char *buffer, size_t length);
- static void sigterm_handler(int sig);
- @@ -1042,7 +1046,7 @@ lpd_queue(const char *hostname, /* I - Host to connect to */
- * Send the control file...
- */
- - if (lpd_command(fd, "\002%d cfA%03.3d%.15s\n", strlen(control),
- + if (lpd_command(fd, "\002%d cfA%03.3d%.15s\n", (int)strlen(control),
- (int)getpid() % 1000, localhost))
- {
- close(fd);
- @@ -1175,7 +1179,7 @@ lpd_queue(const char *hostname, /* I - Host to connect to */
- * Send control file...
- */
- - if (lpd_command(fd, "\002%d cfA%03.3d%.15s\n", strlen(control),
- + if (lpd_command(fd, "\002%d cfA%03.3d%.15s\n", (int)strlen(control),
- (int)getpid() % 1000, localhost))
- {
- close(fd);
- diff --git a/backend/usb-libusb.c b/backend/usb-libusb.c
- index 87606ac13..393fe65ee 100644
- --- a/backend/usb-libusb.c
- +++ b/backend/usb-libusb.c
- @@ -826,8 +826,7 @@ find_device(usb_cb_t cb, /* I - Callback function */
- err = libusb_init(NULL);
- if (err)
- {
- - fprintf(stderr, "DEBUG: Unable to initialize USB access via libusb, "
- - "libusb error %i\n", (int)err);
- + fprintf(stderr, "ERROR: Unable to initialize USB access via libusb, libusb error %i (%s)\n", (int)err, libusb_strerror((int)err));
- return (NULL);
- }
- @@ -879,7 +878,7 @@ find_device(usb_cb_t cb, /* I - Callback function */
- protocol = 0;
- for (altset = 0, altptr = ifaceptr->altsetting;
- - altset < ifaceptr->num_altsetting;
- + altset < ifaceptr->num_altsetting; // lgtm [cpp/comparison-with-wider-type]
- altset ++, altptr ++)
- {
- /*
- diff --git a/berkeley/lpr.c b/berkeley/lpr.c
- index a9aed3ca4..627fa6a4e 100644
- --- a/berkeley/lpr.c
- +++ b/berkeley/lpr.c
- @@ -1,7 +1,7 @@
- /*
- * "lpr" command for CUPS.
- *
- - * Copyright © 2007-2018 by Apple Inc.
- + * Copyright © 2007-2019 by Apple Inc.
- * Copyright © 1997-2007 by Easy Software Products.
- *
- * Licensed under Apache License v2.0. See the file "LICENSE" for more
- @@ -445,9 +445,9 @@ usage(void)
- " Specify 2-sided portrait printing"));
- _cupsLangPuts(stdout, _("-o sides=two-sided-short-edge\n"
- " Specify 2-sided landscape printing"));
- + _cupsLangPuts(stdout, _("-P destination Specify the destination"));
- _cupsLangPuts(stdout, _("-q Specify the job should be held for printing"));
- _cupsLangPuts(stdout, _("-r Remove the file(s) after submission"));
- - _cupsLangPuts(stdout, _("-P destination Specify the destination"));
- _cupsLangPuts(stdout, _("-T title Specify the job title"));
- _cupsLangPuts(stdout, _("-U username Specify the username to use for authentication"));
- diff --git a/cgi-bin/var.c b/cgi-bin/var.c
- index 306375bd6..349a21845 100644
- --- a/cgi-bin/var.c
- +++ b/cgi-bin/var.c
- @@ -170,6 +170,9 @@ cgiGetArray(const char *name, /* I - Name of array variable */
- if (element < 0 || element >= var->nvalues)
- return (NULL);
- + if (var->values[element] == NULL)
- + return (NULL);
- +
- return (strdup(var->values[element]));
- }
- @@ -980,7 +983,7 @@ cgi_initialize_post(void)
- */
- length = (size_t)strtol(content_length, NULL, 10);
- - data = malloc(length + 1);
- + data = malloc(length + 1); // lgtm [cpp/uncontrolled-allocation-size]
- if (data == NULL)
- return (0);
- diff --git a/config-scripts/cups-common.m4 b/config-scripts/cups-common.m4
- index 87264d850..a460a73a4 100644
- --- a/config-scripts/cups-common.m4
- +++ b/config-scripts/cups-common.m4
- @@ -293,14 +293,14 @@ fi
- LIBS="$SAVELIBS"
- dnl Check for DBUS support
- -AC_ARG_ENABLE(dbus, [ --disable-dbus build without DBUS support])
- -AC_ARG_WITH(dbusdir, [ --with-dbusdir set DBUS configuration directory ],
- - DBUSDIR="$withval")
- -
- DBUSDIR=""
- DBUS_NOTIFIER=""
- DBUS_NOTIFIERLIBS=""
- +AC_ARG_ENABLE(dbus, [ --disable-dbus build without DBUS support])
- +AC_ARG_WITH(dbusdir, [ --with-dbusdir set DBUS configuration directory ],
- + DBUSDIR="$withval")
- +
- if test "x$enable_dbus" != xno -a "x$PKGCONFIG" != x -a "x$host_os_name" != xdarwin; then
- AC_MSG_CHECKING(for DBUS)
- if $PKGCONFIG --exists dbus-1; then
- @@ -317,7 +317,7 @@ if test "x$enable_dbus" != xno -a "x$PKGCONFIG" != x -a "x$host_os_name" != xdar
- AC_CHECK_FUNC(dbus_threads_init,
- AC_DEFINE(HAVE_DBUS_THREADS_INIT))
- LIBS="$SAVELIBS"
- - if test -d /etc/dbus-1; then
- + if test -d /etc/dbus-1 -a "x$DBUSDIR" = x; then
- DBUSDIR="/etc/dbus-1"
- fi
- else
- diff --git a/config-scripts/cups-ssl.m4 b/config-scripts/cups-ssl.m4
- index 4ce926f51..c1648b1c1 100644
- --- a/config-scripts/cups-ssl.m4
- +++ b/config-scripts/cups-ssl.m4
- @@ -58,7 +58,6 @@ if test x$enable_ssl != xno; then
- SAVELIBS="$LIBS"
- LIBS="$LIBS $SSLLIBS"
- - AC_CHECK_FUNC(gnutls_fips140_set_mode, AC_DEFINE(HAVE_GNUTLS_FIPS140_SET_MODE))
- AC_CHECK_FUNC(gnutls_transport_set_pull_timeout_function, AC_DEFINE(HAVE_GNUTLS_TRANSPORT_SET_PULL_TIMEOUT_FUNCTION))
- AC_CHECK_FUNC(gnutls_priority_set_direct, AC_DEFINE(HAVE_GNUTLS_PRIORITY_SET_DIRECT))
- LIBS="$SAVELIBS"
- diff --git a/config.h.in b/config.h.in
- index 5e93a9dac..1c2d7a826 100644
- --- a/config.h.in
- +++ b/config.h.in
- @@ -301,13 +301,6 @@
- #undef HAVE_SSL
- -/*
- - * Do we have the gnutls_fips140_set_mode function?
- - */
- -
- -#undef HAVE_GNUTLS_FIPS140_SET_MODE
- -
- -
- /*
- * Do we have the gnutls_transport_set_pull_timeout_function function?
- */
- diff --git a/configure b/configure
- index d3df145bc..004ecee99 100755
- --- a/configure
- +++ b/configure
- @@ -1,6 +1,6 @@
- #! /bin/sh
- # Guess values for system-dependent variables and create Makefiles.
- -# Generated by GNU Autoconf 2.69 for CUPS 2.3.0.
- +# Generated by GNU Autoconf 2.69 for CUPS 2.3.1.
- #
- # Report bugs to <https://github.com/apple/cups/issues>.
- #
- @@ -580,8 +580,8 @@ MAKEFLAGS=
- # Identity of this package.
- PACKAGE_NAME='CUPS'
- PACKAGE_TARNAME='cups'
- -PACKAGE_VERSION='2.3.0'
- -PACKAGE_STRING='CUPS 2.3.0'
- +PACKAGE_VERSION='2.3.1'
- +PACKAGE_STRING='CUPS 2.3.1'
- PACKAGE_BUGREPORT='https://github.com/apple/cups/issues'
- PACKAGE_URL='https://www.cups.org/'
- @@ -1467,7 +1467,7 @@ if test "$ac_init_help" = "long"; then
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat <<_ACEOF
- -\`configure' configures CUPS 2.3.0 to adapt to many kinds of systems.
- +\`configure' configures CUPS 2.3.1 to adapt to many kinds of systems.
- Usage: $0 [OPTION]... [VAR=VALUE]...
- @@ -1532,7 +1532,7 @@ fi
- if test -n "$ac_init_help"; then
- case $ac_init_help in
- - short | recursive ) echo "Configuration of CUPS 2.3.0:";;
- + short | recursive ) echo "Configuration of CUPS 2.3.1:";;
- esac
- cat <<\_ACEOF
- @@ -1713,7 +1713,7 @@ fi
- test -n "$ac_init_help" && exit $ac_status
- if $ac_init_version; then
- cat <<\_ACEOF
- -CUPS configure 2.3.0
- +CUPS configure 2.3.1
- generated by GNU Autoconf 2.69
- Copyright (C) 2012 Free Software Foundation, Inc.
- @@ -2177,7 +2177,7 @@ cat >config.log <<_ACEOF
- This file contains any messages produced by compilers while
- running configure, to aid debugging if configure makes a mistake.
- -It was created by CUPS $as_me 2.3.0, which was
- +It was created by CUPS $as_me 2.3.1, which was
- generated by GNU Autoconf 2.69. Invocation command line was
- $ $0 $@
- @@ -2694,7 +2694,7 @@ done
- ac_config_headers="$ac_config_headers config.h"
- -CUPS_VERSION="2.3.0"
- +CUPS_VERSION="2.3.1"
- CUPS_REVISION=""
- CUPS_BUILD="cups-$CUPS_VERSION"
- @@ -5775,6 +5775,10 @@ fi
- fi
- LIBS="$SAVELIBS"
- +DBUSDIR=""
- +DBUS_NOTIFIER=""
- +DBUS_NOTIFIERLIBS=""
- +
- # Check whether --enable-dbus was given.
- if test "${enable_dbus+set}" = set; then :
- enableval=$enable_dbus;
- @@ -5787,10 +5791,6 @@ if test "${with_dbusdir+set}" = set; then :
- fi
- -DBUSDIR=""
- -DBUS_NOTIFIER=""
- -DBUS_NOTIFIERLIBS=""
- -
- if test "x$enable_dbus" != xno -a "x$PKGCONFIG" != x -a "x$host_os_name" != xdarwin; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DBUS" >&5
- $as_echo_n "checking for DBUS... " >&6; }
- @@ -5818,7 +5818,7 @@ if test "x$ac_cv_func_dbus_threads_init" = xyes; then :
- fi
- LIBS="$SAVELIBS"
- - if test -d /etc/dbus-1; then
- + if test -d /etc/dbus-1 -a "x$DBUSDIR" = x; then
- DBUSDIR="/etc/dbus-1"
- fi
- else
- @@ -8308,12 +8308,6 @@ fi
- SAVELIBS="$LIBS"
- LIBS="$LIBS $SSLLIBS"
- - ac_fn_c_check_func "$LINENO" "gnutls_fips140_set_mode" "ac_cv_func_gnutls_fips140_set_mode"
- -if test "x$ac_cv_func_gnutls_fips140_set_mode" = xyes; then :
- - $as_echo "#define HAVE_GNUTLS_FIPS140_SET_MODE 1" >>confdefs.h
- -
- -fi
- -
- ac_fn_c_check_func "$LINENO" "gnutls_transport_set_pull_timeout_function" "ac_cv_func_gnutls_transport_set_pull_timeout_function"
- if test "x$ac_cv_func_gnutls_transport_set_pull_timeout_function" = xyes; then :
- $as_echo "#define HAVE_GNUTLS_TRANSPORT_SET_PULL_TIMEOUT_FUNCTION 1" >>confdefs.h
- @@ -10393,7 +10387,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
- # report actual input values of CONFIG_FILES etc. instead of their
- # values after options handling.
- ac_log="
- -This file was extended by CUPS $as_me 2.3.0, which was
- +This file was extended by CUPS $as_me 2.3.1, which was
- generated by GNU Autoconf 2.69. Invocation command line was
- CONFIG_FILES = $CONFIG_FILES
- @@ -10456,7 +10450,7 @@ _ACEOF
- cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
- ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
- ac_cs_version="\\
- -CUPS config.status 2.3.0
- +CUPS config.status 2.3.1
- configured by $0, generated by GNU Autoconf 2.69,
- with options \\"\$ac_cs_config\\"
- diff --git a/configure.ac b/configure.ac
- index 7eca9e37f..23abe870e 100644
- --- a/configure.ac
- +++ b/configure.ac
- @@ -12,7 +12,7 @@ dnl We need at least autoconf 2.60...
- AC_PREREQ(2.60)
- dnl Package name and version...
- -AC_INIT([CUPS], [2.3.0], [https://github.com/apple/cups/issues], [cups], [https://www.cups.org/])
- +AC_INIT([CUPS], [2.3.1], [https://github.com/apple/cups/issues], [cups], [https://www.cups.org/])
- sinclude(config-scripts/cups-opsys.m4)
- sinclude(config-scripts/cups-common.m4)
- diff --git a/cups/Dependencies b/cups/Dependencies
- index b30c76994..1cb291bd9 100644
- --- a/cups/Dependencies
- +++ b/cups/Dependencies
- @@ -188,7 +188,7 @@ tls.o: tls.c cups-private.h string-private.h ../config.h \
- ipp-private.h ../cups/cups.h file.h ipp.h http.h array.h language.h \
- pwg.h http-private.h ../cups/language.h ../cups/http.h \
- language-private.h ../cups/transcode.h pwg-private.h thread-private.h \
- - debug-internal.h debug-private.h tls-darwin.c
- + debug-internal.h debug-private.h tls-darwin.c tls-darwin.h
- transcode.o: transcode.c cups-private.h string-private.h ../config.h \
- ../cups/versioning.h array-private.h ../cups/array.h versioning.h \
- ipp-private.h ../cups/cups.h file.h ipp.h http.h array.h language.h \
- @@ -214,7 +214,7 @@ adminutil.o: adminutil.c cups-private.h string-private.h ../config.h \
- language-private.h ../cups/transcode.h pwg-private.h thread-private.h \
- debug-internal.h debug-private.h ppd.h cups.h raster.h adminutil.h
- backchannel.o: backchannel.c cups.h file.h versioning.h ipp.h http.h \
- - array.h language.h pwg.h
- + array.h language.h pwg.h sidechannel.h
- backend.o: backend.c cups-private.h string-private.h ../config.h \
- ../cups/versioning.h array-private.h ../cups/array.h versioning.h \
- ipp-private.h ../cups/cups.h file.h ipp.h http.h array.h language.h \
- @@ -401,6 +401,9 @@ testsnmp.o: testsnmp.c cups-private.h string-private.h ../config.h \
- pwg.h http-private.h ../cups/language.h ../cups/http.h \
- language-private.h ../cups/transcode.h pwg-private.h thread-private.h \
- snmp-private.h
- +testthreads.o: testthreads.c ../cups/cups.h file.h versioning.h ipp.h \
- + http.h array.h language.h pwg.h ../cups/thread-private.h ../config.h \
- + ../cups/versioning.h
- tlscheck.o: tlscheck.c cups-private.h string-private.h ../config.h \
- ../cups/versioning.h array-private.h ../cups/array.h versioning.h \
- ipp-private.h ../cups/cups.h file.h ipp.h http.h array.h language.h \
- diff --git a/cups/Makefile b/cups/Makefile
- index 87d85babc..4e2aa6d37 100644
- --- a/cups/Makefile
- +++ b/cups/Makefile
- @@ -106,6 +106,7 @@ TESTOBJS = \
- testpwg.o \
- testraster.o \
- testsnmp.o \
- + testthreads.o \
- tlscheck.o
- OBJS = \
- $(LIBOBJS) \
- @@ -191,6 +192,7 @@ UNITTARGETS = \
- testpwg \
- testraster \
- testsnmp \
- + testthreads \
- tlscheck
- TARGETS = \
- @@ -700,6 +702,16 @@ testsnmp: testsnmp.o $(LIBCUPSSTATIC)
- $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@
- +#
- +# testthreads (dependency on static CUPS library is intentional)
- +#
- +
- +testthreads: testthreads.o $(LIBCUPSSTATIC)
- + echo Linking $@...
- + $(LD_CC) $(ALL_LDFLAGS) -o $@ testthreads.o $(LINKCUPSSTATIC)
- + $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@
- +
- +
- #
- # tlscheck (dependency on static CUPS library is intentional)
- #
- diff --git a/cups/adminutil.c b/cups/adminutil.c
- index 7ff5bf2bc..3118968c6 100644
- --- a/cups/adminutil.c
- +++ b/cups/adminutil.c
- @@ -1,7 +1,7 @@
- /*
- * Administration utility API definitions for CUPS.
- *
- - * Copyright © 2007-2018 by Apple Inc.
- + * Copyright © 2007-2019 by Apple Inc.
- * Copyright © 2001-2007 by Easy Software Products.
- *
- * Licensed under Apache License v2.0. See the file "LICENSE" for more
- @@ -738,13 +738,9 @@ cupsAdminSetServerSettings(
- {
- if (!wrote_browsing)
- {
- - int new_share_printers = (share_printers > 0 ||
- - (share_printers == -1 &&
- - old_share_printers > 0));
- -
- wrote_browsing = 1;
- - if (new_share_printers)
- + if (share_printers)
- {
- const char *localp = cupsGetOption("BrowseLocalProtocols",
- num_settings, settings);
- @@ -989,7 +985,7 @@ cupsAdminSetServerSettings(
- in_cancel_job = 0;
- }
- - else if ((((in_admin_location || in_conf_location || in_root_location) &&
- + else if ((((in_admin_location || in_conf_location || in_root_location || in_log_location) &&
- (remote_admin >= 0 || remote_any >= 0)) ||
- (in_root_location && share_printers >= 0)) &&
- (!_cups_strcasecmp(line, "Allow") || !_cups_strcasecmp(line, "Deny") ||
- diff --git a/cups/auth.c b/cups/auth.c
- index 634ed1fba..db45bbba6 100644
- --- a/cups/auth.c
- +++ b/cups/auth.c
- @@ -289,7 +289,7 @@ cupsDoAuthentication(
- if (_httpSetDigestAuthString(http, nonce, method, resource))
- {
- - DEBUG_puts("2cupsDoAuthentication: Using Basic.");
- + DEBUG_puts("2cupsDoAuthentication: Using Digest.");
- break;
- }
- }
- diff --git a/cups/cups-private.h b/cups/cups-private.h
- index f1b052a30..97734a539 100644
- --- a/cups/cups-private.h
- +++ b/cups/cups-private.h
- @@ -57,6 +57,12 @@ typedef struct _cups_raster_error_s /**** Error buffer structure ****/
- *end; /* End of buffer */
- } _cups_raster_error_t;
- +typedef enum _cups_digestoptions_e /**** Digest Options values */
- +{
- + _CUPS_DIGESTOPTIONS_NONE, /* No Digest authentication options */
- + _CUPS_DIGESTOPTIONS_DENYMD5 /* Do not use MD5 hashes for digest */
- +} _cups_digestoptions_t;
- +
- typedef enum _cups_uatokens_e /**** UserAgentTokens values */
- {
- _CUPS_UATOKENS_NONE, /* Do not send User-Agent */
- @@ -76,6 +82,7 @@ typedef struct _cups_globals_s /**** CUPS global state data ****/
- *cups_serverroot,
- /* CUPS_SERVERROOT environment var */
- *cups_statedir, /* CUPS_STATEDIR environment var */
- + *home, /* HOME environment var */
- *localedir; /* LOCALDIR environment var */
- /* adminutil.c */
- @@ -157,6 +164,7 @@ typedef struct _cups_globals_s /**** CUPS global state data ****/
- char tempfile[1024]; /* cupsTempFd/File buffer */
- /* usersys.c */
- + _cups_digestoptions_t digestoptions; /* DigestOptions setting */
- _cups_uatokens_t uatokens; /* UserAgentTokens setting */
- http_encryption_t encryption; /* Encryption setting */
- char user[65], /* User name */
- diff --git a/cups/cups.h b/cups/cups.h
- index e64fdcc96..77a66c17b 100644
- --- a/cups/cups.h
- +++ b/cups/cups.h
- @@ -42,10 +42,10 @@ extern "C" {
- * Constants...
- */
- -# define CUPS_VERSION 2.0300
- +# define CUPS_VERSION 2.0301
- # define CUPS_VERSION_MAJOR 2
- # define CUPS_VERSION_MINOR 3
- -# define CUPS_VERSION_PATCH 0
- +# define CUPS_VERSION_PATCH 1
- # define CUPS_BC_FD 3
- /* Back-channel file descriptor for
- diff --git a/cups/cupspm.md b/cups/cupspm.md
- index 260b261f5..d4d6d7c55 100644
- --- a/cups/cupspm.md
- +++ b/cups/cupspm.md
- @@ -2,7 +2,7 @@
- title: CUPS Programming Manual
- author: Michael R Sweet
- copyright: Copyright © 2007-2019 by Apple Inc. All Rights Reserved.
- -version: 2.3.0
- +version: 2.3.1
- ...
- > Please [file issues on Github](https://github.com/apple/cups/issues) to
- @@ -108,7 +108,7 @@ to the file. Build and run (CMD+R) to see the list of destinations.
- ### Compiling with GCC
- -From the command-line, create a file called `sample.c` using your favorite
- +From the command-line, create a file called `simple.c` using your favorite
- editor, copy the example to this file, and save. Then run the following command
- to compile it with GCC and run it:
- diff --git a/cups/dest.c b/cups/dest.c
- index 17d96fe4a..cde987a09 100644
- --- a/cups/dest.c
- +++ b/cups/dest.c
- @@ -1748,7 +1748,6 @@ cupsGetNamedDest(http_t *http, /* I - Connection to server or @code CUPS_HTT
- cups_dest_t *dest; /* Destination */
- char filename[1024], /* Path to lpoptions */
- defname[256]; /* Default printer name */
- - const char *home = getenv("HOME"); /* Home directory */
- int set_as_default = 0; /* Set returned destination as default */
- ipp_op_t op = IPP_OP_GET_PRINTER_ATTRIBUTES;
- /* IPP operation to get server ops */
- @@ -1780,13 +1779,13 @@ cupsGetNamedDest(http_t *http, /* I - Connection to server or @code CUPS_HTT
- else
- instance = NULL;
- }
- - else if (home)
- + else if (cg->home)
- {
- /*
- * No default in the environment, try the user's lpoptions files...
- */
- - snprintf(filename, sizeof(filename), "%s/.cups/lpoptions", home);
- + snprintf(filename, sizeof(filename), "%s/.cups/lpoptions", cg->home);
- dest_name = cups_get_default(filename, defname, sizeof(defname), &instance);
- @@ -1892,9 +1891,9 @@ cupsGetNamedDest(http_t *http, /* I - Connection to server or @code CUPS_HTT
- snprintf(filename, sizeof(filename), "%s/lpoptions", cg->cups_serverroot);
- cups_get_dests(filename, dest_name, instance, 0, 1, 1, &dest);
- - if (home)
- + if (cg->home)
- {
- - snprintf(filename, sizeof(filename), "%s/.cups/lpoptions", home);
- + snprintf(filename, sizeof(filename), "%s/.cups/lpoptions", cg->home);
- cups_get_dests(filename, dest_name, instance, 0, 1, 1, &dest);
- }
- @@ -2032,9 +2031,6 @@ cupsSetDests2(http_t *http, /* I - Connection to server or @code CUPS_HTTP_
- cups_option_t *option; /* Current option */
- _ipp_option_t *match; /* Matching attribute for option */
- FILE *fp; /* File pointer */
- -#ifndef _WIN32
- - const char *home; /* HOME environment variable */
- -#endif /* _WIN32 */
- char filename[1024]; /* lpoptions file */
- int num_temps; /* Number of temporary destinations */
- cups_dest_t *temps = NULL, /* Temporary destinations */
- @@ -2068,27 +2064,18 @@ cupsSetDests2(http_t *http, /* I - Connection to server or @code CUPS_HTTP_
- snprintf(filename, sizeof(filename), "%s/lpoptions", cg->cups_serverroot);
- -#ifndef _WIN32
- - if (getuid())
- + if (cg->home)
- {
- /*
- - * Point to user defaults...
- + * Create ~/.cups subdirectory...
- */
- - if ((home = getenv("HOME")) != NULL)
- - {
- - /*
- - * Create ~/.cups subdirectory...
- - */
- + snprintf(filename, sizeof(filename), "%s/.cups", cg->home);
- + if (access(filename, 0))
- + mkdir(filename, 0700);
- - snprintf(filename, sizeof(filename), "%s/.cups", home);
- - if (access(filename, 0))
- - mkdir(filename, 0700);
- -
- - snprintf(filename, sizeof(filename), "%s/.cups/lpoptions", home);
- - }
- + snprintf(filename, sizeof(filename), "%s/.cups/lpoptions", cg->home);
- }
- -#endif /* !_WIN32 */
- /*
- * Try to open the file...
- @@ -2269,7 +2256,7 @@ _cupsUserDefault(char *name, /* I - Name buffer */
- * system preferences...
- */
- - if ((locprinter = _cupsAppleCopyDefaultPrinter()) != NULL)
- + if (!getenv("CUPS_NO_APPLE_DEFAULT") && (locprinter = _cupsAppleCopyDefaultPrinter()) != NULL)
- {
- CFStringGetCString(locprinter, name, (CFIndex)namesize, kCFStringEncodingUTF8);
- CFRelease(locprinter);
- @@ -3392,10 +3379,9 @@ cups_enum_dests(
- int i, j, /* Looping vars */
- num_dests; /* Number of destinations */
- cups_dest_t *dests = NULL, /* Destinations */
- - *dest, /* Current destination */
- - *user_dest; /* User destination */
- + *dest; /* Current destination */
- cups_option_t *option; /* Current option */
- - char *user_default; /* User default printer */
- + const char *user_default; /* Default printer from environment */
- #if defined(HAVE_DNSSD) || defined(HAVE_AVAHI)
- int count, /* Number of queries started */
- completed, /* Number of completed queries */
- @@ -3426,7 +3412,6 @@ cups_enum_dests(
- #else
- _cups_getdata_t data; /* Data for callback */
- #endif /* HAVE_DNSSD || HAVE_AVAHI */
- - const char *home; /* HOME environment variable */
- char filename[1024]; /* Local lpoptions file */
- _cups_globals_t *cg = _cupsGlobals(); /* Pointer to library globals */
- @@ -3451,13 +3436,35 @@ cups_enum_dests(
- memset(&data, 0, sizeof(data));
- - if ((user_default = _cupsUserDefault(data.def_name, sizeof(data.def_name))) == NULL)
- + user_default = _cupsUserDefault(data.def_name, sizeof(data.def_name));
- +
- + snprintf(filename, sizeof(filename), "%s/lpoptions", cg->cups_serverroot);
- + data.num_dests = cups_get_dests(filename, NULL, NULL, 1, user_default != NULL, data.num_dests, &data.dests);
- +
- + if (cg->home)
- {
- - const char *defprinter = cupsGetDefault2(http);
- - /* Server default, if any */
- + snprintf(filename, sizeof(filename), "%s/.cups/lpoptions", cg->home);
- - if (defprinter)
- - strlcpy(data.def_name, defprinter, sizeof(data.def_name));
- + data.num_dests = cups_get_dests(filename, NULL, NULL, 1, user_default != NULL, data.num_dests, &data.dests);
- + }
- +
- + if (!user_default && (dest = cupsGetDest(NULL, NULL, data.num_dests, data.dests)) != NULL)
- + {
- + /*
- + * Use an lpoptions default printer...
- + */
- +
- + if (dest->instance)
- + snprintf(data.def_name, sizeof(data.def_name), "%s/%s", dest->name, dest->instance);
- + else
- + strlcpy(data.def_name, dest->name, sizeof(data.def_name));
- + }
- + else
- + {
- + const char *default_printer; /* Server default printer */
- +
- + if ((default_printer = cupsGetDefault2(http)) != NULL)
- + strlcpy(data.def_name, default_printer, sizeof(data.def_name));
- }
- if (data.def_name[0])
- @@ -3472,16 +3479,6 @@ cups_enum_dests(
- DEBUG_printf(("1cups_enum_dests: def_name=\"%s\", def_instance=\"%s\"", data.def_name, data.def_instance));
- - snprintf(filename, sizeof(filename), "%s/lpoptions", cg->cups_serverroot);
- - data.num_dests = cups_get_dests(filename, NULL, NULL, 1, user_default != NULL, data.num_dests, &data.dests);
- -
- - if ((home = getenv("HOME")) != NULL)
- - {
- - snprintf(filename, sizeof(filename), "%s/.cups/lpoptions", home);
- -
- - data.num_dests = cups_get_dests(filename, NULL, NULL, 1, user_default != NULL, data.num_dests, &data.dests);
- - }
- -
- /*
- * Get ready to enumerate...
- */
- @@ -3519,8 +3516,9 @@ cups_enum_dests(
- i > 0 && (!cancel || !*cancel);
- i --, dest ++)
- {
- + cups_dest_t *user_dest; /* Destination from lpoptions */
- #if defined(HAVE_DNSSD) || defined(HAVE_AVAHI)
- - const char *device_uri; /* Device URI */
- + const char *device_uri; /* Device URI */
- #endif /* HAVE_DNSSD || HAVE_AVAHI */
- if ((user_dest = cupsGetDest(dest->name, dest->instance, data.num_dests, data.dests)) != NULL)
- @@ -3789,6 +3787,8 @@ cups_enum_dests(
- if ((device->type & mask) == type)
- {
- + cups_dest_t *user_dest; /* Destination from lpoptions */
- +
- dest = &device->dest;
- if ((user_dest = cupsGetDest(dest->name, dest->instance, data.num_dests, data.dests)) != NULL)
- diff --git a/cups/encode.c b/cups/encode.c
- index 2469406e2..5bcbf6fe5 100644
- --- a/cups/encode.c
- +++ b/cups/encode.c
- @@ -523,7 +523,7 @@ _cupsEncodeOption(
- quote = *sep;
- }
- - else if (*sep == ',' && count > 1)
- + else if (*sep == ',')
- break;
- else if (*sep == '\\' && sep[1])
- {
- diff --git a/cups/globals.c b/cups/globals.c
- index b75434f2c..fd41baefe 100644
- --- a/cups/globals.c
- +++ b/cups/globals.c
- @@ -1,10 +1,11 @@
- /*
- * Global variable access routines for CUPS.
- *
- - * Copyright 2007-2015 by Apple Inc.
- - * Copyright 1997-2007 by Easy Software Products, all rights reserved.
- + * Copyright © 2007-2019 by Apple Inc.
- + * Copyright © 1997-2007 by Easy Software Products, all rights reserved.
- *
- - * Licensed under Apache License v2.0. See the file "LICENSE" for more information.
- + * Licensed under Apache License v2.0. See the file "LICENSE" for more
- + * information.
- */
- /*
- @@ -12,6 +13,9 @@
- */
- #include "cups-private.h"
- +#ifndef _WIN32
- +# include <pwd.h>
- +#endif /* !_WIN32 */
- /*
- @@ -269,6 +273,8 @@ cups_globals_alloc(void)
- if ((cg->localedir = getenv("LOCALEDIR")) == NULL)
- cg->localedir = localedir;
- + cg->home = getenv("HOME");
- +
- #else
- # ifdef HAVE_GETEUID
- if ((geteuid() != getuid() && getuid()) || getegid() != getgid())
- @@ -307,6 +313,21 @@ cups_globals_alloc(void)
- if ((cg->localedir = getenv("LOCALEDIR")) == NULL)
- cg->localedir = CUPS_LOCALEDIR;
- +
- + cg->home = getenv("HOME");
- +
- +# ifdef __APPLE__ /* Sandboxing now exposes the container as the home directory */
- + if (cg->home && strstr(cg->home, "/Library/Containers/"))
- + cg->home = NULL;
- +# endif /* !__APPLE__ */
- + }
- +
- + if (!cg->home)
- + {
- + struct passwd *pw; /* User info */
- +
- + if ((pw = getpwuid(getuid())) != NULL)
- + cg->home = _cupsStrAlloc(pw->pw_dir);
- }
- #endif /* _WIN32 */
- diff --git a/cups/hash.c b/cups/hash.c
- index 7b3ea818e..4fbb443db 100644
- --- a/cups/hash.c
- +++ b/cups/hash.c
- @@ -16,6 +16,7 @@
- # include <CommonCrypto/CommonDigest.h>
- #elif defined(HAVE_GNUTLS)
- # include <gnutls/crypto.h>
- +# include "md5-internal.h"
- #else
- # include "md5-internal.h"
- #endif /* __APPLE__ */
- @@ -186,14 +187,23 @@ cupsHashData(const char *algorithm, /* I - Algorithm name */
- size_t tempsize = 0; /* Truncate to this size? */
- -# ifdef HAVE_GNUTLS_FIPS140_SET_MODE
- - unsigned oldmode = gnutls_fips140_mode_enabled();
- + if (!strcmp(algorithm, "md5"))
- + {
- + /*
- + * Some versions of GNU TLS disable MD5 without warning...
- + */
- - gnutls_fips140_set_mode(GNUTLS_FIPS140_LAX, GNUTLS_FIPS140_SET_MODE_THREAD);
- -# endif /* HAVE_GNUTLS_FIPS140_SET_MODE */
- + _cups_md5_state_t state; /* MD5 state info */
- - if (!strcmp(algorithm, "md5"))
- - alg = GNUTLS_DIG_MD5;
- + if (hashsize < 16)
- + goto too_small;
- +
- + _cupsMD5Init(&state);
- + _cupsMD5Append(&state, data, datalen);
- + _cupsMD5Finish(&state, hash);
- +
- + return (16);
- + }
- else if (!strcmp(algorithm, "sha"))
- alg = GNUTLS_DIG_SHA1;
- else if (!strcmp(algorithm, "sha2-224"))
- @@ -229,10 +239,6 @@ cupsHashData(const char *algorithm, /* I - Algorithm name */
- gnutls_hash_fast(alg, data, datalen, temp);
- memcpy(hash, temp, tempsize);
- -# ifdef HAVE_GNUTLS_FIPS140_SET_MODE
- - gnutls_fips140_set_mode(oldmode, GNUTLS_FIPS140_SET_MODE_THREAD);
- -# endif /* HAVE_GNUTLS_FIPS140_SET_MODE */
- -
- return ((ssize_t)tempsize);
- }
- @@ -241,17 +247,9 @@ cupsHashData(const char *algorithm, /* I - Algorithm name */
- gnutls_hash_fast(alg, data, datalen, hash);
- -# ifdef HAVE_GNUTLS_FIPS140_SET_MODE
- - gnutls_fips140_set_mode(oldmode, GNUTLS_FIPS140_SET_MODE_THREAD);
- -# endif /* HAVE_GNUTLS_FIPS140_SET_MODE */
- -
- return ((ssize_t)gnutls_hash_get_len(alg));
- }
- -# ifdef HAVE_GNUTLS_FIPS140_SET_MODE
- - gnutls_fips140_set_mode(oldmode, GNUTLS_FIPS140_SET_MODE_THREAD);
- -# endif /* HAVE_GNUTLS_FIPS140_SET_MODE */
- -
- #else
- /*
- * No hash support beyond MD5 without CommonCrypto or GNU TLS...
- @@ -261,6 +259,9 @@ cupsHashData(const char *algorithm, /* I - Algorithm name */
- {
- _cups_md5_state_t state; /* MD5 state info */
- + if (hashsize < 16)
- + goto too_small;
- +
- _cupsMD5Init(&state);
- _cupsMD5Append(&state, data, datalen);
- _cupsMD5Finish(&state, hash);
- @@ -285,10 +286,6 @@ cupsHashData(const char *algorithm, /* I - Algorithm name */
- too_small:
- -#ifdef HAVE_GNUTLS_FIPS140_SET_MODE
- - gnutls_fips140_set_mode(oldmode, GNUTLS_FIPS140_SET_MODE_THREAD);
- -#endif /* HAVE_GNUTLS_FIPS140_SET_MODE */
- -
- _cupsSetError(IPP_STATUS_ERROR_INTERNAL, _("Hash buffer too small."), 1);
- return (-1);
- }
- diff --git a/cups/http-support.c b/cups/http-support.c
- index 6d8607140..63175145e 100644
- --- a/cups/http-support.c
- +++ b/cups/http-support.c
- @@ -1,7 +1,7 @@
- /*
- * HTTP support routines for CUPS.
- *
- - * Copyright 2007-2018 by Apple Inc.
- + * Copyright 2007-2019 by Apple Inc.
- * Copyright 1997-2007 by Easy Software Products, all rights reserved.
- *
- * Licensed under Apache License v2.0. See the file "LICENSE" for more
- @@ -799,14 +799,12 @@ httpGetDateString2(time_t t, /* I - Time in seconds */
- char *s, /* I - String buffer */
- int slen) /* I - Size of string buffer */
- {
- - struct tm *tdate; /* UNIX date/time data */
- + struct tm tdate; /* UNIX date/time data */
- - tdate = gmtime(&t);
- - if (tdate)
- - snprintf(s, (size_t)slen, "%s, %02d %s %d %02d:%02d:%02d GMT", http_days[tdate->tm_wday], tdate->tm_mday, http_months[tdate->tm_mon], tdate->tm_year + 1900, tdate->tm_hour, tdate->tm_min, tdate->tm_sec);
- - else
- - s[0] = '\0';
- + gmtime_r(&t, &tdate);
- +
- + snprintf(s, (size_t)slen, "%s, %02d %s %d %02d:%02d:%02d GMT", http_days[tdate.tm_wday], tdate.tm_mday, http_months[tdate.tm_mon], tdate.tm_year + 1900, tdate.tm_hour, tdate.tm_min, tdate.tm_sec);
- return (s);
- }
- @@ -1321,6 +1319,7 @@ _httpSetDigestAuthString(
- digest[1024]; /* Digest auth data */
- unsigned char hash[32]; /* Hash buffer */
- size_t hashsize; /* Size of hash */
- + _cups_globals_t *cg = _cupsGlobals(); /* Per-thread globals */
- DEBUG_printf(("2_httpSetDigestAuthString(http=%p, nonce=\"%s\", method=\"%s\", resource=\"%s\")", (void *)http, nonce, method, resource));
- @@ -1363,6 +1362,12 @@ _httpSetDigestAuthString(
- * RFC 2617 Digest with MD5
- */
- + if (cg->digestoptions == _CUPS_DIGESTOPTIONS_DENYMD5)
- + {
- + DEBUG_puts("3_httpSetDigestAuthString: MD5 Digest is disabled.");
- + return (0);
- + }
- +
- hashalg = "md5";
- }
- else if (!_cups_strcasecmp(http->algorithm, "SHA-256"))
- diff --git a/cups/http.c b/cups/http.c
- index fbb1bf13c..8d69ce31f 100644
- --- a/cups/http.c
- +++ b/cups/http.c
- @@ -1733,7 +1733,7 @@ httpPeek(http_t *http, /* I - HTTP connection */
- if (http->used > 0 && ((z_stream *)http->stream)->avail_in < HTTP_MAX_BUFFER)
- {
- - size_t buflen = buflen = HTTP_MAX_BUFFER - ((z_stream *)http->stream)->avail_in;
- + size_t buflen = HTTP_MAX_BUFFER - ((z_stream *)http->stream)->avail_in;
- /* Number of bytes to copy */
- if (((z_stream *)http->stream)->avail_in > 0 &&
- diff --git a/cups/ipp-support.c b/cups/ipp-support.c
- index 7d028b4f2..bfb9dff09 100644
- --- a/cups/ipp-support.c
- +++ b/cups/ipp-support.c
- @@ -460,7 +460,7 @@ static const char * const ipp_document_states[] =
- "punch-multiple-top", /* IPP Finishings 2.1/Canon */
- "punch-multiple-right",/* IPP Finishings 2.1/Canon */
- "punch-multiple-bottom",/* IPP Finishings 2.1/Canon */
- - "fold-accordian", /* IPP Finishings 2.0 */
- + "fold-accordion", /* IPP Finishings 2.0 */
- "fold-double-gate", /* IPP Finishings 2.0 */
- "fold-gate", /* IPP Finishings 2.0 */
- "fold-half", /* IPP Finishings 2.0 */
- @@ -571,7 +571,7 @@ static const char * const ipp_document_states[] =
- "0x40000057",
- "0x40000058",
- "0x40000059",
- - "cups-fold-accordian",
- + "cups-fold-accordion",
- "cups-fold-double-gate",
- "cups-fold-gate",
- "cups-fold-half",
- @@ -2093,7 +2093,7 @@ ippEnumString(const char *attrname, /* I - Attribute name */
- {
- if (enumvalue >= 3 && enumvalue < (3 + (int)(sizeof(ipp_finishings) / sizeof(ipp_finishings[0]))))
- return (ipp_finishings[enumvalue - 3]);
- - else if (enumvalue >= 0x40000000 && enumvalue <= (0x40000000 + (int)(sizeof(ipp_finishings_vendor) / sizeof(ipp_finishings_vendor[0]))))
- + else if (enumvalue >= 0x40000000 && enumvalue < (0x40000000 + (int)(sizeof(ipp_finishings_vendor) / sizeof(ipp_finishings_vendor[0]))))
- return (ipp_finishings_vendor[enumvalue - 0x40000000]);
- }
- else if ((!strcmp(attrname, "job-collation-type") || !strcmp(attrname, "job-collation-type-actual")) && enumvalue >= 3 && enumvalue < (3 + (int)(sizeof(ipp_job_collation_types) / sizeof(ipp_job_collation_types[0]))))
- diff --git a/cups/ipp.c b/cups/ipp.c
- index 1bd59cef1..d0cac8cfe 100644
- --- a/cups/ipp.c
- +++ b/cups/ipp.c
- @@ -4659,7 +4659,7 @@ ippSetVersion(ipp_t *ipp, /* I - IPP message */
- const ipp_uchar_t * /* O - RFC-2579 date/time data */
- ippTimeToDate(time_t t) /* I - Time in seconds */
- {
- - struct tm *unixdate; /* UNIX unixdate/time info */
- + struct tm unixdate; /* UNIX unixdate/time info */
- ipp_uchar_t *date = _cupsGlobals()->ipp_date;
- /* RFC-2579 date/time data */
- @@ -4681,16 +4681,16 @@ ippTimeToDate(time_t t) /* I - Time in seconds */
- * 10 UTC minutes (0 to 59)
- */
- - unixdate = gmtime(&t);
- - unixdate->tm_year += 1900;
- + gmtime_r(&t, &unixdate);
- + unixdate.tm_year += 1900;
- - date[0] = (ipp_uchar_t)(unixdate->tm_year >> 8);
- - date[1] = (ipp_uchar_t)(unixdate->tm_year);
- - date[2] = (ipp_uchar_t)(unixdate->tm_mon + 1);
- - date[3] = (ipp_uchar_t)unixdate->tm_mday;
- - date[4] = (ipp_uchar_t)unixdate->tm_hour;
- - date[5] = (ipp_uchar_t)unixdate->tm_min;
- - date[6] = (ipp_uchar_t)unixdate->tm_sec;
- + date[0] = (ipp_uchar_t)(unixdate.tm_year >> 8);
- + date[1] = (ipp_uchar_t)(unixdate.tm_year);
- + date[2] = (ipp_uchar_t)(unixdate.tm_mon + 1);
- + date[3] = (ipp_uchar_t)unixdate.tm_mday;
- + date[4] = (ipp_uchar_t)unixdate.tm_hour;
- + date[5] = (ipp_uchar_t)unixdate.tm_min;
- + date[6] = (ipp_uchar_t)unixdate.tm_sec;
- date[7] = 0;
- date[8] = '+';
- date[9] = 0;
- diff --git a/cups/ipp.h b/cups/ipp.h
- index 6402855a7..b7412a40c 100644
- --- a/cups/ipp.h
- +++ b/cups/ipp.h
- @@ -145,11 +145,11 @@ typedef enum ipp_finishings_e /**** Finishings values ****/
- IPP_FINISHINGS_PUNCH_QUAD_TOP, /* Punch 4 holes top edge */
- IPP_FINISHINGS_PUNCH_QUAD_RIGHT, /* Punch 4 holes right side */
- IPP_FINISHINGS_PUNCH_QUAD_BOTTOM, /* Punch 4 holes bottom edge */
- - IPP_FINISHINGS_PUNCH_MULTIPLE_LEFT, /* Pucnh multiple holes left side */
- - IPP_FINISHINGS_PUNCH_MULTIPLE_TOP, /* Pucnh multiple holes top edge */
- - IPP_FINISHINGS_PUNCH_MULTIPLE_RIGHT, /* Pucnh multiple holes right side */
- - IPP_FINISHINGS_PUNCH_MULTIPLE_BOTTOM, /* Pucnh multiple holes bottom edge */
- - IPP_FINISHINGS_FOLD_ACCORDIAN = 90, /* Accordian-fold the paper vertically into four sections */
- + IPP_FINISHINGS_PUNCH_MULTIPLE_LEFT, /* Punch multiple holes left side */
- + IPP_FINISHINGS_PUNCH_MULTIPLE_TOP, /* Punch multiple holes top edge */
- + IPP_FINISHINGS_PUNCH_MULTIPLE_RIGHT, /* Punch multiple holes right side */
- + IPP_FINISHINGS_PUNCH_MULTIPLE_BOTTOM, /* Punch multiple holes bottom edge */
- + IPP_FINISHINGS_FOLD_ACCORDION = 90, /* Accordion-fold the paper vertically into four sections */
- IPP_FINISHINGS_FOLD_DOUBLE_GATE, /* Fold the top and bottom quarters of the paper towards the midline, then fold in half vertically */
- IPP_FINISHINGS_FOLD_GATE, /* Fold the top and bottom quarters of the paper towards the midline */
- IPP_FINISHINGS_FOLD_HALF, /* Fold the paper in half vertically */
- @@ -184,8 +184,8 @@ typedef enum ipp_finishings_e /**** Finishings values ****/
- IPP_FINISHINGS_CUPS_PUNCH_QUAD_RIGHT, /* Punch 4 holes right side @exclude all@ */
- IPP_FINISHINGS_CUPS_PUNCH_QUAD_BOTTOM,/* Punch 4 holes bottom edge @exclude all@ */
- - IPP_FINISHINGS_CUPS_FOLD_ACCORDIAN = 0x4000005A,
- - /* Accordian-fold the paper vertically into four sections @exclude all@ */
- + IPP_FINISHINGS_CUPS_FOLD_ACCORDION = 0x4000005A,
- + /* Accordion-fold the paper vertically into four sections @exclude all@ */
- IPP_FINISHINGS_CUPS_FOLD_DOUBLE_GATE, /* Fold the top and bottom quarters of the paper towards the midline, then fold in half vertically @exclude all@ */
- IPP_FINISHINGS_CUPS_FOLD_GATE, /* Fold the top and bottom quarters of the paper towards the midline @exclude all@ */
- IPP_FINISHINGS_CUPS_FOLD_HALF, /* Fold the paper in half vertically @exclude all@ */
- @@ -198,8 +198,10 @@ typedef enum ipp_finishings_e /**** Finishings values ****/
- IPP_FINISHINGS_CUPS_FOLD_Z /* Fold the paper vertically into three sections, forming a Z @exclude all@ */
- } ipp_finishings_t;
- # ifndef _CUPS_NO_DEPRECATED
- +# define IPP_FINISHINGS_CUPS_FOLD_ACCORDIAN IPP_FINISHINGS_CUPS_FOLD_ACCORDION
- +# define IPP_FINISHINGS_FOLD_ACCORDIAN IPP_FINISHINGS_FOLD_ACCORDION
- # define IPP_FINISHINGS_JOB_OFFSET IPP_FINISHINGS_JOG_OFFSET
- - /* Long-time misspelling... */
- + /* Long-time misspellings... */
- typedef enum ipp_finishings_e ipp_finish_t;
- # endif /* !_CUPS_NO_DEPRECATED */
- diff --git a/cups/md5.c b/cups/md5.c
- index c3b2768dd..a94646c72 100644
- --- a/cups/md5.c
- +++ b/cups/md5.c
- @@ -43,7 +43,7 @@
- #include "md5-internal.h"
- #include "string-private.h"
- -#if !defined(__APPLE__) && !defined(HAVE_GNUTLS)
- +#if !defined(__APPLE__)
- # define T1 0xd76aa478
- # define T2 0xe8c7b756
- # define T3 0x242070db
- @@ -338,4 +338,4 @@ _cupsMD5Finish(_cups_md5_state_t *pms, unsigned char digest[16])
- for (i = 0; i < 16; ++i)
- digest[i] = (unsigned char)(pms->abcd[i >> 2] >> ((i & 3) << 3));
- }
- -#endif /* !__APPLE__ && !HAVE_GNUTLS */
- +#endif /* !__APPLE__ */
- diff --git a/cups/ppd-cache.c b/cups/ppd-cache.c
- index 6a35ef41a..5965e382b 100644
- --- a/cups/ppd-cache.c
- +++ b/cups/ppd-cache.c
- @@ -1075,7 +1075,7 @@ _ppdCacheCreateWithPPD(ppd_file_t *ppd) /* I - PPD file */
- * Convert the PPD size name to the corresponding PWG keyword name.
- */
- - if ((pwg_media = pwgMediaForPPD(ppd_size->name)) != NULL)
- + if ((pwg_media = pwgMediaForSize(PWG_FROM_POINTS(ppd_size->width), PWG_FROM_POINTS(ppd_size->length))) != NULL)
- {
- /*
- * Standard name, do we have conflicts?
- @@ -3983,7 +3983,25 @@ _ppdCreateFromIPP(char *buffer, /* I - Filename buffer */
- if ((attr = ippFindAttribute(response, "finishings-supported", IPP_TAG_ENUM)) != NULL)
- {
- int value; /* Enum value */
- + const char *ppd_keyword; /* PPD keyword for enum */
- cups_array_t *names; /* Names we've added */
- + static const char * const base_keywords[] =
- + { /* Base STD 92 keywords */
- + NULL, /* none */
- + "SingleAuto", /* staple */
- + "SingleAuto", /* punch */
- + NULL, /* cover */
- + "BindAuto", /* bind */
- + "SaddleStitch", /* saddle-stitch */
- + "EdgeStitchAuto", /* edge-stitch */
- + "Auto", /* fold */
- + NULL, /* trim */
- + NULL, /* bale */
- + NULL, /* booklet-maker */
- + NULL, /* jog-offset */
- + NULL, /* coat */
- + NULL /* laminate */
- + };
- count = ippGetCount(attr);
- names = cupsArrayNew3((cups_array_func_t)strcmp, NULL, NULL, 0, (cups_acopy_func_t)strdup, (cups_afree_func_t)free);
- @@ -4004,6 +4022,33 @@ _ppdCreateFromIPP(char *buffer, /* I - Filename buffer */
- if (i < count)
- {
- + static const char * const staple_keywords[] =
- + { /* StapleLocation keywords */
- + "SinglePortrait",
- + "SingleRevLandscape",
- + "SingleLandscape",
- + "SingleRevPortrait",
- + "EdgeStitchPortrait",
- + "EdgeStitchLandscape",
- + "EdgeStitchRevPortrait",
- + "EdgeStitchRevLandscape",
- + "DualPortrait",
- + "DualLandscape",
- + "DualRevPortrait",
- + "DualRevLandscape",
- + "TriplePortrait",
- + "TripleLandscape",
- + "TripleRevPortrait",
- + "TripleRevLandscape"
- + };
- + static const char * const bind_keywords[] =
- + { /* StapleLocation binding keywords */
- + "BindPortrait",
- + "BindLandscape",
- + "BindRevPortrait",
- + "BindRevLandscape"
- + };
- +
- cupsArrayAdd(fin_options, "*StapleLocation");
- cupsFilePuts(fp, "*OpenUI *StapleLocation: PickOne\n");
- @@ -4031,9 +4076,21 @@ _ppdCreateFromIPP(char *buffer, /* I - Filename buffer */
- if ((msgstr = _cupsMessageLookup(strings, msgid)) == msgid)
- msgstr = keyword;
- - cupsFilePrintf(fp, "*StapleLocation %s: \"\"\n", keyword);
- - cupsFilePrintf(fp, "*%s.StapleLocation %s/%s: \"\"\n", lang->language, keyword, msgstr);
- - cupsFilePrintf(fp, "*cupsIPPFinishings %d/%s: \"*StapleLocation %s\"\n", value, keyword, keyword);
- + if (value >= IPP_FINISHINGS_NONE && value <= IPP_FINISHINGS_LAMINATE)
- + ppd_keyword = base_keywords[value - IPP_FINISHINGS_NONE];
- + else if (value >= IPP_FINISHINGS_STAPLE_TOP_LEFT && value <= IPP_FINISHINGS_STAPLE_TRIPLE_BOTTOM)
- + ppd_keyword = staple_keywords[value - IPP_FINISHINGS_STAPLE_TOP_LEFT];
- + else if (value >= IPP_FINISHINGS_BIND_LEFT && value <= IPP_FINISHINGS_BIND_BOTTOM)
- + ppd_keyword = bind_keywords[value - IPP_FINISHINGS_BIND_LEFT];
- + else
- + ppd_keyword = NULL;
- +
- + if (!ppd_keyword)
- + continue;
- +
- + cupsFilePrintf(fp, "*StapleLocation %s: \"\"\n", ppd_keyword);
- + cupsFilePrintf(fp, "*%s.StapleLocation %s/%s: \"\"\n", lang->language, ppd_keyword, msgstr);
- + cupsFilePrintf(fp, "*cupsIPPFinishings %d/%s: \"*StapleLocation %s\"\n", value, keyword, ppd_keyword);
- }
- cupsFilePuts(fp, "*CloseUI: *StapleLocation\n");
- @@ -4048,12 +4105,28 @@ _ppdCreateFromIPP(char *buffer, /* I - Filename buffer */
- value = ippGetInteger(attr, i);
- keyword = ippEnumString("finishings", value);
- - if (!strncmp(keyword, "fold-", 5))
- + if (!strncmp(keyword, "cups-fold-", 10) || !strcmp(keyword, "fold") || !strncmp(keyword, "fold-", 5))
- break;
- }
- if (i < count)
- {
- + static const char * const fold_keywords[] =
- + { /* FoldType keywords */
- + "Accordion",
- + "DoubleGate",
- + "Gate",
- + "Half",
- + "HalfZ",
- + "LeftGate",
- + "Letter",
- + "Parallel",
- + "XFold",
- + "RightGate",
- + "ZFold",
- + "EngineeringZ"
- + };
- +
- cupsArrayAdd(fin_options, "*FoldType");
- cupsFilePuts(fp, "*OpenUI *FoldType: PickOne\n");
- @@ -4068,7 +4141,9 @@ _ppdCreateFromIPP(char *buffer, /* I - Filename buffer */
- value = ippGetInteger(attr, i);
- keyword = ippEnumString("finishings", value);
- - if (strncmp(keyword, "fold-", 5))
- + if (!strncmp(keyword, "cups-fold-", 10))
- + keyword += 5;
- + else if (strcmp(keyword, "fold") && strncmp(keyword, "fold-", 5))
- continue;
- if (cupsArrayFind(names, (char *)keyword))
- @@ -4081,9 +4156,21 @@ _ppdCreateFromIPP(char *buffer, /* I - Filename buffer */
- if ((msgstr = _cupsMessageLookup(strings, msgid)) == msgid)
- msgstr = keyword;
- - cupsFilePrintf(fp, "*FoldType %s: \"\"\n", keyword);
- - cupsFilePrintf(fp, "*%s.FoldType %s/%s: \"\"\n", lang->language, keyword, msgstr);
- - cupsFilePrintf(fp, "*cupsIPPFinishings %d/%s: \"*FoldType %s\"\n", value, keyword, keyword);
- + if (value >= IPP_FINISHINGS_NONE && value <= IPP_FINISHINGS_LAMINATE)
- + ppd_keyword = base_keywords[value - IPP_FINISHINGS_NONE];
- + else if (value >= IPP_FINISHINGS_FOLD_ACCORDION && value <= IPP_FINISHINGS_FOLD_ENGINEERING_Z)
- + ppd_keyword = fold_keywords[value - IPP_FINISHINGS_FOLD_ACCORDION];
- + else if (value >= IPP_FINISHINGS_CUPS_FOLD_ACCORDION && value <= IPP_FINISHINGS_CUPS_FOLD_Z)
- + ppd_keyword = fold_keywords[value - IPP_FINISHINGS_CUPS_FOLD_ACCORDION];
- + else
- + ppd_keyword = NULL;
- +
- + if (!ppd_keyword)
- + continue;
- +
- + cupsFilePrintf(fp, "*FoldType %s: \"\"\n", ppd_keyword);
- + cupsFilePrintf(fp, "*%s.FoldType %s/%s: \"\"\n", lang->language, ppd_keyword, msgstr);
- + cupsFilePrintf(fp, "*cupsIPPFinishings %d/%s: \"*FoldType %s\"\n", value, keyword, ppd_keyword);
- }
- cupsFilePuts(fp, "*CloseUI: *FoldType\n");
- @@ -4098,12 +4185,36 @@ _ppdCreateFromIPP(char *buffer, /* I - Filename buffer */
- value = ippGetInteger(attr, i);
- keyword = ippEnumString("finishings", value);
- - if (!strncmp(keyword, "punch-", 6))
- + if (!strncmp(keyword, "cups-punch-", 11) || !strncmp(keyword, "punch-", 6))
- break;
- }
- if (i < count)
- {
- + static const char * const punch_keywords[] =
- + { /* PunchMedia keywords */
- + "SinglePortrait",
- + "SingleRevLandscape",
- + "SingleLandscape",
- + "SingleRevPortrait",
- + "DualPortrait",
- + "DualLandscape",
- + "DualRevPortrait",
- + "DualRevLandscape",
- + "TriplePortrait",
- + "TripleLandscape",
- + "TripleRevPortrait",
- + "TripleRevLandscape",
- + "QuadPortrait",
- + "QuadLandscape",
- + "QuadRevPortrait",
- + "QuadRevLandscape",
- + "MultiplePortrait",
- + "MultipleLandscape",
- + "MultipleRevPortrait",
- + "MultipleRevLandscape"
- + };
- +
- cupsArrayAdd(fin_options, "*PunchMedia");
- cupsFilePuts(fp, "*OpenUI *PunchMedia: PickOne\n");
- @@ -4118,7 +4229,9 @@ _ppdCreateFromIPP(char *buffer, /* I - Filename buffer */
- value = ippGetInteger(attr, i);
- keyword = ippEnumString("finishings", value);
- - if (strncmp(keyword, "punch-", 6))
- + if (!strncmp(keyword, "cups-punch-", 11))
- + keyword += 5;
- + else if (strncmp(keyword, "punch-", 6))
- continue;
- if (cupsArrayFind(names, (char *)keyword))
- @@ -4131,9 +4244,21 @@ _ppdCreateFromIPP(char *buffer, /* I - Filename buffer */
- if ((msgstr = _cupsMessageLookup(strings, msgid)) == msgid)
- msgstr = keyword;
- - cupsFilePrintf(fp, "*PunchMedia %s: \"\"\n", keyword);
- - cupsFilePrintf(fp, "*%s.PunchMedia %s/%s: \"\"\n", lang->language, keyword, msgstr);
- - cupsFilePrintf(fp, "*cupsIPPFinishings %d/%s: \"*PunchMedia %s\"\n", value, keyword, keyword);
- + if (value >= IPP_FINISHINGS_NONE && value <= IPP_FINISHINGS_LAMINATE)
- + ppd_keyword = base_keywords[value - IPP_FINISHINGS_NONE];
- + else if (value >= IPP_FINISHINGS_PUNCH_TOP_LEFT && value <= IPP_FINISHINGS_PUNCH_MULTIPLE_BOTTOM)
- + ppd_keyword = punch_keywords[value - IPP_FINISHINGS_PUNCH_TOP_LEFT];
- + else if (value >= IPP_FINISHINGS_CUPS_PUNCH_TOP_LEFT && value <= IPP_FINISHINGS_CUPS_PUNCH_QUAD_BOTTOM)
- + ppd_keyword = punch_keywords[value - IPP_FINISHINGS_CUPS_PUNCH_TOP_LEFT];
- + else
- + ppd_keyword = NULL;
- +
- + if (!ppd_keyword)
- + continue;
- +
- + cupsFilePrintf(fp, "*PunchMedia %s: \"\"\n", ppd_keyword);
- + cupsFilePrintf(fp, "*%s.PunchMedia %s/%s: \"\"\n", lang->language, ppd_keyword, msgstr);
- + cupsFilePrintf(fp, "*cupsIPPFinishings %d/%s: \"*PunchMedia %s\"\n", value, keyword, ppd_keyword);
- }
- cupsFilePuts(fp, "*CloseUI: *PunchMedia\n");
- @@ -4157,6 +4282,69 @@ _ppdCreateFromIPP(char *buffer, /* I - Filename buffer */
- cupsFilePuts(fp, "*CloseUI: *Booklet\n");
- }
- + /*
- + * CutMedia
- + */
- +
- + for (i = 0; i < count; i ++)
- + {
- + value = ippGetInteger(attr, i);
- + keyword = ippEnumString("finishings", value);
- +
- + if (!strcmp(keyword, "trim") || !strncmp(keyword, "trim-", 5))
- + break;
- + }
- +
- + if (i < count)
- + {
- + static const char * const trim_keywords[] =
- + { /* CutMedia keywords */
- + "EndOfPage",
- + "EndOfDoc",
- + "EndOfSet",
- + "EndOfJob"
- + };
- +
- + cupsArrayAdd(fin_options, "*CutMedia");
- +
- + cupsFilePuts(fp, "*OpenUI *CutMedia: PickOne\n");
- + cupsFilePuts(fp, "*OrderDependency: 10 AnySetup *CutMedia\n");
- + cupsFilePrintf(fp, "*%s.Translation CutMedia/%s: \"\"\n", lang->language, _cupsLangString(lang, _("Cut")));
- + cupsFilePuts(fp, "*DefaultCutMedia: None\n");
- + cupsFilePuts(fp, "*CutMedia None: \"\"\n");
- + cupsFilePrintf(fp, "*%s.CutMedia None/%s: \"\"\n", lang->language, _cupsLangString(lang, _("None")));
- +
- + for (i = 0; i < count; i ++)
- + {
- + value = ippGetInteger(attr, i);
- + keyword = ippEnumString("finishings", value);
- +
- + if (strcmp(keyword, "trim") && strncmp(keyword, "trim-", 5))
- + continue;
- +
- + if (cupsArrayFind(names, (char *)keyword))
- + continue; /* Already did this finishing template */
- +
- + cupsArrayAdd(names, (char *)keyword);
- +
- + snprintf(msgid, sizeof(msgid), "finishings.%d", value);
- + if ((msgstr = _cupsLangString(lang, msgid)) == msgid || !strcmp(msgid, msgstr))
- + if ((msgstr = _cupsMessageLookup(strings, msgid)) == msgid)
- + msgstr = keyword;
- +
- + if (value == IPP_FINISHINGS_TRIM)
- + ppd_keyword = "Auto";
- + else
- + ppd_keyword = trim_keywords[value - IPP_FINISHINGS_TRIM_AFTER_PAGES];
- +
- + cupsFilePrintf(fp, "*CutMedia %s: \"\"\n", ppd_keyword);
- + cupsFilePrintf(fp, "*%s.CutMedia %s/%s: \"\"\n", lang->language, ppd_keyword, msgstr);
- + cupsFilePrintf(fp, "*cupsIPPFinishings %d/%s: \"*CutMedia %s\"\n", value, keyword, ppd_keyword);
- + }
- +
- + cupsFilePuts(fp, "*CloseUI: *CutMedia\n");
- + }
- +
- cupsArrayDelete(names);
- }
- @@ -4184,7 +4372,7 @@ _ppdCreateFromIPP(char *buffer, /* I - Filename buffer */
- if (!keyword || cupsArrayFind(templates, (void *)keyword))
- continue;
- - if (strncmp(keyword, "fold-", 5) && (strstr(keyword, "-bottom") || strstr(keyword, "-left") || strstr(keyword, "-right") || strstr(keyword, "-top")))
- + if (!strcmp(keyword, "none"))
- continue;
- cupsArrayAdd(templates, (void *)keyword);
- diff --git a/cups/ppd.c b/cups/ppd.c
- index fae19c42e..ff52df2e1 100644
- --- a/cups/ppd.c
- +++ b/cups/ppd.c
- @@ -1874,9 +1874,9 @@ _ppdOpen(
- {
- if (!_cups_strcasecmp(name, "custom") || !_cups_strncasecmp(name, "custom.", 7))
- {
- - pg->ppd_status = PPD_ILLEGAL_OPTION_KEYWORD;
- -
- - goto error;
- + char cname[PPD_MAX_NAME]; /* Rewrite with a leading underscore */
- + snprintf(cname, sizeof(cname), "_%s", name);
- + strlcpy(name, cname, sizeof(name));
- }
- if ((size = ppdPageSize(ppd, name)) == NULL)
- @@ -1903,9 +1903,9 @@ _ppdOpen(
- {
- if (!_cups_strcasecmp(name, "custom") || !_cups_strncasecmp(name, "custom.", 7))
- {
- - pg->ppd_status = PPD_ILLEGAL_OPTION_KEYWORD;
- -
- - goto error;
- + char cname[PPD_MAX_NAME]; /* Rewrite with a leading underscore */
- + snprintf(cname, sizeof(cname), "_%s", name);
- + strlcpy(name, cname, sizeof(name));
- }
- if ((size = ppdPageSize(ppd, name)) == NULL)
- @@ -1939,9 +1939,9 @@ _ppdOpen(
- if (!_cups_strcasecmp(name, "custom") || !_cups_strncasecmp(name, "custom.", 7))
- {
- - pg->ppd_status = PPD_ILLEGAL_OPTION_KEYWORD;
- -
- - goto error;
- + char cname[PPD_MAX_NAME]; /* Rewrite with a leading underscore */
- + snprintf(cname, sizeof(cname), "_%s", name);
- + strlcpy(name, cname, sizeof(name));
- }
- if (!strcmp(keyword, "PageSize"))
- diff --git a/cups/raster-stream.c b/cups/raster-stream.c
- index d7db020f1..1459817cf 100644
- --- a/cups/raster-stream.c
- +++ b/cups/raster-stream.c
- @@ -1,7 +1,7 @@
- /*
- * Raster file routines for CUPS.
- *
- - * Copyright 2007-2018 by Apple Inc.
- + * Copyright 2007-2019 by Apple Inc.
- * Copyright 1997-2006 by Easy Software Products.
- *
- * This file is part of the CUPS Imaging library.
- @@ -32,6 +32,24 @@ typedef void (*_cups_copyfunc_t)(void *dst, const void *src, size_t bytes);
- * Local globals...
- */
- +static const char * const apple_media_types[] =
- +{ /* media-type values for Apple Raster */
- + "auto",
- + "stationery",
- + "transparency",
- + "envelope",
- + "cardstock",
- + "labels",
- + "stationery-letterhead",
- + "disc",
- + "photographic-matte",
- + "photographic-satin",
- + "photographic-semi-gloss",
- + "photographic-glossy",
- + "photographic-high-gloss",
- + "other"
- +};
- +
- #ifdef DEBUG
- static const char * const cups_modes[] =
- { /* Open modes */
- @@ -638,7 +656,7 @@ _cupsRasterReadHeader(
- {
- CUPS_CSPACE_SW,
- CUPS_CSPACE_SRGB,
- - CUPS_CSPACE_RGBW,
- + CUPS_CSPACE_CIELab,
- CUPS_CSPACE_ADOBERGB,
- CUPS_CSPACE_W,
- CUPS_CSPACE_RGB,
- @@ -648,7 +666,7 @@ _cupsRasterReadHeader(
- {
- 1,
- 3,
- - 4,
- + 3,
- 3,
- 1,
- 3,
- @@ -681,8 +699,21 @@ _cupsRasterReadHeader(
- r->header.cupsPageSize[1] = (float)(r->header.cupsHeight * 72.0 / r->header.HWResolution[1]);
- }
- - r->header.cupsInteger[0] = r->apple_page_count;
- - r->header.cupsInteger[7] = 0xffffff;
- + r->header.cupsInteger[CUPS_RASTER_PWG_TotalPageCount] = r->apple_page_count;
- + r->header.cupsInteger[CUPS_RASTER_PWG_AlternatePrimary] = 0xffffff;
- + r->header.cupsInteger[CUPS_RASTER_PWG_PrintQuality] = appleheader[3];
- +
- + if (appleheader[2] >= 2)
- + r->header.Duplex = 1;
- + if (appleheader[2] == 2)
- + r->header.Tumble = 1;
- +
- + r->header.MediaPosition = appleheader[5];
- +
- + if (appleheader[4] < (int)(sizeof(apple_media_types) / sizeof(apple_media_types[0])))
- + strlcpy(r->header.MediaType, apple_media_types[appleheader[4]], sizeof(r->header.MediaType));
- + else
- + strlcpy(r->header.MediaType, "other", sizeof(r->header.MediaType));
- }
- break;
- }
- @@ -1072,8 +1103,9 @@ _cupsRasterWriteHeader(
- * zeroed.
- */
- - unsigned char appleheader[32]; /* Raw page header */
- - unsigned height = r->header.cupsHeight * r->rowheight;
- + int i; /* Looping var */
- + unsigned char appleheader[32];/* Raw page header */
- + unsigned height = r->header.cupsHeight * r->rowheight;
- /* Computed page height */
- if (r->apple_page_count == 0xffffffffU)
- @@ -1101,11 +1133,14 @@ _cupsRasterWriteHeader(
- appleheader[0] = (unsigned char)r->header.cupsBitsPerPixel;
- appleheader[1] = r->header.cupsColorSpace == CUPS_CSPACE_SRGB ? 1 :
- - r->header.cupsColorSpace == CUPS_CSPACE_RGBW ? 2 :
- + r->header.cupsColorSpace == CUPS_CSPACE_CIELab ? 2 :
- r->header.cupsColorSpace == CUPS_CSPACE_ADOBERGB ? 3 :
- r->header.cupsColorSpace == CUPS_CSPACE_W ? 4 :
- r->header.cupsColorSpace == CUPS_CSPACE_RGB ? 5 :
- r->header.cupsColorSpace == CUPS_CSPACE_CMYK ? 6 : 0;
- + appleheader[2] = r->header.Duplex ? (r->header.Tumble ? 2 : 3) : 1;
- + appleheader[3] = (unsigned char)(r->header.cupsInteger[CUPS_RASTER_PWG_PrintQuality]);
- + appleheader[5] = (unsigned char)(r->header.MediaPosition);
- appleheader[12] = (unsigned char)(r->header.cupsWidth >> 24);
- appleheader[13] = (unsigned char)(r->header.cupsWidth >> 16);
- appleheader[14] = (unsigned char)(r->header.cupsWidth >> 8);
- @@ -1119,6 +1154,15 @@ _cupsRasterWriteHeader(
- appleheader[22] = (unsigned char)(r->header.HWResolution[0] >> 8);
- appleheader[23] = (unsigned char)(r->header.HWResolution[0]);
- + for (i = 0; i < (int)(sizeof(apple_media_types) / sizeof(apple_media_types[0])); i ++)
- + {
- + if (!strcmp(r->header.MediaType, apple_media_types[i]))
- + {
- + appleheader[4] = (unsigned char)i;
- + break;
- + }
- + }
- +
- return (cups_raster_io(r, appleheader, sizeof(appleheader)) == sizeof(appleheader));
- }
- else
- diff --git a/cups/sidechannel.c b/cups/sidechannel.c
- index b43123a8c..56a5d0116 100644
- --- a/cups/sidechannel.c
- +++ b/cups/sidechannel.c
- @@ -1,10 +1,11 @@
- /*
- * Side-channel API code for CUPS.
- *
- - * Copyright 2007-2014 by Apple Inc.
- - * Copyright 2006 by Easy Software Products.
- + * Copyright © 2007-2019 by Apple Inc.
- + * Copyright © 2006 by Easy Software Products.
- *
- - * Licensed under Apache License v2.0. See the file "LICENSE" for more information.
- + * Licensed under Apache License v2.0. See the file "LICENSE" for more
- + * information.
- */
- /*
- @@ -589,8 +590,8 @@ cupsSideChannelWrite(
- if ((buffer = _cupsBufferGet((size_t)datalen + 4)) == NULL)
- return (-1);
- - buffer[0] = command;
- - buffer[1] = status;
- + buffer[0] = (char)command;
- + buffer[1] = (char)status;
- buffer[2] = (char)(datalen >> 8);
- buffer[3] = (char)(datalen & 255);
- diff --git a/cups/snmp.c b/cups/snmp.c
- index 1d9da01f2..6da119d76 100644
- --- a/cups/snmp.c
- +++ b/cups/snmp.c
- @@ -1,7 +1,7 @@
- /*
- * SNMP functions for CUPS.
- *
- - * Copyright © 2007-2014 by Apple Inc.
- + * Copyright © 2007-2019 by Apple Inc.
- * Copyright © 2006-2007 by Easy Software Products, all rights reserved.
- *
- * Licensed under Apache License v2.0. See the file "LICENSE" for more
- @@ -1167,7 +1167,7 @@ asn1_encode_snmp(unsigned char *buffer, /* I - Buffer */
- memcpy(bufptr, packet->community, commlen);
- bufptr += commlen;
- - *bufptr++ = packet->request_type; /* Get-Request-PDU/Get-Next-Request-PDU */
- + *bufptr++ = (unsigned char)packet->request_type; /* Get-Request-PDU/Get-Next-Request-PDU */
- asn1_set_length(&bufptr, reqlen);
- asn1_set_integer(&bufptr, (int)packet->request_id);
- diff --git a/cups/string.c b/cups/string.c
- index 54f7bd0cf..93cdad19d 100644
- --- a/cups/string.c
- +++ b/cups/string.c
- @@ -146,7 +146,7 @@ _cupsStrDate(char *buf, /* I - Buffer */
- size_t bufsize, /* I - Size of buffer */
- time_t timeval) /* I - Time value */
- {
- - struct tm *dateval; /* Local date/time */
- + struct tm date; /* Local date/time */
- char temp[1024]; /* Temporary buffer */
- _cups_globals_t *cg = _cupsGlobals(); /* Per-thread globals */
- @@ -154,15 +154,15 @@ _cupsStrDate(char *buf, /* I - Buffer */
- if (!cg->lang_default)
- cg->lang_default = cupsLangDefault();
- - dateval = localtime(&timeval);
- + localtime_r(&timeval, &date);
- if (cg->lang_default->encoding != CUPS_UTF8)
- {
- - strftime(temp, sizeof(temp), "%c", dateval);
- + strftime(temp, sizeof(temp), "%c", &date);
- cupsCharsetToUTF8((cups_utf8_t *)buf, temp, (int)bufsize, cg->lang_default->encoding);
- }
- else
- - strftime(buf, bufsize, "%c", dateval);
- + strftime(buf, bufsize, "%c", &date);
- return (buf);
- }
- diff --git a/cups/testraster.c b/cups/testraster.c
- index d3dab4bbc..de72a4bfb 100644
- --- a/cups/testraster.c
- +++ b/cups/testraster.c
- @@ -1,7 +1,7 @@
- /*
- * Raster test program routines for CUPS.
- *
- - * Copyright © 2007-2018 by Apple Inc.
- + * Copyright © 2007-2019 by Apple Inc.
- * Copyright © 1997-2007 by Easy Software Products.
- *
- * Licensed under Apache License v2.0. See the file "LICENSE" for more
- @@ -22,8 +22,7 @@
- static int do_ras_file(const char *filename);
- static int do_raster_tests(cups_mode_t mode);
- -static void print_changes(cups_page_header2_t *header,
- - cups_page_header2_t *expected);
- +static void print_changes(cups_page_header2_t *header, cups_page_header2_t *expected);
- /*
- @@ -174,6 +173,8 @@ do_raster_tests(cups_mode_t mode) /* O - Write mode */
- header.cupsPageSize[0] = 288.0f;
- header.cupsPageSize[1] = 288.0f;
- + strlcpy(header.MediaType, "auto", sizeof(header.MediaType));
- +
- if (page & 1)
- {
- header.cupsBytesPerLine *= 4;
- @@ -308,6 +309,8 @@ do_raster_tests(cups_mode_t mode) /* O - Write mode */
- expected.PageSize[0] = 288;
- expected.PageSize[1] = 288;
- + strlcpy(expected.MediaType, "auto", sizeof(expected.MediaType));
- +
- if (mode != CUPS_RASTER_WRITE_PWG)
- {
- expected.cupsPageSize[0] = 288.0f;
- diff --git a/cups/testthreads.c b/cups/testthreads.c
- new file mode 100644
- index 000000000..441bc9f15
- --- /dev/null
- +++ b/cups/testthreads.c
- @@ -0,0 +1,268 @@
- +/*
- + * Threaded test program for CUPS.
- + *
- + * Copyright © 2012-2019 by Apple Inc.
- + *
- + * Licensed under Apache License v2.0. See the file "LICENSE" for more
- + * information.
- + */
- +
- +/*
- + * Include necessary headers...
- + */
- +
- +#include <stdio.h>
- +#include <errno.h>
- +#include <cups/cups.h>
- +#include <cups/thread-private.h>
- +
- +
- +/*
- + * Local functions...
- + */
- +
- +static int enum_dests_cb(void *_name, unsigned flags, cups_dest_t *dest);
- +static void *run_query(cups_dest_t *dest);
- +static void show_supported(http_t *http, cups_dest_t *dest, cups_dinfo_t *dinfo, const char *option, const char *value);
- +
- +
- +/*
- + * 'main()' - Main entry.
- + */
- +
- +int /* O - Exit status */
- +main(int argc, /* I - Number of command-line arguments */
- + char *argv[]) /* I - Command-line arguments */
- +{
- + /*
- + * Go through all the available destinations to find the requested one...
- + */
- +
- + (void)argc;
- +
- + cupsEnumDests(CUPS_DEST_FLAGS_NONE, -1, NULL, 0, 0, enum_dests_cb, argv[1]);
- +
- + return (0);
- +}
- +
- +
- +/*
- + * 'enum_dests_cb()' - Destination enumeration function...
- + */
- +
- +static int /* O - 1 to continue, 0 to stop */
- +enum_dests_cb(void *_name, /* I - Printer name, if any */
- + unsigned flags, /* I - Enumeration flags */
- + cups_dest_t *dest) /* I - Found destination */
- +{
- + const char *name = (const char *)_name;
- + /* Printer name */
- + cups_dest_t *cdest; /* Copied destination */
- +
- +
- + (void)flags;
- +
- + /*
- + * If a name was specified, compare it...
- + */
- +
- + if (name && strcasecmp(name, dest->name))
- + return (1); /* Continue */
- +
- + /*
- + * Copy the destination and run the query on a separate thread...
- + */
- +
- + cupsCopyDest(dest, 0, &cdest);
- + _cupsThreadWait(_cupsThreadCreate((_cups_thread_func_t)run_query, cdest));
- +
- + cupsFreeDests(1, cdest);
- +
- + /*
- + * Continue if no name was specified or the name matches...
- + */
- +
- + return (!name || !strcasecmp(name, dest->name));
- +}
- +
- +
- +/*
- + * 'run_query()' - Query printer capabilities on a separate thread.
- + */
- +
- +static void * /* O - Return value (not used) */
- +run_query(cups_dest_t *dest) /* I - Destination to query */
- +{
- + http_t *http; /* Connection to destination */
- + cups_dinfo_t *dinfo; /* Destination info */
- + unsigned dflags = CUPS_DEST_FLAGS_NONE;
- + /* Destination flags */
- +
- +
- + if ((http = cupsConnectDest(dest, dflags, 300, NULL, NULL, 0, NULL, NULL)) == NULL)
- + {
- + printf("testthreads: Unable to connect to destination \"%s\": %s\n", dest->name, cupsLastErrorString());
- + return (NULL);
- + }
- +
- + if ((dinfo = cupsCopyDestInfo(http, dest)) == NULL)
- + {
- + printf("testdest: Unable to get information for destination \"%s\": %s\n", dest->name, cupsLastErrorString());
- + return (NULL);
- + }
- +
- + printf("\n%s:\n", dest->name);
- +
- + show_supported(http, dest, dinfo, NULL, NULL);
- +
- + return (NULL);
- +}
- +
- +
- +
- +/*
- + * 'show_supported()' - Show supported options, values, etc.
- + */
- +
- +static void
- +show_supported(http_t *http, /* I - Connection to destination */
- + cups_dest_t *dest, /* I - Destination */
- + cups_dinfo_t *dinfo, /* I - Destination information */
- + const char *option, /* I - Option, if any */
- + const char *value) /* I - Value, if any */
- +{
- + ipp_attribute_t *attr; /* Attribute */
- + int i, /* Looping var */
- + count; /* Number of values */
- +
- +
- + if (!option)
- + {
- + attr = cupsFindDestSupported(http, dest, dinfo, "job-creation-attributes");
- + if (attr)
- + {
- + count = ippGetCount(attr);
- + for (i = 0; i < count; i ++)
- + show_supported(http, dest, dinfo, ippGetString(attr, i, NULL), NULL);
- + }
- + else
- + {
- + static const char * const options[] =
- + { /* List of standard options */
- + CUPS_COPIES,
- + CUPS_FINISHINGS,
- + CUPS_MEDIA,
- + CUPS_NUMBER_UP,
- + CUPS_ORIENTATION,
- + CUPS_PRINT_COLOR_MODE,
- + CUPS_PRINT_QUALITY,
- + CUPS_SIDES
- + };
- +
- + puts(" No job-creation-attributes-supported attribute, probing instead.");
- +
- + for (i = 0; i < (int)(sizeof(options) / sizeof(options[0])); i ++)
- + if (cupsCheckDestSupported(http, dest, dinfo, options[i], NULL))
- + show_supported(http, dest, dinfo, options[i], NULL);
- + }
- + }
- + else if (!value)
- + {
- + printf(" %s (%s - %s)\n", option, cupsLocalizeDestOption(http, dest, dinfo, option), cupsCheckDestSupported(http, dest, dinfo, option, NULL) ? "supported" : "not-supported");
- +
- + if ((attr = cupsFindDestSupported(http, dest, dinfo, option)) != NULL)
- + {
- + count = ippGetCount(attr);
- +
- + switch (ippGetValueTag(attr))
- + {
- + case IPP_TAG_INTEGER :
- + for (i = 0; i < count; i ++)
- + printf(" %d\n", ippGetInteger(attr, i));
- + break;
- +
- + case IPP_TAG_ENUM :
- + for (i = 0; i < count; i ++)
- + {
- + int val = ippGetInteger(attr, i);
- + char valstr[256];
- +
- + snprintf(valstr, sizeof(valstr), "%d", val);
- + printf(" %s (%s)\n", ippEnumString(option, ippGetInteger(attr, i)), cupsLocalizeDestValue(http, dest, dinfo, option, valstr));
- + }
- + break;
- +
- + case IPP_TAG_RANGE :
- + for (i = 0; i < count; i ++)
- + {
- + int upper, lower = ippGetRange(attr, i, &upper);
- +
- + printf(" %d-%d\n", lower, upper);
- + }
- + break;
- +
- + case IPP_TAG_RESOLUTION :
- + for (i = 0; i < count; i ++)
- + {
- + int xres, yres;
- + ipp_res_t units;
- + xres = ippGetResolution(attr, i, &yres, &units);
- +
- + if (xres == yres)
- + printf(" %d%s\n", xres, units == IPP_RES_PER_INCH ? "dpi" : "dpcm");
- + else
- + printf(" %dx%d%s\n", xres, yres, units == IPP_RES_PER_INCH ? "dpi" : "dpcm");
- + }
- + break;
- +
- + case IPP_TAG_KEYWORD :
- + for (i = 0; i < count; i ++)
- + printf(" %s (%s)\n", ippGetString(attr, i, NULL), cupsLocalizeDestValue(http, dest, dinfo, option, ippGetString(attr, i, NULL)));
- + break;
- +
- + case IPP_TAG_TEXTLANG :
- + case IPP_TAG_NAMELANG :
- + case IPP_TAG_TEXT :
- + case IPP_TAG_NAME :
- + case IPP_TAG_URI :
- + case IPP_TAG_URISCHEME :
- + case IPP_TAG_CHARSET :
- + case IPP_TAG_LANGUAGE :
- + case IPP_TAG_MIMETYPE :
- + for (i = 0; i < count; i ++)
- + printf(" %s\n", ippGetString(attr, i, NULL));
- + break;
- +
- + case IPP_TAG_STRING :
- + for (i = 0; i < count; i ++)
- + {
- + int j, len;
- + unsigned char *data = ippGetOctetString(attr, i, &len);
- +
- + fputs(" ", stdout);
- + for (j = 0; j < len; j ++)
- + {
- + if (data[j] < ' ' || data[j] >= 0x7f)
- + printf("<%02X>", data[j]);
- + else
- + putchar(data[j]);
- + }
- + putchar('\n');
- + }
- + break;
- +
- + case IPP_TAG_BOOLEAN :
- + break;
- +
- + default :
- + printf(" %s\n", ippTagString(ippGetValueTag(attr)));
- + break;
- + }
- + }
- +
- + }
- + else if (cupsCheckDestSupported(http, dest, dinfo, option, value))
- + puts("YES");
- + else
- + puts("NO");
- +}
- diff --git a/cups/tls-darwin.c b/cups/tls-darwin.c
- index e8c4fb713..b3bd50bf8 100644
- --- a/cups/tls-darwin.c
- +++ b/cups/tls-darwin.c
- @@ -2002,7 +2002,8 @@ static const char * /* O - Keychain path */
- http_cdsa_default_path(char *buffer, /* I - Path buffer */
- size_t bufsize) /* I - Size of buffer */
- {
- - const char *home = getenv("HOME"); /* HOME environment variable */
- + _cups_globals_t *cg = _cupsGlobals();
- + /* Pointer to library globals */
- /*
- @@ -2011,8 +2012,8 @@ http_cdsa_default_path(char *buffer, /* I - Path buffer */
- * 10.11.4 (!), so we need to create our own keychain just for CUPS.
- */
- - if (getuid() && home)
- - snprintf(buffer, bufsize, "%s/.cups/ssl.keychain", home);
- + if (cg->home)
- + snprintf(buffer, bufsize, "%s/.cups/ssl.keychain", cg->home);
- else
- strlcpy(buffer, "/etc/cups/ssl.keychain", bufsize);
- diff --git a/cups/tls-gnutls.c b/cups/tls-gnutls.c
- index fc52f493c..329cc0eb4 100644
- --- a/cups/tls-gnutls.c
- +++ b/cups/tls-gnutls.c
- @@ -935,12 +935,13 @@ static const char * /* O - Path or NULL on error */
- http_gnutls_default_path(char *buffer,/* I - Path buffer */
- size_t bufsize)/* I - Size of path buffer */
- {
- - const char *home = getenv("HOME"); /* HOME environment variable */
- + _cups_globals_t *cg = _cupsGlobals();
- + /* Pointer to library globals */
- - if (getuid() && home)
- + if (cg->home)
- {
- - snprintf(buffer, bufsize, "%s/.cups", home);
- + snprintf(buffer, bufsize, "%s/.cups", cg->home);
- if (access(buffer, 0))
- {
- DEBUG_printf(("1http_gnutls_default_path: Making directory \"%s\".", buffer));
- @@ -951,7 +952,7 @@ http_gnutls_default_path(char *buffer,/* I - Path buffer */
- }
- }
- - snprintf(buffer, bufsize, "%s/.cups/ssl", home);
- + snprintf(buffer, bufsize, "%s/.cups/ssl", cg->home);
- if (access(buffer, 0))
- {
- DEBUG_printf(("1http_gnutls_default_path: Making directory \"%s\".", buffer));
- diff --git a/cups/tls-sspi.c b/cups/tls-sspi.c
- index 6e3c03b9e..ccbdf8aaf 100644
- --- a/cups/tls-sspi.c
- +++ b/cups/tls-sspi.c
- @@ -1967,6 +1967,8 @@ http_sspi_make_credentials(
- GetSystemTime(&et);
- et.wYear += years;
- + if (et.wMonth == 2 && et.wDay == 29)
- + et.wDay = 28; /* Avoid Feb 29th due to leap years */
- ZeroMemory(&exts, sizeof(exts));
- diff --git a/cups/usersys.c b/cups/usersys.c
- index 497681e27..d74c951cf 100644
- --- a/cups/usersys.c
- +++ b/cups/usersys.c
- @@ -40,6 +40,8 @@
- # define kCUPSPrintingPrefs CFSTR(".GlobalPreferences")
- # define kPREFIX "AirPrint"
- # endif /* TARGET_OS_OSX */
- +# define kDigestOptionsKey CFSTR(kPREFIX "DigestOptions")
- +# define kUserKey CFSTR(kPREFIX "User")
- # define kUserAgentTokensKey CFSTR(kPREFIX "UserAgentTokens")
- # define kAllowAnyRootKey CFSTR(kPREFIX "AllowAnyRoot")
- # define kAllowExpiredCertsKey CFSTR(kPREFIX "AllowExpiredCerts")
- @@ -63,6 +65,7 @@
- typedef struct _cups_client_conf_s /**** client.conf config data ****/
- {
- + _cups_digestoptions_t digestoptions; /* DigestOptions values */
- _cups_uatokens_t uatokens; /* UserAgentTokens values */
- #ifdef HAVE_SSL
- int ssl_options, /* SSLOptions values */
- @@ -97,6 +100,7 @@ static void cups_finalize_client_conf(_cups_client_conf_t *cc);
- static void cups_init_client_conf(_cups_client_conf_t *cc);
- static void cups_read_client_conf(cups_file_t *fp, _cups_client_conf_t *cc);
- static void cups_set_default_ipp_port(_cups_globals_t *cg);
- +static void cups_set_digestoptions(_cups_client_conf_t *cc, const char *value);
- static void cups_set_encryption(_cups_client_conf_t *cc, const char *value);
- #ifdef HAVE_GSSAPI
- static void cups_set_gss_service_name(_cups_client_conf_t *cc, const char *value);
- @@ -967,7 +971,6 @@ void
- _cupsSetDefaults(void)
- {
- cups_file_t *fp; /* File */
- - const char *home; /* Home directory of user */
- char filename[1024]; /* Filename */
- _cups_client_conf_t cc; /* client.conf values */
- _cups_globals_t *cg = _cupsGlobals(); /* Pointer to library globals */
- @@ -993,19 +996,13 @@ _cupsSetDefaults(void)
- cupsFileClose(fp);
- }
- -# ifdef HAVE_GETEUID
- - if ((geteuid() == getuid() || !getuid()) && getegid() == getgid() && (home = getenv("HOME")) != NULL)
- -# elif !defined(_WIN32)
- - if (getuid() && (home = getenv("HOME")) != NULL)
- -# else
- - if ((home = getenv("HOME")) != NULL)
- -# endif /* HAVE_GETEUID */
- + if (cg->home)
- {
- /*
- * Look for ~/.cups/client.conf...
- */
- - snprintf(filename, sizeof(filename), "%s/.cups/client.conf", home);
- + snprintf(filename, sizeof(filename), "%s/.cups/client.conf", cg->home);
- if ((fp = cupsFileOpen(filename, "r")) != NULL)
- {
- cups_read_client_conf(fp, &cc);
- @@ -1324,10 +1321,14 @@ cups_init_client_conf(
- cc->validate_certs = bval;
- # endif /* HAVE_SSL */
- + if (cups_apple_get_string(kDigestOptionsKey, sval, sizeof(sval)))
- + cups_set_digestoptions(cc, sval);
- +
- + if (cups_apple_get_string(kUserKey, sval, sizeof(sval)))
- + strlcpy(cc->user, sval, sizeof(cc->user));
- +
- if (cups_apple_get_string(kUserAgentTokensKey, sval, sizeof(sval)))
- - {
- cups_set_uatokens(cc, sval);
- - }
- #endif /* __APPLE__ */
- }
- @@ -1353,7 +1354,9 @@ cups_read_client_conf(
- linenum = 0;
- while (cupsFileGetConf(fp, line, sizeof(line), &value, &linenum))
- {
- - if (!_cups_strcasecmp(line, "Encryption") && value)
- + if (!_cups_strcasecmp(line, "DigestOptions") && value)
- + cups_set_digestoptions(cc, value);
- + else if (!_cups_strcasecmp(line, "Encryption") && value)
- cups_set_encryption(cc, value);
- #ifndef __APPLE__
- /*
- @@ -1408,6 +1411,23 @@ cups_set_default_ipp_port(
- cg->ipp_port = CUPS_DEFAULT_IPP_PORT;
- }
- +
- +/*
- + * 'cups_set_digestoptions()' - Set the DigestOptions value.
- + */
- +
- +static void
- +cups_set_digestoptions(
- + _cups_client_conf_t *cc, /* I - client.conf values */
- + const char *value) /* I - Value */
- +{
- + if (!_cups_strcasecmp(value, "DenyMD5"))
- + cc->digestoptions = _CUPS_DIGESTOPTIONS_DENYMD5;
- + else if (!_cups_strcasecmp(value, "None"))
- + cc->digestoptions = _CUPS_DIGESTOPTIONS_NONE;
- +}
- +
- +
- /*
- * 'cups_set_encryption()' - Set the Encryption value.
- */
- diff --git a/doc/help/api-admin.html b/doc/help/api-admin.html
- index 7e6b40702..f9969d4a9 100644
- --- a/doc/help/api-admin.html
- +++ b/doc/help/api-admin.html
- @@ -5,7 +5,7 @@
- <title>Administration APIs</title>
- <meta name="keywords" content="Programming">
- <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
- - <meta name="creator" content="codedoc v3.2">
- + <meta name="creator" content="codedoc v3.1">
- <meta name="author" content="Unknown">
- <meta name="copyright" content="Unknown">
- <meta name="version" content="0.0">
- @@ -450,7 +450,6 @@ h3.title {
- --></style>
- </head>
- <body>
- - <div class="header">
- <!--
- Administrative API header for CUPS.
- @@ -482,7 +481,6 @@ h3.title {
- </tr>
- </tbody>
- </table></div>
- - </div>
- <div class="contents">
- <h2 class="title">Contents</h2>
- <ul class="contents">
- diff --git a/doc/help/api-filter.html b/doc/help/api-filter.html
- index 961f4623a..eddd06389 100644
- --- a/doc/help/api-filter.html
- +++ b/doc/help/api-filter.html
- @@ -5,7 +5,7 @@
- <title>Filter and Backend Programming</title>
- <meta name="keywords" content="Programming">
- <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
- - <meta name="creator" content="codedoc v3.2">
- + <meta name="creator" content="codedoc v3.1">
- <meta name="author" content="Unknown">
- <meta name="copyright" content="Unknown">
- <meta name="version" content="0.0">
- @@ -450,7 +450,6 @@ h3.title {
- --></style>
- </head>
- <body>
- - <div class="header">
- <!--
- Filter and backend programming header for CUPS.
- @@ -488,7 +487,6 @@ h3.title {
- </tr>
- </tbody>
- </table></div>
- - </div>
- <div class="contents">
- <h2 class="title">Contents</h2>
- <ul class="contents">
- diff --git a/doc/help/api-ppd.html b/doc/help/api-ppd.html
- index 623a3a8e0..fce4da3f7 100644
- --- a/doc/help/api-ppd.html
- +++ b/doc/help/api-ppd.html
- @@ -5,7 +5,7 @@
- <title>PPD API (DEPRECATED)</title>
- <meta name="keywords" content="Programming">
- <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
- - <meta name="creator" content="codedoc v3.2">
- + <meta name="creator" content="codedoc v3.1">
- <meta name="author" content="Unknown">
- <meta name="copyright" content="Unknown">
- <meta name="version" content="0.0">
- @@ -450,7 +450,6 @@ h3.title {
- --></style>
- </head>
- <body>
- - <div class="header">
- <!--
- PPD API header for CUPS.
- @@ -487,7 +486,6 @@ h3.title {
- </tr>
- </tbody>
- </table></div>
- - </div>
- <div class="contents">
- <h2 class="title">Contents</h2>
- <ul class="contents">
- diff --git a/doc/help/api-raster.html b/doc/help/api-raster.html
- index 6a9e76385..6eccab791 100644
- --- a/doc/help/api-raster.html
- +++ b/doc/help/api-raster.html
- @@ -5,7 +5,7 @@
- <title>Raster API</title>
- <meta name="keywords" content="Programming">
- <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
- - <meta name="creator" content="codedoc v3.2">
- + <meta name="creator" content="codedoc v3.1">
- <meta name="author" content="Unknown">
- <meta name="copyright" content="Unknown">
- <meta name="version" content="0.0">
- @@ -450,7 +450,6 @@ h3.title {
- --></style>
- </head>
- <body>
- - <div class="header">
- <!--
- Raster API documentation for CUPS.
- @@ -482,7 +481,6 @@ h3.title {
- </tr>
- </tbody>
- </table></div>
- - </div>
- <div class="contents">
- <h2 class="title">Contents</h2>
- <ul class="contents">
- diff --git a/doc/help/cupspm.epub b/doc/help/cupspm.epub
- index 1a8c38823..1d8572474 100644
- Binary files a/doc/help/cupspm.epub and b/doc/help/cupspm.epub differ
- diff --git a/doc/help/cupspm.html b/doc/help/cupspm.html
- index fa1a87681..9b48cde34 100644
- --- a/doc/help/cupspm.html
- +++ b/doc/help/cupspm.html
- @@ -5,62 +5,91 @@
- <title>CUPS Programming Manual</title>
- <meta name="keywords" content="Programming">
- <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
- - <meta name="creator" content="codedoc v3.2">
- + <meta name="creator" content="codedoc v3.1">
- <meta name="author" content="Michael R Sweet">
- <meta name="copyright" content="Copyright © 2007-2019 by Apple Inc. All Rights Reserved.">
- - <meta name="version" content="2.3.0">
- + <meta name="version" content="2.3.1">
- <style type="text/css"><!--
- -body, p, h1, h2, h3, h4, h5, h6 {
- +body, p, h1, h2, h3, h4 {
- font-family: sans-serif;
- - line-height: 1.4;
- }
- -h1, h2, h3, h4, h5, h6 {
- - font-weight: bold;
- - page-break-inside: avoid;
- -}
- -h1 {
- +div.body h1 {
- font-size: 250%;
- + font-weight: bold;
- margin: 0;
- }
- -h2 {
- +div.body h2 {
- font-size: 250%;
- margin-top: 1.5em;
- }
- -h3 {
- - font-size: 200%;
- +div.body h3 {
- + font-size: 150%;
- margin-bottom: 0.5em;
- margin-top: 1.5em;
- }
- -h4 {
- - font-size: 150%;
- +div.body h4 {
- + font-size: 110%;
- margin-bottom: 0.5em;
- margin-top: 1.5em;
- }
- -h5 {
- - font-size: 125%;
- +div.body h5 {
- + font-size: 100%;
- margin-bottom: 0.5em;
- margin-top: 1.5em;
- }
- -h6 {
- +div.contents {
- + background: #e8e8e8;
- + border: solid thin black;
- + padding: 10px;
- +}
- +div.contents h1 {
- font-size: 110%;
- - margin-bottom: 0.5em;
- - margin-top: 1.5em;
- }
- -div.header h1, div.header p {
- - text-align: center;
- +div.contents h2 {
- + font-size: 100%;
- }
- -div.contents, div.body, div.footer {
- - page-break-before: always;
- +div.contents ul.contents {
- + font-size: 80%;
- }
- -.class, .enumeration, .function, .struct, .typedef, .union {
- +.class {
- border-bottom: solid 2px gray;
- }
- +.constants {
- +}
- .description {
- margin-top: 0.5em;
- }
- +.discussion {
- +}
- +.enumeration {
- + border-bottom: solid 2px gray;
- +}
- .function {
- + border-bottom: solid 2px gray;
- margin-bottom: 0;
- }
- +.members {
- +}
- +.method {
- +}
- +.parameters {
- +}
- +.returnvalue {
- +}
- +.struct {
- + border-bottom: solid 2px gray;
- +}
- +.typedef {
- + border-bottom: solid 2px gray;
- +}
- +.union {
- + border-bottom: solid 2px gray;
- +}
- +.variable {
- +}
- +h1, h2, h3, h4, h5, h6 {
- + page-break-inside: avoid;
- +}
- blockquote {
- border: solid thin gray;
- box-shadow: 3px 3px 5px rgba(0,0,0,0.5);
- @@ -68,15 +97,19 @@ blockquote {
- page-break-inside: avoid;
- }
- p code, li code, p.code, pre, ul.code li {
- + background: rgba(127,127,127,0.1);
- + border: thin dotted gray;
- font-family: monospace;
- + font-size: 90%;
- hyphens: manual;
- -webkit-hyphens: manual;
- + page-break-inside: avoid;
- }
- p.code, pre, ul.code li {
- - background: rgba(127,127,127,0.1);
- - border: thin dotted gray;
- padding: 10px;
- - page-break-inside: avoid;
- +}
- +p code, li code {
- + padding: 2px 5px;
- }
- a:link, a:visited {
- text-decoration: none;
- @@ -90,7 +123,7 @@ span.info {
- font-weight: bold;
- white-space: nowrap;
- }
- -h1 span.info, h2 span.info, h3 span.info, h4 span.info {
- +h3 span.info, h4 span.info {
- border-top-left-radius: 10px;
- border-top-right-radius: 10px;
- float: right;
- @@ -110,38 +143,13 @@ ul.contents > li {
- ul.contents li ul.code, ul.contents li ul.subcontents {
- padding-left: 2em;
- }
- -table {
- - border-collapse: collapse;
- - border-spacing: 0;
- -}
- -td {
- - border: solid 1px #666;
- - padding: 5px 10px;
- - vertical-align: top;
- -}
- -td.left {
- - text-align: left;
- -}
- -td.center {
- - text-align: center;
- -}
- -td.right {
- - text-align: right;
- -}
- -th {
- - border-bottom: solid 2px #000;
- - padding: 1px 5px;
- - text-align: center;
- - vertical-align: bottom;
- -}
- -tr:nth-child(even) {
- - background: rgba(127,127,127,0.1);n}
- table.list {
- border-collapse: collapse;
- width: 100%;
- }
- +table.list tr:nth-child(even) {
- + background: rgba(127,127,127,0.1);]n}
- table.list th {
- - border-bottom: none;
- border-right: 2px solid gray;
- font-family: monospace;
- padding: 5px 10px 5px 2px;
- @@ -149,22 +157,24 @@ table.list th {
- vertical-align: top;
- }
- table.list td {
- - border: none;
- padding: 5px 2px 5px 10px;
- text-align: left;
- vertical-align: top;
- }
- -h2.title, h3.title {
- +h1.title {
- +}
- +h2.title {
- + border-bottom: solid 2px black;
- +}
- +h3.title {
- border-bottom: solid 2px black;
- }
- --></style>
- </head>
- <body>
- - <div class="header">
- - <h1 class="title">CUPS Programming Manual</h1>
- - <p>Michael R Sweet</p>
- - <p>Copyright © 2007-2019 by Apple Inc. All Rights Reserved.</p>
- - </div>
- + <h1 class="title">CUPS Programming Manual</h1>
- + <p>Michael R Sweet</p>
- + <p>Copyright © 2007-2019 by Apple Inc. All Rights Reserved.</p>
- <div class="contents">
- <h2 class="title">Contents</h2>
- <ul class="contents">
- @@ -506,20 +516,16 @@ h2.title, h3.title {
- <blockquote>
- <p>Please <a href="https://github.com/apple/cups/issues">file issues on Github</a> to provide feedback on this document.</p>
- </blockquote>
- - <h2 class="title" id="introduction">Introduction</h2>
- + <h2><a id="introduction">Introduction</a></h2>
- <p>CUPS provides the "cups" library to talk to the different parts of CUPS and with Internet Printing Protocol (IPP) printers. The "cups" library functions are accessed by including the <code><cups/cups.h></code> header.</p>
- <p>CUPS is based on the Internet Printing Protocol ("IPP"), which allows clients (applications) to communicate with a server (the scheduler, printers, etc.) to get a list of destinations, send print jobs, and so forth. You identify which server you want to communicate with using a pointer to the opaque structure <code>http_t</code>. The <code>CUPS_HTTP_DEFAULT</code> constant can be used when you want to talk to the CUPS scheduler.</p>
- - <h3 class="title" id="guidelines">Guidelines</h3>
- + <h3><a id="guidelines">Guidelines</a></h3>
- <p>When writing software (other than printer drivers) that uses the "cups" library:</p>
- <ul>
- - <li> <p>Do not use undocumented or deprecated APIs,</p>
- -</li>
- - <li> <p>Do not rely on pre-configured printers,</p>
- -</li>
- - <li> <p>Do not assume that printers support specific features or formats, and</p>
- -</li>
- - <li> <p>Do not rely on implementation details (PPDs, etc.)</p>
- -</li>
- + <li>Do not use undocumented or deprecated APIs,</li>
- + <li>Do not rely on pre-configured printers,</li>
- + <li>Do not assume that printers support specific features or formats, and</li>
- + <li>Do not rely on implementation details (PPDs, etc.)</li>
- </ul>
- <p>CUPS is designed to insulate users and developers from the implementation details of printers and file formats. The goal is to allow an application to supply a print file in a standard format with the user intent ("print four copies, two-sided on A4 media, and staple each copy") and have the printing system manage the printer communication and format conversion needed.</p>
- <p>Similarly, printer and job management applications can use standard query operations to obtain the status information in a common, generic form and use standard management operations to control the state of those printers and jobs.</p>
- @@ -527,9 +533,9 @@ h2.title, h3.title {
- <p><strong>Note:</strong></p>
- <p>CUPS printer drivers necessarily depend on specific file formats and certain implementation details of the CUPS software. Please consult the Postscript and raster printer driver developer documentation on <a href="https://www.cups.org/documentation.html">CUPS.org</a> for more information.</p>
- </blockquote>
- - <h3 class="title" id="terms-used-in-this-document">Terms Used in This Document</h3>
- - <p>A <em>Destination</em> is a printer or print queue that accepts print jobs. A <em>Print Job</em> is a collection of one or more documents that are processed by a destination using options supplied when creating the job. A <em>Document</em> is a file (JPEG image, PDF file, etc.) suitable for printing. An <em>Option</em> controls some aspect of printing, such as the media used. <em>Media</em> is the sheets or roll that is printed on. An <em>Attribute</em> is an option encoded for an Internet Printing Protocol (IPP) request.</p>
- - <h3 class="title" id="compiling-programs-that-use-the-cups-api">Compiling Programs That Use the CUPS API</h3>
- + <h3><a id="terms-used-in-this-document">Terms Used in This Document</a></h3>
- + <p>A <em>Destination</em> is a printer or print queue that accepts print jobs. A <em>Print</em> <em>Job</em> is a collection of one or more documents that are processed by a destination using options supplied when creating the job. A <em>Document</em> is a file (JPEG image, PDF file, etc.) suitable for printing. An <em>Option</em> controls some aspect of printing, such as the media used. <em>Media</em> is the sheets or roll that is printed on. An <em>Attribute</em> is an option encoded for an Internet Printing Protocol (IPP) request.</p>
- + <h3><a id="compiling-programs-that-use-the-cups-api">Compiling Programs That Use the CUPS API</a></h3>
- <p>The CUPS libraries can be used from any C, C++, or Objective C program. The method of compiling against the libraries varies depending on the operating system and installation of CUPS. The following sections show how to compile a simple program (shown below) in two common environments.</p>
- <p>The following simple program lists the available destinations:</p>
- <pre><code>#include <stdio.h>
- @@ -552,20 +558,20 @@ int main(void)
- return (0);
- }
- </code></pre>
- - <h4 id="compiling-with-xcode">Compiling with Xcode</h4>
- - <p>In Xcode, choose <em>New Project...</em> from the <em>File</em> menu (or press SHIFT+CMD+N), then select the <em>Command Line Tool</em> under the macOS Application project type. Click <em>Next</em> and enter a name for the project, for example "firstcups". Click <em>Next</em> and choose a project directory. The click <em>Next</em> to create the project.</p>
- - <p>In the project window, click on the <em>Build Phases</em> group and expand the <em>Link Binary with Libraries</em> section. Click <em>+</em>, type "libcups" to show the library, and then double-click on <code>libcups.tbd</code>.</p>
- + <h4><a id="compiling-with-xcode">Compiling with Xcode</a></h4>
- + <p>In Xcode, choose <em>New</em> <em>Project...</em> from the <em>File</em> menu (or press SHIFT+CMD+N), then select the <em>Command</em> <em>Line</em> <em>Tool</em> under the macOS Application project type. Click <em>Next</em> and enter a name for the project, for example "firstcups". Click <em>Next</em> and choose a project directory. The click <em>Next</em> to create the project.</p>
- + <p>In the project window, click on the <em>Build</em> <em>Phases</em> group and expand the <em>Link</em> <em>Binary</em> <em>with</em> <em>Libraries</em> section. Click <em>+</em>, type "libcups" to show the library, and then double-click on <code>libcups.tbd</code>.</p>
- <p>Finally, click on the <code>main.c</code> file in the sidebar and copy the example program to the file. Build and run (CMD+R) to see the list of destinations.</p>
- - <h4 id="compiling-with-gcc">Compiling with GCC</h4>
- - <p>From the command-line, create a file called <code>sample.c</code> using your favorite editor, copy the example to this file, and save. Then run the following command to compile it with GCC and run it:</p>
- + <h4><a id="compiling-with-gcc">Compiling with GCC</a></h4>
- + <p>From the command-line, create a file called <code>simple.c</code> using your favorite editor, copy the example to this file, and save. Then run the following command to compile it with GCC and run it:</p>
- <pre><code>gcc -o simple `cups-config --cflags` simple.c `cups-config --libs`
- ./simple
- </code></pre>
- <p>The <code>cups-config</code> command provides the compiler flags (<code>cups-config --cflags</code>) and libraries (<code>cups-config --libs</code>) needed for the local system.</p>
- - <h2 class="title" id="working-with-destinations">Working with Destinations</h2>
- + <h2><a id="working-with-destinations">Working with Destinations</a></h2>
- <p>Destinations, which in CUPS represent individual printers or classes (collections or pools) of printers, are represented by the <code>cups_dest_t</code> structure which includes the name (<code>name</code>), instance (<code>instance</code>, saved options/settings), whether the destination is the default for the user (<code>is_default</code>), and the options and basic information associated with that destination (<code>num_options</code> and <code>options</code>).</p>
- <p>Historically destinations have been manually maintained by the administrator of a system or network, but CUPS also supports dynamic discovery of destinations on the current network.</p>
- - <h3 class="title" id="finding-available-destinations">Finding Available Destinations</h3>
- + <h3><a id="finding-available-destinations">Finding Available Destinations</a></h3>
- <p>The <code>cupsEnumDests</code> function finds all of the available destinations:</p>
- <pre><code> int
- cupsEnumDests(unsigned flags, int msec, int *cancel,
- @@ -577,42 +583,24 @@ int main(void)
- <p>The <code>cancel</code> argument points to an integer variable that, when set to a non-zero value, will cause enumeration to stop as soon as possible. It can be <code>NULL</code> if not needed.</p>
- <p>The <code>type</code> and <code>mask</code> arguments are bitfields that allow the caller to filter the destinations based on categories and/or capabilities. The destination's "printer-type" value is masked by the <code>mask</code> value and compared to the <code>type</code> value when filtering. For example, to only enumerate destinations that are hosted on the local system, pass <code>CUPS_PRINTER_LOCAL</code> for the <code>type</code> argument and <code>CUPS_PRINTER_DISCOVERED</code> for the <code>mask</code> argument. The following constants can be used for filtering:</p>
- <ul>
- - <li> <p><code>CUPS_PRINTER_CLASS</code>: A collection of destinations.</p>
- -</li>
- - <li> <p><code>CUPS_PRINTER_FAX</code>: A facsimile device.</p>
- -</li>
- - <li> <p><code>CUPS_PRINTER_LOCAL</code>: A local printer or class. This constant has the value 0 (no bits set) and is only used for the <code>type</code> argument and is paired with the <code>CUPS_PRINTER_REMOTE</code> or <code>CUPS_PRINTER_DISCOVERED</code> constant passed in the <code>mask</code> argument.</p>
- -</li>
- - <li> <p><code>CUPS_PRINTER_REMOTE</code>: A remote (shared) printer or class.</p>
- -</li>
- - <li> <p><code>CUPS_PRINTER_DISCOVERED</code>: An available network printer or class.</p>
- -</li>
- - <li> <p><code>CUPS_PRINTER_BW</code>: Can do B&W printing.</p>
- -</li>
- - <li> <p><code>CUPS_PRINTER_COLOR</code>: Can do color printing.</p>
- -</li>
- - <li> <p><code>CUPS_PRINTER_DUPLEX</code>: Can do two-sided printing.</p>
- -</li>
- - <li> <p><code>CUPS_PRINTER_STAPLE</code>: Can staple output.</p>
- -</li>
- - <li> <p><code>CUPS_PRINTER_COLLATE</code>: Can quickly collate copies.</p>
- -</li>
- - <li> <p><code>CUPS_PRINTER_PUNCH</code>: Can punch output.</p>
- -</li>
- - <li> <p><code>CUPS_PRINTER_COVER</code>: Can cover output.</p>
- -</li>
- - <li> <p><code>CUPS_PRINTER_BIND</code>: Can bind output.</p>
- -</li>
- - <li> <p><code>CUPS_PRINTER_SORT</code>: Can sort output (mailboxes, etc.)</p>
- -</li>
- - <li> <p><code>CUPS_PRINTER_SMALL</code>: Can print on Letter/Legal/A4-size media.</p>
- -</li>
- - <li> <p><code>CUPS_PRINTER_MEDIUM</code>: Can print on Tabloid/B/C/A3/A2-size media.</p>
- -</li>
- - <li> <p><code>CUPS_PRINTER_LARGE</code>: Can print on D/E/A1/A0-size media.</p>
- -</li>
- - <li> <p><code>CUPS_PRINTER_VARIABLE</code>: Can print on rolls and custom-size media.</p>
- -</li>
- + <li><code>CUPS_PRINTER_CLASS</code>: A collection of destinations.</li>
- + <li><code>CUPS_PRINTER_FAX</code>: A facsimile device.</li>
- + <li><code>CUPS_PRINTER_LOCAL</code>: A local printer or class. This constant has the value 0 (no bits set) and is only used for the <code>type</code> argument and is paired with the <code>CUPS_PRINTER_REMOTE</code> or <code>CUPS_PRINTER_DISCOVERED</code> constant passed in the <code>mask</code> argument.</li>
- + <li><code>CUPS_PRINTER_REMOTE</code>: A remote (shared) printer or class.</li>
- + <li><code>CUPS_PRINTER_DISCOVERED</code>: An available network printer or class.</li>
- + <li><code>CUPS_PRINTER_BW</code>: Can do B&W printing.</li>
- + <li><code>CUPS_PRINTER_COLOR</code>: Can do color printing.</li>
- + <li><code>CUPS_PRINTER_DUPLEX</code>: Can do two-sided printing.</li>
- + <li><code>CUPS_PRINTER_STAPLE</code>: Can staple output.</li>
- + <li><code>CUPS_PRINTER_COLLATE</code>: Can quickly collate copies.</li>
- + <li><code>CUPS_PRINTER_PUNCH</code>: Can punch output.</li>
- + <li><code>CUPS_PRINTER_COVER</code>: Can cover output.</li>
- + <li><code>CUPS_PRINTER_BIND</code>: Can bind output.</li>
- + <li><code>CUPS_PRINTER_SORT</code>: Can sort output (mailboxes, etc.)</li>
- + <li><code>CUPS_PRINTER_SMALL</code>: Can print on Letter/Legal/A4-size media.</li>
- + <li><code>CUPS_PRINTER_MEDIUM</code>: Can print on Tabloid/B/C/A3/A2-size media.</li>
- + <li><code>CUPS_PRINTER_LARGE</code>: Can print on D/E/A1/A0-size media.</li>
- + <li><code>CUPS_PRINTER_VARIABLE</code>: Can print on rolls and custom-size media.</li>
- </ul>
- <p>The <code>cb</code> argument specifies a function to call for every destination that is found:</p>
- <pre><code>typedef int (*cups_dest_cb_t)(void *user_data,
- @@ -621,12 +609,9 @@ int main(void)
- </code></pre>
- <p>The callback function receives a copy of the <code>user_data</code> argument along with a bitfield (<code>flags</code>) and the destination that was found. The <code>flags</code> argument can have any of the following constant (bit) values set:</p>
- <ul>
- - <li> <p><code>CUPS_DEST_FLAGS_MORE</code>: There are more destinations coming.</p>
- -</li>
- - <li> <p><code>CUPS_DEST_FLAGS_REMOVED</code>: The destination has gone away and should be removed from the list of destinations a user can select.</p>
- -</li>
- - <li> <p><code>CUPS_DEST_FLAGS_ERROR</code>: An error occurred. The reason for the error can be found by calling the <code>cupsLastError</code> and/or <code>cupsLastErrorString</code> functions.</p>
- -</li>
- + <li><code>CUPS_DEST_FLAGS_MORE</code>: There are more destinations coming.</li>
- + <li><code>CUPS_DEST_FLAGS_REMOVED</code>: The destination has gone away and should be removed from the list of destinations a user can select.</li>
- + <li><code>CUPS_DEST_FLAGS_ERROR</code>: An error occurred. The reason for the error can be found by calling the <code>cupsLastError</code> and/or <code>cupsLastErrorString</code> functions.</li>
- </ul>
- <p>The callback function returns 0 to stop enumeration or 1 to continue.</p>
- <blockquote>
- @@ -700,45 +685,34 @@ my_get_dests(cups_ptype_t type, cups_ptype_t mask,
- return (user_data.num_dests);
- }
- </code></pre>
- - <h3 class="title" id="basic-destination-information">Basic Destination Information</h3>
- + <h3><a id="basic-destination-information">Basic Destination Information</a></h3>
- <p>The <code>num_options</code> and <code>options</code> members of the <code>cups_dest_t</code> structure provide basic attributes about the destination in addition to the user default options and values for that destination. The following names are predefined for various destination attributes:</p>
- <ul>
- - <li> <p>"auth-info-required": The type of authentication required for printing to this destination: "none", "username,password", "domain,username,password", or "negotiate" (Kerberos).</p>
- -</li>
- - <li> <p>"printer-info": The human-readable description of the destination such as "My Laser Printer".</p>
- -</li>
- - <li> <p>"printer-is-accepting-jobs": "true" if the destination is accepting new jobs, "false" otherwise.</p>
- -</li>
- - <li> <p>"printer-is-shared": "true" if the destination is being shared with other computers, "false" otherwise.</p>
- -</li>
- - <li> <p>"printer-location": The human-readable location of the destination such as "Lab 4".</p>
- -</li>
- - <li> <p>"printer-make-and-model": The human-readable make and model of the destination such as "ExampleCorp LaserPrinter 4000 Series".</p>
- -</li>
- - <li> <p>"printer-state": "3" if the destination is idle, "4" if the destination is printing a job, and "5" if the destination is stopped.</p>
- -</li>
- - <li> <p>"printer-state-change-time": The UNIX time when the destination entered the current state.</p>
- -</li>
- - <li> <p>"printer-state-reasons": Additional comma-delimited state keywords for the destination such as "media-tray-empty-error" and "toner-low-warning".</p>
- -</li>
- - <li> <p>"printer-type": The <code>cups_ptype_t</code> value associated with the destination.</p>
- -</li>
- - <li> <p>"printer-uri-supported": The URI associated with the destination; if not set, this destination was discovered but is not yet setup as a local printer.</p>
- -</li>
- + <li>"auth-info-required": The type of authentication required for printing to this destination: "none", "username,password", "domain,username,password", or "negotiate" (Kerberos).</li>
- + <li>"printer-info": The human-readable description of the destination such as "My Laser Printer".</li>
- + <li>"printer-is-accepting-jobs": "true" if the destination is accepting new jobs, "false" otherwise.</li>
- + <li>"printer-is-shared": "true" if the destination is being shared with other computers, "false" otherwise.</li>
- + <li>"printer-location": The human-readable location of the destination such as "Lab 4".</li>
- + <li>"printer-make-and-model": The human-readable make and model of the destination such as "ExampleCorp LaserPrinter 4000 Series".</li>
- + <li>"printer-state": "3" if the destination is idle, "4" if the destination is printing a job, and "5" if the destination is stopped.</li>
- + <li>"printer-state-change-time": The UNIX time when the destination entered the current state.</li>
- + <li>"printer-state-reasons": Additional comma-delimited state keywords for the destination such as "media-tray-empty-error" and "toner-low-warning".</li>
- + <li>"printer-type": The <code>cups_ptype_t</code> value associated with the destination.</li>
- + <li>"printer-uri-supported": The URI associated with the destination; if not set, this destination was discovered but is not yet setup as a local printer.</li>
- </ul>
- <p>Use the <code>cupsGetOption</code> function to retrieve the value. For example, the following code gets the make and model of a destination:</p>
- <pre><code>const char *model = cupsGetOption("printer-make-and-model",
- dest->num_options,
- dest->options);
- </code></pre>
- - <h3 class="title" id="detailed-destination-information">Detailed Destination Information</h3>
- + <h3><a id="detailed-destination-information">Detailed Destination Information</a></h3>
- <p>Once a destination has been chosen, the <code>cupsCopyDestInfo</code> function can be used to gather detailed information about the destination:</p>
- <pre><code>cups_dinfo_t *
- cupsCopyDestInfo(http_t *http, cups_dest_t *dest);
- </code></pre>
- <p>The <code>http</code> argument specifies a connection to the CUPS scheduler and is typically the constant <code>CUPS_HTTP_DEFAULT</code>. The <code>dest</code> argument specifies the destination to query.</p>
- <p>The <code>cups_dinfo_t</code> structure that is returned contains a snapshot of the supported options and their supported, ready, and default values. It also can report constraints between different options and values, and recommend changes to resolve those constraints.</p>
- - <h4 id="getting-supported-options-and-values">Getting Supported Options and Values</h4>
- + <h4><a id="getting-supported-options-and-values">Getting Supported Options and Values</a></h4>
- <p>The <code>cupsCheckDestSupported</code> function can be used to test whether a particular option or option and value is supported:</p>
- <pre><code>int
- cupsCheckDestSupported(http_t *http, cups_dest_t *dest,
- @@ -748,26 +722,16 @@ cupsCheckDestSupported(http_t *http, cups_dest_t *dest,
- </code></pre>
- <p>The <code>option</code> argument specifies the name of the option to check. The following constants can be used to check the various standard options:</p>
- <ul>
- - <li> <p><code>CUPS_COPIES</code>: Controls the number of copies that are produced.</p>
- -</li>
- - <li> <p><code>CUPS_FINISHINGS</code>: A comma-delimited list of integer constants that control the finishing processes that are applied to the job, including stapling, punching, and folding.</p>
- -</li>
- - <li> <p><code>CUPS_MEDIA</code>: Controls the media size that is used, typically one of the following: <code>CUPS_MEDIA_3X5</code>, <code>CUPS_MEDIA_4X6</code>, <code>CUPS_MEDIA_5X7</code>, <code>CUPS_MEDIA_8X10</code>, <code>CUPS_MEDIA_A3</code>, <code>CUPS_MEDIA_A4</code>, <code>CUPS_MEDIA_A5</code>, <code>CUPS_MEDIA_A6</code>, <code>CUPS_MEDIA_ENV10</code>, <code>CUPS_MEDIA_ENVDL</code>, <code>CUPS_MEDIA_LEGAL</code>, <code>CUPS_MEDIA_LETTER</code>, <code>CUPS_MEDIA_PHOTO_L</code>, <code>CUPS_MEDIA_SUPERBA3</code>, or <code>CUPS_MEDIA_TABLOID</code>.</p>
- -</li>
- - <li> <p><code>CUPS_MEDIA_SOURCE</code>: Controls where the media is pulled from, typically either <code>CUPS_MEDIA_SOURCE_AUTO</code> or <code>CUPS_MEDIA_SOURCE_MANUAL</code>.</p>
- -</li>
- - <li> <p><code>CUPS_MEDIA_TYPE</code>: Controls the type of media that is used, typically one of the following: <code>CUPS_MEDIA_TYPE_AUTO</code>, <code>CUPS_MEDIA_TYPE_ENVELOPE</code>, <code>CUPS_MEDIA_TYPE_LABELS</code>, <code>CUPS_MEDIA_TYPE_LETTERHEAD</code>, <code>CUPS_MEDIA_TYPE_PHOTO</code>, <code>CUPS_MEDIA_TYPE_PHOTO_GLOSSY</code>, <code>CUPS_MEDIA_TYPE_PHOTO_MATTE</code>, <code>CUPS_MEDIA_TYPE_PLAIN</code>, or <code>CUPS_MEDIA_TYPE_TRANSPARENCY</code>.</p>
- -</li>
- - <li> <p><code>CUPS_NUMBER_UP</code>: Controls the number of document pages that are placed on each media side.</p>
- -</li>
- - <li> <p><code>CUPS_ORIENTATION</code>: Controls the orientation of document pages placed on the media: <code>CUPS_ORIENTATION_PORTRAIT</code> or <code>CUPS_ORIENTATION_LANDSCAPE</code>.</p>
- -</li>
- - <li> <p><code>CUPS_PRINT_COLOR_MODE</code>: Controls whether the output is in color (<code>CUPS_PRINT_COLOR_MODE_COLOR</code>), grayscale (<code>CUPS_PRINT_COLOR_MODE_MONOCHROME</code>), or either (<code>CUPS_PRINT_COLOR_MODE_AUTO</code>).</p>
- -</li>
- - <li> <p><code>CUPS_PRINT_QUALITY</code>: Controls the generate quality of the output: <code>CUPS_PRINT_QUALITY_DRAFT</code>, <code>CUPS_PRINT_QUALITY_NORMAL</code>, or <code>CUPS_PRINT_QUALITY_HIGH</code>.</p>
- -</li>
- - <li> <p><code>CUPS_SIDES</code>: Controls whether prints are placed on one or both sides of the media: <code>CUPS_SIDES_ONE_SIDED</code>, <code>CUPS_SIDES_TWO_SIDED_PORTRAIT</code>, or <code>CUPS_SIDES_TWO_SIDED_LANDSCAPE</code>.</p>
- -</li>
- + <li><code>CUPS_COPIES</code>: Controls the number of copies that are produced.</li>
- + <li><code>CUPS_FINISHINGS</code>: A comma-delimited list of integer constants that control the finishing processes that are applied to the job, including stapling, punching, and folding.</li>
- + <li><code>CUPS_MEDIA</code>: Controls the media size that is used, typically one of the following: <code>CUPS_MEDIA_3X5</code>, <code>CUPS_MEDIA_4X6</code>, <code>CUPS_MEDIA_5X7</code>, <code>CUPS_MEDIA_8X10</code>, <code>CUPS_MEDIA_A3</code>, <code>CUPS_MEDIA_A4</code>, <code>CUPS_MEDIA_A5</code>, <code>CUPS_MEDIA_A6</code>, <code>CUPS_MEDIA_ENV10</code>, <code>CUPS_MEDIA_ENVDL</code>, <code>CUPS_MEDIA_LEGAL</code>, <code>CUPS_MEDIA_LETTER</code>, <code>CUPS_MEDIA_PHOTO_L</code>, <code>CUPS_MEDIA_SUPERBA3</code>, or <code>CUPS_MEDIA_TABLOID</code>.</li>
- + <li><code>CUPS_MEDIA_SOURCE</code>: Controls where the media is pulled from, typically either <code>CUPS_MEDIA_SOURCE_AUTO</code> or <code>CUPS_MEDIA_SOURCE_MANUAL</code>.</li>
- + <li><code>CUPS_MEDIA_TYPE</code>: Controls the type of media that is used, typically one of the following: <code>CUPS_MEDIA_TYPE_AUTO</code>, <code>CUPS_MEDIA_TYPE_ENVELOPE</code>, <code>CUPS_MEDIA_TYPE_LABELS</code>, <code>CUPS_MEDIA_TYPE_LETTERHEAD</code>, <code>CUPS_MEDIA_TYPE_PHOTO</code>, <code>CUPS_MEDIA_TYPE_PHOTO_GLOSSY</code>, <code>CUPS_MEDIA_TYPE_PHOTO_MATTE</code>, <code>CUPS_MEDIA_TYPE_PLAIN</code>, or <code>CUPS_MEDIA_TYPE_TRANSPARENCY</code>.</li>
- + <li><code>CUPS_NUMBER_UP</code>: Controls the number of document pages that are placed on each media side.</li>
- + <li><code>CUPS_ORIENTATION</code>: Controls the orientation of document pages placed on the media: <code>CUPS_ORIENTATION_PORTRAIT</code> or <code>CUPS_ORIENTATION_LANDSCAPE</code>.</li>
- + <li><code>CUPS_PRINT_COLOR_MODE</code>: Controls whether the output is in color (<code>CUPS_PRINT_COLOR_MODE_COLOR</code>), grayscale (<code>CUPS_PRINT_COLOR_MODE_MONOCHROME</code>), or either (<code>CUPS_PRINT_COLOR_MODE_AUTO</code>).</li>
- + <li><code>CUPS_PRINT_QUALITY</code>: Controls the generate quality of the output: <code>CUPS_PRINT_QUALITY_DRAFT</code>, <code>CUPS_PRINT_QUALITY_NORMAL</code>, or <code>CUPS_PRINT_QUALITY_HIGH</code>.</li>
- + <li><code>CUPS_SIDES</code>: Controls whether prints are placed on one or both sides of the media: <code>CUPS_SIDES_ONE_SIDED</code>, <code>CUPS_SIDES_TWO_SIDED_PORTRAIT</code>, or <code>CUPS_SIDES_TWO_SIDED_LANDSCAPE</code>.</li>
- </ul>
- <p>If the <code>value</code> argument is <code>NULL</code>, the <code>cupsCheckDestSupported</code> function returns whether the option is supported by the destination. Otherwise, the function returns whether the specified value of the option is supported.</p>
- <p>The <code>cupsFindDestSupported</code> function returns the IPP attribute containing the supported values for a given option:</p>
- @@ -804,7 +768,7 @@ int i, count = ippGetCount(attrs);
- for (i = 0; i < count; i ++)
- puts(ippGetString(attrs, i, NULL));
- </code></pre>
- - <h4 id="getting-default-values">Getting Default Values</h4>
- + <h4><a id="getting-default-values">Getting Default Values</a></h4>
- <p>There are two sets of default values - user defaults that are available via the <code>num_options</code> and <code>options</code> members of the <code>cups_dest_t</code> structure, and destination defaults that available via the <code>cups_dinfo_t</code> structure and the <code>cupsFindDestDefault</code> function which returns the IPP attribute containing the default value(s) for a given option:</p>
- <pre><code>ipp_attribute_t *
- cupsFindDestDefault(http_t *http, cups_dest_t *dest,
- @@ -834,7 +798,7 @@ else
- putchar('\n');
- }
- </code></pre>
- - <h4 id="getting-ready-loaded-values">Getting Ready (Loaded) Values</h4>
- + <h4><a id="getting-ready-loaded-values">Getting Ready (Loaded) Values</a></h4>
- <p>The finishings and media options also support queries for the ready, or loaded, values. For example, a printer may have punch and staple finishers installed but be out of staples - the supported values will list both punch and staple finishing processes but the ready values will only list the punch processes. Similarly, a printer may support hundreds of different sizes of media but only have a single size loaded at any given time - the ready values are limited to the media that is actually in the printer.</p>
- <p>The <code>cupsFindDestReady</code> function finds the IPP attribute containing the ready values for a given option:</p>
- <pre><code>ipp_attribute_t *
- @@ -857,7 +821,7 @@ if (ready_finishings != NULL)
- else
- puts("no finishings are ready.");
- </code></pre>
- - <h4 id="media-size-options">Media Size Options</h4>
- + <h4><a id="media-size-options">Media Size Options</a></h4>
- <p>CUPS provides functions for querying the dimensions and margins for each of the supported media size options. The <code>cups_size_t</code> structure is used to describe a media size:</p>
- <pre><code>typedef struct cups_size_s
- {
- @@ -882,16 +846,11 @@ cupsGetDestMediaBySize(http_t *http, cups_dest_t *dest,
- </code></pre>
- <p>The <code>media</code>, <code>width</code>, and <code>length</code> arguments specify the size to lookup. The <code>flags</code> argument specifies a bitfield controlling various lookup options:</p>
- <ul>
- - <li> <p><code>CUPS_MEDIA_FLAGS_DEFAULT</code>: Find the closest size supported by the printer.</p>
- -</li>
- - <li> <p><code>CUPS_MEDIA_FLAGS_BORDERLESS</code>: Find a borderless size.</p>
- -</li>
- - <li> <p><code>CUPS_MEDIA_FLAGS_DUPLEX</code>: Find a size compatible with two-sided printing.</p>
- -</li>
- - <li> <p><code>CUPS_MEDIA_FLAGS_EXACT</code>: Find an exact match for the size.</p>
- -</li>
- - <li> <p><code>CUPS_MEDIA_FLAGS_READY</code>: If the printer supports media sensing or configuration of the media in each tray/source, find the size amongst the "ready" media.</p>
- -</li>
- + <li><code>CUPS_MEDIA_FLAGS_DEFAULT</code>: Find the closest size supported by the printer.</li>
- + <li><code>CUPS_MEDIA_FLAGS_BORDERLESS</code>: Find a borderless size.</li>
- + <li><code>CUPS_MEDIA_FLAGS_DUPLEX</code>: Find a size compatible with two-sided printing.</li>
- + <li><code>CUPS_MEDIA_FLAGS_EXACT</code>: Find an exact match for the size.</li>
- + <li><code>CUPS_MEDIA_FLAGS_READY</code>: If the printer supports media sensing or configuration of the media in each tray/source, find the size amongst the "ready" media.</li>
- </ul>
- <p>If a matching size is found for the destination, the size information is stored in the structure pointed to by the <code>size</code> argument and 1 is returned. Otherwise 0 is returned.</p>
- <p>For example, the following code prints the margins for two-sided printing on US Letter media:</p>
- @@ -949,7 +908,7 @@ cupsGetDestMediaDefault(http_t *http, cups_dest_t *dest,
- cups_dinfo_t *dinfo, unsigned flags,
- cups_size_t *size);
- </code></pre>
- - <h4 id="localizing-options-and-values">Localizing Options and Values</h4>
- + <h4><a id="localizing-options-and-values">Localizing Options and Values</a></h4>
- <p>CUPS provides three functions to get localized, human-readable strings in the user's current locale for options and values: <code>cupsLocalizeDestMedia</code>, <code>cupsLocalizeDestOption</code>, and <code>cupsLocalizeDestValue</code>:</p>
- <pre><code>const char *
- cupsLocalizeDestMedia(http_t *http, cups_dest_t *dest,
- @@ -966,7 +925,7 @@ cupsLocalizeDestValue(http_t *http, cups_dest_t *dest,
- cups_dinfo_t *info,
- const char *option, const char *value);
- </code></pre>
- - <h3 class="title" id="submitting-a-print-job">Submitting a Print Job</h3>
- + <h3><a id="submitting-a-print-job">Submitting a Print Job</a></h3>
- <p>Once you are ready to submit a print job, you create a job using the <code>cupsCreateDestJob</code> function:</p>
- <pre><code>ipp_status_t
- cupsCreateDestJob(http_t *http, cups_dest_t *dest,
- @@ -1017,14 +976,10 @@ cupsFinishDestDocument(http_t *http, cups_dest_t *dest,
- </code></pre>
- <p>The <code>docname</code> argument specifies the name of the document, typically the original filename. The <code>format</code> argument specifies the MIME media type of the document, including the following constants:</p>
- <ul>
- - <li> <p><code>CUPS_FORMAT_JPEG</code>: "image/jpeg"</p>
- -</li>
- - <li> <p><code>CUPS_FORMAT_PDF</code>: "application/pdf"</p>
- -</li>
- - <li> <p><code>CUPS_FORMAT_POSTSCRIPT</code>: "application/postscript"</p>
- -</li>
- - <li> <p><code>CUPS_FORMAT_TEXT</code>: "text/plain"</p>
- -</li>
- + <li><code>CUPS_FORMAT_JPEG</code>: "image/jpeg"</li>
- + <li><code>CUPS_FORMAT_PDF</code>: "application/pdf"</li>
- + <li><code>CUPS_FORMAT_POSTSCRIPT</code>: "application/postscript"</li>
- + <li><code>CUPS_FORMAT_TEXT</code>: "text/plain"</li>
- </ul>
- <p>The <code>num_options</code> and <code>options</code> arguments specify per-document print options, which at present must be 0 and <code>NULL</code>. The <code>last_document</code> argument specifies whether this is the last document in the job.</p>
- <p>For example, the following code submits a PDF file to the job that was just created:</p>
- @@ -1051,9 +1006,9 @@ if (cupsStartDestDocument(CUPS_HTTP_DEFAULT, dest, info,
- fclose(fp);
- </code></pre>
- - <h2 class="title" id="sending-ipp-requests">Sending IPP Requests</h2>
- + <h2><a id="sending-ipp-requests">Sending IPP Requests</a></h2>
- <p>CUPS provides a rich API for sending IPP requests to the scheduler or printers, typically from management or utility applications whose primary purpose is not to send print jobs.</p>
- - <h3 class="title" id="connecting-to-the-scheduler-or-printer">Connecting to the Scheduler or Printer</h3>
- + <h3><a id="connecting-to-the-scheduler-or-printer">Connecting to the Scheduler or Printer</a></h3>
- <p>The connection to the scheduler or printer is represented by the HTTP connection type <code>http_t</code>. The <code>cupsConnectDest</code> function connects to the scheduler or printer associated with the destination:</p>
- <pre><code>http_t *
- cupsConnectDest(cups_dest_t *dest, unsigned flags, int msec,
- @@ -1074,7 +1029,7 @@ http_t *http = cupsConnectDest(dest, CUPS_DEST_FLAGS_DEVICE,
- 30000, NULL, resource,
- sizeof(resource), NULL, NULL);
- </code></pre>
- - <h3 class="title" id="creating-an-ipp-request">Creating an IPP Request</h3>
- + <h3><a id="creating-an-ipp-request">Creating an IPP Request</a></h3>
- <p>IPP requests are represented by the IPP message type <code>ipp_t</code> and each IPP attribute in the request is representing using the type <code>ipp_attribute_t</code>. Each IPP request includes an operation code (<code>IPP_OP_CREATE_JOB</code>, <code>IPP_OP_GET_PRINTER_ATTRIBUTES</code>, etc.) and a 32-bit integer identifier.</p>
- <p>The <code>ippNewRequest</code> function creates a new IPP request:</p>
- <pre><code>ipp_t *
- @@ -1112,30 +1067,19 @@ ippAddStrings(request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD,
- <p>The <code>ippAddStrings</code> function adds an attribute with one or more strings, in this case three. The <code>IPP_TAG_KEYWORD</code> argument specifies that the strings are keyword values, which are used for attribute names. All strings use the same language (<code>NULL</code>), and the attribute will contain the three strings in the array <code>requested_attributes</code>.</p>
- <p>CUPS provides many functions to adding attributes of different types:</p>
- <ul>
- - <li> <p><code>ippAddBoolean</code> adds a boolean (<code>IPP_TAG_BOOLEAN</code>) attribute with one value.</p>
- -</li>
- - <li> <p><code>ippAddInteger</code> adds an enum (<code>IPP_TAG_ENUM</code>) or integer (<code>IPP_TAG_INTEGER</code>) attribute with one value.</p>
- -</li>
- - <li> <p><code>ippAddIntegers</code> adds an enum or integer attribute with one or more values.</p>
- -</li>
- - <li> <p><code>ippAddOctetString</code> adds an octetString attribute with one value.</p>
- -</li>
- - <li> <p><code>ippAddOutOfBand</code> adds a admin-defined (<code>IPP_TAG_ADMINDEFINE</code>), default (<code>IPP_TAG_DEFAULT</code>), delete-attribute (<code>IPP_TAG_DELETEATTR</code>), no-value (<code>IPP_TAG_NOVALUE</code>), not-settable (<code>IPP_TAG_NOTSETTABLE</code>), unknown (<code>IPP_TAG_UNKNOWN</code>), or unsupported (<code>IPP_TAG_UNSUPPORTED_VALUE</code>) out-of-band attribute.</p>
- -</li>
- - <li> <p><code>ippAddRange</code> adds a rangeOfInteger attribute with one range.</p>
- -</li>
- - <li> <p><code>ippAddRanges</code> adds a rangeOfInteger attribute with one or more ranges.</p>
- -</li>
- - <li> <p><code>ippAddResolution</code> adds a resolution attribute with one resolution.</p>
- -</li>
- - <li> <p><code>ippAddResolutions</code> adds a resolution attribute with one or more resolutions.</p>
- -</li>
- - <li> <p><code>ippAddString</code> adds a charset (<code>IPP_TAG_CHARSET</code>), keyword (<code>IPP_TAG_KEYWORD</code>), mimeMediaType (<code>IPP_TAG_MIMETYPE</code>), name (<code>IPP_TAG_NAME</code> and <code>IPP_TAG_NAMELANG</code>), naturalLanguage (<code>IPP_TAG_NATURAL_LANGUAGE</code>), text (<code>IPP_TAG_TEXT</code> and <code>IPP_TAG_TEXTLANG</code>), uri (<code>IPP_TAG_URI</code>), or uriScheme (<code>IPP_TAG_URISCHEME</code>) attribute with one value.</p>
- -</li>
- - <li> <p><code>ippAddStrings</code> adds a charset, keyword, mimeMediaType, name, naturalLanguage, text, uri, or uriScheme attribute with one or more values.</p>
- -</li>
- + <li><code>ippAddBoolean</code> adds a boolean (<code>IPP_TAG_BOOLEAN</code>) attribute with one value.</li>
- + <li><code>ippAddInteger</code> adds an enum (<code>IPP_TAG_ENUM</code>) or integer (<code>IPP_TAG_INTEGER</code>) attribute with one value.</li>
- + <li><code>ippAddIntegers</code> adds an enum or integer attribute with one or more values.</li>
- + <li><code>ippAddOctetString</code> adds an octetString attribute with one value.</li>
- + <li><code>ippAddOutOfBand</code> adds a admin-defined (<code>IPP_TAG_ADMINDEFINE</code>), default (<code>IPP_TAG_DEFAULT</code>), delete-attribute (<code>IPP_TAG_DELETEATTR</code>), no-value (<code>IPP_TAG_NOVALUE</code>), not-settable (<code>IPP_TAG_NOTSETTABLE</code>), unknown (<code>IPP_TAG_UNKNOWN</code>), or unsupported (<code>IPP_TAG_UNSUPPORTED_VALUE</code>) out-of-band attribute.</li>
- + <li><code>ippAddRange</code> adds a rangeOfInteger attribute with one range.</li>
- + <li><code>ippAddRanges</code> adds a rangeOfInteger attribute with one or more ranges.</li>
- + <li><code>ippAddResolution</code> adds a resolution attribute with one resolution.</li>
- + <li><code>ippAddResolutions</code> adds a resolution attribute with one or more resolutions.</li>
- + <li><code>ippAddString</code> adds a charset (<code>IPP_TAG_CHARSET</code>), keyword (<code>IPP_TAG_KEYWORD</code>), mimeMediaType (<code>IPP_TAG_MIMETYPE</code>), name (<code>IPP_TAG_NAME</code> and <code>IPP_TAG_NAMELANG</code>), naturalLanguage (<code>IPP_TAG_NATURAL_LANGUAGE</code>), text (<code>IPP_TAG_TEXT</code> and <code>IPP_TAG_TEXTLANG</code>), uri (<code>IPP_TAG_URI</code>), or uriScheme (<code>IPP_TAG_URISCHEME</code>) attribute with one value.</li>
- + <li><code>ippAddStrings</code> adds a charset, keyword, mimeMediaType, name, naturalLanguage, text, uri, or uriScheme attribute with one or more values.</li>
- </ul>
- - <h3 class="title" id="sending-the-ipp-request">Sending the IPP Request</h3>
- + <h3><a id="sending-the-ipp-request">Sending the IPP Request</a></h3>
- <p>Once you have created the IPP request, you can send it using the <code>cupsDoRequest</code> function. For example, the following code sends the IPP Get-Printer-Attributes request to the destination and saves the response:</p>
- <pre><code>ipp_t *response = cupsDoRequest(http, request, resource);
- </code></pre>
- @@ -1157,7 +1101,7 @@ ippAddStrings(request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD,
- printf("Request failed: %s\n", cupsLastErrorString());
- }
- </code></pre>
- - <h3 class="title" id="processing-the-ipp-response">Processing the IPP Response</h3>
- + <h3><a id="processing-the-ipp-response">Processing the IPP Response</a></h3>
- <p>Each response to an IPP request is also an IPP message (<code>ipp_t</code>) with its own IPP attributes (<code>ipp_attribute_t</code>) that includes a status code (<code>IPP_STATUS_OK</code>, <code>IPP_STATUS_ERROR_BAD_REQUEST</code>, etc.) and the corresponding 32-bit integer identifier from the request.</p>
- <p>For example, the following code finds the printer state attributes and prints their values:</p>
- <pre><code>ipp_attribute_t *attr;
- @@ -1194,7 +1138,7 @@ if ((attr = ippFindAttribute(response, "printer-state-reasons",
- <p>Once you are done using the IPP response message, free it using the <code>ippDelete</code> function:</p>
- <pre><code>ippDelete(response);
- </code></pre>
- - <h3 class="title" id="authentication">Authentication</h3>
- + <h3><a id="authentication">Authentication</a></h3>
- <p>CUPS normally handles authentication through the console. GUI applications should set a password callback using the <code>cupsSetPasswordCB2</code> function:</p>
- <pre><code>void
- cupsSetPasswordCB2(cups_password_cb2_t cb, void *user_data);
- @@ -6339,7 +6283,7 @@ are server-oriented...</p>
- <tr><th>IPP_FINISHINGS_EDGE_STITCH_RIGHT </th> <td class="description">Stitch along right side</td></tr>
- <tr><th>IPP_FINISHINGS_EDGE_STITCH_TOP </th> <td class="description">Stitch along top edge</td></tr>
- <tr><th>IPP_FINISHINGS_FOLD </th> <td class="description">Fold (any type)</td></tr>
- - <tr><th>IPP_FINISHINGS_FOLD_ACCORDIAN </th> <td class="description">Accordian-fold the paper vertically into four sections</td></tr>
- + <tr><th>IPP_FINISHINGS_FOLD_ACCORDION </th> <td class="description">Accordion-fold the paper vertically into four sections</td></tr>
- <tr><th>IPP_FINISHINGS_FOLD_DOUBLE_GATE </th> <td class="description">Fold the top and bottom quarters of the paper towards the midline, then fold in half vertically</td></tr>
- <tr><th>IPP_FINISHINGS_FOLD_ENGINEERING_Z </th> <td class="description">Fold the paper vertically into two small sections and one larger, forming an elongated Z</td></tr>
- <tr><th>IPP_FINISHINGS_FOLD_GATE </th> <td class="description">Fold the top and bottom quarters of the paper towards the midline</td></tr>
- @@ -6361,10 +6305,10 @@ are server-oriented...</p>
- <tr><th>IPP_FINISHINGS_PUNCH_DUAL_LEFT </th> <td class="description">Punch 2 holes left side</td></tr>
- <tr><th>IPP_FINISHINGS_PUNCH_DUAL_RIGHT </th> <td class="description">Punch 2 holes right side</td></tr>
- <tr><th>IPP_FINISHINGS_PUNCH_DUAL_TOP </th> <td class="description">Punch 2 holes top edge</td></tr>
- - <tr><th>IPP_FINISHINGS_PUNCH_MULTIPLE_BOTTOM </th> <td class="description">Pucnh multiple holes bottom edge</td></tr>
- - <tr><th>IPP_FINISHINGS_PUNCH_MULTIPLE_LEFT </th> <td class="description">Pucnh multiple holes left side</td></tr>
- - <tr><th>IPP_FINISHINGS_PUNCH_MULTIPLE_RIGHT </th> <td class="description">Pucnh multiple holes right side</td></tr>
- - <tr><th>IPP_FINISHINGS_PUNCH_MULTIPLE_TOP </th> <td class="description">Pucnh multiple holes top edge</td></tr>
- + <tr><th>IPP_FINISHINGS_PUNCH_MULTIPLE_BOTTOM </th> <td class="description">Punch multiple holes bottom edge</td></tr>
- + <tr><th>IPP_FINISHINGS_PUNCH_MULTIPLE_LEFT </th> <td class="description">Punch multiple holes left side</td></tr>
- + <tr><th>IPP_FINISHINGS_PUNCH_MULTIPLE_RIGHT </th> <td class="description">Punch multiple holes right side</td></tr>
- + <tr><th>IPP_FINISHINGS_PUNCH_MULTIPLE_TOP </th> <td class="description">Punch multiple holes top edge</td></tr>
- <tr><th>IPP_FINISHINGS_PUNCH_QUAD_BOTTOM </th> <td class="description">Punch 4 holes bottom edge</td></tr>
- <tr><th>IPP_FINISHINGS_PUNCH_QUAD_LEFT </th> <td class="description">Punch 4 holes left side</td></tr>
- <tr><th>IPP_FINISHINGS_PUNCH_QUAD_RIGHT </th> <td class="description">Punch 4 holes right side</td></tr>
- diff --git a/doc/help/man-client.conf.html b/doc/help/man-client.conf.html
- index 58b091fe0..032cd333d 100644
- --- a/doc/help/man-client.conf.html
- +++ b/doc/help/man-client.conf.html
- @@ -19,28 +19,32 @@ See the NOTES section below for more information.
- <h3><a name="DIRECTIVES">Directives</a></h3>
- The following directives are understood by the client. Consult the online help for detailed descriptions:
- <dl class="man">
- -<dt><b>AllowAnyRoot Yes</b>
- +<dt><a name="AllowAnyRoot"></a><b>AllowAnyRoot Yes</b>
- <dd style="margin-left: 5.0em"><dt><b>AllowAnyRoot No</b>
- <dd style="margin-left: 5.0em">Specifies whether to allow TLS with certificates that have not been signed by a trusted Certificate Authority.
- The default is "Yes".
- -<dt><b>AllowExpiredCerts Yes</b>
- +<dt><a name="AllowExpiredCerts"></a><b>AllowExpiredCerts Yes</b>
- <dd style="margin-left: 5.0em"><dt><b>AllowExpiredCerts No</b>
- <dd style="margin-left: 5.0em">Specifies whether to allow TLS with expired certificates.
- The default is "No".
- -<dt><b>Encryption IfRequested</b>
- +<dt><a name="DigestOptions"></a><b>DigestOptions DenyMD5</b>
- +<dd style="margin-left: 5.0em"><dt><b>DigestOptions None</b>
- +<dd style="margin-left: 5.0em">Specifies HTTP Digest authentication options.
- +<b>DenyMD5</b> disables support for the original MD5 hash algorithm.
- +<dt><a name="Encryption"></a><b>Encryption IfRequested</b>
- <dd style="margin-left: 5.0em"><dt><b>Encryption Never</b>
- <dd style="margin-left: 5.0em"><dt><b>Encryption Required</b>
- <dd style="margin-left: 5.0em">Specifies the level of encryption that should be used.
- -<dt><b>GSSServiceName </b><i>name</i>
- +<dt><a name="GSSServiceName"></a><b>GSSServiceName </b><i>name</i>
- <dd style="margin-left: 5.0em">Specifies the Kerberos service name that is used for authentication, typically "host", "http", or "ipp".
- CUPS adds the remote hostname ("name@server.example.com") for you. The default name is "http".
- -<dt><b>ServerName </b><i>hostname-or-ip-address</i>[<i>:port</i>]
- +<dt><a name="ServerName"></a><b>ServerName </b><i>hostname-or-ip-address</i>[<i>:port</i>]
- <dd style="margin-left: 5.0em"><dt><b>ServerName </b><i>/domain/socket</i>
- <dd style="margin-left: 5.0em">Specifies the address and optionally the port to use when connecting to the server.
- <b>Note: This directive is not supported on macOS 10.7 or later.</b>
- <dt><b>ServerName </b><i>hostname-or-ip-address</i>[<i>:port</i>]<b>/version=1.1</b>
- <dd style="margin-left: 5.0em">Specifies the address and optionally the port to use when connecting to a server running CUPS 1.3.12 and earlier.
- -<dt><b>SSLOptions </b>[<i>AllowDH</i>] [<i>AllowRC4</i>] [<i>AllowSSL3</i>] [<i>DenyCBC</i>] [<i>DenyTLS1.0</i>] [<i>MaxTLS1.0</i>] [<i>MaxTLS1.1</i>] [<i>MaxTLS1.2</i>] [<i>MaxTLS1.3</i>] [<i>MinTLS1.0</i>] [<i>MinTLS1.1</i>] [<i>MinTLS1.2</i>] [<i>MinTLS1.3</i>]
- +<dt><a name="SSLOptions"></a><b>SSLOptions </b>[<i>AllowDH</i>] [<i>AllowRC4</i>] [<i>AllowSSL3</i>] [<i>DenyCBC</i>] [<i>DenyTLS1.0</i>] [<i>MaxTLS1.0</i>] [<i>MaxTLS1.1</i>] [<i>MaxTLS1.2</i>] [<i>MaxTLS1.3</i>] [<i>MinTLS1.0</i>] [<i>MinTLS1.1</i>] [<i>MinTLS1.2</i>] [<i>MinTLS1.3</i>]
- <dd style="margin-left: 5.0em"><dt><b>SSLOptions None</b>
- <dd style="margin-left: 5.0em">Sets encryption options (only in /etc/cups/client.conf).
- By default, CUPS only supports encryption using TLS v1.0 or higher using known secure cipher suites.
- @@ -54,11 +58,11 @@ The <i>DenyTLS1.0</i> option disables TLS v1.0 support - this sets the minimum p
- The <i>MinTLS</i> options set the minimum TLS version to support.
- The <i>MaxTLS</i> options set the maximum TLS version to support.
- Not all operating systems support TLS 1.3 at this time.
- -<dt><b>TrustOnFirstUse Yes</b>
- +<dt><a name="TrustOnFirstUse"></a><b>TrustOnFirstUse Yes</b>
- <dd style="margin-left: 5.0em"><dt><b>TrustOnFirstUse No</b>
- <dd style="margin-left: 5.0em">Specifies whether to trust new TLS certificates by default.
- The default is "Yes".
- -<dt><b>User </b><i>name</i>
- +<dt><a name="User"></a><b>User </b><i>name</i>
- <dd style="margin-left: 5.0em">Specifies the default user name to use for requests.
- <dt><a name="UserAgentTokens"></a><b>UserAgentTokens None</b>
- <dd style="margin-left: 5.0em"><dt><b>UserAgentTokens ProductOnly</b>
- @@ -76,7 +80,7 @@ The default is "Yes".
- "OS" reports "CUPS/major.minor.path (osname osversion) IPP/2.1".
- "Full" reports "CUPS/major.minor.path (osname osversion; architecture) IPP/2.1".
- The default is "Minimal".
- -<dt><b>ValidateCerts Yes</b>
- +<dt><a name="ValidateCerts"></a><b>ValidateCerts Yes</b>
- <dd style="margin-left: 5.0em"><dt><b>ValidateCerts No</b>
- <dd style="margin-left: 5.0em">Specifies whether to only allow TLS with certificates whose common name matches the hostname.
- The default is "No".
- diff --git a/doc/help/man-ippeveprinter.html b/doc/help/man-ippeveprinter.html
- index d37d63559..bcd91ae48 100644
- --- a/doc/help/man-ippeveprinter.html
- +++ b/doc/help/man-ippeveprinter.html
- @@ -16,10 +16,15 @@ ippeveprinter - an ipp everywhere printer application for cups
- ] [
- <b>--no-web-forms</b>
- ] [
- +<b>--pam-service</b>
- +<i>service</i>
- +] [
- <b>--version</b>
- ] [
- <b>-2</b>
- ] [
- +<b>-A</b>
- +] [
- <b>-D</b>
- <i>device-uri</i>
- ] [
- @@ -87,10 +92,17 @@ The following options are recognized by
- <dd style="margin-left: 5.0em">Show program usage.
- <dt><b>--no-web-forms</b>
- <dd style="margin-left: 5.0em">Disable the web interface forms used to update the media and supply levels.
- +<dt><b>--pam-service </b><i>service</i>
- +<dd style="margin-left: 5.0em">Set the PAM service name.
- +The default service is "cups".
- <dt><b>--version</b>
- <dd style="margin-left: 5.0em">Show the CUPS version.
- <dt><b>-2</b>
- <dd style="margin-left: 5.0em">Report support for two-sided (duplex) printing.
- +<dt><b>-A</b>
- +<dd style="margin-left: 5.0em">Enable authentication for the created printer.
- +<b>ippeveprinter</b>
- +uses PAM to authenticate HTTP Basic credentials.
- <dt><b>-D </b><i>device-uri</i>
- <dd style="margin-left: 5.0em">Set the device URI for print output.
- The URI can be a filename, directory, or a network socket URI of the form "socket://ADDRESS[:PORT]" (where the default port number is 9100).
- @@ -149,6 +161,8 @@ command.
- <dt><b>-p </b><i>port</i>
- <dd style="margin-left: 5.0em">Specifies the port number to listen on.
- The default is a user-specific number from 8000 to 8999.
- +<dt><b>-r</b><b>off</b>
- +<dd style="margin-left: 5.0em">Turns off DNS-SD service advertisements entirely.
- <dt><b>-r </b><i>subtype[,subtype]</i>
- <dd style="margin-left: 5.0em">Specifies the DNS-SD subtype(s) to advertise.
- Separate multiple subtypes with a comma.
- diff --git a/doc/help/postscript-driver.html b/doc/help/postscript-driver.html
- index 59832ebdc..f94fa72fd 100644
- --- a/doc/help/postscript-driver.html
- +++ b/doc/help/postscript-driver.html
- @@ -5,7 +5,7 @@
- <title>Developing PostScript Printer Drivers</title>
- <meta name="keywords" content="Programming">
- <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
- - <meta name="creator" content="codedoc v3.2">
- + <meta name="creator" content="codedoc v3.1">
- <meta name="author" content="Unknown">
- <meta name="copyright" content="Unknown">
- <meta name="version" content="0.0">
- @@ -450,7 +450,6 @@ h3.title {
- --></style>
- </head>
- <body>
- - <div class="header">
- <!--
- PostScript printer driver documentation for CUPS.
- @@ -478,7 +477,6 @@ h3.title {
- </tr>
- </tbody>
- </table></div>
- - </div>
- <div class="contents">
- <h2 class="title">Contents</h2>
- <ul class="contents">
- diff --git a/doc/help/ppd-compiler.html b/doc/help/ppd-compiler.html
- index f85ebc2d4..b33ca2d27 100644
- --- a/doc/help/ppd-compiler.html
- +++ b/doc/help/ppd-compiler.html
- @@ -5,7 +5,7 @@
- <title>Introduction to the PPD Compiler</title>
- <meta name="keywords" content="Programming">
- <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
- - <meta name="creator" content="codedoc v3.2">
- + <meta name="creator" content="codedoc v3.1">
- <meta name="author" content="Unknown">
- <meta name="copyright" content="Unknown">
- <meta name="version" content="0.0">
- @@ -450,7 +450,6 @@ h3.title {
- --></style>
- </head>
- <body>
- - <div class="header">
- <!--
- PPD compiler documentation for CUPS.
- @@ -486,7 +485,6 @@ that describe the features and capabilities of one or more printers.</P>
- </tr>
- </tbody>
- </table></div>
- - </div>
- <div class="contents">
- <h2 class="title">Contents</h2>
- <ul class="contents">
- diff --git a/doc/help/raster-driver.html b/doc/help/raster-driver.html
- index 9b7c84e3f..de573c616 100644
- --- a/doc/help/raster-driver.html
- +++ b/doc/help/raster-driver.html
- @@ -5,7 +5,7 @@
- <title>Developing Raster Printer Drivers</title>
- <meta name="keywords" content="Programming">
- <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
- - <meta name="creator" content="codedoc v3.2">
- + <meta name="creator" content="codedoc v3.1">
- <meta name="author" content="Unknown">
- <meta name="copyright" content="Unknown">
- <meta name="version" content="0.0">
- @@ -450,7 +450,6 @@ h3.title {
- --></style>
- </head>
- <body>
- - <div class="header">
- <!--
- Raster printer driver documentation for CUPS.
- @@ -478,7 +477,6 @@ h3.title {
- </tr>
- </tbody>
- </table></div>
- - </div>
- <div class="contents">
- <h2 class="title">Contents</h2>
- <ul class="contents">
- diff --git a/doc/help/spec-ipp.html b/doc/help/spec-ipp.html
- index 3574cd658..8f0ad313d 100644
- --- a/doc/help/spec-ipp.html
- +++ b/doc/help/spec-ipp.html
- @@ -35,7 +35,11 @@
- <li><a href="http://ftp.pwg.org/pub/pwg/candidates/cs-ipptrans10-20131108-5100.16.pdf">PWG 5100.16: IPP Transaction-Based Printing Extensions</a></li>
- - <li><a href="http://tools.ietf.org/html/rfc3998">RFC 3998: IPP Job and Printer Administrative Operations</a> (Disable-Printer, Enable-Printer, Hold-New-Jobs, and Release-Held-New-Jobs operations)</li>
- + <li><a href="http://tools.ietf.org/html/rfc3995">RFC 3995: IPP: Event Notifications and Subscriptions</a></li>
- +
- + <li><a href="http://tools.ietf.org/html/rfc3996">RFC 3996: IPP: The 'ippget' Delivery Method for Event Notifications</li>
- +
- + <li><a href="http://tools.ietf.org/html/rfc3998">RFC 3998: IPP: Job and Printer Administrative Operations</a> (Disable-Printer, Enable-Printer, Hold-New-Jobs, and Release-Held-New-Jobs operations)</li>
- <li><a href="http://tools.ietf.org/html/rfc7472">RFC 7472: IPP over HTTPS Transport Binding and 'ipps' URI Scheme</a></li>
- @@ -1614,11 +1618,13 @@ CUPS-Get-PPDs Response:
- <li>'domain': A domain name is required.</li>
- + <li>'negotiate': Kerberos is required - this keyword can only appear by itself and causes cupsd to collect the UID of the printing user.</li>
- +
- <li>'none': No authentication is required - this keyword can only appear by itself.</li>
- <li>'password': A password is required.</li>
- - <li>'username': A username is required.</li>
- + <li>'username': A username is required. Some protocols (like SMB) prefix the username with the domain, for example "DOMAIN\user".</li>
- </ul>
- diff --git a/doc/help/spec-ppd.html b/doc/help/spec-ppd.html
- index e0ed28603..ee383fbe0 100644
- --- a/doc/help/spec-ppd.html
- +++ b/doc/help/spec-ppd.html
- @@ -5,7 +5,7 @@
- <title>CUPS PPD Extensions</title>
- <meta name="keywords" content="Specifications">
- <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
- - <meta name="creator" content="codedoc v3.2">
- + <meta name="creator" content="codedoc v3.1">
- <meta name="author" content="Unknown">
- <meta name="copyright" content="Unknown">
- <meta name="version" content="0.0">
- @@ -450,7 +450,6 @@ h3.title {
- --></style>
- </head>
- <body>
- - <div class="header">
- <!--
- PPD extension documentation for CUPS.
- @@ -478,7 +477,6 @@ h3.title {
- </tr>
- </tbody>
- </table></div>
- - </div>
- <div class="contents">
- <h2 class="title">Contents</h2>
- <ul class="contents">
- @@ -498,7 +496,7 @@ h3.title {
- <li><a href="#cupsUIResolver">cupsUIResolver</a></li>
- </ul></li>
- <li><a href="#I18N">Globalized PPD Support</a></li>
- - <li><a href="#OPTIONS">Custom Options</a></li>
- + <li><a href="#OPTIONS"><span class="info">CUPS 1.3/macOS 10.6</span>Custom Options</a></li>
- <li><a href="#RASTERPS">Writing PostScript Option Commands for Raster Drivers</a></li>
- <li><a href="#MEDIA">Media Keywords</a><ul class="subcontents">
- <li><a href="#cupsMediaQualifier2">cupsMediaQualifier2</a></li>
- diff --git a/filter/rastertolabel.c b/filter/rastertolabel.c
- index 35d678db7..73ac4d76e 100644
- --- a/filter/rastertolabel.c
- +++ b/filter/rastertolabel.c
- @@ -23,12 +23,12 @@
- /*
- - * This driver filter currently supports Dymo, Intellitech, and Zebra
- + * This driver filter currently supports DYMO, Intellitech, and Zebra
- * label printers.
- *
- - * The Dymo portion of the driver has been tested with the 300, 330,
- - * and 330 Turbo label printers; it may also work with other models.
- - * The Dymo printers support printing at 136, 203, and 300 DPI.
- + * The DYMO portion of the driver has been tested with the 300, 330,
- + * 330 Turbo, and 450 Twin Turbo label printers; it may also work with other
- + * models. The DYMO printers support printing at 136, 203, and 300 DPI.
- *
- * The Intellitech portion of the driver has been tested with the
- * Intellibar 408, 412, and 808 and supports their PCL variant.
- @@ -43,7 +43,7 @@
- * Model number constants...
- */
- -#define DYMO_3x0 0 /* Dymo Labelwriter 300/330/330 Turbo */
- +#define DYMO_3x0 0 /* DYMO Labelwriter 300/330/330 Turbo */
- #define ZEBRA_EPL_LINE 0x10 /* Zebra EPL line mode printers */
- #define ZEBRA_EPL_PAGE 0x11 /* Zebra EPL page mode printers */
- @@ -191,6 +191,7 @@ StartPage(ppd_file_t *ppd, /* I - PPD file */
- printf("\033D%c", header->cupsBytesPerLine);
- printf("\033%c", header->cupsCompression + 'c'); /* Darkness */
- + printf("\033q%d", header->MediaPosition + 1); /* Roll Select */
- break;
- case ZEBRA_EPL_LINE :
- diff --git a/man/client.conf.5 b/man/client.conf.5
- index 8805561db..4dbf0c49b 100644
- --- a/man/client.conf.5
- +++ b/man/client.conf.5
- @@ -7,7 +7,7 @@
- .\" Licensed under Apache License v2.0. See the file "LICENSE" for more
- .\" information.
- .\"
- -.TH client.conf 5 "CUPS" "26 April 2019" "Apple Inc."
- +.TH client.conf 5 "CUPS" "15 October 2019" "Apple Inc."
- .SH NAME
- client.conf \- client configuration file for cups (deprecated on macos)
- .SH DESCRIPTION
- @@ -20,18 +20,28 @@ Starting with macOS 10.12, all applications can access these settings in the \fI
- See the NOTES section below for more information.
- .SS DIRECTIVES
- The following directives are understood by the client. Consult the online help for detailed descriptions:
- +.\"#AllowAnyRoot
- .TP 5
- \fBAllowAnyRoot Yes\fR
- .TP 5
- \fBAllowAnyRoot No\fR
- Specifies whether to allow TLS with certificates that have not been signed by a trusted Certificate Authority.
- The default is "Yes".
- +.\"#AllowExpiredCerts
- .TP 5
- \fBAllowExpiredCerts Yes\fR
- .TP 5
- \fBAllowExpiredCerts No\fR
- Specifies whether to allow TLS with expired certificates.
- The default is "No".
- +.\"#DigestOptions
- +.TP 5
- +\fBDigestOptions DenyMD5\fR
- +.TP 5
- +\fBDigestOptions None\fR
- +Specifies HTTP Digest authentication options.
- +\fBDenyMD5\fR disables support for the original MD5 hash algorithm.
- +.\"#Encryption
- .TP 5
- \fBEncryption IfRequested\fR
- .TP 5
- @@ -39,10 +49,12 @@ The default is "No".
- .TP 5
- \fBEncryption Required\fR
- Specifies the level of encryption that should be used.
- +.\"#GSSServiceName
- .TP 5
- \fBGSSServiceName \fIname\fR
- Specifies the Kerberos service name that is used for authentication, typically "host", "http", or "ipp".
- CUPS adds the remote hostname ("name@server.example.com") for you. The default name is "http".
- +.\"#ServerName
- .TP 5
- \fBServerName \fIhostname-or-ip-address\fR[\fI:port\fR]
- .TP 5
- @@ -52,6 +64,7 @@ Specifies the address and optionally the port to use when connecting to the serv
- .TP 5
- \fBServerName \fIhostname-or-ip-address\fR[\fI:port\fR]\fB/version=1.1\fR
- Specifies the address and optionally the port to use when connecting to a server running CUPS 1.3.12 and earlier.
- +.\"#SSLOptions
- .TP 5
- \fBSSLOptions \fR[\fIAllowDH\fR] [\fIAllowRC4\fR] [\fIAllowSSL3\fR] [\fIDenyCBC\fR] [\fIDenyTLS1.0\fR] [\fIMaxTLS1.0\fR] [\fIMaxTLS1.1\fR] [\fIMaxTLS1.2\fR] [\fIMaxTLS1.3\fR] [\fIMinTLS1.0\fR] [\fIMinTLS1.1\fR] [\fIMinTLS1.2\fR] [\fIMinTLS1.3\fR]
- .TP 5
- @@ -68,12 +81,14 @@ The \fIDenyTLS1.0\fR option disables TLS v1.0 support - this sets the minimum pr
- The \fIMinTLS\fR options set the minimum TLS version to support.
- The \fIMaxTLS\fR options set the maximum TLS version to support.
- Not all operating systems support TLS 1.3 at this time.
- +.\"#TrustOnFirstUse
- .TP 5
- \fBTrustOnFirstUse Yes\fR
- .TP 5
- \fBTrustOnFirstUse No\fR
- Specifies whether to trust new TLS certificates by default.
- The default is "Yes".
- +.\"#User
- .TP 5
- \fBUser \fIname\fR
- Specifies the default user name to use for requests.
- @@ -101,6 +116,7 @@ Specifies what information is included in the User-Agent header of HTTP requests
- "OS" reports "CUPS/major.minor.path (osname osversion) IPP/2.1".
- "Full" reports "CUPS/major.minor.path (osname osversion; architecture) IPP/2.1".
- The default is "Minimal".
- +.\"#ValidateCerts
- .TP 5
- \fBValidateCerts Yes\fR
- .TP 5
- diff --git a/man/ippeveprinter.1 b/man/ippeveprinter.1
- index 5753c69da..fa32efb2e 100644
- --- a/man/ippeveprinter.1
- +++ b/man/ippeveprinter.1
- @@ -6,7 +6,7 @@
- .\" Licensed under Apache License v2.0. See the file "LICENSE" for more
- .\" information.
- .\"
- -.TH ippeveprinter 1 "CUPS" "17 May 2019" "Apple Inc."
- +.TH ippeveprinter 1 "CUPS" "2 December 2019" "Apple Inc."
- .SH NAME
- ippeveprinter \- an ipp everywhere printer application for cups
- .SH SYNOPSIS
- @@ -16,10 +16,15 @@ ippeveprinter \- an ipp everywhere printer application for cups
- ] [
- .B \-\-no\-web\-forms
- ] [
- +.B \-\-pam\-service
- +.I service
- +] [
- .B \-\-version
- ] [
- .B \-2
- ] [
- +.B \-A
- +] [
- .B \-D
- .I device-uri
- ] [
- @@ -89,12 +94,21 @@ Show program usage.
- .B \-\-no\-web\-forms
- Disable the web interface forms used to update the media and supply levels.
- .TP 5
- +\fB\-\-pam\-service \fIservice\fR
- +Set the PAM service name.
- +The default service is "cups".
- +.TP 5
- .B \-\-version
- Show the CUPS version.
- .TP 5
- .B \-2
- Report support for two-sided (duplex) printing.
- .TP 5
- +.B \-A
- +Enable authentication for the created printer.
- +.B ippeveprinter
- +uses PAM to authenticate HTTP Basic credentials.
- +.TP 5
- \fB\-D \fIdevice-uri\fR
- Set the device URI for print output.
- The URI can be a filename, directory, or a network socket URI of the form "socket://ADDRESS[:PORT]" (where the default port number is 9100).
- @@ -168,6 +182,9 @@ command.
- Specifies the port number to listen on.
- The default is a user-specific number from 8000 to 8999.
- .TP 5
- +.B \-r off
- +Turns off DNS-SD service advertisements entirely.
- +.TP 5
- \fB\-r \fIsubtype[,subtype]\fR
- Specifies the DNS-SD subtype(s) to advertise.
- Separate multiple subtypes with a comma.
- diff --git a/ppdc/sample.drv b/ppdc/sample.drv
- index 6ca0e82b5..148cf0f54 100644
- --- a/ppdc/sample.drv
- +++ b/ppdc/sample.drv
- @@ -1,7 +1,7 @@
- //
- // Driver info file for CUPS-supplied PPDs.
- //
- -// Copyright © 2007-2018 by Apple Inc.
- +// Copyright © 2007-2019 by Apple Inc.
- // Copyright © 1993-2006 by Easy Software Products.
- //
- // Licensed under Apache License v2.0. See the file "LICENSE" for more
- @@ -66,6 +66,7 @@
- #media "w144h396/2.00x5.50\"" 144 396
- #media "w162h36/2.25x0.50\"" 162 36
- #media "w162h90/2.25x1.25\"" 162 90
- +#media "w162h225/30859 Paint Can Label" 162 225
- #media "w162h288/2.25x4.00\"" 162 288
- #media "w162h396/2.25x5.50\"" 162 396
- #media "w171h396/2.38x5.50\"" 171 396
- @@ -114,7 +115,7 @@ Attribute "FileSystem" "" "False"
- Attribute "LandscapeOrientation" "" "Plus90"
- Attribute "TTRasterizer" "" "Type42"
- -Copyright "Copyright (c) 2007-2018 by Apple Inc."
- +Copyright "Copyright (c) 2007-2019 by Apple Inc."
- Copyright "Copyright (c) 1997-2007 by Easy Software Products."
- Copyright ""
- Copyright "Licensed under Apache License v2.0. See the file \"LICENSE\" for more"
- @@ -124,11 +125,11 @@ Font *
- Version "2.3"
- -// Dymo Label Printer
- +// DYMO Label Printer
- {
- - Manufacturer "Dymo"
- + Manufacturer "DYMO"
- ModelName "Label Printer"
- - Attribute NickName "" "Dymo Label Printer"
- + Attribute NickName "" "DYMO Label Printer"
- PCFileName "dymo.ppd"
- DriverType label
- ModelNumber $DYMO_3x0
- @@ -142,7 +143,8 @@ Version "2.3"
- *MediaSize w81h252
- MediaSize w101h252
- MediaSize w54h144
- - MediaSize w167h288
- + MediaSize w162h225
- + MediaSize w162h288
- MediaSize w162h540
- MediaSize w162h504
- MediaSize w41h248
- @@ -153,6 +155,9 @@ Version "2.3"
- Resolution k 1 0 0 0 203dpi
- *Resolution k 1 0 0 0 300dpi
- + *InputSlot 0 "Roll/Main Roll"
- + InputSlot 1 "Roll2/Second Roll (DUO/Twin Only)"
- +
- Darkness 0 Light
- Darkness 1 Medium
- *Darkness 2 Normal
- diff --git a/scheduler/auth.c b/scheduler/auth.c
- index 5bb80edc9..4fbad6e24 100644
- --- a/scheduler/auth.c
- +++ b/scheduler/auth.c
- @@ -757,7 +757,7 @@ cupsdAuthorize(cupsd_client_t *con) /* I - Client connection */
- * Decode the authorization string to get the input token...
- */
- - len = (int)strlen(authorization);
- + len = (int)strlen(authorization) + 0;
- input_token.value = malloc((size_t)len);
- input_token.value = httpDecode64_2(input_token.value, &len,
- authorization);
- diff --git a/scheduler/classes.c b/scheduler/classes.c
- index 776e79a91..14d2558bf 100644
- --- a/scheduler/classes.c
- +++ b/scheduler/classes.c
- @@ -664,7 +664,7 @@ cupsdSaveAllClasses(void)
- cupsd_printer_t *pclass; /* Current printer class */
- int i; /* Looping var */
- time_t curtime; /* Current time */
- - struct tm *curdate; /* Current date */
- + struct tm curdate; /* Current date */
- cups_option_t *option; /* Current option */
- @@ -683,9 +683,9 @@ cupsdSaveAllClasses(void)
- * Write a small header to the file...
- */
- - curtime = time(NULL);
- - curdate = localtime(&curtime);
- - strftime(temp, sizeof(temp) - 1, "%Y-%m-%d %H:%M", curdate);
- + time(&curtime);
- + localtime_r(&curtime, &curdate);
- + strftime(temp, sizeof(temp) - 1, "%Y-%m-%d %H:%M", &curdate);
- cupsFilePuts(fp, "# Class configuration file for " CUPS_SVERSION "\n");
- cupsFilePrintf(fp, "# Written by cupsd on %s\n", temp);
- diff --git a/scheduler/client.c b/scheduler/client.c
- index f693e7c49..c2ee8f12a 100644
- --- a/scheduler/client.c
- +++ b/scheduler/client.c
- @@ -1099,7 +1099,7 @@ cupsdReadClient(cupsd_client_t *con) /* I - Client to read from */
- }
- }
- }
- - else if (!strncmp(con->uri, "/admin", 6) || !strncmp(con->uri, "/printers", 9) || !strncmp(con->uri, "/classes", 8) || !strncmp(con->uri, "/help", 5) || !strncmp(con->uri, "/jobs", 5))
- + else if (!buf[0] && (!strncmp(con->uri, "/admin", 6) || !strncmp(con->uri, "/classes", 8) || !strncmp(con->uri, "/help", 5) || !strncmp(con->uri, "/jobs", 5) || !strncmp(con->uri, "/printers", 9)))
- {
- if (!WebInterface)
- {
- @@ -1125,14 +1125,6 @@ cupsdReadClient(cupsd_client_t *con) /* I - Client to read from */
- cupsdSetStringf(&con->command, "%s/cgi-bin/admin.cgi", ServerBin);
- cupsdSetString(&con->options, strchr(con->uri + 6, '?'));
- }
- - else if (!strncmp(con->uri, "/printers", 9))
- - {
- - cupsdSetStringf(&con->command, "%s/cgi-bin/printers.cgi", ServerBin);
- - if (con->uri[9] && con->uri[10])
- - cupsdSetString(&con->options, con->uri + 9);
- - else
- - cupsdSetString(&con->options, NULL);
- - }
- else if (!strncmp(con->uri, "/classes", 8))
- {
- cupsdSetStringf(&con->command, "%s/cgi-bin/classes.cgi", ServerBin);
- @@ -1149,6 +1141,14 @@ cupsdReadClient(cupsd_client_t *con) /* I - Client to read from */
- else
- cupsdSetString(&con->options, NULL);
- }
- + else if (!strncmp(con->uri, "/printers", 9))
- + {
- + cupsdSetStringf(&con->command, "%s/cgi-bin/printers.cgi", ServerBin);
- + if (con->uri[9] && con->uri[10])
- + cupsdSetString(&con->options, con->uri + 9);
- + else
- + cupsdSetString(&con->options, NULL);
- + }
- else
- {
- cupsdSetStringf(&con->command, "%s/cgi-bin/help.cgi", ServerBin);
- @@ -1458,7 +1458,7 @@ cupsdReadClient(cupsd_client_t *con) /* I - Client to read from */
- break;
- }
- - if (!strncmp(con->uri, "/admin", 6) || !strncmp(con->uri, "/printers", 9) || !strncmp(con->uri, "/classes", 8) || !strncmp(con->uri, "/help", 5) || !strncmp(con->uri, "/jobs", 5))
- + if (!buf[0] && (!strncmp(con->uri, "/admin", 6) || !strncmp(con->uri, "/classes", 8) || !strncmp(con->uri, "/help", 5) || !strncmp(con->uri, "/jobs", 5) || !strncmp(con->uri, "/printers", 9)))
- {
- /*
- * CGI output...
- @@ -2701,6 +2701,7 @@ get_file(cupsd_client_t *con, /* I - Client connection */
- * Figure out the real filename...
- */
- + filename[0] = '\0';
- language[0] = '\0';
- if (!strncmp(con->uri, "/help", 5) && (con->uri[5] == '/' || !con->uri[5]))
- @@ -2718,6 +2719,7 @@ get_file(cupsd_client_t *con, /* I - Client connection */
- if ((p = cupsdFindDest(dest)) == NULL)
- {
- + strlcpy(filename, "/", len);
- cupsdLogClient(con, CUPSD_LOG_INFO, "No destination \"%s\" found.", dest);
- return (NULL);
- }
- @@ -2754,6 +2756,7 @@ get_file(cupsd_client_t *con, /* I - Client connection */
- if ((p = cupsdFindDest(dest)) == NULL)
- {
- + strlcpy(filename, "/", len);
- cupsdLogClient(con, CUPSD_LOG_INFO, "No destination \"%s\" found.", dest);
- return (NULL);
- }
- @@ -2786,6 +2789,14 @@ get_file(cupsd_client_t *con, /* I - Client connection */
- perm_check = 0;
- }
- + else if (!strncmp(con->uri, "/admin", 6) || !strncmp(con->uri, "/classes", 8) || !strncmp(con->uri, "/jobs", 5) || !strncmp(con->uri, "/printers", 9))
- + {
- + /*
- + * Admin/class/job/printer pages are served by CGI...
- + */
- +
- + return (NULL);
- + }
- 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, "/strings/", 9) && !strcmp(con->uri + strlen(con->uri) - 8, ".strings"))
- @@ -2795,12 +2806,14 @@ get_file(cupsd_client_t *con, /* I - Client connection */
- if ((p = cupsdFindDest(dest)) == NULL)
- {
- + strlcpy(filename, "/", len);
- cupsdLogClient(con, CUPSD_LOG_INFO, "No destination \"%s\" found.", dest);
- return (NULL);
- }
- if (!p->strings)
- {
- + strlcpy(filename, "/", len);
- cupsdLogClient(con, CUPSD_LOG_INFO, "No strings files for \"%s\".", dest);
- return (NULL);
- }
- diff --git a/scheduler/ipp.c b/scheduler/ipp.c
- index a38559751..2fe3bf25c 100644
- --- a/scheduler/ipp.c
- +++ b/scheduler/ipp.c
- @@ -10429,7 +10429,7 @@ set_job_attrs(cupsd_client_t *con, /* I - Client connection */
- case IPP_JOB_PROCESSING :
- case IPP_JOB_STOPPED :
- - if (job->state_value != attr->values[0].integer)
- + if (job->state_value != (ipp_jstate_t)attr->values[0].integer)
- {
- send_ipp_status(con, IPP_NOT_POSSIBLE,
- _("Job state cannot be changed."));
- diff --git a/scheduler/job.c b/scheduler/job.c
- index 2cfb1b03d..e20e7c563 100644
- --- a/scheduler/job.c
- +++ b/scheduler/job.c
- @@ -2183,7 +2183,7 @@ cupsdSaveAllJobs(void)
- temp[1024]; /* Temporary string */
- cupsd_job_t *job; /* Current job */
- time_t curtime; /* Current time */
- - struct tm *curdate; /* Current date */
- + struct tm curdate; /* Current date */
- snprintf(filename, sizeof(filename), "%s/job.cache", CacheDir);
- @@ -2196,9 +2196,9 @@ cupsdSaveAllJobs(void)
- * Write a small header to the file...
- */
- - curtime = time(NULL);
- - curdate = localtime(&curtime);
- - strftime(temp, sizeof(temp) - 1, "%Y-%m-%d %H:%M", curdate);
- + time(&curtime);
- + localtime_r(&curtime, &curdate);
- + strftime(temp, sizeof(temp) - 1, "%Y-%m-%d %H:%M", &curdate);
- cupsFilePuts(fp, "# Job cache file for " CUPS_SVERSION "\n");
- cupsFilePrintf(fp, "# Written by cupsd on %s\n", temp);
- @@ -2311,7 +2311,7 @@ cupsdSetJobHoldUntil(cupsd_job_t *job, /* I - Job */
- int update)/* I - Update job-hold-until attr? */
- {
- time_t curtime; /* Current time */
- - struct tm *curdate; /* Current date */
- + struct tm curdate; /* Current date */
- int hour; /* Hold hour */
- int minute; /* Hold minute */
- int second = 0; /* Hold second */
- @@ -2380,15 +2380,15 @@ cupsdSetJobHoldUntil(cupsd_job_t *job, /* I - Job */
- * Hold to 6am the next morning unless local time is < 6pm.
- */
- - curtime = time(NULL);
- - curdate = localtime(&curtime);
- + time(&curtime);
- + localtime_r(&curtime, &curdate);
- - if (curdate->tm_hour < 18)
- + if (curdate.tm_hour < 18)
- job->hold_until = curtime;
- else
- job->hold_until = curtime +
- - ((29 - curdate->tm_hour) * 60 + 59 -
- - curdate->tm_min) * 60 + 60 - curdate->tm_sec;
- + ((29 - curdate.tm_hour) * 60 + 59 -
- + curdate.tm_min) * 60 + 60 - curdate.tm_sec;
- }
- else if (!strcmp(when, "evening") || !strcmp(when, "night"))
- {
- @@ -2396,15 +2396,15 @@ cupsdSetJobHoldUntil(cupsd_job_t *job, /* I - Job */
- * Hold to 6pm unless local time is > 6pm or < 6am.
- */
- - curtime = time(NULL);
- - curdate = localtime(&curtime);
- + time(&curtime);
- + localtime_r(&curtime, &curdate);
- - if (curdate->tm_hour < 6 || curdate->tm_hour >= 18)
- + if (curdate.tm_hour < 6 || curdate.tm_hour >= 18)
- job->hold_until = curtime;
- else
- job->hold_until = curtime +
- - ((17 - curdate->tm_hour) * 60 + 59 -
- - curdate->tm_min) * 60 + 60 - curdate->tm_sec;
- + ((17 - curdate.tm_hour) * 60 + 59 -
- + curdate.tm_min) * 60 + 60 - curdate.tm_sec;
- }
- else if (!strcmp(when, "second-shift"))
- {
- @@ -2412,15 +2412,15 @@ cupsdSetJobHoldUntil(cupsd_job_t *job, /* I - Job */
- * Hold to 4pm unless local time is > 4pm.
- */
- - curtime = time(NULL);
- - curdate = localtime(&curtime);
- + time(&curtime);
- + localtime_r(&curtime, &curdate);
- - if (curdate->tm_hour >= 16)
- + if (curdate.tm_hour >= 16)
- job->hold_until = curtime;
- else
- job->hold_until = curtime +
- - ((15 - curdate->tm_hour) * 60 + 59 -
- - curdate->tm_min) * 60 + 60 - curdate->tm_sec;
- + ((15 - curdate.tm_hour) * 60 + 59 -
- + curdate.tm_min) * 60 + 60 - curdate.tm_sec;
- }
- else if (!strcmp(when, "third-shift"))
- {
- @@ -2428,15 +2428,15 @@ cupsdSetJobHoldUntil(cupsd_job_t *job, /* I - Job */
- * Hold to 12am unless local time is < 8am.
- */
- - curtime = time(NULL);
- - curdate = localtime(&curtime);
- + time(&curtime);
- + localtime_r(&curtime, &curdate);
- - if (curdate->tm_hour < 8)
- + if (curdate.tm_hour < 8)
- job->hold_until = curtime;
- else
- job->hold_until = curtime +
- - ((23 - curdate->tm_hour) * 60 + 59 -
- - curdate->tm_min) * 60 + 60 - curdate->tm_sec;
- + ((23 - curdate.tm_hour) * 60 + 59 -
- + curdate.tm_min) * 60 + 60 - curdate.tm_sec;
- }
- else if (!strcmp(when, "weekend"))
- {
- @@ -2444,16 +2444,16 @@ cupsdSetJobHoldUntil(cupsd_job_t *job, /* I - Job */
- * Hold to weekend unless we are in the weekend.
- */
- - curtime = time(NULL);
- - curdate = localtime(&curtime);
- + time(&curtime);
- + localtime_r(&curtime, &curdate);
- - if (curdate->tm_wday == 0 || curdate->tm_wday == 6)
- + if (curdate.tm_wday == 0 || curdate.tm_wday == 6)
- job->hold_until = curtime;
- else
- job->hold_until = curtime +
- - (((5 - curdate->tm_wday) * 24 +
- - (17 - curdate->tm_hour)) * 60 + 59 -
- - curdate->tm_min) * 60 + 60 - curdate->tm_sec;
- + (((5 - curdate.tm_wday) * 24 +
- + (17 - curdate.tm_hour)) * 60 + 59 -
- + curdate.tm_min) * 60 + 60 - curdate.tm_sec;
- }
- else if (sscanf(when, "%d:%d:%d", &hour, &minute, &second) >= 2)
- {
- @@ -2461,12 +2461,12 @@ cupsdSetJobHoldUntil(cupsd_job_t *job, /* I - Job */
- * Hold to specified GMT time (HH:MM or HH:MM:SS)...
- */
- - curtime = time(NULL);
- - curdate = gmtime(&curtime);
- + time(&curtime);
- + gmtime_r(&curtime, &curdate);
- job->hold_until = curtime +
- - ((hour - curdate->tm_hour) * 60 + minute -
- - curdate->tm_min) * 60 + second - curdate->tm_sec;
- + ((hour - curdate.tm_hour) * 60 + minute -
- + curdate.tm_min) * 60 + second - curdate.tm_sec;
- /*
- * Hold until next day as needed...
- @@ -2957,7 +2957,7 @@ dump_job_history(cupsd_job_t *job) /* I - Job */
- {
- int i, /* Looping var */
- oldsize; /* Current MaxLogSize */
- - struct tm *date; /* Date/time value */
- + struct tm date; /* Date/time value */
- cupsd_joblog_t *message; /* Current message */
- char temp[2048], /* Log message */
- *ptr, /* Pointer into log message */
- @@ -2985,12 +2985,12 @@ dump_job_history(cupsd_job_t *job) /* I - Job */
- */
- message = (cupsd_joblog_t *)cupsArrayFirst(job->history);
- - date = localtime(&(message->time));
- - strftime(start, sizeof(start), "%X", date);
- + localtime_r(&(message->time), &date);
- + strftime(start, sizeof(start), "%X", &date);
- message = (cupsd_joblog_t *)cupsArrayLast(job->history);
- - date = localtime(&(message->time));
- - strftime(end, sizeof(end), "%X", date);
- + localtime_r(&(message->time), &date);
- + strftime(end, sizeof(end), "%X", &date);
- snprintf(temp, sizeof(temp),
- "[Job %d] The following messages were recorded from %s to %s",
- diff --git a/scheduler/log.c b/scheduler/log.c
- index cdb5437dc..2bd1952f7 100644
- --- a/scheduler/log.c
- +++ b/scheduler/log.c
- @@ -301,7 +301,7 @@ cupsdGetDateTime(struct timeval *t, /* I - Time value or NULL for current */
- cupsd_time_t format) /* I - Format to use */
- {
- struct timeval curtime; /* Current time value */
- - struct tm *date; /* Date/time value */
- + struct tm date; /* Date/time value */
- static struct timeval last_time = { 0, 0 };
- /* Last time we formatted */
- static char s[1024]; /* Date/time string */
- @@ -351,23 +351,23 @@ cupsdGetDateTime(struct timeval *t, /* I - Time value or NULL for current */
- * (*BSD and Darwin store the timezone offset in the tm structure)
- */
- - date = localtime(&(t->tv_sec));
- + localtime_r(&(t->tv_sec), &date);
- if (format == CUPSD_TIME_STANDARD)
- snprintf(s, sizeof(s), "[%02d/%s/%04d:%02d:%02d:%02d %+03ld%02ld]",
- - date->tm_mday, months[date->tm_mon], 1900 + date->tm_year,
- - date->tm_hour, date->tm_min, date->tm_sec,
- + date.tm_mday, months[date.tm_mon], 1900 + date.tm_year,
- + date.tm_hour, date.tm_min, date.tm_sec,
- #ifdef HAVE_TM_GMTOFF
- - date->tm_gmtoff / 3600, (date->tm_gmtoff / 60) % 60);
- + date.tm_gmtoff / 3600, (date.tm_gmtoff / 60) % 60);
- #else
- timezone / 3600, (timezone / 60) % 60);
- #endif /* HAVE_TM_GMTOFF */
- else
- snprintf(s, sizeof(s), "[%02d/%s/%04d:%02d:%02d:%02d.%06d %+03ld%02ld]",
- - date->tm_mday, months[date->tm_mon], 1900 + date->tm_year,
- - date->tm_hour, date->tm_min, date->tm_sec, (int)t->tv_usec,
- + date.tm_mday, months[date.tm_mon], 1900 + date.tm_year,
- + date.tm_hour, date.tm_min, date.tm_sec, (int)t->tv_usec,
- #ifdef HAVE_TM_GMTOFF
- - date->tm_gmtoff / 3600, (date->tm_gmtoff / 60) % 60);
- + date.tm_gmtoff / 3600, (date.tm_gmtoff / 60) % 60);
- #else
- timezone / 3600, (timezone / 60) % 60);
- #endif /* HAVE_TM_GMTOFF */
- diff --git a/scheduler/main.c b/scheduler/main.c
- index 842b00a42..d5fdf971a 100644
- --- a/scheduler/main.c
- +++ b/scheduler/main.c
- @@ -757,7 +757,9 @@ main(int argc, /* I - Number of command-line args */
- #ifdef HAVE_ONDEMAND
- if (OnDemand)
- {
- +# ifndef HAVE_SYSTEMD /* Issue #5640: systemd doesn't actually support launch-on-demand services, need to fake it */
- stop_scheduler = 1;
- +# endif /* HAVE_SYSTEMD */
- break;
- }
- #endif /* HAVE_ONDEMAND */
- diff --git a/scheduler/printers.c b/scheduler/printers.c
- index 75ef4c0d2..80690397d 100644
- --- a/scheduler/printers.c
- +++ b/scheduler/printers.c
- @@ -1478,7 +1478,7 @@ cupsdSaveAllPrinters(void)
- *name; /* Current user/group name */
- cupsd_printer_t *printer; /* Current printer class */
- time_t curtime; /* Current time */
- - struct tm *curdate; /* Current date */
- + struct tm curdate; /* Current date */
- cups_option_t *option; /* Current option */
- ipp_attribute_t *marker; /* Current marker attribute */
- @@ -1498,9 +1498,9 @@ cupsdSaveAllPrinters(void)
- * Write a small header to the file...
- */
- - curtime = time(NULL);
- - curdate = localtime(&curtime);
- - strftime(temp, sizeof(temp) - 1, "%Y-%m-%d %H:%M", curdate);
- + time(&curtime);
- + localtime_r(&curtime, &curdate);
- + strftime(temp, sizeof(temp) - 1, "%Y-%m-%d %H:%M", &curdate);
- cupsFilePuts(fp, "# Printer configuration file for " CUPS_SVERSION "\n");
- cupsFilePrintf(fp, "# Written by cupsd on %s\n", temp);
- diff --git a/scheduler/subscriptions.c b/scheduler/subscriptions.c
- index 3267a2ff6..15acedca8 100644
- --- a/scheduler/subscriptions.c
- +++ b/scheduler/subscriptions.c
- @@ -1025,7 +1025,7 @@ cupsdSaveAllSubscriptions(void)
- temp[1024]; /* Temporary string */
- cupsd_subscription_t *sub; /* Current subscription */
- time_t curtime; /* Current time */
- - struct tm *curdate; /* Current date */
- + struct tm curdate; /* Current date */
- unsigned mask; /* Current event mask */
- const char *name; /* Current event name */
- int hex; /* Non-zero if we are writing hex data */
- @@ -1046,9 +1046,9 @@ cupsdSaveAllSubscriptions(void)
- * Write a small header to the file...
- */
- - curtime = time(NULL);
- - curdate = localtime(&curtime);
- - strftime(temp, sizeof(temp) - 1, "%Y-%m-%d %H:%M", curdate);
- + time(&curtime);
- + localtime_r(&curtime, &curdate);
- + strftime(temp, sizeof(temp) - 1, "%Y-%m-%d %H:%M", &curdate);
- cupsFilePuts(fp, "# Subscription configuration file for " CUPS_SVERSION "\n");
- cupsFilePrintf(fp, "# Written by cupsd on %s\n", temp);
- diff --git a/systemv/lp.c b/systemv/lp.c
- index ad22715b2..298c15825 100644
- --- a/systemv/lp.c
- +++ b/systemv/lp.c
- @@ -1,7 +1,7 @@
- /*
- * "lp" command for CUPS.
- *
- - * Copyright © 2007-2018 by Apple Inc.
- + * Copyright © 2007-2019 by Apple Inc.
- * Copyright © 1997-2007 by Easy Software Products.
- *
- * Licensed under Apache License v2.0. See the file "LICENSE" for more
- @@ -749,6 +749,7 @@ usage(void)
- " lp [options] -i id"));
- _cupsLangPuts(stdout, _("Options:"));
- _cupsLangPuts(stdout, _("-c Make a copy of the print file(s)"));
- + _cupsLangPuts(stdout, _("-d destination Specify the destination"));
- _cupsLangPuts(stdout, _("-E Encrypt the connection to the server"));
- _cupsLangPuts(stdout, _("-h server[:port] Connect to the named server and port"));
- _cupsLangPuts(stdout, _("-H HH:MM Hold the job until the specified UTC time"));
- diff --git a/templates/jobs.tmpl b/templates/jobs.tmpl
- index 8d787572d..353767cba 100644
- --- a/templates/jobs.tmpl
- +++ b/templates/jobs.tmpl
- @@ -20,7 +20,7 @@
- <FORM ACTION="/jobs/" METHOD="POST"><INPUT TYPE="HIDDEN" NAME="org.cups.sid" VALUE="{$org.cups.sid}"><INPUT TYPE="HIDDEN" NAME="OP" VALUE="restart-job"><INPUT TYPE="HIDDEN" NAME="job_id" VALUE="{job_id}"><INPUT TYPE="HIDDEN" NAME="job_printer_uri" VALUE="{job_printer_uri}"><INPUT TYPE="SUBMIT" VALUE="Reprint Job"></FORM>:}:}
- {job_state=4?{job_hold_until=auth-info-required?Held for authentication.:
- <FORM ACTION="/jobs/" METHOD="POST"><INPUT TYPE="HIDDEN" NAME="org.cups.sid" VALUE="{$org.cups.sid}"><INPUT TYPE="HIDDEN" NAME="OP" VALUE="release-job"><INPUT TYPE="HIDDEN" NAME="job_id" VALUE="{job_id}"><INPUT TYPE="HIDDEN" NAME="job_printer_uri" VALUE="{job_printer_uri}">
- -<INPUT TYPE="SUBMIT" VALUE="Release Job"></FORM>:}}
- +<INPUT TYPE="SUBMIT" VALUE="Release Job"></FORM>:}:}
- {job_state=3?
- <FORM ACTION="/jobs/" METHOD="POST"><INPUT TYPE="HIDDEN" NAME="org.cups.sid" VALUE="{$org.cups.sid}"><INPUT TYPE="HIDDEN" NAME="OP" VALUE="hold-job"><INPUT TYPE="HIDDEN" NAME="job_id" VALUE="{job_id}"><INPUT TYPE="HIDDEN" NAME="job_printer_uri" VALUE="{job_printer_uri}">
- <INPUT TYPE="SUBMIT" VALUE="Hold Job"></FORM>:}
- diff --git a/tools/Makefile b/tools/Makefile
- index be9cba366..f1781ef0b 100644
- --- a/tools/Makefile
- +++ b/tools/Makefile
- @@ -147,7 +147,7 @@ local: ippeveprinter-static ipptool-static
- ippeveprinter: ippeveprinter.o ../cups/$(LIBCUPS)
- echo Linking $@...
- - $(LD_CC) $(ALL_LDFLAGS) -o $@ ippeveprinter.o $(DNSSDLIBS) $(LINKCUPS)
- + $(LD_CC) $(ALL_LDFLAGS) -o $@ ippeveprinter.o $(DNSSDLIBS) $(PAMLIBS) $(LINKCUPS)
- $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@
- @@ -157,7 +157,7 @@ ippeveprinter: ippeveprinter.o ../cups/$(LIBCUPS)
- ippeveprinter-static: ippeveprinter.o ../cups/$(LIBCUPSSTATIC)
- echo Linking $@...
- - $(LD_CC) $(ALL_LDFLAGS) -o $@ ippeveprinter.o $(LINKCUPSSTATIC)
- + $(LD_CC) $(ALL_LDFLAGS) -o $@ ippeveprinter.o $(PAMLIBS) $(LINKCUPSSTATIC)
- $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@
- diff --git a/tools/ippeveprinter.c b/tools/ippeveprinter.c
- index 76c57961a..41954a570 100644
- --- a/tools/ippeveprinter.c
- +++ b/tools/ippeveprinter.c
- @@ -51,6 +51,7 @@ extern char **environ;
- # include <avahi-common/error.h>
- # include <avahi-common/thread-watch.h>
- #endif /* HAVE_DNSSD */
- +
- #ifdef HAVE_SYS_MOUNT_H
- # include <sys/mount.h>
- #endif /* HAVE_SYS_MOUNT_H */
- @@ -64,6 +65,14 @@ extern char **environ;
- # include <sys/vfs.h>
- #endif /* HAVE_SYS_VFS_H */
- +#if HAVE_LIBPAM
- +# ifdef HAVE_PAM_PAM_APPL_H
- +# include <pam/pam_appl.h>
- +# else
- +# include <security/pam_appl.h>
- +# endif /* HAVE_PAM_PAM_APPL_H */
- +#endif /* HAVE_LIBPAM */
- +
- #include "printer-png.h"
- @@ -148,6 +157,14 @@ typedef void *ippeve_srv_t; /* Service reference */
- typedef void *ippeve_txt_t; /* TXT record */
- #endif /* HAVE_DNSSD */
- +#if HAVE_LIBPAM
- +typedef struct ippeve_authdata_s /* Authentication data */
- +{
- + char username[HTTP_MAX_VALUE], /* Username string */
- + *password; /* Password string */
- +} ippeve_authdata_t;
- +#endif /* HAVE_LIBPAM */
- +
- typedef struct ippeve_filter_s /**** Attribute filter ****/
- {
- cups_array_t *ra; /* Requested attributes */
- @@ -224,7 +241,9 @@ typedef struct ippeve_client_s /**** Client data ****/
- char uri[1024], /* Request URI */
- *options; /* URI options */
- http_addr_t addr; /* Client address */
- - char hostname[256]; /* Client hostname */
- + char hostname[256], /* Client hostname */
- + username[HTTP_MAX_VALUE];
- + /* Authenticated username, if any */
- ippeve_printer_t *printer; /* Printer */
- ippeve_job_t *job; /* Current job, if any */
- } ippeve_client_t;
- @@ -234,6 +253,7 @@ typedef struct ippeve_client_s /**** Client data ****/
- * Local functions...
- */
- +static http_status_t authenticate_request(ippeve_client_t *client);
- static void clean_jobs(ippeve_printer_t *printer);
- static int compare_jobs(ippeve_job_t *a, ippeve_job_t *b);
- static void copy_attributes(ipp_t *to, ipp_t *from, cups_array_t *ra, ipp_tag_t group_tag, int quickcopy);
- @@ -281,6 +301,9 @@ static ipp_t *load_legacy_attributes(const char *make, const char *model, int p
- #if !CUPS_LITE
- static ipp_t *load_ppd_attributes(const char *ppdfile, cups_array_t *docformats);
- #endif /* !CUPS_LITE */
- +#if HAVE_LIBPAM
- +static int pam_func(int, const struct pam_message **, struct pam_response **, void *);
- +#endif /* HAVE_LIBPAM */
- static int parse_options(ippeve_client_t *client, cups_option_t **options);
- static void process_attr_message(ippeve_job_t *job, char *message);
- static void *process_client(ippeve_client_t *client);
- @@ -316,6 +339,8 @@ static AvahiClient *DNSSDClient = NULL;
- static int KeepFiles = 0, /* Keep spooled job files? */
- MaxVersion = 20,/* Maximum IPP version (20 = 2.0, 11 = 1.1, etc.) */
- Verbosity = 0; /* Verbosity level */
- +static const char *PAMService = NULL;
- + /* PAM service */
- /*
- @@ -371,6 +396,14 @@ main(int argc, /* I - Number of command-line args */
- {
- web_forms = 0;
- }
- + else if (!strcmp(argv[i], "--pam-service"))
- + {
- + i ++;
- + if (i >= argc)
- + usage(1);
- +
- + PAMService = argv[i];
- + }
- else if (!strcmp(argv[i], "--version"))
- {
- puts(CUPS_SVERSION);
- @@ -392,6 +425,11 @@ main(int argc, /* I - Number of command-line args */
- legacy = 1;
- break;
- + case 'A' : /* -A (enable authentication) */
- + if (!PAMService)
- + PAMService = "cups";
- + break;
- +
- case 'D' : /* -D device-uri */
- i ++;
- if (i >= argc)
- @@ -631,10 +669,6 @@ main(int argc, /* I - Number of command-line args */
- _cupsLangPrintf(stderr, _("Using spool directory \"%s\"."), directory);
- }
- -#ifdef HAVE_SSL
- - cupsSetServerCredentials(keypath, servername, 1);
- -#endif /* HAVE_SSL */
- -
- /*
- * Initialize DNS-SD...
- */
- @@ -675,6 +709,10 @@ main(int argc, /* I - Number of command-line args */
- printer->ppdfile = strdup(ppdfile);
- #endif /* !CUPS_LITE */
- +#ifdef HAVE_SSL
- + cupsSetServerCredentials(keypath, printer->hostname, 1);
- +#endif /* HAVE_SSL */
- +
- /*
- * Run the print service...
- */
- @@ -691,6 +729,105 @@ main(int argc, /* I - Number of command-line args */
- }
- +/*
- + * 'authenticate_request()' - Try to authenticate the request.
- + */
- +
- +static http_status_t /* O - HTTP_STATUS_CONTINUE to keep going, otherwise status to return */
- +authenticate_request(
- + ippeve_client_t *client) /* I - Client */
- +{
- +#if HAVE_LIBPAM
- + /*
- + * If PAM isn't enabled, return 'continue' now...
- + */
- +
- + const char *authorization; /* Pointer into Authorization string */
- + int userlen; /* Username:password length */
- + pam_handle_t *pamh; /* PAM authentication handle */
- + int pamerr; /* PAM error code */
- + struct pam_conv pamdata; /* PAM conversation data */
- + ippeve_authdata_t data; /* Authentication data */
- +
- +
- + if (!PAMService)
- + return (HTTP_STATUS_CONTINUE);
- +
- + /*
- + * Try authenticating using PAM...
- + */
- +
- + authorization = httpGetField(client->http, HTTP_FIELD_AUTHORIZATION);
- +
- + if (!*authorization)
- + return (HTTP_STATUS_UNAUTHORIZED);
- +
- + if (strncmp(authorization, "Basic ", 6))
- + {
- + fputs("Unsupported scheme in Authorization header.\n", stderr);
- + return (HTTP_STATUS_BAD_REQUEST);
- + }
- +
- + authorization += 5;
- + while (isspace(*authorization & 255))
- + authorization ++;
- +
- + userlen = sizeof(data.username);
- + httpDecode64_2(data.username, &userlen, authorization);
- +
- + if ((data.password = strchr(data.username, ':')) == NULL)
- + {
- + fputs("No password in Authorization header.\n", stderr);
- + return (HTTP_STATUS_BAD_REQUEST);
- + }
- +
- + *(data.password)++ = '\0';
- +
- + if (!data.username[0])
- + {
- + fputs("No username in Authorization header.\n", stderr);
- + return (HTTP_STATUS_BAD_REQUEST);
- + }
- +
- + pamdata.conv = pam_func;
- + pamdata.appdata_ptr = &data;
- +
- + if ((pamerr = pam_start(PAMService, data.username, &pamdata, &pamh)) != PAM_SUCCESS)
- + {
- + fprintf(stderr, "pam_start() returned %d (%s)\n", pamerr, pam_strerror(pamh, pamerr));
- + return (HTTP_STATUS_SERVER_ERROR);
- + }
- +
- + if ((pamerr = pam_authenticate(pamh, PAM_SILENT)) != PAM_SUCCESS)
- + {
- + fprintf(stderr, "pam_authenticate() returned %d (%s)\n", pamerr, pam_strerror(pamh, pamerr));
- + pam_end(pamh, 0);
- + return (HTTP_STATUS_UNAUTHORIZED);
- + }
- +
- + if ((pamerr = pam_acct_mgmt(pamh, PAM_SILENT)) != PAM_SUCCESS)
- + {
- + fprintf(stderr, "pam_acct_mgmt() returned %d (%s)\n", pamerr, pam_strerror(pamh, pamerr));
- + pam_end(pamh, 0);
- + return (HTTP_STATUS_SERVER_ERROR);
- + }
- +
- + strlcpy(client->username, data.username, sizeof(client->username));
- +
- + pam_end(pamh, PAM_SUCCESS);
- +
- + return (HTTP_STATUS_CONTINUE);
- +
- +#else
- + /*
- + * No authentication support built-in, return 'continue'...
- + */
- +
- + return (HTTP_STATUS_CONTINUE);
- +#endif /* HAVE_LIBPAM */
- +}
- +
- +
- /*
- * 'clean_jobs()' - Clean out old (completed) jobs.
- */
- @@ -1427,6 +1564,11 @@ create_printer(
- "none",
- "none"
- };
- + static const char * const uri_authentication_basic[] =
- + { /* uri-authentication-supported values with authentication */
- + "basic",
- + "basic"
- + };
- static const char * const uri_security_supported[] =
- { /* uri-security-supported values */
- "none",
- @@ -1763,9 +1905,15 @@ create_printer(
- /* uri-authentication-supported */
- #ifdef HAVE_SSL
- - ippAddStrings(printer->attrs, IPP_TAG_PRINTER, IPP_CONST_TAG(IPP_TAG_KEYWORD), "uri-authentication-supported", 2, NULL, uri_authentication_supported);
- + if (PAMService)
- + ippAddStrings(printer->attrs, IPP_TAG_PRINTER, IPP_CONST_TAG(IPP_TAG_KEYWORD), "uri-authentication-supported", 2, NULL, uri_authentication_basic);
- + else
- + ippAddStrings(printer->attrs, IPP_TAG_PRINTER, IPP_CONST_TAG(IPP_TAG_KEYWORD), "uri-authentication-supported", 2, NULL, uri_authentication_supported);
- #else
- - ippAddString(printer->attrs, IPP_TAG_PRINTER, IPP_CONST_TAG(IPP_TAG_KEYWORD), "uri-authentication-supported", NULL, "none");
- + if (PAMService)
- + ippAddString(printer->attrs, IPP_TAG_PRINTER, IPP_CONST_TAG(IPP_TAG_KEYWORD), "uri-authentication-supported", NULL, "basic");
- + else
- + ippAddString(printer->attrs, IPP_TAG_PRINTER, IPP_CONST_TAG(IPP_TAG_KEYWORD), "uri-authentication-supported", NULL, "none");
- #endif /* HAVE_SSL */
- /* uri-security-supported */
- @@ -5226,6 +5374,78 @@ load_ppd_attributes(
- #endif /* !CUPS_LITE */
- +#if HAVE_LIBPAM
- +/*
- + * 'pam_func()' - PAM conversation function.
- + */
- +
- +static int /* O - Success or failure */
- +pam_func(
- + int num_msg, /* I - Number of messages */
- + const struct pam_message **msg, /* I - Messages */
- + struct pam_response **resp, /* O - Responses */
- + void *appdata_ptr)
- + /* I - Pointer to connection */
- +{
- + int i; /* Looping var */
- + struct pam_response *replies; /* Replies */
- + ippeve_authdata_t *data; /* Pointer to auth data */
- +
- +
- + /*
- + * Allocate memory for the responses...
- + */
- +
- + if ((replies = malloc(sizeof(struct pam_response) * (size_t)num_msg)) == NULL)
- + return (PAM_CONV_ERR);
- +
- + /*
- + * Answer all of the messages...
- + */
- +
- + data = (ippeve_authdata_t *)appdata_ptr;
- +
- + for (i = 0; i < num_msg; i ++)
- + {
- + switch (msg[i]->msg_style)
- + {
- + case PAM_PROMPT_ECHO_ON:
- + replies[i].resp_retcode = PAM_SUCCESS;
- + replies[i].resp = strdup(data->username);
- + break;
- +
- + case PAM_PROMPT_ECHO_OFF:
- + replies[i].resp_retcode = PAM_SUCCESS;
- + replies[i].resp = strdup(data->password);
- + break;
- +
- + case PAM_TEXT_INFO:
- + replies[i].resp_retcode = PAM_SUCCESS;
- + replies[i].resp = NULL;
- + break;
- +
- + case PAM_ERROR_MSG:
- + replies[i].resp_retcode = PAM_SUCCESS;
- + replies[i].resp = NULL;
- + break;
- +
- + default:
- + free(replies);
- + return (PAM_CONV_ERR);
- + }
- + }
- +
- + /*
- + * Return the responses back to PAM...
- + */
- +
- + *resp = replies;
- +
- + return (PAM_SUCCESS);
- +}
- +#endif /* HAVE_LIBPAM */
- +
- +
- /*
- * 'parse_options()' - Parse URL options into CUPS options.
- *
- @@ -5431,6 +5651,8 @@ process_http(ippeve_client_t *client) /* I - Client connection */
- * Clear state variables...
- */
- + client->username[0] = '\0';
- +
- ippDelete(client->request);
- ippDelete(client->response);
- @@ -5526,8 +5748,7 @@ process_http(ippeve_client_t *client) /* I - Client connection */
- * Handle HTTP Upgrade...
- */
- - if (!strcasecmp(httpGetField(client->http, HTTP_FIELD_CONNECTION),
- - "Upgrade"))
- + if (!strcasecmp(httpGetField(client->http, HTTP_FIELD_CONNECTION), "Upgrade"))
- {
- #ifdef HAVE_SSL
- if (strstr(httpGetField(client->http, HTTP_FIELD_UPGRADE), "TLS/") != NULL && !httpIsEncrypted(client->http))
- @@ -5552,34 +5773,6 @@ process_http(ippeve_client_t *client) /* I - Client connection */
- return (0);
- }
- - /*
- - * Handle HTTP Expect...
- - */
- -
- - if (httpGetExpect(client->http) &&
- - (client->operation == HTTP_STATE_POST ||
- - client->operation == HTTP_STATE_PUT))
- - {
- - if (httpGetExpect(client->http) == HTTP_STATUS_CONTINUE)
- - {
- - /*
- - * Send 100-continue header...
- - */
- -
- - if (!respond_http(client, HTTP_STATUS_CONTINUE, NULL, NULL, 0))
- - return (0);
- - }
- - else
- - {
- - /*
- - * Send 417-expectation-failed header...
- - */
- -
- - if (!respond_http(client, HTTP_STATUS_EXPECTATION_FAILED, NULL, NULL, 0))
- - return (0);
- - }
- - }
- -
- /*
- * Handle new transfers...
- */
- @@ -5646,32 +5839,44 @@ process_http(ippeve_client_t *client) /* I - Client connection */
- httpFlushWrite(client->http);
- }
- }
- - else if (!strcmp(client->uri, "/"))
- + else
- {
- /*
- - * Show web status page...
- + * Authenticate if needed...
- */
- - return (show_status(client));
- - }
- - else if (!strcmp(client->uri, "/media"))
- - {
- - /*
- - * Show web media page...
- - */
- + if ((http_status = authenticate_request(client)) != HTTP_STATUS_CONTINUE)
- + {
- + return (respond_http(client, http_status, NULL, NULL, 0));
- + }
- - return (show_media(client));
- - }
- - else if (!strcmp(client->uri, "/supplies"))
- - {
- - /*
- - * Show web supplies page...
- - */
- + if (!strcmp(client->uri, "/"))
- + {
- + /*
- + * Show web status page...
- + */
- - return (show_supplies(client));
- + return (show_status(client));
- + }
- + else if (!strcmp(client->uri, "/media"))
- + {
- + /*
- + * Show web media page...
- + */
- +
- + return (show_media(client));
- + }
- + else if (!strcmp(client->uri, "/supplies"))
- + {
- + /*
- + * Show web supplies page...
- + */
- +
- + return (show_supplies(client));
- + }
- + else
- + return (respond_http(client, HTTP_STATUS_NOT_FOUND, NULL, NULL, 0));
- }
- - else
- - return (respond_http(client, HTTP_STATUS_NOT_FOUND, NULL, NULL, 0));
- break;
- case HTTP_STATE_POST :
- @@ -5730,6 +5935,7 @@ process_ipp(ippeve_client_t *client) /* I - Client */
- ipp_attribute_t *uri; /* Printer URI attribute */
- int major, minor; /* Version number */
- const char *name; /* Name of attribute */
- + http_status_t status; /* Authentication status */
- debug_attributes("Request", client->request, 1);
- @@ -5880,13 +6086,48 @@ process_ipp(ippeve_client_t *client) /* I - Client */
- strcmp(resource, "/ipp/print")))
- respond_ipp(client, IPP_STATUS_ERROR_NOT_FOUND, "%s %s not found.",
- name, ippGetString(uri, 0, NULL));
- - else
- + else if (client->operation_id != IPP_OP_GET_PRINTER_ATTRIBUTES && (status = authenticate_request(client)) != HTTP_STATUS_CONTINUE)
- + {
- + httpFlush(client->http);
- +
- + return (respond_http(client, status, NULL, NULL, 0));
- + }
- + else
- {
- + /*
- + * Handle HTTP Expect...
- + */
- +
- + if (httpGetExpect(client->http))
- + {
- + if (httpGetExpect(client->http) == HTTP_STATUS_CONTINUE)
- + {
- + /*
- + * Send 100-continue header...
- + */
- +
- + if (!respond_http(client, HTTP_STATUS_CONTINUE, NULL, NULL, 0))
- + return (0);
- + }
- + else
- + {
- + /*
- + * Send 417-expectation-failed header...
- + */
- +
- + if (!respond_http(client, HTTP_STATUS_EXPECTATION_FAILED, NULL, NULL, 0))
- + return (0);
- +
- + httpFlush(client->http);
- + return (1);
- + }
- + }
- +
- /*
- * Try processing the operation...
- */
- - switch (ippGetOperation(client->request))
- + switch (client->operation_id)
- {
- case IPP_OP_PRINT_JOB :
- ipp_print_job(client);
- @@ -6529,6 +6770,10 @@ register_printer(
- urf[252], /* List of supported URF values */
- *ptr; /* Pointer into string */
- +
- + if (!strcmp(subtypes, "off"))
- + return (1);
- +
- color_supported = ippFindAttribute(printer->attrs, "color-supported", IPP_TAG_BOOLEAN);
- document_format_supported = ippFindAttribute(printer->attrs, "document-format-supported", IPP_TAG_MIMETYPE);
- printer_location = ippFindAttribute(printer->attrs, "printer-location", IPP_TAG_TEXT);
- @@ -6574,6 +6819,7 @@ register_printer(
- #ifdef HAVE_DNSSD
- DNSServiceErrorType error; /* Error from Bonjour */
- char regtype[256]; /* Bonjour service type */
- + uint32_t interface; /* Interface index */
- /*
- @@ -6606,9 +6852,11 @@ register_printer(
- * defend our service name but not actually support LPD...
- */
- + interface = !strcmp(printer->hostname, "localhost") ? kDNSServiceInterfaceIndexLocalOnly : kDNSServiceInterfaceIndexAny;
- +
- printer->printer_ref = DNSSDMaster;
- - if ((error = DNSServiceRegister(&(printer->printer_ref), kDNSServiceFlagsShareConnection, 0 /* interfaceIndex */, printer->dnssd_name, "_printer._tcp", NULL /* domain */, NULL /* host */, 0 /* port */, 0 /* txtLen */, NULL /* txtRecord */, (DNSServiceRegisterReply)dnssd_callback, printer)) != kDNSServiceErr_NoError)
- + if ((error = DNSServiceRegister(&(printer->printer_ref), kDNSServiceFlagsShareConnection, interface, printer->dnssd_name, "_printer._tcp", NULL /* domain */, NULL /* host */, 0 /* port */, 0 /* txtLen */, NULL /* txtRecord */, (DNSServiceRegisterReply)dnssd_callback, printer)) != kDNSServiceErr_NoError)
- {
- _cupsLangPrintf(stderr, _("Unable to register \"%s.%s\": %d"), printer->dnssd_name, "_printer._tcp", error);
- return (0);
- @@ -6626,7 +6874,7 @@ register_printer(
- else
- strlcpy(regtype, "_ipp._tcp", sizeof(regtype));
- - if ((error = DNSServiceRegister(&(printer->ipp_ref), kDNSServiceFlagsShareConnection, 0 /* interfaceIndex */, printer->dnssd_name, regtype, NULL /* domain */, NULL /* host */, htons(printer->port), TXTRecordGetLength(&ipp_txt), TXTRecordGetBytesPtr(&ipp_txt), (DNSServiceRegisterReply)dnssd_callback, printer)) != kDNSServiceErr_NoError)
- + if ((error = DNSServiceRegister(&(printer->ipp_ref), kDNSServiceFlagsShareConnection, interface, printer->dnssd_name, regtype, NULL /* domain */, NULL /* host */, htons(printer->port), TXTRecordGetLength(&ipp_txt), TXTRecordGetBytesPtr(&ipp_txt), (DNSServiceRegisterReply)dnssd_callback, printer)) != kDNSServiceErr_NoError)
- {
- _cupsLangPrintf(stderr, _("Unable to register \"%s.%s\": %d"), printer->dnssd_name, regtype, error);
- return (0);
- @@ -6645,7 +6893,7 @@ register_printer(
- else
- strlcpy(regtype, "_ipps._tcp", sizeof(regtype));
- - if ((error = DNSServiceRegister(&(printer->ipps_ref), kDNSServiceFlagsShareConnection, 0 /* interfaceIndex */, printer->dnssd_name, regtype, NULL /* domain */, NULL /* host */, htons(printer->port), TXTRecordGetLength(&ipp_txt), TXTRecordGetBytesPtr(&ipp_txt), (DNSServiceRegisterReply)dnssd_callback, printer)) != kDNSServiceErr_NoError)
- + if ((error = DNSServiceRegister(&(printer->ipps_ref), kDNSServiceFlagsShareConnection, interface, printer->dnssd_name, regtype, NULL /* domain */, NULL /* host */, htons(printer->port), TXTRecordGetLength(&ipp_txt), TXTRecordGetBytesPtr(&ipp_txt), (DNSServiceRegisterReply)dnssd_callback, printer)) != kDNSServiceErr_NoError)
- {
- _cupsLangPrintf(stderr, _("Unable to register \"%s.%s\": %d"), printer->dnssd_name, regtype, error);
- return (0);
- @@ -6659,7 +6907,7 @@ register_printer(
- printer->http_ref = DNSSDMaster;
- - if ((error = DNSServiceRegister(&(printer->http_ref), kDNSServiceFlagsShareConnection, 0 /* interfaceIndex */, printer->dnssd_name, "_http._tcp,_printer", NULL /* domain */, NULL /* host */, htons(printer->port), 0 /* txtLen */, NULL /* txtRecord */, (DNSServiceRegisterReply)dnssd_callback, printer)) != kDNSServiceErr_NoError)
- + if ((error = DNSServiceRegister(&(printer->http_ref), kDNSServiceFlagsShareConnection, interface, printer->dnssd_name, "_http._tcp,_printer", NULL /* domain */, NULL /* host */, htons(printer->port), 0 /* txtLen */, NULL /* txtRecord */, (DNSServiceRegisterReply)dnssd_callback, printer)) != kDNSServiceErr_NoError)
- {
- _cupsLangPrintf(stderr, _("Unable to register \"%s.%s\": %d"), printer->dnssd_name, "_http._tcp,_printer", error);
- return (0);
- @@ -6824,6 +7072,14 @@ respond_http(
- client->operation == HTTP_STATE_OPTIONS)
- httpSetField(client->http, HTTP_FIELD_ALLOW, "GET, HEAD, OPTIONS, POST");
- + if (code == HTTP_STATUS_UNAUTHORIZED)
- + {
- + char value[256]; /* WWW-Authenticate value */
- +
- + snprintf(value, sizeof(value), "Basic realm=\"%s\"", PAMService);
- + httpSetField(client->http, HTTP_FIELD_WWW_AUTHENTICATE, value);
- + }
- +
- if (type)
- {
- if (!strcmp(type, "text/html"))
- @@ -7645,10 +7901,12 @@ time_string(time_t tv, /* I - Time value */
- char *buffer, /* I - Buffer */
- size_t bufsize) /* I - Size of buffer */
- {
- - struct tm *curtime = localtime(&tv);
- - /* Local time */
- + struct tm date; /* Local time and date */
- +
- + localtime_r(&tv, &date);
- +
- + strftime(buffer, bufsize, "%X", &date);
- - strftime(buffer, bufsize, "%X", curtime);
- return (buffer);
- }
- @@ -7662,10 +7920,12 @@ usage(int status) /* O - Exit status */
- {
- _cupsLangPuts(stdout, _("Usage: ippeveprinter [options] \"name\""));
- _cupsLangPuts(stdout, _("Options:"));
- - _cupsLangPuts(stderr, _("--help Show program help"));
- - _cupsLangPuts(stderr, _("--no-web-forms Disable web forms for media and supplies"));
- - _cupsLangPuts(stderr, _("--version Show program version"));
- + _cupsLangPuts(stdout, _("--help Show program help"));
- + _cupsLangPuts(stdout, _("--no-web-forms Disable web forms for media and supplies"));
- + _cupsLangPuts(stdout, _("--pam-service service Use the named PAM service"));
- + _cupsLangPuts(stdout, _("--version Show program version"));
- _cupsLangPuts(stdout, _("-2 Set 2-sided printing support (default=1-sided)"));
- + _cupsLangPuts(stdout, _("-A Enable authentication"));
- _cupsLangPuts(stdout, _("-D device-uri Set the device URI for the printer"));
- _cupsLangPuts(stdout, _("-F output-type/subtype Set the output format for the printer"));
- #ifdef HAVE_SSL
- @@ -7686,7 +7946,7 @@ usage(int status) /* O - Exit status */
- _cupsLangPuts(stdout, _("-p port Set port number for printer"));
- _cupsLangPuts(stdout, _("-r subtype,[subtype] Set DNS-SD service subtype"));
- _cupsLangPuts(stdout, _("-s speed[,color-speed] Set speed in pages per minute"));
- - _cupsLangPuts(stderr, _("-v Be verbose"));
- + _cupsLangPuts(stdout, _("-v Be verbose"));
- exit(status);
- }
- diff --git a/tools/ipptool.c b/tools/ipptool.c
- index e54b78ad3..a3a694d5f 100644
- --- a/tools/ipptool.c
- +++ b/tools/ipptool.c
- @@ -2162,16 +2162,16 @@ static char * /* O - ISO 8601 date/time string */
- iso_date(const ipp_uchar_t *date) /* I - IPP (RFC 1903) date/time value */
- {
- time_t utctime; /* UTC time since 1970 */
- - struct tm *utcdate; /* UTC date/time */
- + struct tm utcdate; /* UTC date/time */
- static char buffer[255]; /* String buffer */
- utctime = ippDateToTime(date);
- - utcdate = gmtime(&utctime);
- + gmtime_r(&utctime, &utcdate);
- snprintf(buffer, sizeof(buffer), "%04d-%02d-%02dT%02d:%02d:%02dZ",
- - utcdate->tm_year + 1900, utcdate->tm_mon + 1, utcdate->tm_mday,
- - utcdate->tm_hour, utcdate->tm_min, utcdate->tm_sec);
- + utcdate.tm_year + 1900, utcdate.tm_mon + 1, utcdate.tm_mday,
- + utcdate.tm_hour, utcdate.tm_min, utcdate.tm_sec);
- return (buffer);
- }
- diff --git a/vcnet/config.h b/vcnet/config.h
- index ad6919071..4ad1dc8f1 100644
- --- a/vcnet/config.h
- +++ b/vcnet/config.h
- @@ -46,6 +46,14 @@
- #define write _write
- +/*
- + * Microsoft "safe" functions use a different argument order than POSIX...
- + */
- +
- +#define gmtime_r(t,tm) gmtime_s(tm,t)
- +#define localtime_r(t,tm) localtime_s(tm,t)
- +
- +
- /*
- * Map the POSIX strcasecmp() and strncasecmp() functions to the Win32
- * _stricmp() and _strnicmp() functions...
- @@ -89,8 +97,8 @@ typedef unsigned long useconds_t;
- * Version of software...
- */
- -#define CUPS_SVERSION "CUPS v2.3.0"
- -#define CUPS_MINIMAL "CUPS/2.3.0"
- +#define CUPS_SVERSION "CUPS v2.3.1"
- +#define CUPS_MINIMAL "CUPS/2.3.1"
- /*
- @@ -375,13 +383,6 @@ typedef unsigned long useconds_t;
- #define HAVE_SSL 1
- -/*
- - * Do we have the gnutls_fips140_set_mode function?
- - */
- -
- -/* #undef HAVE_GNUTLS_FIPS140_SET_MODE */
- -
- -
- /*
- * Do we have the gnutls_transport_set_pull_timeout_function function?
- */
- diff --git a/xcode/CUPS.xcodeproj/project.pbxproj b/xcode/CUPS.xcodeproj/project.pbxproj
- index 595220ad2..21b1212d9 100644
- --- a/xcode/CUPS.xcodeproj/project.pbxproj
- +++ b/xcode/CUPS.xcodeproj/project.pbxproj
- @@ -49,6 +49,7 @@
- 271284C31CC11FA500E517C7 /* PBXTargetDependency */,
- 271284C51CC11FA500E517C7 /* PBXTargetDependency */,
- 271284C71CC11FA500E517C7 /* PBXTargetDependency */,
- + 274770E42345347D0089BC31 /* PBXTargetDependency */,
- 271284C91CC11FA500E517C7 /* PBXTargetDependency */,
- 726AD704135E8AA1002C930D /* PBXTargetDependency */,
- 2767FC5419267469000F61D3 /* PBXTargetDependency */,
- @@ -333,6 +334,12 @@
- 273B1ECA226B420C00428143 /* libcups.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 72220EAE1333047D00FCA411 /* libcups.dylib */; };
- 273B1ECD226B421E00428143 /* libcups.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 72220EAE1333047D00FCA411 /* libcups.dylib */; };
- 273BF6C71333B5370022CAAB /* testcups.c in Sources */ = {isa = PBXBuildFile; fileRef = 273BF6C61333B5370022CAAB /* testcups.c */; };
- + 274770D72345342B0089BC31 /* libcups_static.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 72A4332F155844CF002E172D /* libcups_static.a */; };
- + 274770D82345342B0089BC31 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 278C58E5136B64AF00836530 /* CoreFoundation.framework */; };
- + 274770D92345342B0089BC31 /* Kerberos.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 278C58E6136B64B000836530 /* Kerberos.framework */; };
- + 274770DA2345342B0089BC31 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 278C58E7136B64B000836530 /* Security.framework */; };
- + 274770DB2345342B0089BC31 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 278C58E8136B64B000836530 /* SystemConfiguration.framework */; };
- + 274770E2234534660089BC31 /* testthreads.c in Sources */ = {isa = PBXBuildFile; fileRef = 274770E1234534660089BC31 /* testthreads.c */; };
- 274FF5D913332CC700317ECB /* cups-driverd.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 274FF5D613332CC700317ECB /* cups-driverd.cxx */; };
- 274FF5DA13332CC700317ECB /* util.c in Sources */ = {isa = PBXBuildFile; fileRef = 274FF5D713332CC700317ECB /* util.c */; };
- 274FF5DD13332D0600317ECB /* libcups.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 72220EAE1333047D00FCA411 /* libcups.dylib */; };
- @@ -465,6 +472,7 @@
- 278C58EA136B64B000836530 /* Kerberos.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 278C58E6136B64B000836530 /* Kerberos.framework */; };
- 278C58EB136B64B000836530 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 278C58E7136B64B000836530 /* Security.framework */; };
- 278C58EC136B64B000836530 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 278C58E8136B64B000836530 /* SystemConfiguration.framework */; };
- + 279AE6F52395B80F004DD600 /* libpam.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 279AE6F42395B80F004DD600 /* libpam.tbd */; };
- 27A034821A8BDC3A00650675 /* lpadmin.c in Sources */ = {isa = PBXBuildFile; fileRef = 2732E08D137A3F5200FAFEF6 /* lpadmin.c */; };
- 27A034851A8BDC5C00650675 /* libcups.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 72220EAE1333047D00FCA411 /* libcups.dylib */; };
- 7200511218F492F200E7B81B /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 278C58E5136B64AF00836530 /* CoreFoundation.framework */; };
- @@ -1661,6 +1669,20 @@
- remoteGlobalIDString = 273BF6BC1333B5000022CAAB;
- remoteInfo = testcups;
- };
- + 274770D32345342B0089BC31 /* PBXContainerItemProxy */ = {
- + isa = PBXContainerItemProxy;
- + containerPortal = 72BF96371333042100B1EAD7 /* Project object */;
- + proxyType = 1;
- + remoteGlobalIDString = 274FF6891333B1C400317ECB;
- + remoteInfo = libcups_static;
- + };
- + 274770E32345347D0089BC31 /* PBXContainerItemProxy */ = {
- + isa = PBXContainerItemProxy;
- + containerPortal = 72BF96371333042100B1EAD7 /* Project object */;
- + proxyType = 1;
- + remoteGlobalIDString = 274770D12345342B0089BC31;
- + remoteInfo = testthreads;
- + };
- 274FF5DB13332CF900317ECB /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = 72BF96371333042100B1EAD7 /* Project object */;
- @@ -2676,6 +2698,15 @@
- );
- runOnlyForDeploymentPostprocessing = 1;
- };
- + 274770DC2345342B0089BC31 /* CopyFiles */ = {
- + isa = PBXCopyFilesBuildPhase;
- + buildActionMask = 2147483647;
- + dstPath = /usr/share/man/man1/;
- + dstSubfolderSpec = 0;
- + files = (
- + );
- + runOnlyForDeploymentPostprocessing = 1;
- + };
- 274FF5CA13332B1F00317ECB /* CopyFiles */ = {
- isa = PBXCopyFilesBuildPhase;
- buildActionMask = 2147483647;
- @@ -3210,6 +3241,8 @@
- 274561471F545B2E000378E4 /* cupspm.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; name = cupspm.md; path = ../cups/cupspm.md; sourceTree = "<group>"; };
- 274561481F545B2E000378E4 /* api-admin.header */ = {isa = PBXFileReference; lastKnownFileType = text; name = "api-admin.header"; path = "../cups/api-admin.header"; sourceTree = "<group>"; };
- 274561491F545B2E000378E4 /* api-admin.shtml */ = {isa = PBXFileReference; lastKnownFileType = text.html.other; name = "api-admin.shtml"; path = "../cups/api-admin.shtml"; sourceTree = "<group>"; };
- + 274770E02345342B0089BC31 /* testthreads */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testthreads; sourceTree = BUILT_PRODUCTS_DIR; };
- + 274770E1234534660089BC31 /* testthreads.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = testthreads.c; path = ../cups/testthreads.c; sourceTree = "<group>"; };
- 274FF5CC13332B1F00317ECB /* cups-driverd */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "cups-driverd"; sourceTree = BUILT_PRODUCTS_DIR; };
- 274FF5D613332CC700317ECB /* cups-driverd.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "cups-driverd.cxx"; path = "../scheduler/cups-driverd.cxx"; sourceTree = "<group>"; };
- 274FF5D713332CC700317ECB /* util.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = util.c; path = ../scheduler/util.c; sourceTree = "<group>"; };
- @@ -3275,6 +3308,7 @@
- 278C58E6136B64B000836530 /* Kerberos.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Kerberos.framework; path = /System/Library/Frameworks/Kerberos.framework; sourceTree = "<absolute>"; };
- 278C58E7136B64B000836530 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = /System/Library/Frameworks/Security.framework; sourceTree = "<absolute>"; };
- 278C58E8136B64B000836530 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = /System/Library/Frameworks/SystemConfiguration.framework; sourceTree = "<absolute>"; };
- + 279AE6F42395B80F004DD600 /* libpam.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libpam.tbd; path = usr/lib/libpam.tbd; sourceTree = SDKROOT; };
- 27A0347B1A8BDB1300650675 /* lpadmin */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = lpadmin; sourceTree = BUILT_PRODUCTS_DIR; };
- 27D3037D134148CB00F022B1 /* libcups2.def */ = {isa = PBXFileReference; lastKnownFileType = text; name = libcups2.def; path = ../cups/libcups2.def; sourceTree = "<group>"; };
- 27F89DA21B3AC43B00E5A4B7 /* testraster.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = testraster.c; path = ../cups/testraster.c; sourceTree = "<group>"; };
- @@ -3972,6 +4006,18 @@
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- + 274770D62345342B0089BC31 /* Frameworks */ = {
- + isa = PBXFrameworksBuildPhase;
- + buildActionMask = 2147483647;
- + files = (
- + 274770D72345342B0089BC31 /* libcups_static.a in Frameworks */,
- + 274770D82345342B0089BC31 /* CoreFoundation.framework in Frameworks */,
- + 274770D92345342B0089BC31 /* Kerberos.framework in Frameworks */,
- + 274770DA2345342B0089BC31 /* Security.framework in Frameworks */,
- + 274770DB2345342B0089BC31 /* SystemConfiguration.framework in Frameworks */,
- + );
- + runOnlyForDeploymentPostprocessing = 0;
- + };
- 274FF5C913332B1F00317ECB /* Frameworks */ = {
- isa = PBXFrameworksBuildPhase;
- buildActionMask = 2147483647;
- @@ -4593,6 +4639,7 @@
- isa = PBXFrameworksBuildPhase;
- buildActionMask = 2147483647;
- files = (
- + 279AE6F52395B80F004DD600 /* libpam.tbd in Frameworks */,
- 273B1ECA226B420C00428143 /* libcups.dylib in Frameworks */,
- 2767FC6619267538000F61D3 /* CoreFoundation.framework in Frameworks */,
- 2767FC6719267538000F61D3 /* libresolv.dylib in Frameworks */,
- @@ -4699,6 +4746,7 @@
- 727EF04F192E3602001EF690 /* testsub.c */,
- 724FA65D1CC0389F0092477B /* testsupplies.c */,
- 727EF03F192E3498001EF690 /* testtemplate.c */,
- + 274770E1234534660089BC31 /* testthreads.c */,
- 271286681CC130BD00E517C7 /* tlscheck.c */,
- );
- name = tests;
- @@ -4888,6 +4936,7 @@
- 729181BE201155C1005E7560 /* testclient */,
- 273B1EAA226B3E4800428143 /* ippevepcl */,
- 273B1EBB226B3E5200428143 /* ippeveps */,
- + 274770E02345342B0089BC31 /* testthreads */,
- );
- name = Products;
- sourceTree = "<group>";
- @@ -5084,6 +5133,7 @@
- 72220FB113330B4A00FCA411 /* Frameworks */ = {
- isa = PBXGroup;
- children = (
- + 279AE6F42395B80F004DD600 /* libpam.tbd */,
- 2767FC591926750C000F61D3 /* CoreFoundation.framework */,
- 2767FC5A1926750C000F61D3 /* libiconv.dylib */,
- 2767FC5B1926750C000F61D3 /* libresolv.dylib */,
- @@ -6120,6 +6170,24 @@
- productReference = 273BF6BD1333B5000022CAAB /* testcups */;
- productType = "com.apple.product-type.tool";
- };
- + 274770D12345342B0089BC31 /* testthreads */ = {
- + isa = PBXNativeTarget;
- + buildConfigurationList = 274770DD2345342B0089BC31 /* Build configuration list for PBXNativeTarget "testthreads" */;
- + buildPhases = (
- + 274770D42345342B0089BC31 /* Sources */,
- + 274770D62345342B0089BC31 /* Frameworks */,
- + 274770DC2345342B0089BC31 /* CopyFiles */,
- + );
- + buildRules = (
- + );
- + dependencies = (
- + 274770D22345342B0089BC31 /* PBXTargetDependency */,
- + );
- + name = testthreads;
- + productName = testmime;
- + productReference = 274770E02345342B0089BC31 /* testthreads */;
- + productType = "com.apple.product-type.tool";
- + };
- 274FF5CB13332B1F00317ECB /* cups-driverd */ = {
- isa = PBXNativeTarget;
- buildConfigurationList = 274FF5D213332B1F00317ECB /* Build configuration list for PBXNativeTarget "cups-driverd" */;
- @@ -7230,7 +7298,7 @@
- 72BF96371333042100B1EAD7 /* Project object */ = {
- isa = PBXProject;
- attributes = {
- - LastUpgradeCheck = 1020;
- + LastUpgradeCheck = 1100;
- ORGANIZATIONNAME = "Apple Inc.";
- TargetAttributes = {
- 270695FD1CADF3E200FFE5FB = {
- @@ -7355,6 +7423,7 @@
- 724FA6BF1CC0395A0092477B /* testtemplate */,
- 271286571CC1309000E517C7 /* tlscheck */,
- 7243795A1333FF1D009631B9 /* usb */,
- + 274770D12345342B0089BC31 /* testthreads */,
- );
- };
- /* End PBXProject section */
- @@ -7702,6 +7771,14 @@
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- + 274770D42345342B0089BC31 /* Sources */ = {
- + isa = PBXSourcesBuildPhase;
- + buildActionMask = 2147483647;
- + files = (
- + 274770E2234534660089BC31 /* testthreads.c in Sources */,
- + );
- + runOnlyForDeploymentPostprocessing = 0;
- + };
- 274FF5C813332B1F00317ECB /* Sources */ = {
- isa = PBXSourcesBuildPhase;
- buildActionMask = 2147483647;
- @@ -8941,6 +9018,16 @@
- target = 273BF6BC1333B5000022CAAB /* testcups */;
- targetProxy = 273BF6DD1333B6370022CAAB /* PBXContainerItemProxy */;
- };
- + 274770D22345342B0089BC31 /* PBXTargetDependency */ = {
- + isa = PBXTargetDependency;
- + target = 274FF6891333B1C400317ECB /* libcups_static */;
- + targetProxy = 274770D32345342B0089BC31 /* PBXContainerItemProxy */;
- + };
- + 274770E42345347D0089BC31 /* PBXTargetDependency */ = {
- + isa = PBXTargetDependency;
- + target = 274770D12345342B0089BC31 /* testthreads */;
- + targetProxy = 274770E32345347D0089BC31 /* PBXContainerItemProxy */;
- + };
- 274FF5DC13332CF900317ECB /* PBXTargetDependency */ = {
- isa = PBXTargetDependency;
- target = 72220EAD1333047D00FCA411 /* libcups */;
- @@ -9473,6 +9560,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Debug;
- @@ -9481,6 +9569,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Release;
- @@ -9489,6 +9578,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Debug;
- @@ -9497,6 +9587,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Release;
- @@ -9505,6 +9596,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/bin;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -9514,6 +9606,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/bin;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -9523,6 +9616,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/sbin;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -9532,6 +9626,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/sbin;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -9541,6 +9636,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/bin;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -9550,6 +9646,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/bin;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -9559,6 +9656,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/sbin;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -9568,6 +9666,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/sbin;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -9577,6 +9676,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/sbin;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -9586,6 +9686,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/sbin;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -9595,6 +9696,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/bin;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -9604,6 +9706,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/bin;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -9613,6 +9716,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/bin;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -9622,6 +9726,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/bin;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -9631,6 +9736,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/bin;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -9640,6 +9746,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/bin;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -9649,6 +9756,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/bin;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -9658,6 +9766,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/bin;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -9667,6 +9776,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/bin;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -9676,6 +9786,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/bin;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -9685,6 +9796,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/bin;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -9694,6 +9806,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/bin;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -9703,6 +9816,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = "/usr/libexec/cups/cgi-bin";
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -9712,6 +9826,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = "/usr/libexec/cups/cgi-bin";
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -9721,6 +9836,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = "/usr/libexec/cups/cgi-bin";
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -9730,6 +9846,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = "/usr/libexec/cups/cgi-bin";
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -9739,6 +9856,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = "/usr/libexec/cups/cgi-bin";
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -9748,6 +9866,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = "/usr/libexec/cups/cgi-bin";
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -9757,6 +9876,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = "/usr/libexec/cups/cgi-bin";
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -9766,6 +9886,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = "/usr/libexec/cups/cgi-bin";
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -9775,6 +9896,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/libexec/cups/filter;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -9784,6 +9906,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/libexec/cups/filter;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -9793,6 +9916,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/libexec/cups/filter;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -9802,6 +9926,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/libexec/cups/filter;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -9811,6 +9936,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/libexec/cups/filter;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -9820,6 +9946,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/libexec/cups/filter;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -9829,6 +9956,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/libexec/cups/filter;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -9838,6 +9966,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/libexec/cups/filter;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -9847,6 +9976,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/libexec/cups/filter;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -9856,6 +9986,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/libexec/cups/filter;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -9865,6 +9996,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/libexec/cups/filter;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -9874,6 +10006,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/libexec/cups/filter;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -9883,6 +10016,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Debug;
- @@ -9891,6 +10025,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Release;
- @@ -9899,6 +10034,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Debug;
- @@ -9907,6 +10043,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Release;
- @@ -9915,6 +10052,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Debug;
- @@ -9923,6 +10061,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Release;
- @@ -9931,6 +10070,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Debug;
- @@ -9939,6 +10079,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Release;
- @@ -9947,6 +10088,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Debug;
- @@ -9955,6 +10097,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Release;
- @@ -9963,6 +10106,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/libexec/cups/monitor;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -9972,6 +10116,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/libexec/cups/monitor;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -9981,6 +10126,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/libexec/cups/monitor;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -9990,6 +10136,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/libexec/cups/monitor;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -9999,6 +10146,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/libexec/cups/notifier;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -10008,6 +10156,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/libexec/cups/notifier;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -10017,6 +10166,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/libexec/cups/notifier;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -10026,6 +10176,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/libexec/cups/notifier;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -10035,6 +10186,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Debug;
- @@ -10043,6 +10195,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Release;
- @@ -10051,6 +10204,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/bin;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -10060,6 +10214,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/bin;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -10069,6 +10224,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/libexec/cups/ippeveprinter;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -10078,6 +10234,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/libexec/cups/ippeveprinter;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -10087,6 +10244,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/libexec/cups/ippeveprinter;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -10096,6 +10254,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/libexec/cups/ippeveprinter;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -10105,6 +10264,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Debug;
- @@ -10113,6 +10273,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Release;
- @@ -10133,10 +10294,29 @@
- };
- name = Release;
- };
- + 274770DE2345342B0089BC31 /* Debug */ = {
- + isa = XCBuildConfiguration;
- + buildSettings = {
- + CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- + PRODUCT_NAME = "$(TARGET_NAME)";
- + };
- + name = Debug;
- + };
- + 274770DF2345342B0089BC31 /* Release */ = {
- + isa = XCBuildConfiguration;
- + buildSettings = {
- + CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- + PRODUCT_NAME = "$(TARGET_NAME)";
- + };
- + name = Release;
- + };
- 274FF5D313332B1F00317ECB /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/libexec/cups/daemon;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -10146,6 +10326,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/libexec/cups/daemon;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -10199,6 +10380,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/libexec/cups/daemon;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -10208,6 +10390,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/libexec/cups/daemon;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -10217,6 +10400,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/libexec/cups/daemon;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -10226,6 +10410,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/libexec/cups/daemon;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -10235,6 +10420,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/libexec/cups/daemon;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -10244,6 +10430,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/libexec/cups/daemon;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -10253,6 +10440,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/bin;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -10262,6 +10450,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/bin;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -10301,6 +10490,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/sbin;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -10310,6 +10500,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/sbin;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -10319,6 +10510,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/bin;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -10328,6 +10520,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/bin;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -10337,6 +10530,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/bin;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -10346,6 +10540,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/bin;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -10355,6 +10550,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/bin;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -10364,6 +10560,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/bin;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -10373,6 +10570,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/bin;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -10382,6 +10580,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/bin;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -10391,6 +10590,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/bin;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -10400,6 +10600,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/bin;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -10409,6 +10610,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/bin;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -10418,6 +10620,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/bin;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -10427,6 +10630,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- PRODUCT_NAME = testdest;
- };
- name = Debug;
- @@ -10435,6 +10639,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- PRODUCT_NAME = testdest;
- };
- name = Release;
- @@ -10443,6 +10648,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Debug;
- @@ -10451,6 +10657,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Release;
- @@ -10472,6 +10679,7 @@
- CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
- CLANG_WARN_UNREACHABLE_CODE = YES;
- CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
- + CODE_SIGN_IDENTITY = "-";
- COPY_PHASE_STRIP = NO;
- ENABLE_STRICT_OBJC_MSGSEND = YES;
- GCC_C_LANGUAGE_STANDARD = gnu99;
- @@ -10510,6 +10718,7 @@
- CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
- CLANG_WARN_UNREACHABLE_CODE = YES;
- CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
- + CODE_SIGN_IDENTITY = "-";
- COPY_PHASE_STRIP = YES;
- ENABLE_NS_ASSERTIONS = NO;
- ENABLE_STRICT_OBJC_MSGSEND = YES;
- @@ -10529,6 +10738,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/libexec/cups/backend;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -10538,6 +10748,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/libexec/cups/backend;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -10577,6 +10788,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/sbin;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -10586,6 +10798,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/sbin;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -10617,6 +10830,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_MODE_FLAG = "u+rwX,go-rwX";
- INSTALL_PATH = /usr/libexec/cups/backend;
- PRODUCT_NAME = "$(TARGET_NAME)";
- @@ -10627,6 +10841,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_MODE_FLAG = "u+rwX,go-rwX";
- INSTALL_PATH = /usr/libexec/cups/backend;
- PRODUCT_NAME = "$(TARGET_NAME)";
- @@ -10637,6 +10852,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/libexec/cups/backend;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -10646,6 +10862,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/libexec/cups/backend;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -10655,6 +10872,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/libexec/cups/backend;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -10664,6 +10882,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/libexec/cups/backend;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -10673,6 +10892,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/libexec/cups/backend;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -10682,6 +10902,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/libexec/cups/backend;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -10691,6 +10912,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/libexec/cups/backend;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -10700,6 +10922,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/libexec/cups/backend;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -10709,6 +10932,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Debug;
- @@ -10717,6 +10941,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Release;
- @@ -10725,6 +10950,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Debug;
- @@ -10733,6 +10959,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Release;
- @@ -10741,6 +10968,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Debug;
- @@ -10749,6 +10977,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Release;
- @@ -10757,6 +10986,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Debug;
- @@ -10765,6 +10995,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Release;
- @@ -10773,6 +11004,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Debug;
- @@ -10781,6 +11013,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Release;
- @@ -10789,6 +11022,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Debug;
- @@ -10797,6 +11031,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Release;
- @@ -10805,6 +11040,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Debug;
- @@ -10813,6 +11049,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Release;
- @@ -10821,6 +11058,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Debug;
- @@ -10829,6 +11067,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Release;
- @@ -10837,6 +11076,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Debug;
- @@ -10845,6 +11085,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Release;
- @@ -10853,6 +11094,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Debug;
- @@ -10861,6 +11103,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Release;
- @@ -10869,6 +11112,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Debug;
- @@ -10877,6 +11121,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Release;
- @@ -10885,6 +11130,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Debug;
- @@ -10893,6 +11139,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Release;
- @@ -10901,6 +11148,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Debug;
- @@ -10909,6 +11157,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Release;
- @@ -10917,6 +11166,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Debug;
- @@ -10925,6 +11175,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Release;
- @@ -10933,6 +11184,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Debug;
- @@ -10941,6 +11193,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Release;
- @@ -10949,6 +11202,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Debug;
- @@ -10957,6 +11211,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Release;
- @@ -10965,6 +11220,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Debug;
- @@ -10973,6 +11229,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Release;
- @@ -10981,6 +11238,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Debug;
- @@ -10989,6 +11247,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Release;
- @@ -10997,6 +11256,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Debug;
- @@ -11005,6 +11265,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Release;
- @@ -11013,6 +11274,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Debug;
- @@ -11021,6 +11283,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Release;
- @@ -11029,6 +11292,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Debug;
- @@ -11037,6 +11301,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Release;
- @@ -11045,6 +11310,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Debug;
- @@ -11053,6 +11319,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Release;
- @@ -11061,6 +11328,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Debug;
- @@ -11069,6 +11337,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Release;
- @@ -11077,6 +11346,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Debug;
- @@ -11085,6 +11355,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Release;
- @@ -11223,6 +11494,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/libexec/cups/filter;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -11232,6 +11504,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/libexec/cups/filter;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -11241,6 +11514,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/bin;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -11250,6 +11524,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/bin;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -11259,6 +11534,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Debug;
- @@ -11267,6 +11543,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Release;
- @@ -11376,6 +11653,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/bin;
- PRODUCT_NAME = "ipptool copy";
- };
- @@ -11385,6 +11663,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/bin;
- PRODUCT_NAME = "ipptool copy";
- };
- @@ -11394,6 +11673,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/bin;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -11403,6 +11683,7 @@
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_ENABLE_OBJC_WEAK = YES;
- + CODE_SIGN_IDENTITY = "-";
- INSTALL_PATH = /usr/bin;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- @@ -11784,6 +12065,15 @@
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
- + 274770DD2345342B0089BC31 /* Build configuration list for PBXNativeTarget "testthreads" */ = {
- + isa = XCConfigurationList;
- + buildConfigurations = (
- + 274770DE2345342B0089BC31 /* Debug */,
- + 274770DF2345342B0089BC31 /* Release */,
- + );
- + defaultConfigurationIsVisible = 0;
- + defaultConfigurationName = Release;
- + };
- 274FF5D213332B1F00317ECB /* Build configuration list for PBXNativeTarget "cups-driverd" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- diff --git a/xcode/config.h b/xcode/config.h
- index 13198f5bc..38998eee6 100644
- --- a/xcode/config.h
- +++ b/xcode/config.h
- @@ -18,8 +18,8 @@
- * Version of software...
- */
- -#define CUPS_SVERSION "CUPS v2.3.0"
- -#define CUPS_MINIMAL "CUPS/2.3.0"
- +#define CUPS_SVERSION "CUPS v2.3.1"
- +#define CUPS_MINIMAL "CUPS/2.3.1"
- /*
- @@ -305,13 +305,6 @@
- #define HAVE_SSL 1
- -/*
- - * Do we have the gnutls_fips140_set_mode function?
- - */
- -
- -/* #undef HAVE_GNUTLS_FIPS140_SET_MODE */
- -
- -
- /*
- * Do we have the gnutls_transport_set_pull_timeout_function function?
- */
Add Comment
Please, Sign In to add comment