summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES.md21
-rw-r--r--INSTALL.md4
-rw-r--r--README.md4
-rw-r--r--backend/org.cups.usb-quirks6
-rw-r--r--cgi-bin/var.c4
-rw-r--r--config-scripts/cups-compiler.m42
-rwxr-xr-xconfigure259
-rw-r--r--configure.ac2
-rw-r--r--cups/auth.c2
-rw-r--r--cups/cups.h4
-rw-r--r--cups/ppd-cache.c8
-rw-r--r--doc/help/man-cupsd-logs.html20
-rw-r--r--man/cupsd-logs.man27
-rw-r--r--packaging/cups.spec4
-rw-r--r--scheduler/job.c86
-rw-r--r--scheduler/printers.c2
-rw-r--r--systemv/lpadmin.c13
-rw-r--r--systemv/lpoptions.c15
-rwxr-xr-xtest/run-stp-tests.sh2
-rw-r--r--vcnet/config.h4
-rw-r--r--xcode/config.h4
21 files changed, 270 insertions, 223 deletions
diff --git a/CHANGES.md b/CHANGES.md
index 8e09dbd..65cbdb1 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -1,5 +1,22 @@
-CHANGES - 2.2.9 - 2018-11-09
-============================
+CHANGES - 2.2.10 - 2018-12-07
+=============================
+
+
+Changes in CUPS v2.2.10
+-----------------------
+
+- CVE-2018-4700: Linux session cookies used a predictable random number seed.
+- The `lpoptions` command now works with IPP Everywhere printers that have not
+ yet been added as local queues (Issue #5045)
+- Added USB quirk rules (Issue #5395, Issue #5443)
+- The generated PPD files for IPP Everywhere printers did not contain the
+ cupsManualCopies keyword (Issue #5433)
+- Kerberos credentials might be truncated (Issue #5435)
+- The handling of `MaxJobTime 0` did not match the documentation (Issue #5438)
+- Incorporated the page accounting changes from CUPS 2.3 (Issue #5439)
+- Fixed a bug adding a queue with the `-E` option (Issue #5440)
+- Fixed a crash bug when mapping PPD duplex options to IPP attributes
+ (rdar://46183976)
Changes in CUPS v2.2.9
diff --git a/INSTALL.md b/INSTALL.md
index 9d733c8..7d196cf 100644
--- a/INSTALL.md
+++ b/INSTALL.md
@@ -1,5 +1,5 @@
-INSTALL - CUPS v2.2.9 - 2018-11-08
-==================================
+INSTALL - CUPS v2.2.10 - 2018-12-07
+===================================
This file describes how to compile and install CUPS from source code. For more
information on CUPS see the file called "README.md". A complete change log can
diff --git a/README.md b/README.md
index 45837b5..d73673d 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,5 @@
-README - CUPS v2.2.9 - 2018-11-08
-=================================
+README - CUPS v2.2.10 - 2018-12-07
+==================================
Looking for compile instructions? Read the file `INSTALL.md` instead...
diff --git a/backend/org.cups.usb-quirks b/backend/org.cups.usb-quirks
index fd3df82..3f99f60 100644
--- a/backend/org.cups.usb-quirks
+++ b/backend/org.cups.usb-quirks
@@ -287,3 +287,9 @@
# Lexmark MS317dn
0x043d 0x0226 no-reattach
+
+# Star TSP743 (Issue #5443)
+0x0519 0x0001 delay-close
+
+# Zebra ZD420 (Issue #5395)
+0x0a5f 0x0120 unidir no-reattach
diff --git a/cgi-bin/var.c b/cgi-bin/var.c
index 649b65b..579f23b 100644
--- a/cgi-bin/var.c
+++ b/cgi-bin/var.c
@@ -1207,6 +1207,7 @@ cgi_set_sid(void)
const char *remote_addr, /* REMOTE_ADDR */
*server_name, /* SERVER_NAME */
*server_port; /* SERVER_PORT */
+ struct timeval curtime; /* Current time */
if ((remote_addr = getenv("REMOTE_ADDR")) == NULL)
@@ -1216,7 +1217,8 @@ cgi_set_sid(void)
if ((server_port = getenv("SERVER_PORT")) == NULL)
server_port = "SERVER_PORT";
- CUPS_SRAND(time(NULL));
+ gettimeofday(&curtime, NULL);
+ CUPS_SRAND(curtime.tv_sec + curtime.tv_usec);
snprintf(buffer, sizeof(buffer), "%s:%s:%s:%02X%02X%02X%02X%02X%02X%02X%02X",
remote_addr, server_name, server_port,
(unsigned)CUPS_RAND() & 255, (unsigned)CUPS_RAND() & 255,
diff --git a/config-scripts/cups-compiler.m4 b/config-scripts/cups-compiler.m4
index 7bde566..f804f56 100644
--- a/config-scripts/cups-compiler.m4
+++ b/config-scripts/cups-compiler.m4
@@ -162,7 +162,7 @@ if test -n "$GCC"; then
# doesn't trigger...
gccversion=`$CC --version | head -1 | awk '{print $NF}'`
case "$gccversion" in
- 7.*)
+ 7.* | 8.*)
OPTIM="$OPTIM -Wno-format-truncation -Wno-tautological-compare"
;;
esac
diff --git a/configure b/configure
index 5c2ce69..18a68f5 100755
--- a/configure
+++ b/configure
@@ -1,13 +1,11 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for CUPS 2.2.9.
+# Generated by GNU Autoconf 2.69 for CUPS 2.2.10.
#
# Report bugs to <https://github.com/apple/cups/issues>.
#
#
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
-# Foundation, Inc.
+# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
#
#
# This configure script is free software; the Free Software Foundation
@@ -136,6 +134,31 @@ export LANGUAGE
# CDPATH.
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+# Use a proper internal environment variable to ensure we don't fall
+ # into an infinite loop, continuously re-executing ourselves.
+ if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
+ _as_can_reexec=no; export _as_can_reexec;
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+as_fn_exit 255
+ fi
+ # We don't want this to propagate to other subprocesses.
+ { _as_can_reexec=; unset _as_can_reexec;}
if test "x$CONFIG_SHELL" = x; then
as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
emulate sh
@@ -169,7 +192,8 @@ if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
else
exitcode=1; echo positional parameters were not saved.
fi
-test x\$exitcode = x0 || exit 1"
+test x\$exitcode = x0 || exit 1
+test -x / || exit 1"
as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
@@ -214,21 +238,25 @@ IFS=$as_save_IFS
if test "x$CONFIG_SHELL" != x; then :
- # We cannot yet assume a decent shell, so we have to provide a
- # neutralization value for shells without unset; and this also
- # works around shells that cannot unset nonexistent variables.
- # Preserve -v and -x to the replacement shell.
- BASH_ENV=/dev/null
- ENV=/dev/null
- (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
- export CONFIG_SHELL
- case $- in # ((((
- *v*x* | *x*v* ) as_opts=-vx ;;
- *v* ) as_opts=-v ;;
- *x* ) as_opts=-x ;;
- * ) as_opts= ;;
- esac
- exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
+ export CONFIG_SHELL
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
fi
if test x$as_have_required = xno; then :
@@ -331,6 +359,14 @@ $as_echo X"$as_dir" |
} # as_fn_mkdir_p
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
# as_fn_append VAR VALUE
# ----------------------
# Append the text in VALUE to the end of the definition contained in VAR. Take
@@ -452,6 +488,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
chmod +x "$as_me.lineno" ||
{ $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+ # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
+ # already done that, so ensure we don't try to do so again and fall
+ # in an infinite loop. This has already happened in practice.
+ _as_can_reexec=no; export _as_can_reexec
# Don't try to exec as it changes $[0], causing all sort of problems
# (the dirname of $[0] is not the place where we might find the
# original and so on. Autoconf is especially sensitive to this).
@@ -486,16 +526,16 @@ if (echo >conf$$.file) 2>/dev/null; then
# ... but there are two gotchas:
# 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
# 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
+ # In both cases, we have to default to `cp -pR'.
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null
@@ -507,28 +547,8 @@ else
as_mkdir_p=false
fi
-if test -x / >/dev/null 2>&1; then
- as_test_x='test -x'
-else
- if ls -dL / >/dev/null 2>&1; then
- as_ls_L_option=L
- else
- as_ls_L_option=
- fi
- as_test_x='
- eval sh -c '\''
- if test -d "$1"; then
- test -d "$1/.";
- else
- case $1 in #(
- -*)set "./$1";;
- esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
- ???[sx]*):;;*)false;;esac;fi
- '\'' sh
- '
-fi
-as_executable_p=$as_test_x
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -560,8 +580,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='CUPS'
PACKAGE_TARNAME='cups'
-PACKAGE_VERSION='2.2.9'
-PACKAGE_STRING='CUPS 2.2.9'
+PACKAGE_VERSION='2.2.10'
+PACKAGE_STRING='CUPS 2.2.10'
PACKAGE_BUGREPORT='https://github.com/apple/cups/issues'
PACKAGE_URL='https://www.cups.org/'
@@ -1375,8 +1395,6 @@ target=$target_alias
if test "x$host_alias" != x; then
if test "x$build_alias" = x; then
cross_compiling=maybe
- $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
- If a cross compiler is detected then cross compile mode will be used" >&2
elif test "x$build_alias" != "x$host_alias"; then
cross_compiling=yes
fi
@@ -1462,7 +1480,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.2.9 to adapt to many kinds of systems.
+\`configure' configures CUPS 2.2.10 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1527,7 +1545,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of CUPS 2.2.9:";;
+ short | recursive ) echo "Configuration of CUPS 2.2.10:";;
esac
cat <<\_ACEOF
@@ -1708,10 +1726,10 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-CUPS configure 2.2.9
-generated by GNU Autoconf 2.68
+CUPS configure 2.2.10
+generated by GNU Autoconf 2.69
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
@@ -1862,7 +1880,7 @@ $as_echo "$ac_try_echo"; } >&5
test ! -s conftest.err
} && test -s conftest$ac_exeext && {
test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
+ test -x conftest$ac_exeext
}; then :
ac_retval=0
else
@@ -2172,8 +2190,8 @@ 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.2.9, which was
-generated by GNU Autoconf 2.68. Invocation command line was
+It was created by CUPS $as_me 2.2.10, which was
+generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2663,7 +2681,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_CODE_SIGN="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2693,7 +2711,7 @@ done
ac_config_headers="$ac_config_headers config.h"
-CUPS_VERSION="2.2.9"
+CUPS_VERSION="2.2.10"
CUPS_REVISION=""
CUPS_BUILD="cups-$CUPS_VERSION"
@@ -2739,7 +2757,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_AWK="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2787,7 +2805,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2831,7 +2849,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3275,8 +3293,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdarg.h>
#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
+struct stat;
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
struct buf { int x; };
FILE * (*rcsopen) (struct buf *, struct stat *, int);
@@ -3526,7 +3543,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3570,7 +3587,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CXX="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3772,7 +3789,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3812,7 +3829,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_RANLIB="ranlib"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3865,7 +3882,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3905,7 +3922,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3945,7 +3962,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3985,7 +4002,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_LD="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -4025,7 +4042,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -4065,7 +4082,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -4105,7 +4122,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -4145,7 +4162,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -4185,7 +4202,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -4225,7 +4242,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -4265,7 +4282,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_XDGOPEN="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -4341,7 +4358,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -4384,7 +4401,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_ac_pt_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -4794,7 +4811,7 @@ do
for ac_prog in grep ggrep; do
for ac_exec_ext in '' $ac_executable_extensions; do
ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+ as_fn_executable_p "$ac_path_GREP" || continue
# Check for GNU ac_path_GREP and select it if it is found.
# Check for GNU $ac_path_GREP
case `"$ac_path_GREP" --version 2>&1` in
@@ -4860,7 +4877,7 @@ do
for ac_prog in egrep; do
for ac_exec_ext in '' $ac_executable_extensions; do
ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+ as_fn_executable_p "$ac_path_EGREP" || continue
# Check for GNU ac_path_EGREP and select it if it is found.
# Check for GNU $ac_path_EGREP
case `"$ac_path_EGREP" --version 2>&1` in
@@ -7003,7 +7020,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
# doesn't trigger...
gccversion=`$CC --version | head -1 | awk '{print $NF}'`
case "$gccversion" in
- 7.*)
+ 7.* | 8.*)
OPTIM="$OPTIM -Wno-format-truncation -Wno-tautological-compare"
;;
esac
@@ -7765,7 +7782,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_KRB5CONFIG="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -7808,7 +7825,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_ac_pt_KRB5CONFIG="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -8360,7 +8377,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_LIBGNUTLSCONFIG="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -8403,7 +8420,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_ac_pt_LIBGNUTLSCONFIG="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -8962,6 +8979,8 @@ _ACEOF
esac
rm -rf conftest*
fi
+
+
fi
@@ -10003,7 +10022,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -10068,7 +10087,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -10133,7 +10152,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_PHPCGI="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -10174,7 +10193,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_PHP="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -10244,7 +10263,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -10714,16 +10733,16 @@ if (echo >conf$$.file) 2>/dev/null; then
# ... but there are two gotchas:
# 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
# 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
+ # In both cases, we have to default to `cp -pR'.
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null
@@ -10783,28 +10802,16 @@ else
as_mkdir_p=false
fi
-if test -x / >/dev/null 2>&1; then
- as_test_x='test -x'
-else
- if ls -dL / >/dev/null 2>&1; then
- as_ls_L_option=L
- else
- as_ls_L_option=
- fi
- as_test_x='
- eval sh -c '\''
- if test -d "$1"; then
- test -d "$1/.";
- else
- case $1 in #(
- -*)set "./$1";;
- esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
- ???[sx]*):;;*)false;;esac;fi
- '\'' sh
- '
-fi
-as_executable_p=$as_test_x
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -10825,8 +10832,8 @@ 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.2.9, which was
-generated by GNU Autoconf 2.68. Invocation command line was
+This file was extended by CUPS $as_me 2.2.10, which was
+generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -10888,11 +10895,11 @@ _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.2.9
-configured by $0, generated by GNU Autoconf 2.68,
+CUPS config.status 2.2.10
+configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
@@ -10981,7 +10988,7 @@ fi
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
if \$ac_cs_recheck; then
- set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
shift
\$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
CONFIG_SHELL='$SHELL'
diff --git a/configure.ac b/configure.ac
index 046356c..c7696c7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -15,7 +15,7 @@ dnl We need at least autoconf 2.60...
AC_PREREQ(2.60)
dnl Package name and version...
-AC_INIT([CUPS], [2.2.9], [https://github.com/apple/cups/issues], [cups], [https://www.cups.org/])
+AC_INIT([CUPS], [2.2.10], [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/auth.c b/cups/auth.c
index a1f5042..e4328e0 100644
--- a/cups/auth.c
+++ b/cups/auth.c
@@ -447,7 +447,7 @@ _cupsSetNegotiateAuthString(
*/
int authsize = 10 + /* "Negotiate " */
- (int)output_token.length * 4 / 3 + 1 + 1;
+ (((int)output_token.length * 4 / 3 + 3) & ~3) + 1;
/* Base64 + nul */
httpSetAuthString(http, NULL, NULL);
diff --git a/cups/cups.h b/cups/cups.h
index cf3be12..37c610a 100644
--- a/cups/cups.h
+++ b/cups/cups.h
@@ -47,10 +47,10 @@ extern "C" {
* Constants...
*/
-# define CUPS_VERSION 2.0209
+# define CUPS_VERSION 2.0210
# define CUPS_VERSION_MAJOR 2
# define CUPS_VERSION_MINOR 2
-# define CUPS_VERSION_PATCH 9
+# define CUPS_VERSION_PATCH 10
# define CUPS_BC_FD 3
/* Back-channel file descriptor for
diff --git a/cups/ppd-cache.c b/cups/ppd-cache.c
index 9ed946e..ab91f0f 100644
--- a/cups/ppd-cache.c
+++ b/cups/ppd-cache.c
@@ -290,11 +290,11 @@ _cupsConvertOptions(
ippAddString(request, IPP_TAG_JOB, IPP_TAG_KEYWORD, "sides", NULL, keyword);
else if (pc->sides_option && (choice = ppdFindMarkedChoice(ppd, pc->sides_option)) != NULL)
{
- if (!_cups_strcasecmp(choice->choice, pc->sides_1sided))
+ if (pc->sides_1sided && !_cups_strcasecmp(choice->choice, pc->sides_1sided))
ippAddString(request, IPP_TAG_JOB, IPP_TAG_KEYWORD, "sides", NULL, "one-sided");
- else if (!_cups_strcasecmp(choice->choice, pc->sides_2sided_long))
+ else if (pc->sides_2sided_long && !_cups_strcasecmp(choice->choice, pc->sides_2sided_long))
ippAddString(request, IPP_TAG_JOB, IPP_TAG_KEYWORD, "sides", NULL, "two-sided-long-edge");
- if (!_cups_strcasecmp(choice->choice, pc->sides_2sided_short))
+ else if (pc->sides_2sided_short && !_cups_strcasecmp(choice->choice, pc->sides_2sided_short))
ippAddString(request, IPP_TAG_JOB, IPP_TAG_KEYWORD, "sides", NULL, "two-sided-short-edge");
}
@@ -3178,6 +3178,8 @@ _ppdCreateFromIPP(char *buffer, /* I - Filename buffer */
else
cupsFilePuts(fp, "*cupsFilter2: \"application/vnd.cups-pdf application/pdf 10 -\"\n");
}
+ else
+ cupsFilePuts(fp, "*cupsManualCopies: true\n");
if (is_apple)
cupsFilePuts(fp, "*cupsFilter2: \"image/urf image/urf 100 -\"\n");
if (is_pwg)
diff --git a/doc/help/man-cupsd-logs.html b/doc/help/man-cupsd-logs.html
index 30ee2af..e90dd40 100644
--- a/doc/help/man-cupsd-logs.html
+++ b/doc/help/man-cupsd-logs.html
@@ -142,25 +142,17 @@ The <i>level</i> field contains the type of message:
<p>The <i>message</i> field contains a free-form textual message.
Messages from job filters are prefixed with "[Job NNN]" where "NNN" is the job ID.
<h3><a name="PAGE_LOG_FILE_FORMAT">Page Log File Format</a></h3>
-The <i>page_log</i> file lists each page or group of pages that are sent to a printer.
+The <i>page_log</i> file lists the total number of pages (sheets) that are printed.
By default, each line contains the following information:
<pre class="man">
- <i>printer user job-id date-time page-number num-copies job-billing
- job-originating-host-name job-name media sides</i>
-
- <i>printer user job-id date-time </i><b>total </b><i>num-impressions job-billing
+ <i>printer user job-id date-time </i><b>total </b><i>num-sheets job-billing
job-originating-host-name job-name media sides</i>
</pre>
-For example the entries for a two page job called "myjob" might look like:
+For example the entry for a two page job called "myjob" might look like:
<pre class="man">
- DeskJet root 1 [20/May/1999:19:21:05 +0000] 1 1 acme-123
- localhost myjob na_letter_8.5x11in one-sided
- DeskJet root 1 [20/May/1999:19:21:05 +0000] 2 1 acme-123
- localhost myjob na_letter_8.5x11in one-sided
-
DeskJet root 1 [20/May/1999:19:21:06 +0000] total 2 acme-123
localhost myjob na_letter_8.5x11in one-sided
@@ -174,9 +166,7 @@ If you send a job to a printer class, this field will contain the name of the pr
<p>The <i>job-id</i> field contains the job number of the page being printed.
<p>The <i>date-time</i> field contains the date and time of when the page started printing.
The format of this field is identical to the data-time field in the <i>access_log</i> file.
-<p>The <i>page-number</i> and <i>num-copies</i> fields contain the page number and number of copies being printed of that page.
-For printers that cannot produce copies on their own, the num-copies field will always be 1.
-<p>Lines containing the keyword "total" have a <i>num-impressions</i> field instead which provides the total number of impressions (sides) that have been printed on for the job.
+<p>The <i>num-sheets</i> field provides the total number of pages (sheets) that have been printed on for the job.
<p>The <i>job-billing</i> field contains a copy of the job-billing or job-account-id attributes provided with the IPP Create-Job or Print-Job requests or "-" if neither was provided.
<p>The <i>job-originating-host-name</i> field contains the hostname or IP address of the client that printed the job.
<p>The <i>job-name</i> field contains a copy of the job-name attribute provided with the IPP Create-Job or Print-Job requests or "-" if none was provided.
@@ -188,7 +178,7 @@ For printers that cannot produce copies on their own, the num-copies field will
<a href="man-cups-files.conf.html?TOPIC=Man+Pages"><b>cups-files.conf</b>(5),</a>
CUPS Online Help (<a href="http://localhost:631/help">http://localhost:631/help</a>)
<h2 class="title"><a name="COPYRIGHT">Copyright</a></h2>
-Copyright &copy; 2007-2017 by Apple Inc.
+Copyright &copy; 2007-2018 by Apple Inc.
</body>
</html>
diff --git a/man/cupsd-logs.man b/man/cupsd-logs.man
index d12fab3..8672afa 100644
--- a/man/cupsd-logs.man
+++ b/man/cupsd-logs.man
@@ -1,8 +1,8 @@
.\"
.\" cupsd-logs man page for CUPS.
.\"
-.\" Copyright 2007-2014 by Apple Inc.
-.\" Copyright 1997-2006 by Easy Software Products.
+.\" Copyright © 2007-2018 by Apple Inc.
+.\" Copyright © 1997-2006 by Easy Software Products.
.\"
.\" These coded instructions, statements, and computer programs are the
.\" property of Apple Inc. and are protected by Federal copyright
@@ -10,7 +10,7 @@
.\" which should have been included with this file. If this file is
.\" file is missing or damaged, see the license at "http://www.cups.org/".
.\"
-.TH cupsd-logs 5 "CUPS" "11 June 2014" "Apple Inc."
+.TH cupsd-logs 5 "CUPS" "8 November 2017" "Apple Inc."
.SH NAME
cupsd\-logs \- cupsd log files (access_log, error_log, and page_log)
.SH DESCRIPTION
@@ -176,25 +176,17 @@ The \fIdate-time\fR field contains the date and time of when the page started pr
The \fImessage\fR field contains a free-form textual message.
Messages from job filters are prefixed with "[Job NNN]" where "NNN" is the job ID.
.SS PAGE LOG FILE FORMAT
-The \fIpage_log\fR file lists each page or group of pages that are sent to a printer.
+The \fIpage_log\fR file lists the total number of pages (sheets) that are printed.
By default, each line contains the following information:
.nf
- \fIprinter user job-id date-time page-number num-copies job-billing
- job-originating-host-name job-name media sides\fR
-
- \fIprinter user job-id date-time \fBtotal \fInum-impressions job-billing
+ \fIprinter user job-id date-time \fBtotal \fInum-sheets job-billing
job-originating-host-name job-name media sides\fR
.fi
-For example the entries for a two page job called "myjob" might look like:
+For example the entry for a two page job called "myjob" might look like:
.nf
- DeskJet root 1 [20/May/1999:19:21:05 +0000] 1 1 acme-123
- localhost myjob na_letter_8.5x11in one-sided
- DeskJet root 1 [20/May/1999:19:21:05 +0000] 2 1 acme-123
- localhost myjob na_letter_8.5x11in one-sided
-
DeskJet root 1 [20/May/1999:19:21:06 +0000] total 2 acme-123
localhost myjob na_letter_8.5x11in one-sided
@@ -213,10 +205,7 @@ The \fIjob-id\fR field contains the job number of the page being printed.
The \fIdate-time\fR field contains the date and time of when the page started printing.
The format of this field is identical to the data-time field in the \fIaccess_log\fR file.
.LP
-The \fIpage-number\fR and \fInum-copies\fR fields contain the page number and number of copies being printed of that page.
-For printers that cannot produce copies on their own, the num-copies field will always be 1.
-.LP
-Lines containing the keyword "total" have a \fInum-impressions\fR field instead which provides the total number of impressions (sides) that have been printed on for the job.
+The \fInum-sheets\fR field provides the total number of pages (sheets) that have been printed on for the job.
.LP
The \fIjob-billing\fR field contains a copy of the job-billing or job-account-id attributes provided with the IPP Create-Job or Print-Job requests or "-" if neither was provided.
.LP
@@ -233,4 +222,4 @@ The \fIsides\fR field contains a copy of the sides attribute provided with the I
.BR cups-files.conf (5),
CUPS Online Help (http://localhost:631/help)
.SH COPYRIGHT
-Copyright \[co] 2007-2017 by Apple Inc.
+Copyright \[co] 2007-2018 by Apple Inc.
diff --git a/packaging/cups.spec b/packaging/cups.spec
index b83b968..84007d3 100644
--- a/packaging/cups.spec
+++ b/packaging/cups.spec
@@ -43,12 +43,12 @@
Summary: CUPS
Name: cups
-Version: 2.2.9
+Version: 2.2.10
Release: 0
Epoch: 1
License: GPL
Group: System Environment/Daemons
-Source: https://github.com/apple/cups/releases/download/v2.2.9/cups-2.2.9-source.tar.gz
+Source: https://github.com/apple/cups/releases/download/v2.2.10/cups-2.2.10-source.tar.gz
Url: http://www.cups.org
Packager: Anonymous <anonymous@example.com>
Vendor: Example Corp
diff --git a/scheduler/job.c b/scheduler/job.c
index 554e092..638f256 100644
--- a/scheduler/job.c
+++ b/scheduler/job.c
@@ -1850,6 +1850,8 @@ cupsdLoadJob(cupsd_job_t *job) /* I - Job */
if (!job->impressions)
job->impressions = ippAddInteger(job->attrs, IPP_TAG_JOB, IPP_TAG_INTEGER, "job-impressions-completed", 0);
+ if (!job->sheets)
+ job->sheets = ippAddInteger(job->attrs, IPP_TAG_JOB, IPP_TAG_INTEGER, "job-media-sheets-completed", 0);
if (!job->priority)
{
@@ -3155,6 +3157,13 @@ finalize_job(cupsd_job_t *job, /* I - Job */
job->status_buffer = NULL;
/*
+ * Log the final impression (page) count...
+ */
+
+ snprintf(buffer, sizeof(buffer), "total %d", ippGetInteger(job->impressions, 0));
+ cupsdLogPage(job, buffer);
+
+ /*
* Process the exit status...
*/
@@ -4993,7 +5002,6 @@ void
update_job(cupsd_job_t *job) /* I - Job to check */
{
int i; /* Looping var */
- int copies; /* Number of copies printed */
char message[CUPSD_SB_BUFFER_SIZE],
/* Message text */
*ptr; /* Pointer update... */
@@ -5031,6 +5039,10 @@ update_job(cupsd_job_t *job) /* I - Job to check */
if (loglevel == CUPSD_LOG_PAGE)
{
+ int impressions = ippGetInteger(job->impressions, 0);
+ /* Number of impressions printed */
+ int delta; /* Number of impressions added */
+
/*
* Page message; send the message to the page_log file and update the
* job sheet count...
@@ -5038,51 +5050,57 @@ update_job(cupsd_job_t *job) /* I - Job to check */
cupsdLogJob(job, CUPSD_LOG_DEBUG, "PAGE: %s", message);
- if (job->impressions)
+ if (!_cups_strncasecmp(message, "total ", 6))
{
- if (!_cups_strncasecmp(message, "total ", 6))
- {
- /*
- * Got a total count of pages from a backend or filter...
- */
+ /*
+ * Got a total count of pages from a backend or filter...
+ */
+
+ int total = atoi(message + 6); /* Total impressions */
- copies = atoi(message + 6);
- copies -= ippGetInteger(job->impressions, 0); /* Just track the delta */
+ if (total > impressions)
+ {
+ delta = total - impressions;
+ impressions = total;
}
- else if (!sscanf(message, "%*d%d", &copies))
+ else
+ delta = 0;
+ }
+ else
+ {
+ /*
+ * Add the number of copies to the impression count...
+ */
+
+ int copies; /* Number of copies */
+
+ if (!sscanf(message, "%*d%d", &copies) || copies <= 0)
copies = 1;
- ippSetInteger(job->attrs, &job->impressions, 0, ippGetInteger(job->impressions, 0) + copies);
- job->dirty = 1;
- cupsdMarkDirty(CUPSD_DIRTY_JOBS);
+ delta = copies;
+ impressions += copies;
}
+ if (job->impressions)
+ ippSetInteger(job->attrs, &job->impressions, 0, impressions);
+
if (job->sheets)
{
- if (!_cups_strncasecmp(message, "total ", 6))
- {
- /*
- * Got a total count of pages from a backend or filter...
- */
-
- copies = atoi(message + 6);
- copies -= ippGetInteger(job->sheets, 0); /* Just track the delta */
- }
- else if (!sscanf(message, "%*d%d", &copies))
- copies = 1;
+ const char *sides = ippGetString(ippFindAttribute(job->attrs, "sides", IPP_TAG_KEYWORD), 0, NULL);
- ippSetInteger(job->attrs, &job->sheets, 0, ippGetInteger(job->sheets, 0) + copies);
- job->dirty = 1;
- cupsdMarkDirty(CUPSD_DIRTY_JOBS);
+ if (sides && strcmp(sides, "one-sided"))
+ ippSetInteger(job->attrs, &job->sheets, 0, impressions / 2);
+ else
+ ippSetInteger(job->attrs, &job->sheets, 0, impressions);
- if (job->printer->page_limit)
- cupsdUpdateQuota(job->printer, job->username, copies, 0);
+ cupsdAddEvent(CUPSD_EVENT_JOB_PROGRESS, job->printer, job, "Printed %d page(s).", ippGetInteger(job->sheets, 0));
}
- cupsdLogPage(job, message);
+ job->dirty = 1;
+ cupsdMarkDirty(CUPSD_DIRTY_JOBS);
- if (job->sheets)
- cupsdAddEvent(CUPSD_EVENT_JOB_PROGRESS, job->printer, job, "Printed %d page(s).", ippGetInteger(job->sheets, 0));
+ if (job->printer->page_limit)
+ cupsdUpdateQuota(job->printer, job->username, delta, 0);
}
else if (loglevel == CUPSD_LOG_JOBSTATE)
{
@@ -5130,8 +5148,10 @@ update_job(cupsd_job_t *job) /* I - Job to check */
if (cancel_after)
job->cancel_time = time(NULL) + ippGetInteger(cancel_after, 0);
- else
+ else if (MaxJobTime > 0)
job->cancel_time = time(NULL) + MaxJobTime;
+ else
+ job->cancel_time = 0;
}
}
}
diff --git a/scheduler/printers.c b/scheduler/printers.c
index bb99907..68239d8 100644
--- a/scheduler/printers.c
+++ b/scheduler/printers.c
@@ -3370,7 +3370,7 @@ add_printer_defaults(cupsd_printer_t *p)/* I - Printer */
"document-format-default", NULL, "application/octet-stream");
if (!cupsGetOption("job-cancel-after", p->num_options, p->options))
- ippAddInteger(p->attrs, IPP_TAG_PRINTER, IPP_TAG_INTEGER,
+ ippAddInteger(p->attrs, IPP_TAG_PRINTER, MaxJobTime > 0 ? IPP_TAG_INTEGER : IPP_TAG_NOVALUE,
"job-cancel-after-default", MaxJobTime);
if (!cupsGetOption("job-hold-until", p->num_options, p->options))
diff --git a/systemv/lpadmin.c b/systemv/lpadmin.c
index 6828f8a..ee2438c 100644
--- a/systemv/lpadmin.c
+++ b/systemv/lpadmin.c
@@ -1387,12 +1387,6 @@ set_printer_options(
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, uri);
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, "requesting-user-name", NULL, cupsUser());
- if (enable)
- {
- ippAddInteger(request, IPP_TAG_PRINTER, IPP_TAG_ENUM, "printer-state", IPP_PSTATE_IDLE);
- ippAddBoolean(request, IPP_TAG_PRINTER, "printer-is-accepting-jobs", 1);
- }
-
/*
* Add the options...
*/
@@ -1425,6 +1419,13 @@ set_printer_options(
ppdfile = NULL;
cupsEncodeOptions2(request, num_options, options, IPP_TAG_OPERATION);
+
+ if (enable)
+ {
+ ippAddInteger(request, IPP_TAG_PRINTER, IPP_TAG_ENUM, "printer-state", IPP_PSTATE_IDLE);
+ ippAddBoolean(request, IPP_TAG_PRINTER, "printer-is-accepting-jobs", 1);
+ }
+
cupsEncodeOptions2(request, num_options, options, IPP_TAG_PRINTER);
if ((protocol = cupsGetOption("protocol", num_options, options)) != NULL)
diff --git a/systemv/lpoptions.c b/systemv/lpoptions.c
index fceab6d..5926dc2 100644
--- a/systemv/lpoptions.c
+++ b/systemv/lpoptions.c
@@ -480,19 +480,32 @@ list_group(ppd_file_t *ppd, /* I - PPD file */
static void
list_options(cups_dest_t *dest) /* I - Destination to list */
{
+ http_t *http; /* Connection to destination */
+ char resource[1024]; /* Resource path */
int i; /* Looping var */
const char *filename; /* PPD filename */
ppd_file_t *ppd; /* PPD data */
ppd_group_t *group; /* Current group */
- if ((filename = cupsGetPPD(dest->name)) == NULL)
+ if ((http = cupsConnectDest(dest, CUPS_DEST_FLAGS_NONE, 30000, NULL, resource, sizeof(resource), NULL, NULL)) == NULL)
{
_cupsLangPrintf(stderr, _("lpoptions: Unable to get PPD file for %s: %s"),
dest->name, cupsLastErrorString());
return;
}
+ if ((filename = cupsGetPPD2(http, dest->name)) == NULL)
+ {
+ httpClose(http);
+
+ _cupsLangPrintf(stderr, _("lpoptions: Unable to get PPD file for %s: %s"),
+ dest->name, cupsLastErrorString());
+ return;
+ }
+
+ httpClose(http);
+
if ((ppd = ppdOpenFile(filename)) == NULL)
{
unlink(filename);
diff --git a/test/run-stp-tests.sh b/test/run-stp-tests.sh
index 8a263fb..fc7e252 100755
--- a/test/run-stp-tests.sh
+++ b/test/run-stp-tests.sh
@@ -886,7 +886,7 @@ fi
# Paged printed on Test3
count=`$GREP '^Test3 ' $BASE/log/page_log | awk 'BEGIN{count=0}{count=count+$7}END{print count}'`
-expected=4
+expected=2
if test $count != $expected; then
echo "FAIL: Printer 'Test3' produced $count page(s), expected $expected."
echo " <p>FAIL: Printer 'Test3' produced $count page(s), expected $expected.</p>" >>$strfile
diff --git a/vcnet/config.h b/vcnet/config.h
index 7f2a9de..753f380 100644
--- a/vcnet/config.h
+++ b/vcnet/config.h
@@ -94,8 +94,8 @@ typedef unsigned long useconds_t;
* Version of software...
*/
-#define CUPS_SVERSION "CUPS v2.2.9"
-#define CUPS_MINIMAL "CUPS/2.2.9"
+#define CUPS_SVERSION "CUPS v2.2.10"
+#define CUPS_MINIMAL "CUPS/2.2.10"
/*
diff --git a/xcode/config.h b/xcode/config.h
index b8e1e0e..ea8b067 100644
--- a/xcode/config.h
+++ b/xcode/config.h
@@ -22,8 +22,8 @@
* Version of software...
*/
-#define CUPS_SVERSION "CUPS v2.2.9"
-#define CUPS_MINIMAL "CUPS/2.2.9"
+#define CUPS_SVERSION "CUPS v2.2.10"
+#define CUPS_MINIMAL "CUPS/2.2.10"
/*