diff -u -r -N squid-5.0.1/aclocal.m4 squid-5.0.2/aclocal.m4 --- squid-5.0.1/aclocal.m4 2020-01-20 17:01:29.000000000 +1300 +++ squid-5.0.2/aclocal.m4 2020-04-20 00:08:46.000000000 +1200 @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.16.1 -*- Autoconf -*- +# generated automatically by aclocal 1.16.2 -*- Autoconf -*- -# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1055,8 +1055,8 @@ _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD - echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD - $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD + echo "$AR cr libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD + $AR cr libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD cat > conftest.c << _LT_EOF @@ -1506,7 +1506,7 @@ m4_defun([_LT_PROG_AR], [AC_CHECK_TOOLS(AR, [ar], false) : ${AR=ar} -: ${AR_FLAGS=cru} +: ${AR_FLAGS=cr} _LT_DECL([], [AR], [1], [The archiver]) _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) @@ -10059,7 +10059,7 @@ m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) -# Copyright (C) 2002-2018 Free Software Foundation, Inc. +# Copyright (C) 2002-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -10074,7 +10074,7 @@ [am__api_version='1.16' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.16.1], [], +m4_if([$1], [1.16.2], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -10090,14 +10090,14 @@ # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.16.1])dnl +[AM_AUTOMAKE_VERSION([1.16.2])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -10149,7 +10149,7 @@ # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997-2018 Free Software Foundation, Inc. +# Copyright (C) 1997-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -10180,7 +10180,7 @@ Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -10371,7 +10371,7 @@ # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -10410,7 +10410,9 @@ done if test $am_rc -ne 0; then AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments - for automatic dependency tracking. Try re-running configure with the + for automatic dependency tracking. If GNU make was not used, consider + re-running the configure script with MAKE="gmake" (or whatever is + necessary). You can also try re-running configure with the '--disable-dependency-tracking' option to at least be able to build the package (albeit without support for automatic dependency tracking).]) fi @@ -10437,7 +10439,7 @@ # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -10634,7 +10636,7 @@ done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -10655,7 +10657,7 @@ fi AC_SUBST([install_sh])]) -# Copyright (C) 2003-2018 Free Software Foundation, Inc. +# Copyright (C) 2003-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -10677,7 +10679,7 @@ # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering -# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -10712,7 +10714,7 @@ # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -10755,7 +10757,7 @@ # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997-2018 Free Software Foundation, Inc. +# Copyright (C) 1997-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -10794,7 +10796,7 @@ # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -10823,7 +10825,7 @@ AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -10870,7 +10872,7 @@ # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -10889,7 +10891,7 @@ # Check to make sure that the build environment is sane. -*- Autoconf -*- -# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -10970,7 +10972,7 @@ rm -f conftest.file ]) -# Copyright (C) 2009-2018 Free Software Foundation, Inc. +# Copyright (C) 2009-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -11030,7 +11032,7 @@ _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -11058,7 +11060,7 @@ INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006-2018 Free Software Foundation, Inc. +# Copyright (C) 2006-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -11077,7 +11079,7 @@ # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004-2018 Free Software Foundation, Inc. +# Copyright (C) 2004-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -u -r -N squid-5.0.1/cfgaux/compile squid-5.0.2/cfgaux/compile --- squid-5.0.1/cfgaux/compile 2020-01-20 17:01:31.000000000 +1300 +++ squid-5.0.2/cfgaux/compile 2020-04-20 00:08:50.000000000 +1200 @@ -3,7 +3,7 @@ scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify @@ -53,7 +53,7 @@ MINGW*) file_conv=mingw ;; - CYGWIN*) + CYGWIN* | MSYS*) file_conv=cygwin ;; *) @@ -67,7 +67,7 @@ mingw/*) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; - cygwin/*) + cygwin/* | msys/*) file=`cygpath -m "$file" || echo "$file"` ;; wine/*) diff -u -r -N squid-5.0.1/cfgaux/depcomp squid-5.0.2/cfgaux/depcomp --- squid-5.0.1/cfgaux/depcomp 2020-01-20 17:01:35.000000000 +1300 +++ squid-5.0.2/cfgaux/depcomp 2020-04-20 00:08:54.000000000 +1200 @@ -3,7 +3,7 @@ scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff -u -r -N squid-5.0.1/cfgaux/install-sh squid-5.0.2/cfgaux/install-sh --- squid-5.0.1/cfgaux/install-sh 2020-01-20 17:01:31.000000000 +1300 +++ squid-5.0.2/cfgaux/install-sh 2020-04-20 00:08:50.000000000 +1200 @@ -451,7 +451,18 @@ trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. - (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && + (umask $cp_umask && + { test -z "$stripcmd" || { + # Create $dsttmp read-write so that cp doesn't create it read-only, + # which would cause strip to fail. + if test -z "$doit"; then + : >"$dsttmp" # No need to fork-exec 'touch'. + else + $doit touch "$dsttmp" + fi + } + } && + $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # diff -u -r -N squid-5.0.1/cfgaux/ltmain.sh squid-5.0.2/cfgaux/ltmain.sh --- squid-5.0.1/cfgaux/ltmain.sh 2020-01-20 17:01:30.000000000 +1300 +++ squid-5.0.2/cfgaux/ltmain.sh 2020-04-20 00:08:47.000000000 +1200 @@ -31,7 +31,7 @@ PROGRAM=libtool PACKAGE=libtool -VERSION="2.4.6 Debian-2.4.6-11" +VERSION="2.4.6 Debian-2.4.6-14" package_revision=2.4.6 @@ -387,7 +387,7 @@ # putting '$debug_cmd' at the start of all your functions, you can get # bash to show function call trace with: # -# debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name +# debug_cmd='echo "${FUNCNAME[0]} $*" >&2' bash your-script-name debug_cmd=${debug_cmd-":"} exit_cmd=: @@ -2141,7 +2141,7 @@ compiler: $LTCC compiler flags: $LTCFLAGS linker: $LD (gnu? $with_gnu_ld) - version: $progname $scriptversion Debian-2.4.6-11 + version: $progname $scriptversion Debian-2.4.6-14 automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` @@ -7368,10 +7368,12 @@ # -stdlib=* select c++ std lib with clang # -fsanitize=* Clang/GCC memory and address sanitizer # -fuse-ld=* Linker select flags for GCC + # -static-* direct GCC to link specific libraries statically + # -fcilkplus Cilk Plus language extension features for C/C++ -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \ - -specs=*|-fsanitize=*|-fuse-ld=*) + -specs=*|-fsanitize=*|-fuse-ld=*|-static-*|-fcilkplus) func_quote_for_eval "$arg" arg=$func_quote_for_eval_result func_append compile_command " $arg" diff -u -r -N squid-5.0.1/cfgaux/missing squid-5.0.2/cfgaux/missing --- squid-5.0.1/cfgaux/missing 2020-01-20 17:01:31.000000000 +1300 +++ squid-5.0.2/cfgaux/missing 2020-04-20 00:08:50.000000000 +1200 @@ -3,7 +3,7 @@ scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify diff -u -r -N squid-5.0.1/cfgaux/test-driver squid-5.0.2/cfgaux/test-driver --- squid-5.0.1/cfgaux/test-driver 2020-01-20 17:01:35.000000000 +1300 +++ squid-5.0.2/cfgaux/test-driver 2020-04-20 00:08:54.000000000 +1200 @@ -3,7 +3,7 @@ scriptversion=2018-03-07.03; # UTC -# Copyright (C) 2011-2018 Free Software Foundation, Inc. +# Copyright (C) 2011-2020 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff -u -r -N squid-5.0.1/ChangeLog squid-5.0.2/ChangeLog --- squid-5.0.1/ChangeLog 2020-01-20 17:01:23.000000000 +1300 +++ squid-5.0.2/ChangeLog 2020-04-19 22:50:48.000000000 +1200 @@ -1,3 +1,15 @@ +Changes in squid-5.0.2 (18 Apr 2020): + + - Bug 5030: Negative responses are never cached + - Bug 4796: comm.cc !isOpen(conn->fd) assertion when rotating logs + - Support worker-dedicated listening queues (SO_REUSEPORT) + - High precision time units + - Ban reserved annotations in "note", "adaptation_meta" directives + - ESI: convert parse exceptions into 500 status response + - Fix PURGE error responses + - ... and several documentation changes + - ... and some compile fixes + Changes in squid-5.0.1 (14 Jan 2020): - Bug 4989: Leaking StoreEntry objects on Cache Digest rebuilds @@ -45,6 +57,18 @@ - ... and many documentation changes - ... and much code cleanup and polishing +Changes to squid-4.11 (18 Apr 2020): + + - Bug 5036: capital 'L's in logs when daemon queue overflows + - Bug 5022: Reconfigure kills Coordinator in SMP+ufs configurations + - Bug 5016: systemd thinks Squid is ready before Squid listens + - kerberos_ldap_group: fix encryption type for cross realm check + - HTTP: Ignore malformed Host header in intercept and reverse proxy mode + - Fix Digest authentication nonce handling + - Supply ALE to request_header_add/reply_header_add + - ... and some documentation updates + - ... and some compile fixes + Changes to squid-4.10 (14 Jan 2020): - Bug 5009: Build failure with older clang libc++ diff -u -r -N squid-5.0.1/compat/getnameinfo.cc squid-5.0.2/compat/getnameinfo.cc --- squid-5.0.1/compat/getnameinfo.cc 2020-01-20 17:01:23.000000000 +1300 +++ squid-5.0.2/compat/getnameinfo.cc 2020-04-19 22:50:48.000000000 +1200 @@ -203,12 +203,12 @@ if (sp) { if (strlen(sp->s_name) + 1 > servlen) return EAI_OVERFLOW; - strncpy(serv, sp->s_name, servlen); + xstrncpy(serv, sp->s_name, servlen); } else { snprintf(numserv, sizeof(numserv), "%u", ntohs(port)); if (strlen(numserv) + 1 > servlen) return EAI_OVERFLOW; - strncpy(serv, numserv, servlen); + xstrncpy(serv, numserv, servlen); } } @@ -301,7 +301,7 @@ #endif return EAI_OVERFLOW; } - strncpy(host, hp->h_name, hostlen); + xstrncpy(host, hp->h_name, hostlen); #if USE_GETIPNODEBY freehostent(hp); #endif @@ -351,7 +351,7 @@ numaddrlen = strlen(numaddr); if (numaddrlen + 1 > hostlen) /* don't forget terminator */ return EAI_OVERFLOW; - strncpy(host, numaddr, hostlen); + xstrncpy(host, numaddr, hostlen); if (((const struct sockaddr_in6 *)sa)->sin6_scope_id) { char zonebuf[SQUIDHOSTNAMELEN]; diff -u -r -N squid-5.0.1/compat/Makefile.in squid-5.0.2/compat/Makefile.in --- squid-5.0.1/compat/Makefile.in 2020-01-20 17:01:31.000000000 +1300 +++ squid-5.0.2/compat/Makefile.in 2020-04-20 00:08:50.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -653,6 +653,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/configure squid-5.0.2/configure --- squid-5.0.1/configure 2020-01-20 17:01:36.000000000 +1300 +++ squid-5.0.2/configure 2020-04-20 00:08:55.000000000 +1200 @@ -1,7 +1,7 @@ #! /bin/sh # From configure.ac Revision. # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for Squid Web Proxy 5.0.1. +# Generated by GNU Autoconf 2.69 for Squid Web Proxy 5.0.2. # # Report bugs to . # @@ -595,8 +595,8 @@ # Identity of this package. PACKAGE_NAME='Squid Web Proxy' PACKAGE_TARNAME='squid' -PACKAGE_VERSION='5.0.1' -PACKAGE_STRING='Squid Web Proxy 5.0.1' +PACKAGE_VERSION='5.0.2' +PACKAGE_STRING='Squid Web Proxy 5.0.2' PACKAGE_BUGREPORT='http://bugs.squid-cache.org/' PACKAGE_URL='' @@ -707,6 +707,8 @@ ENABLE_LEAKFINDER_FALSE ENABLE_LEAKFINDER_TRUE EPOLL_LIBS +SYSTEMD_LIBS +SYSTEMD_CFLAGS LBERLIB LDAPLIB KRB5LIBS @@ -1021,6 +1023,7 @@ with_mit_krb5 with_heimdal_krb5 with_gnugss +with_systemd enable_forw_via_db enable_cache_digests enable_select @@ -1100,6 +1103,8 @@ LIBOPENSSL_LIBS LIB_KRB5_CFLAGS LIB_KRB5_LIBS +SYSTEMD_CFLAGS +SYSTEMD_LIBS LIBTDB_CFLAGS LIBTDB_LIBS LIBCPPUNIT_CFLAGS @@ -1657,7 +1662,7 @@ # 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 Squid Web Proxy 5.0.1 to adapt to many kinds of systems. +\`configure' configures Squid Web Proxy 5.0.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1728,7 +1733,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Squid Web Proxy 5.0.1:";; + short | recursive ) echo "Configuration of Squid Web Proxy 5.0.2:";; esac cat <<\_ACEOF @@ -2004,6 +2009,8 @@ --without-mit-krb5 Compile without MIT Kerberos support. --without-heimdal-krb5 Compile without Heimdal Kerberos support. --without-gnugss Compile without the GNU gss libraries. + --without-systemd Do not use systemd API to send start-up completion + notification. Default: auto-detect --with-nat-devpf Enable /dev/pf support for NAT on older OpenBSD and FreeBSD kernels. --without-netfilter-conntrack @@ -2077,6 +2084,10 @@ C compiler flags for LIB_KRB5, overriding pkg-config LIB_KRB5_LIBS linker flags for LIB_KRB5, overriding pkg-config + SYSTEMD_CFLAGS + C compiler flags for SYSTEMD, overriding pkg-config + SYSTEMD_LIBS + linker flags for SYSTEMD, overriding pkg-config LIBTDB_CFLAGS C compiler flags for LIBTDB, overriding pkg-config LIBTDB_LIBS linker flags for LIBTDB, overriding pkg-config @@ -2155,7 +2166,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Squid Web Proxy configure 5.0.1 +Squid Web Proxy configure 5.0.2 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -3259,7 +3270,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Squid Web Proxy $as_me 5.0.1, which was +It was created by Squid Web Proxy $as_me 5.0.2, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -4126,7 +4137,7 @@ # Define the identity of the package. PACKAGE='squid' - VERSION='5.0.1' + VERSION='5.0.2' cat >>confdefs.h <<_ACEOF @@ -9554,7 +9565,7 @@ fi : ${AR=ar} -: ${AR_FLAGS=cru} +: ${AR_FLAGS=cr} @@ -11276,8 +11287,8 @@ _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 - echo "$AR cru libconftest.a conftest.o" >&5 - $AR cru libconftest.a conftest.o 2>&5 + echo "$AR cr libconftest.a conftest.o" >&5 + $AR cr libconftest.a conftest.o 2>&5 echo "$RANLIB libconftest.a" >&5 $RANLIB libconftest.a 2>&5 cat > conftest.c << _LT_EOF @@ -33580,6 +33591,317 @@ + +# Check whether --with-systemd was given. +if test "${with_systemd+set}" = set; then : + withval=$with_systemd; +case "$with_systemd" in + yes|no) + : # Nothing special to do here + ;; + *) + if test ! -d "$withval" ; then + as_fn_error $? "--with-systemd path does not point to a directory" "$LINENO" 5 + fi + SYSTEMD_PATH="-L$with_systemd/lib" + CPPFLAGS="-I$with_systemd/include $CPPFLAGS" + esac + +fi + + +if test "x$with_systemd" != "xno" -a "x$squid_host_os" = "xlinux"; then + +# save state, key is squid_systemd_state +squid_systemd_state_CFLAGS="${CFLAGS}" +squid_systemd_state_CXXFLAGS="${CXXFLAGS}" +squid_systemd_state_LDFLAGS="${LDFLAGS}" +squid_systemd_state_LIBS="${LIBS}" +squid_systemd_state_CC="${CC}" +squid_systemd_state_CXX="${CXX}" +squid_systemd_state_CPPFLAGS="${CPPFLAGS}" +squid_systemd_state_squid_saved_vars="" +for squid_util_var_tosave in $squid_systemd_state_squid_saved_vars +do + squid_util_var_tosave2="squid_systemd_state_${squid_util_var_tosave}" + eval "${squid_util_var_tosave2}=\"${squid_util_var_tosave}\"" +done + + + # User may have provided a custom location for systemd. Otherwise... + LIBS="$LIBS $SYSTEMD_PATH" + + # auto-detect using pkg-config + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD" >&5 +$as_echo_n "checking for SYSTEMD... " >&6; } + +if test -n "$SYSTEMD_CFLAGS"; then + pkg_cv_SYSTEMD_CFLAGS="$SYSTEMD_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libsystemd") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_SYSTEMD_CFLAGS=`$PKG_CONFIG --cflags "libsystemd" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$SYSTEMD_LIBS"; then + pkg_cv_SYSTEMD_LIBS="$SYSTEMD_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libsystemd") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_SYSTEMD_LIBS=`$PKG_CONFIG --libs "libsystemd" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libsystemd" 2>&1` + else + SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --print-errors "libsystemd" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$SYSTEMD_PKG_ERRORS" >&5 + + + # systemd < 209 + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD" >&5 +$as_echo_n "checking for SYSTEMD... " >&6; } + +if test -n "$SYSTEMD_CFLAGS"; then + pkg_cv_SYSTEMD_CFLAGS="$SYSTEMD_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_SYSTEMD_CFLAGS=`$PKG_CONFIG --cflags "libsystemd-daemon" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$SYSTEMD_LIBS"; then + pkg_cv_SYSTEMD_LIBS="$SYSTEMD_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_SYSTEMD_LIBS=`$PKG_CONFIG --libs "libsystemd-daemon" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libsystemd-daemon" 2>&1` + else + SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --print-errors "libsystemd-daemon" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$SYSTEMD_PKG_ERRORS" >&5 + + : +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + : +else + SYSTEMD_CFLAGS=$pkg_cv_SYSTEMD_CFLAGS + SYSTEMD_LIBS=$pkg_cv_SYSTEMD_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi + +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + + # systemd < 209 + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD" >&5 +$as_echo_n "checking for SYSTEMD... " >&6; } + +if test -n "$SYSTEMD_CFLAGS"; then + pkg_cv_SYSTEMD_CFLAGS="$SYSTEMD_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_SYSTEMD_CFLAGS=`$PKG_CONFIG --cflags "libsystemd-daemon" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$SYSTEMD_LIBS"; then + pkg_cv_SYSTEMD_LIBS="$SYSTEMD_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_SYSTEMD_LIBS=`$PKG_CONFIG --libs "libsystemd-daemon" 2>/dev/null` +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libsystemd-daemon" 2>&1` + else + SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --print-errors "libsystemd-daemon" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$SYSTEMD_PKG_ERRORS" >&5 + + : +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + : +else + SYSTEMD_CFLAGS=$pkg_cv_SYSTEMD_CFLAGS + SYSTEMD_LIBS=$pkg_cv_SYSTEMD_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi + +else + SYSTEMD_CFLAGS=$pkg_cv_SYSTEMD_CFLAGS + SYSTEMD_LIBS=$pkg_cv_SYSTEMD_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi + + for ac_header in systemd/sd-daemon.h +do : + ac_fn_cxx_check_header_mongrel "$LINENO" "systemd/sd-daemon.h" "ac_cv_header_systemd_sd_daemon_h" "$ac_includes_default" +if test "x$ac_cv_header_systemd_sd_daemon_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SYSTEMD_SD_DAEMON_H 1 +_ACEOF + +fi + +done + + + +# rollback state, key is squid_systemd_state +CFLAGS="${squid_systemd_state_CFLAGS}" +CXXFLAGS="${squid_systemd_state_CXXFLAGS}" +LDFLAGS="${squid_systemd_state_LDFLAGS}" +LIBS="${squid_systemd_state_LIBS}" +CC="${squid_systemd_state_CC}" +CXX="${squid_systemd_state_CXX}" +CPPFLAGS="${squid_systemd_state_CPPFLAGS}" +for squid_util_var_tosave in $squid_systemd_state_squid_saved_vars +do + squid_util_var_tosave2="\$squid_systemd_state_${squid_util_var_tosave}" + eval "$squid_util_var_tosave=\"${squid_util_var_tosave2}\"" +done + +# commit state, key is squid_systemd_state +unset squid_systemd_state_CFLAGS +unset squid_systemd_state_CXXFLAGS +unset squid_systemd_state_LDFLAGS +unset squid_systemd_state_LIBS +unset squid_systemd_state_CC +unset squid_systemd_state_CXX +unset squid_systemd_state_CPPFLAGS +for squid_util_var_tosave in $squid_systemd_state_squid_saved_vars +do + unset ${squid_util_var_tosave} +done + + #de-pollute LIBS + + if test "x$with_systemd" = "xyes" -a "x$SYSTEMD_LIBS" = "x"; then + as_fn_error $? "Required systemd library not found" "$LINENO" 5 + fi + if test "x$SYSTEMD_LIBS" != "x" ; then + CXXFLAGS="$SYSTEMD_CFLAGS $CXXFLAGS" + +$as_echo "#define USE_SYSTEMD 1" >>confdefs.h + + else + with_systemd=no + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: systemd library support: ${with_systemd:=auto} ${SYSTEMD_PATH} ${SYSTEMD_LIBS}" >&5 +$as_echo "$as_me: systemd library support: ${with_systemd:=auto} ${SYSTEMD_PATH} ${SYSTEMD_LIBS}" >&6;} + # Check whether --enable-forw-via-db was given. if test "${enable_forw_via_db+set}" = set; then : enableval=$enable_forw_via_db; @@ -44609,7 +44931,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Squid Web Proxy $as_me 5.0.1, which was +This file was extended by Squid Web Proxy $as_me 5.0.2, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -44675,7 +44997,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -Squid Web Proxy config.status 5.0.1 +Squid Web Proxy config.status 5.0.2 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -45983,7 +46305,9 @@ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "Something went wrong bootstrapping makefile fragments - for automatic dependency tracking. Try re-running configure with the + for automatic dependency tracking. If GNU make was not used, consider + re-running the configure script with MAKE=\"gmake\" (or whatever is + necessary). You can also try re-running configure with the '--disable-dependency-tracking' option to at least be able to build the package (albeit without support for automatic dependency tracking). See \`config.log' for more details" "$LINENO" 5; } diff -u -r -N squid-5.0.1/configure.ac squid-5.0.2/configure.ac --- squid-5.0.1/configure.ac 2020-01-20 17:01:36.000000000 +1300 +++ squid-5.0.2/configure.ac 2020-04-20 00:08:55.000000000 +1200 @@ -5,7 +5,7 @@ ## Please see the COPYING and CONTRIBUTORS files for details. ## -AC_INIT([Squid Web Proxy],[5.0.1],[http://bugs.squid-cache.org/],[squid]) +AC_INIT([Squid Web Proxy],[5.0.2],[http://bugs.squid-cache.org/],[squid]) AC_PREREQ(2.61) AC_CONFIG_HEADERS([include/autoconf.h]) AC_CONFIG_AUX_DIR(cfgaux) @@ -2102,6 +2102,51 @@ AC_SUBST(LDAPLIB) AC_SUBST(LBERLIB) +AC_ARG_WITH(systemd, + AS_HELP_STRING([--without-systemd], + [Do not use systemd API to send start-up completion + notification. Default: auto-detect]), [ +case "$with_systemd" in + yes|no) + : # Nothing special to do here + ;; + *) + if test ! -d "$withval" ; then + AC_MSG_ERROR([--with-systemd path does not point to a directory]) + fi + SYSTEMD_PATH="-L$with_systemd/lib" + CPPFLAGS="-I$with_systemd/include $CPPFLAGS" + esac +]) +AH_TEMPLATE(USE_SYSTEMD,[systemd support is available]) +if test "x$with_systemd" != "xno" -a "x$squid_host_os" = "xlinux"; then + SQUID_STATE_SAVE(squid_systemd_state) + + # User may have provided a custom location for systemd. Otherwise... + LIBS="$LIBS $SYSTEMD_PATH" + + # auto-detect using pkg-config + PKG_CHECK_MODULES(SYSTEMD,[libsystemd],,[ + # systemd < 209 + PKG_CHECK_MODULES(SYSTEMD,[libsystemd-daemon],,[:]) + ]) + + AC_CHECK_HEADERS(systemd/sd-daemon.h) + + SQUID_STATE_ROLLBACK(squid_systemd_state) #de-pollute LIBS + + if test "x$with_systemd" = "xyes" -a "x$SYSTEMD_LIBS" = "x"; then + AC_MSG_ERROR([Required systemd library not found]) + fi + if test "x$SYSTEMD_LIBS" != "x" ; then + CXXFLAGS="$SYSTEMD_CFLAGS $CXXFLAGS" + AC_DEFINE(USE_SYSTEMD,1,[systemd support is available]) + else + with_systemd=no + fi +fi +AC_MSG_NOTICE([systemd library support: ${with_systemd:=auto} ${SYSTEMD_PATH} ${SYSTEMD_LIBS}]) + AC_ARG_ENABLE(forw-via-db, AS_HELP_STRING([--enable-forw-via-db],[Enable Forw/Via database]), [ SQUID_YESNO([$enableval],[unrecognized argument to --enable-forw-via-db: $enableval]) diff -u -r -N squid-5.0.1/contrib/Makefile.in squid-5.0.2/contrib/Makefile.in --- squid-5.0.1/contrib/Makefile.in 2020-01-20 17:01:31.000000000 +1300 +++ squid-5.0.2/contrib/Makefile.in 2020-04-20 00:08:50.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -349,6 +349,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/doc/Makefile.in squid-5.0.2/doc/Makefile.in --- squid-5.0.1/doc/Makefile.in 2020-01-20 17:01:31.000000000 +1300 +++ squid-5.0.2/doc/Makefile.in 2020-04-20 00:08:50.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -404,6 +404,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/doc/manuals/Makefile.in squid-5.0.2/doc/manuals/Makefile.in --- squid-5.0.1/doc/manuals/Makefile.in 2020-01-20 17:01:31.000000000 +1300 +++ squid-5.0.2/doc/manuals/Makefile.in 2020-04-20 00:08:50.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -344,6 +344,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/doc/release-notes/Makefile.in squid-5.0.2/doc/release-notes/Makefile.in --- squid-5.0.1/doc/release-notes/Makefile.in 2020-01-20 17:01:31.000000000 +1300 +++ squid-5.0.2/doc/release-notes/Makefile.in 2020-04-20 00:08:50.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -344,6 +344,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/doc/release-notes/release-5.html squid-5.0.2/doc/release-notes/release-5.html --- squid-5.0.1/doc/release-notes/release-5.html 2020-01-20 17:13:26.000000000 +1300 +++ squid-5.0.2/doc/release-notes/release-5.html 2020-04-20 00:20:13.000000000 +1200 @@ -1,11 +1,12 @@ - - Squid 5.0.1 release notes + + + Squid 5.0.2 release notes -

Squid 5.0.1 release notes

+

Squid 5.0.2 release notes

Squid Developers


@@ -60,7 +61,7 @@

1. Notice

-

The Squid Team are pleased to announce the release of Squid-5.0.1 for testing.

+

The Squid Team are pleased to announce the release of Squid-5.0.2 for testing.

This new release is available for download from http://www.squid-cache.org/Versions/v5/ or the mirrors.

@@ -209,9 +210,9 @@

Squid now supports forwarding of bumped, re-encrypted HTTPS requests through -a cache_peer using a standard HTTP CONNECT tunnel.

+a cache_peer using a standard HTTP CONNECT tunnel.

-

No support for triggering client authentication when a cache_peer +

No support for triggering client authentication when a cache_peer configuration instructs the bumping Squid to relay authentication info contained in client CONNECT request. The bumping Squid still responds with HTTP 200 (Connection Established) to the client CONNECT request (to diff -u -r -N squid-5.0.1/errors/Makefile.in squid-5.0.2/errors/Makefile.in --- squid-5.0.1/errors/Makefile.in 2020-01-20 17:01:31.000000000 +1300 +++ squid-5.0.2/errors/Makefile.in 2020-04-20 00:08:50.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -345,6 +345,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/icons/Makefile.in squid-5.0.2/icons/Makefile.in --- squid-5.0.1/icons/Makefile.in 2020-01-20 17:01:31.000000000 +1300 +++ squid-5.0.2/icons/Makefile.in 2020-04-20 00:08:50.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -374,6 +374,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/include/autoconf.h.in squid-5.0.2/include/autoconf.h.in --- squid-5.0.1/include/autoconf.h.in 2020-01-20 17:01:29.000000000 +1300 +++ squid-5.0.2/include/autoconf.h.in 2020-04-20 00:08:47.000000000 +1200 @@ -1065,6 +1065,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYSLOG_H +/* Define to 1 if you have the header file. */ +#undef HAVE_SYSTEMD_SD_DAEMON_H + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_BITYPES_H @@ -1570,6 +1573,9 @@ /* Use ssl-crtd daemon */ #undef USE_SSL_CRTD +/* systemd support is available */ +#undef USE_SYSTEMD + /* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # undef _ALL_SOURCE diff -u -r -N squid-5.0.1/include/version.h squid-5.0.2/include/version.h --- squid-5.0.1/include/version.h 2020-01-20 17:01:36.000000000 +1300 +++ squid-5.0.2/include/version.h 2020-04-20 00:08:55.000000000 +1200 @@ -7,7 +7,7 @@ */ #ifndef SQUID_RELEASE_TIME -#define SQUID_RELEASE_TIME 1579492886 +#define SQUID_RELEASE_TIME 1587298122 #endif /* diff -u -r -N squid-5.0.1/lib/libTrie/Makefile.in squid-5.0.2/lib/libTrie/Makefile.in --- squid-5.0.1/lib/libTrie/Makefile.in 2020-01-20 17:01:31.000000000 +1300 +++ squid-5.0.2/lib/libTrie/Makefile.in 2020-04-20 00:08:50.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -673,6 +673,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/lib/libTrie/test/Makefile.in squid-5.0.2/lib/libTrie/test/Makefile.in --- squid-5.0.1/lib/libTrie/test/Makefile.in 2020-01-20 17:01:31.000000000 +1300 +++ squid-5.0.2/lib/libTrie/test/Makefile.in 2020-04-20 00:08:50.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -604,6 +604,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/lib/Makefile.in squid-5.0.2/lib/Makefile.in --- squid-5.0.1/lib/Makefile.in 2020-01-20 17:01:31.000000000 +1300 +++ squid-5.0.2/lib/Makefile.in 2020-04-20 00:08:50.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -722,6 +722,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/lib/ntlmauth/Makefile.in squid-5.0.2/lib/ntlmauth/Makefile.in --- squid-5.0.1/lib/ntlmauth/Makefile.in 2020-01-20 17:01:31.000000000 +1300 +++ squid-5.0.2/lib/ntlmauth/Makefile.in 2020-04-20 00:08:50.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -624,6 +624,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/lib/profiler/Makefile.in squid-5.0.2/lib/profiler/Makefile.in --- squid-5.0.1/lib/profiler/Makefile.in 2020-01-20 17:01:31.000000000 +1300 +++ squid-5.0.2/lib/profiler/Makefile.in 2020-04-20 00:08:50.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -628,6 +628,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/lib/rfcnb/Makefile.in squid-5.0.2/lib/rfcnb/Makefile.in --- squid-5.0.1/lib/rfcnb/Makefile.in 2020-01-20 17:01:31.000000000 +1300 +++ squid-5.0.2/lib/rfcnb/Makefile.in 2020-04-20 00:08:50.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -605,6 +605,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/lib/smblib/Makefile.in squid-5.0.2/lib/smblib/Makefile.in --- squid-5.0.1/lib/smblib/Makefile.in 2020-01-20 17:01:31.000000000 +1300 +++ squid-5.0.2/lib/smblib/Makefile.in 2020-04-20 00:08:50.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -607,6 +607,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/lib/snmplib/Makefile.in squid-5.0.2/lib/snmplib/Makefile.in --- squid-5.0.1/lib/snmplib/Makefile.in 2020-01-20 17:01:31.000000000 +1300 +++ squid-5.0.2/lib/snmplib/Makefile.in 2020-04-20 00:08:50.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -401,6 +401,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/libltdl/aclocal.m4 squid-5.0.2/libltdl/aclocal.m4 --- squid-5.0.1/libltdl/aclocal.m4 2020-01-20 17:02:23.000000000 +1300 +++ squid-5.0.2/libltdl/aclocal.m4 2020-04-20 00:09:34.000000000 +1200 @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.16.1 -*- Autoconf -*- +# generated automatically by aclocal 1.16.2 -*- Autoconf -*- -# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -20,7 +20,7 @@ If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) -# Copyright (C) 2002-2018 Free Software Foundation, Inc. +# Copyright (C) 2002-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -35,7 +35,7 @@ [am__api_version='1.16' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.16.1], [], +m4_if([$1], [1.16.2], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -51,14 +51,14 @@ # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.16.1])dnl +[AM_AUTOMAKE_VERSION([1.16.2])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -110,7 +110,7 @@ # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997-2018 Free Software Foundation, Inc. +# Copyright (C) 1997-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -141,7 +141,7 @@ Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -332,7 +332,7 @@ # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -371,7 +371,9 @@ done if test $am_rc -ne 0; then AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments - for automatic dependency tracking. Try re-running configure with the + for automatic dependency tracking. If GNU make was not used, consider + re-running the configure script with MAKE="gmake" (or whatever is + necessary). You can also try re-running configure with the '--disable-dependency-tracking' option to at least be able to build the package (albeit without support for automatic dependency tracking).]) fi @@ -398,7 +400,7 @@ # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -595,7 +597,7 @@ done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -616,7 +618,7 @@ fi AC_SUBST([install_sh])]) -# Copyright (C) 2003-2018 Free Software Foundation, Inc. +# Copyright (C) 2003-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -637,7 +639,7 @@ # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -680,7 +682,7 @@ # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997-2018 Free Software Foundation, Inc. +# Copyright (C) 1997-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -719,7 +721,7 @@ # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -748,7 +750,7 @@ AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -795,7 +797,7 @@ # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -814,7 +816,7 @@ # Check to make sure that the build environment is sane. -*- Autoconf -*- -# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -895,7 +897,7 @@ rm -f conftest.file ]) -# Copyright (C) 2009-2018 Free Software Foundation, Inc. +# Copyright (C) 2009-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -955,7 +957,7 @@ _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -983,7 +985,7 @@ INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006-2018 Free Software Foundation, Inc. +# Copyright (C) 2006-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1002,7 +1004,7 @@ # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004-2018 Free Software Foundation, Inc. +# Copyright (C) 2004-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -u -r -N squid-5.0.1/libltdl/configure squid-5.0.2/libltdl/configure --- squid-5.0.1/libltdl/configure 2020-01-20 17:02:24.000000000 +1300 +++ squid-5.0.2/libltdl/configure 2020-04-20 00:09:34.000000000 +1200 @@ -5626,7 +5626,7 @@ fi : ${AR=ar} -: ${AR_FLAGS=cru} +: ${AR_FLAGS=cr} @@ -7347,8 +7347,8 @@ _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 - echo "$AR cru libconftest.a conftest.o" >&5 - $AR cru libconftest.a conftest.o 2>&5 + echo "$AR cr libconftest.a conftest.o" >&5 + $AR cr libconftest.a conftest.o 2>&5 echo "$RANLIB libconftest.a" >&5 $RANLIB libconftest.a 2>&5 cat > conftest.c << _LT_EOF @@ -14952,7 +14952,9 @@ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "Something went wrong bootstrapping makefile fragments - for automatic dependency tracking. Try re-running configure with the + for automatic dependency tracking. If GNU make was not used, consider + re-running the configure script with MAKE=\"gmake\" (or whatever is + necessary). You can also try re-running configure with the '--disable-dependency-tracking' option to at least be able to build the package (albeit without support for automatic dependency tracking). See \`config.log' for more details" "$LINENO" 5; } diff -u -r -N squid-5.0.1/libltdl/m4/libtool.m4 squid-5.0.2/libltdl/m4/libtool.m4 --- squid-5.0.1/libltdl/m4/libtool.m4 2020-01-20 17:01:30.000000000 +1300 +++ squid-5.0.2/libltdl/m4/libtool.m4 2020-04-20 00:08:47.000000000 +1200 @@ -1041,8 +1041,8 @@ _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD - echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD - $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD + echo "$AR cr libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD + $AR cr libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD cat > conftest.c << _LT_EOF @@ -1492,7 +1492,7 @@ m4_defun([_LT_PROG_AR], [AC_CHECK_TOOLS(AR, [ar], false) : ${AR=ar} -: ${AR_FLAGS=cru} +: ${AR_FLAGS=cr} _LT_DECL([], [AR], [1], [The archiver]) _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) diff -u -r -N squid-5.0.1/libltdl/Makefile.in squid-5.0.2/libltdl/Makefile.in --- squid-5.0.1/libltdl/Makefile.in 2020-01-20 17:02:24.000000000 +1300 +++ squid-5.0.2/libltdl/Makefile.in 2020-04-20 00:09:34.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -273,8 +273,8 @@ am__ltdlinclude_HEADERS_DIST = libltdl/lt_system.h libltdl/lt_error.h \ libltdl/lt_dlloader.h HEADERS = $(include_HEADERS) $(ltdlinclude_HEADERS) -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ - $(LISP)config-h.in +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) \ + config-h.in # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. @@ -975,6 +975,10 @@ tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) +dist-zstd: distdir + tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst + $(am__post_remove_distdir) + dist-tarZ: distdir @echo WARNING: "Support for distribution archives compressed with" \ "legacy program 'compress' is deprecated." >&2 @@ -1017,6 +1021,8 @@ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ + *.tar.zst*) \ + zstd -dc $(distdir).tar.zst | $(am__untar) ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) @@ -1248,8 +1254,8 @@ check-am clean clean-cscope clean-generic clean-libLTLIBRARIES \ clean-libtool clean-noinstLTLIBRARIES cscope cscopelist-am \ ctags ctags-am dist dist-all dist-bzip2 dist-gzip dist-lzip \ - dist-shar dist-tarZ dist-xz dist-zip distcheck distclean \ - distclean-compile distclean-generic distclean-hdr \ + dist-shar dist-tarZ dist-xz dist-zip dist-zstd distcheck \ + distclean distclean-compile distclean-generic distclean-hdr \ distclean-libtool distclean-tags distcleancheck distdir \ distuninstallcheck dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ diff -u -r -N squid-5.0.1/Makefile.in squid-5.0.2/Makefile.in --- squid-5.0.1/Makefile.in 2020-01-20 17:01:31.000000000 +1300 +++ squid-5.0.2/Makefile.in 2020-04-20 00:08:50.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -432,6 +432,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ @@ -769,6 +771,10 @@ tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) +dist-zstd: distdir + tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst + $(am__post_remove_distdir) + dist-tarZ: distdir @echo WARNING: "Support for distribution archives compressed with" \ "legacy program 'compress' is deprecated." >&2 @@ -811,6 +817,8 @@ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ + *.tar.zst*) \ + zstd -dc $(distdir).tar.zst | $(am__untar) ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) @@ -989,7 +997,7 @@ am--refresh check check-am clean clean-cscope clean-generic \ clean-libtool cscope cscopelist-am ctags ctags-am dist \ dist-all dist-bzip2 dist-gzip dist-hook dist-lzip dist-shar \ - dist-tarZ dist-xz dist-zip distcheck distclean \ + dist-tarZ dist-xz dist-zip dist-zstd distcheck distclean \ distclean-generic distclean-hdr distclean-libtool \ distclean-tags distcleancheck distdir distuninstallcheck dvi \ dvi-am html html-am info info-am install install-am \ diff -u -r -N squid-5.0.1/RELEASENOTES.html squid-5.0.2/RELEASENOTES.html --- squid-5.0.1/RELEASENOTES.html 2020-01-20 17:13:26.000000000 +1300 +++ squid-5.0.2/RELEASENOTES.html 2020-04-20 00:20:13.000000000 +1200 @@ -1,11 +1,12 @@ - - Squid 5.0.1 release notes + + + Squid 5.0.2 release notes -

Squid 5.0.1 release notes

+

Squid 5.0.2 release notes

Squid Developers


@@ -60,7 +61,7 @@

1. Notice

-

The Squid Team are pleased to announce the release of Squid-5.0.1 for testing.

+

The Squid Team are pleased to announce the release of Squid-5.0.2 for testing.

This new release is available for download from http://www.squid-cache.org/Versions/v5/ or the mirrors.

@@ -209,9 +210,9 @@

Squid now supports forwarding of bumped, re-encrypted HTTPS requests through -a cache_peer using a standard HTTP CONNECT tunnel.

+a cache_peer using a standard HTTP CONNECT tunnel.

-

No support for triggering client authentication when a cache_peer +

No support for triggering client authentication when a cache_peer configuration instructs the bumping Squid to relay authentication info contained in client CONNECT request. The bumping Squid still responds with HTTP 200 (Connection Established) to the client CONNECT request (to diff -u -r -N squid-5.0.1/scripts/Makefile.in squid-5.0.2/scripts/Makefile.in --- squid-5.0.1/scripts/Makefile.in 2020-01-20 17:01:31.000000000 +1300 +++ squid-5.0.2/scripts/Makefile.in 2020-04-20 00:08:50.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -347,6 +347,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/SPONSORS squid-5.0.2/SPONSORS --- squid-5.0.1/SPONSORS 2020-01-20 17:01:36.000000000 +1300 +++ squid-5.0.2/SPONSORS 2020-04-20 00:08:55.000000000 +1200 @@ -1,55 +1,62 @@ The following organizations have supported the Squid Project by providing their resources or funding various Squid development activities: +The Squid Software Foundation - http://foundation.squid-cache.org/ -Augur TBBS Pty Limited - - Augur TBBS has funded development work towards HTTP/2 support in - Squid-4. - -Bloomberg L.P. + The Foundation governs and facilitates Squid project activities, + providing the infrastructure and support framework for Squid + developers and users. - Bloomberg L.P. has funded development work towards stabilizing - Squid-4. DigialOcean - https://www.digitalocean.com/ DigitalOcean has donated droplets from their cloud infrastructure - to host some of the project's continuous integration farm + to host most of Squid Project's continuous integration farm. -LaunchPad - http://launchpad.net/ +SpinUp - https://SpinUp.com + + SpinUp has donated cloud resources to host our main website, wiki + and mailing lists. + +The Measurement Factory - http://www.measurement-factory.com/ + + The Measurement Factory has contributed significant resources to + Squid development and Squid Project infrastructure and support. + +Treehouse Networks, NZ - http://treenet.co.nz/ + + Treehouse Networks has contributed significant resources + toward Squid-3+ development and maintenance for their customer + gateways and CDN. - Provide Bazaar mirroring services and host the Squid-3+ developer - project code. -RackSpace - http://www.rackspace.com/ +RackSpace - https://www.rackspace.com/ RackSpace donated a number of virtual machines from their cloud - infrastructure to support and extend the continuous integration - testing infrastructure, and since late 2014 to host many of the + infrastructure to support and extend our continuous integration + testing infrastructure and, in 2014-2019, to host many of the Squid Project services. -RM Education - http://www.rm.com/ - RM Education has sponsored Squid performance optimizations and - stability improvements. +Augur TBBS Pty Limited -Squid Software Foundation - http://foundation.squid-cache.org/ + Augur TBBS has funded development work towards HTTP/2 support in + Squid-4. - The Foundation governs and facilitates Squid project activities, - providing the infrastructure and support framework for Squid - developers and users. +Bloomberg L.P. -The Measurement Factory - http://www.measurement-factory.com/ + Bloomberg L.P. has funded development work towards stabilizing + Squid-4. - Measurement Factory has contributed significant resources - toward Squid-3+ development and server maintenance. +LaunchPad - http://launchpad.net/ -Treehouse Networks, NZ - http://treenet.co.nz/ + Provide Bazaar mirroring services and host the Squid-3+ developer + project code. - Treehouse Networks has contributed significant resources - toward Squid-3+ development and maintenance for their customer - gateways and CDN. +RM Education - http://www.rm.com/ + + RM Education has sponsored Squid performance optimizations and + stability improvements. Messagenet - http://messagenet.it/ diff -u -r -N squid-5.0.1/src/acl/AnnotationData.cc squid-5.0.2/src/acl/AnnotationData.cc --- squid-5.0.1/src/acl/AnnotationData.cc 2020-01-20 17:01:23.000000000 +1300 +++ squid-5.0.2/src/acl/AnnotationData.cc 2020-04-19 22:50:48.000000000 +1200 @@ -16,23 +16,8 @@ #include "format/Format.h" #include "sbuf/Algorithms.h" -const char *AnnotationBlackList[] = { - "user", - "group", - "password", - "status", - "message", - "log", - "tag", - "ttl", - "ha1", - "rewrite-url", - "url", - nullptr -}; - ACLAnnotationData::ACLAnnotationData() - : notes(new Notes("annotation_data", AnnotationBlackList)) {} + : notes(new Notes("annotation_data")) {} SBufList ACLAnnotationData::dump() const diff -u -r -N squid-5.0.1/src/acl/external/AD_group/Makefile.in squid-5.0.2/src/acl/external/AD_group/Makefile.in --- squid-5.0.1/src/acl/external/AD_group/Makefile.in 2020-01-20 17:01:32.000000000 +1300 +++ squid-5.0.2/src/acl/external/AD_group/Makefile.in 2020-04-20 00:08:51.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -614,6 +614,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/acl/external/delayer/ext_delayer_acl.8 squid-5.0.2/src/acl/external/delayer/ext_delayer_acl.8 --- squid-5.0.1/src/acl/external/delayer/ext_delayer_acl.8 2020-01-20 17:13:30.000000000 +1300 +++ squid-5.0.2/src/acl/external/delayer/ext_delayer_acl.8 2020-04-20 00:20:15.000000000 +1200 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "EXT_DELAYER_ACL 8" -.TH EXT_DELAYER_ACL 8 "2020-01-20" "perl v5.28.1" "User Contributed Perl Documentation" +.TH EXT_DELAYER_ACL 8 "2020-04-19" "perl v5.28.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff -u -r -N squid-5.0.1/src/acl/external/delayer/Makefile.in squid-5.0.2/src/acl/external/delayer/Makefile.in --- squid-5.0.1/src/acl/external/delayer/Makefile.in 2020-01-20 17:01:32.000000000 +1300 +++ squid-5.0.2/src/acl/external/delayer/Makefile.in 2020-04-20 00:08:51.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -562,6 +562,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/acl/external/eDirectory_userip/Makefile.in squid-5.0.2/src/acl/external/eDirectory_userip/Makefile.in --- squid-5.0.1/src/acl/external/eDirectory_userip/Makefile.in 2020-01-20 17:01:32.000000000 +1300 +++ squid-5.0.2/src/acl/external/eDirectory_userip/Makefile.in 2020-04-20 00:08:51.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -617,6 +617,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/acl/external/file_userip/Makefile.in squid-5.0.2/src/acl/external/file_userip/Makefile.in --- squid-5.0.1/src/acl/external/file_userip/Makefile.in 2020-01-20 17:01:32.000000000 +1300 +++ squid-5.0.2/src/acl/external/file_userip/Makefile.in 2020-04-20 00:08:51.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -615,6 +615,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/acl/external/kerberos_ldap_group/Makefile.in squid-5.0.2/src/acl/external/kerberos_ldap_group/Makefile.in --- squid-5.0.1/src/acl/external/kerberos_ldap_group/Makefile.in 2020-01-20 17:01:32.000000000 +1300 +++ squid-5.0.2/src/acl/external/kerberos_ldap_group/Makefile.in 2020-04-20 00:08:51.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -650,6 +650,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/acl/external/kerberos_ldap_group/support_krb5.cc squid-5.0.2/src/acl/external/kerberos_ldap_group/support_krb5.cc --- squid-5.0.1/src/acl/external/kerberos_ldap_group/support_krb5.cc 2020-01-20 17:01:23.000000000 +1300 +++ squid-5.0.2/src/acl/external/kerberos_ldap_group/support_krb5.cc 2020-04-19 22:50:48.000000000 +1200 @@ -465,6 +465,12 @@ k5_error("Error while initialising TGT credentials", code); goto loop_end; } + + // overwrite limitation of enctypes + creds->keyblock.enctype = 0; + if (creds->keyblock.contents) + krb5_free_keyblock_contents(kparam.context, &creds->keyblock); + code = krb5_get_credentials(kparam.context, 0, kparam.cc[ccindex], creds, &tgt_creds); if (code) { k5_error("Error while getting tgt", code); diff -u -r -N squid-5.0.1/src/acl/external/kerberos_sid_group/ext_kerberos_sid_group_acl.8 squid-5.0.2/src/acl/external/kerberos_sid_group/ext_kerberos_sid_group_acl.8 --- squid-5.0.1/src/acl/external/kerberos_sid_group/ext_kerberos_sid_group_acl.8 2020-01-20 17:13:31.000000000 +1300 +++ squid-5.0.2/src/acl/external/kerberos_sid_group/ext_kerberos_sid_group_acl.8 2020-04-20 00:20:15.000000000 +1200 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "EXT_KERBEROS_SID_GROUP_ACL 8" -.TH EXT_KERBEROS_SID_GROUP_ACL 8 "2020-01-20" "perl v5.28.1" "User Contributed Perl Documentation" +.TH EXT_KERBEROS_SID_GROUP_ACL 8 "2020-04-19" "perl v5.28.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff -u -r -N squid-5.0.1/src/acl/external/kerberos_sid_group/Makefile.in squid-5.0.2/src/acl/external/kerberos_sid_group/Makefile.in --- squid-5.0.1/src/acl/external/kerberos_sid_group/Makefile.in 2020-01-20 17:01:32.000000000 +1300 +++ squid-5.0.2/src/acl/external/kerberos_sid_group/Makefile.in 2020-04-20 00:08:51.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -562,6 +562,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/acl/external/LDAP_group/Makefile.in squid-5.0.2/src/acl/external/LDAP_group/Makefile.in --- squid-5.0.1/src/acl/external/LDAP_group/Makefile.in 2020-01-20 17:01:32.000000000 +1300 +++ squid-5.0.2/src/acl/external/LDAP_group/Makefile.in 2020-04-20 00:08:51.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -617,6 +617,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/acl/external/LM_group/Makefile.in squid-5.0.2/src/acl/external/LM_group/Makefile.in --- squid-5.0.1/src/acl/external/LM_group/Makefile.in 2020-01-20 17:01:32.000000000 +1300 +++ squid-5.0.2/src/acl/external/LM_group/Makefile.in 2020-04-20 00:08:51.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -615,6 +615,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/acl/external/Makefile.in squid-5.0.2/src/acl/external/Makefile.in --- squid-5.0.1/src/acl/external/Makefile.in 2020-01-20 17:01:32.000000000 +1300 +++ squid-5.0.2/src/acl/external/Makefile.in 2020-04-20 00:08:51.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -403,6 +403,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/acl/external/session/Makefile.in squid-5.0.2/src/acl/external/session/Makefile.in --- squid-5.0.1/src/acl/external/session/Makefile.in 2020-01-20 17:01:32.000000000 +1300 +++ squid-5.0.2/src/acl/external/session/Makefile.in 2020-04-20 00:08:51.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -614,6 +614,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/acl/external/SQL_session/ext_sql_session_acl.8 squid-5.0.2/src/acl/external/SQL_session/ext_sql_session_acl.8 --- squid-5.0.1/src/acl/external/SQL_session/ext_sql_session_acl.8 2020-01-20 17:13:31.000000000 +1300 +++ squid-5.0.2/src/acl/external/SQL_session/ext_sql_session_acl.8 2020-04-20 00:20:16.000000000 +1200 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "EXT_SQL_SESSION_ACL 8" -.TH EXT_SQL_SESSION_ACL 8 "2020-01-20" "perl v5.28.1" "User Contributed Perl Documentation" +.TH EXT_SQL_SESSION_ACL 8 "2020-04-19" "perl v5.28.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff -u -r -N squid-5.0.1/src/acl/external/SQL_session/Makefile.in squid-5.0.2/src/acl/external/SQL_session/Makefile.in --- squid-5.0.1/src/acl/external/SQL_session/Makefile.in 2020-01-20 17:01:32.000000000 +1300 +++ squid-5.0.2/src/acl/external/SQL_session/Makefile.in 2020-04-20 00:08:51.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -562,6 +562,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/acl/external/time_quota/Makefile.in squid-5.0.2/src/acl/external/time_quota/Makefile.in --- squid-5.0.1/src/acl/external/time_quota/Makefile.in 2020-01-20 17:01:32.000000000 +1300 +++ squid-5.0.2/src/acl/external/time_quota/Makefile.in 2020-04-20 00:08:51.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -615,6 +615,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/acl/external/unix_group/Makefile.in squid-5.0.2/src/acl/external/unix_group/Makefile.in --- squid-5.0.1/src/acl/external/unix_group/Makefile.in 2020-01-20 17:01:32.000000000 +1300 +++ squid-5.0.2/src/acl/external/unix_group/Makefile.in 2020-04-20 00:08:51.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -615,6 +615,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/acl/external/wbinfo_group/ext_wbinfo_group_acl.8 squid-5.0.2/src/acl/external/wbinfo_group/ext_wbinfo_group_acl.8 --- squid-5.0.1/src/acl/external/wbinfo_group/ext_wbinfo_group_acl.8 2020-01-20 17:13:31.000000000 +1300 +++ squid-5.0.2/src/acl/external/wbinfo_group/ext_wbinfo_group_acl.8 2020-04-20 00:20:16.000000000 +1200 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "EXT_WBINFO_GROUP_ACL 8" -.TH EXT_WBINFO_GROUP_ACL 8 "2020-01-20" "perl v5.28.1" "User Contributed Perl Documentation" +.TH EXT_WBINFO_GROUP_ACL 8 "2020-04-19" "perl v5.28.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff -u -r -N squid-5.0.1/src/acl/external/wbinfo_group/Makefile.in squid-5.0.2/src/acl/external/wbinfo_group/Makefile.in --- squid-5.0.1/src/acl/external/wbinfo_group/Makefile.in 2020-01-20 17:01:32.000000000 +1300 +++ squid-5.0.2/src/acl/external/wbinfo_group/Makefile.in 2020-04-20 00:08:51.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -562,6 +562,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/acl/Makefile.in squid-5.0.2/src/acl/Makefile.in --- squid-5.0.1/src/acl/Makefile.in 2020-01-20 17:01:32.000000000 +1300 +++ squid-5.0.2/src/acl/Makefile.in 2020-04-20 00:08:51.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -768,6 +768,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/adaptation/Config.cc squid-5.0.2/src/adaptation/Config.cc --- squid-5.0.1/src/adaptation/Config.cc 2020-01-20 17:01:23.000000000 +1300 +++ squid-5.0.2/src/adaptation/Config.cc 2020-04-19 22:50:48.000000000 +1200 @@ -28,24 +28,24 @@ int Adaptation::Config::send_client_ip = false; int Adaptation::Config::send_username = false; int Adaptation::Config::use_indirect_client = true; -const char *metasBlacklist[] = { - "Methods", - "Service", - "ISTag", +static const char *protectedFieldNamesRaw[] = { + "Allow", + "Date", "Encapsulated", - "Opt-body-type", + "ISTag", "Max-Connections", + "Methods", + "Opt-body-type", "Options-TTL", - "Date", - "Service-ID", - "Allow", "Preview", - "Transfer-Preview", - "Transfer-Ignore", + "Service", + "Service-ID", "Transfer-Complete", - NULL + "Transfer-Ignore", + "Transfer-Preview" }; -Notes Adaptation::Config::metaHeaders("ICAP header", metasBlacklist); +static const Notes::Keys protectedFieldNames(std::begin(protectedFieldNamesRaw), std::end(protectedFieldNamesRaw)); +Notes Adaptation::Config::metaHeaders("ICAP header", &protectedFieldNames); bool Adaptation::Config::needHistory = false; Adaptation::ServiceConfig* diff -u -r -N squid-5.0.1/src/adaptation/ecap/Makefile.in squid-5.0.2/src/adaptation/ecap/Makefile.in --- squid-5.0.1/src/adaptation/ecap/Makefile.in 2020-01-20 17:01:32.000000000 +1300 +++ squid-5.0.2/src/adaptation/ecap/Makefile.in 2020-04-20 00:08:51.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -635,6 +635,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/adaptation/icap/Makefile.in squid-5.0.2/src/adaptation/icap/Makefile.in --- squid-5.0.1/src/adaptation/icap/Makefile.in 2020-01-20 17:01:32.000000000 +1300 +++ squid-5.0.2/src/adaptation/icap/Makefile.in 2020-04-20 00:08:51.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -631,6 +631,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/adaptation/Makefile.in squid-5.0.2/src/adaptation/Makefile.in --- squid-5.0.1/src/adaptation/Makefile.in 2020-01-20 17:01:32.000000000 +1300 +++ squid-5.0.2/src/adaptation/Makefile.in 2020-04-20 00:08:51.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -678,6 +678,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/anyp/Makefile.in squid-5.0.2/src/anyp/Makefile.in --- squid-5.0.1/src/anyp/Makefile.in 2020-01-20 17:01:32.000000000 +1300 +++ squid-5.0.2/src/anyp/Makefile.in 2020-04-20 00:08:51.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -626,6 +626,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/anyp/PortCfg.cc squid-5.0.2/src/anyp/PortCfg.cc --- squid-5.0.1/src/anyp/PortCfg.cc 2020-01-20 17:01:23.000000000 +1300 +++ squid-5.0.2/src/anyp/PortCfg.cc 2020-04-19 22:50:48.000000000 +1200 @@ -39,6 +39,7 @@ ftp_track_dirs(false), vport(0), disable_pmtu_discovery(0), + workerQueues(false), listenConn() { memset(&tcp_keepalive, 0, sizeof(tcp_keepalive)); @@ -71,6 +72,7 @@ b->vhost = vhost; b->vport = vport; b->connection_auth_disabled = connection_auth_disabled; + b->workerQueues = workerQueues; b->ftp_track_dirs = ftp_track_dirs; b->disable_pmtu_discovery = disable_pmtu_discovery; b->tcp_keepalive = tcp_keepalive; diff -u -r -N squid-5.0.1/src/anyp/PortCfg.h squid-5.0.2/src/anyp/PortCfg.h --- squid-5.0.1/src/anyp/PortCfg.h 2020-01-20 17:01:23.000000000 +1300 +++ squid-5.0.2/src/anyp/PortCfg.h 2020-04-19 22:50:48.000000000 +1200 @@ -51,6 +51,7 @@ int vport; ///< virtual port support. -1 if dynamic, >0 static int disable_pmtu_discovery; + bool workerQueues; ///< whether listening queues should be worker-specific struct { unsigned int idle; diff -u -r -N squid-5.0.1/src/auth/basic/DB/basic_db_auth.8 squid-5.0.2/src/auth/basic/DB/basic_db_auth.8 --- squid-5.0.1/src/auth/basic/DB/basic_db_auth.8 2020-01-20 17:13:32.000000000 +1300 +++ squid-5.0.2/src/auth/basic/DB/basic_db_auth.8 2020-04-20 00:20:16.000000000 +1200 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BASIC_DB_AUTH 8" -.TH BASIC_DB_AUTH 8 "2020-01-20" "perl v5.28.1" "User Contributed Perl Documentation" +.TH BASIC_DB_AUTH 8 "2020-04-19" "perl v5.28.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff -u -r -N squid-5.0.1/src/auth/basic/DB/Makefile.in squid-5.0.2/src/auth/basic/DB/Makefile.in --- squid-5.0.1/src/auth/basic/DB/Makefile.in 2020-01-20 17:01:32.000000000 +1300 +++ squid-5.0.2/src/auth/basic/DB/Makefile.in 2020-04-20 00:08:51.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -562,6 +562,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/auth/basic/fake/Makefile.in squid-5.0.2/src/auth/basic/fake/Makefile.in --- squid-5.0.1/src/auth/basic/fake/Makefile.in 2020-01-20 17:01:33.000000000 +1300 +++ squid-5.0.2/src/auth/basic/fake/Makefile.in 2020-04-20 00:08:52.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -609,6 +609,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/auth/basic/getpwnam/Makefile.in squid-5.0.2/src/auth/basic/getpwnam/Makefile.in --- squid-5.0.1/src/auth/basic/getpwnam/Makefile.in 2020-01-20 17:01:33.000000000 +1300 +++ squid-5.0.2/src/auth/basic/getpwnam/Makefile.in 2020-04-20 00:08:52.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -615,6 +615,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/auth/basic/LDAP/Makefile.in squid-5.0.2/src/auth/basic/LDAP/Makefile.in --- squid-5.0.1/src/auth/basic/LDAP/Makefile.in 2020-01-20 17:01:32.000000000 +1300 +++ squid-5.0.2/src/auth/basic/LDAP/Makefile.in 2020-04-20 00:08:51.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -615,6 +615,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/auth/basic/Makefile.in squid-5.0.2/src/auth/basic/Makefile.in --- squid-5.0.1/src/auth/basic/Makefile.in 2020-01-20 17:01:32.000000000 +1300 +++ squid-5.0.2/src/auth/basic/Makefile.in 2020-04-20 00:08:51.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -665,6 +665,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/auth/basic/NCSA/Makefile.in squid-5.0.2/src/auth/basic/NCSA/Makefile.in --- squid-5.0.1/src/auth/basic/NCSA/Makefile.in 2020-01-20 17:01:33.000000000 +1300 +++ squid-5.0.2/src/auth/basic/NCSA/Makefile.in 2020-04-20 00:08:51.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -637,6 +637,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/auth/basic/NIS/Makefile.in squid-5.0.2/src/auth/basic/NIS/Makefile.in --- squid-5.0.1/src/auth/basic/NIS/Makefile.in 2020-01-20 17:01:33.000000000 +1300 +++ squid-5.0.2/src/auth/basic/NIS/Makefile.in 2020-04-20 00:08:51.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -632,6 +632,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/auth/basic/PAM/Makefile.in squid-5.0.2/src/auth/basic/PAM/Makefile.in --- squid-5.0.1/src/auth/basic/PAM/Makefile.in 2020-01-20 17:01:33.000000000 +1300 +++ squid-5.0.2/src/auth/basic/PAM/Makefile.in 2020-04-20 00:08:51.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -614,6 +614,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/auth/basic/POP3/basic_pop3_auth.8 squid-5.0.2/src/auth/basic/POP3/basic_pop3_auth.8 --- squid-5.0.1/src/auth/basic/POP3/basic_pop3_auth.8 2020-01-20 17:13:32.000000000 +1300 +++ squid-5.0.2/src/auth/basic/POP3/basic_pop3_auth.8 2020-04-20 00:20:17.000000000 +1200 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BASIC_POP3_AUTH 8" -.TH BASIC_POP3_AUTH 8 "2020-01-20" "perl v5.28.1" "User Contributed Perl Documentation" +.TH BASIC_POP3_AUTH 8 "2020-04-19" "perl v5.28.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff -u -r -N squid-5.0.1/src/auth/basic/POP3/Makefile.in squid-5.0.2/src/auth/basic/POP3/Makefile.in --- squid-5.0.1/src/auth/basic/POP3/Makefile.in 2020-01-20 17:01:33.000000000 +1300 +++ squid-5.0.2/src/auth/basic/POP3/Makefile.in 2020-04-20 00:08:51.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -562,6 +562,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/auth/basic/RADIUS/Makefile.in squid-5.0.2/src/auth/basic/RADIUS/Makefile.in --- squid-5.0.1/src/auth/basic/RADIUS/Makefile.in 2020-01-20 17:01:33.000000000 +1300 +++ squid-5.0.2/src/auth/basic/RADIUS/Makefile.in 2020-04-20 00:08:51.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -637,6 +637,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/auth/basic/SASL/Makefile.in squid-5.0.2/src/auth/basic/SASL/Makefile.in --- squid-5.0.1/src/auth/basic/SASL/Makefile.in 2020-01-20 17:01:33.000000000 +1300 +++ squid-5.0.2/src/auth/basic/SASL/Makefile.in 2020-04-20 00:08:51.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -615,6 +615,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/auth/basic/SMB/Makefile.in squid-5.0.2/src/auth/basic/SMB/Makefile.in --- squid-5.0.1/src/auth/basic/SMB/Makefile.in 2020-01-20 17:01:33.000000000 +1300 +++ squid-5.0.2/src/auth/basic/SMB/Makefile.in 2020-04-20 00:08:52.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -619,6 +619,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/auth/basic/SMB_LM/Makefile.in squid-5.0.2/src/auth/basic/SMB_LM/Makefile.in --- squid-5.0.1/src/auth/basic/SMB_LM/Makefile.in 2020-01-20 17:01:33.000000000 +1300 +++ squid-5.0.2/src/auth/basic/SMB_LM/Makefile.in 2020-04-20 00:08:52.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -632,6 +632,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/auth/basic/SSPI/Makefile.in squid-5.0.2/src/auth/basic/SSPI/Makefile.in --- squid-5.0.1/src/auth/basic/SSPI/Makefile.in 2020-01-20 17:01:33.000000000 +1300 +++ squid-5.0.2/src/auth/basic/SSPI/Makefile.in 2020-04-20 00:08:52.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -641,6 +641,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/auth/digest/Config.cc squid-5.0.2/src/auth/digest/Config.cc --- squid-5.0.1/src/auth/digest/Config.cc 2020-01-20 17:01:23.000000000 +1300 +++ squid-5.0.2/src/auth/digest/Config.cc 2020-04-19 22:50:48.000000000 +1200 @@ -96,9 +96,6 @@ static void authenticateDigestNonceSetup(void); static void authDigestNonceEncode(digest_nonce_h * nonce); static void authDigestNonceLink(digest_nonce_h * nonce); -#if NOT_USED -static int authDigestNonceLinks(digest_nonce_h * nonce); -#endif static void authDigestNonceUserUnlink(digest_nonce_h * nonce); static void @@ -157,10 +154,10 @@ * really bad timing with expiry and creation). Using a random * component in the nonce allows us to loop to find a unique nonce. * We use H(nonce_data) so the nonce is meaningless to the reciever. - * So our nonce looks like hex(H(timestamp,pointertohash,randomdata)) + * So our nonce looks like hex(H(timestamp,randomdata)) * And even if our randomness is not very random we don't really care - * - the timestamp and memory pointer also guarantee local uniqueness - * in the input to the hash function. + * - the timestamp also guarantees local uniqueness in the input to + * the hash function. */ // NP: this will likely produce the same randomness sequences for each worker // since they should all start within the 1-second resolution of seed value. @@ -170,7 +167,6 @@ /* create a new nonce */ newnonce->nc = 0; newnonce->flags.valid = true; - newnonce->noncedata.self = newnonce; newnonce->noncedata.creationtime = current_time.tv_sec; newnonce->noncedata.randomdata = newRandomData(mt); @@ -292,21 +288,10 @@ { assert(nonce != NULL); ++nonce->references; + assert(nonce->references != 0); // no overflows debugs(29, 9, "nonce '" << nonce << "' now at '" << nonce->references << "'."); } -#if NOT_USED -static int -authDigestNonceLinks(digest_nonce_h * nonce) -{ - if (!nonce) - return -1; - - return nonce->references; -} - -#endif - void authDigestNonceUnlink(digest_nonce_h * nonce) { diff -u -r -N squid-5.0.1/src/auth/digest/Config.h squid-5.0.2/src/auth/digest/Config.h --- squid-5.0.1/src/auth/digest/Config.h 2020-01-20 17:01:23.000000000 +1300 +++ squid-5.0.2/src/auth/digest/Config.h 2020-04-19 22:50:48.000000000 +1200 @@ -32,8 +32,6 @@ /* data to be encoded into the nonce's hex representation */ struct _digest_nonce_data { time_t creationtime; - /* in memory address of the nonce struct (similar purpose to an ETag) */ - digest_nonce_h *self; uint32_t randomdata; }; @@ -44,7 +42,7 @@ /* number of uses we've seen of this nonce */ unsigned long nc; /* reference count */ - short references; + uint64_t references; /* the auth_user this nonce has been tied to */ Auth::Digest::User *user; /* has this nonce been invalidated ? */ diff -u -r -N squid-5.0.1/src/auth/digest/eDirectory/Makefile.in squid-5.0.2/src/auth/digest/eDirectory/Makefile.in --- squid-5.0.1/src/auth/digest/eDirectory/Makefile.in 2020-01-20 17:01:33.000000000 +1300 +++ squid-5.0.2/src/auth/digest/eDirectory/Makefile.in 2020-04-20 00:08:52.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -634,6 +634,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/auth/digest/file/Makefile.in squid-5.0.2/src/auth/digest/file/Makefile.in --- squid-5.0.1/src/auth/digest/file/Makefile.in 2020-01-20 17:01:33.000000000 +1300 +++ squid-5.0.2/src/auth/digest/file/Makefile.in 2020-04-20 00:08:52.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -637,6 +637,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/auth/digest/LDAP/Makefile.in squid-5.0.2/src/auth/digest/LDAP/Makefile.in --- squid-5.0.1/src/auth/digest/LDAP/Makefile.in 2020-01-20 17:01:33.000000000 +1300 +++ squid-5.0.2/src/auth/digest/LDAP/Makefile.in 2020-04-20 00:08:52.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -634,6 +634,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/auth/digest/Makefile.in squid-5.0.2/src/auth/digest/Makefile.in --- squid-5.0.1/src/auth/digest/Makefile.in 2020-01-20 17:01:33.000000000 +1300 +++ squid-5.0.2/src/auth/digest/Makefile.in 2020-04-20 00:08:52.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -665,6 +665,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/auth/Makefile.in squid-5.0.2/src/auth/Makefile.in --- squid-5.0.1/src/auth/Makefile.in 2020-01-20 17:01:32.000000000 +1300 +++ squid-5.0.2/src/auth/Makefile.in 2020-04-20 00:08:51.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -676,6 +676,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/auth/negotiate/kerberos/Makefile.in squid-5.0.2/src/auth/negotiate/kerberos/Makefile.in --- squid-5.0.1/src/auth/negotiate/kerberos/Makefile.in 2020-01-20 17:01:33.000000000 +1300 +++ squid-5.0.2/src/auth/negotiate/kerberos/Makefile.in 2020-04-20 00:08:52.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -659,6 +659,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/auth/negotiate/Makefile.in squid-5.0.2/src/auth/negotiate/Makefile.in --- squid-5.0.1/src/auth/negotiate/Makefile.in 2020-01-20 17:01:33.000000000 +1300 +++ squid-5.0.2/src/auth/negotiate/Makefile.in 2020-04-20 00:08:52.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -666,6 +666,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/auth/negotiate/SSPI/Makefile.in squid-5.0.2/src/auth/negotiate/SSPI/Makefile.in --- squid-5.0.1/src/auth/negotiate/SSPI/Makefile.in 2020-01-20 17:01:33.000000000 +1300 +++ squid-5.0.2/src/auth/negotiate/SSPI/Makefile.in 2020-04-20 00:08:52.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -615,6 +615,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/auth/negotiate/wrapper/Makefile.in squid-5.0.2/src/auth/negotiate/wrapper/Makefile.in --- squid-5.0.1/src/auth/negotiate/wrapper/Makefile.in 2020-01-20 17:01:33.000000000 +1300 +++ squid-5.0.2/src/auth/negotiate/wrapper/Makefile.in 2020-04-20 00:08:52.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -612,6 +612,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/auth/ntlm/fake/Makefile.in squid-5.0.2/src/auth/ntlm/fake/Makefile.in --- squid-5.0.1/src/auth/ntlm/fake/Makefile.in 2020-01-20 17:01:33.000000000 +1300 +++ squid-5.0.2/src/auth/ntlm/fake/Makefile.in 2020-04-20 00:08:52.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -614,6 +614,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/auth/ntlm/Makefile.in squid-5.0.2/src/auth/ntlm/Makefile.in --- squid-5.0.1/src/auth/ntlm/Makefile.in 2020-01-20 17:01:33.000000000 +1300 +++ squid-5.0.2/src/auth/ntlm/Makefile.in 2020-04-20 00:08:52.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -665,6 +665,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/auth/ntlm/SMB_LM/Makefile.in squid-5.0.2/src/auth/ntlm/SMB_LM/Makefile.in --- squid-5.0.1/src/auth/ntlm/SMB_LM/Makefile.in 2020-01-20 17:01:33.000000000 +1300 +++ squid-5.0.2/src/auth/ntlm/SMB_LM/Makefile.in 2020-04-20 00:08:52.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -616,6 +616,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/auth/ntlm/SSPI/Makefile.in squid-5.0.2/src/auth/ntlm/SSPI/Makefile.in --- squid-5.0.1/src/auth/ntlm/SSPI/Makefile.in 2020-01-20 17:01:33.000000000 +1300 +++ squid-5.0.2/src/auth/ntlm/SSPI/Makefile.in 2020-04-20 00:08:52.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -617,6 +617,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/base/Makefile.in squid-5.0.2/src/base/Makefile.in --- squid-5.0.1/src/base/Makefile.in 2020-01-20 17:01:33.000000000 +1300 +++ squid-5.0.2/src/base/Makefile.in 2020-04-20 00:08:52.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -631,6 +631,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/cache_cf.cc squid-5.0.2/src/cache_cf.cc --- squid-5.0.1/src/cache_cf.cc 2020-01-20 17:01:23.000000000 +1300 +++ squid-5.0.2/src/cache_cf.cc 2020-04-19 22:50:48.000000000 +1200 @@ -92,6 +92,7 @@ #if HAVE_GLOB_H #include #endif +#include #include #include #if HAVE_PWD_H @@ -100,6 +101,9 @@ #if HAVE_GRP_H #include #endif +#if HAVE_SYS_SOCKET_H +#include +#endif #if HAVE_SYS_STAT_H #include #endif @@ -134,6 +138,8 @@ static peer_t parseNeighborType(const char *s); +static const char *const T_NANOSECOND_STR = "nanosecond"; +static const char *const T_MICROSECOND_STR = "microsecond"; static const char *const T_MILLISECOND_STR = "millisecond"; static const char *const T_SECOND_STR = "second"; static const char *const T_MINUTE_STR = "minute"; @@ -152,6 +158,9 @@ static const char *const list_sep = ", \t\n\r"; +// std::chrono::years requires C++20. Do our own rough calculation for now. +static const double HoursPerYear = 24*365.2522; + static void parse_access_log(CustomLog ** customlog_definitions); static int check_null_access_log(CustomLog *customlog_definitions); static void dump_access_log(StoreEntry * entry, const char *name, CustomLog * definitions); @@ -160,7 +169,6 @@ static void configDoConfigure(void); static void parse_refreshpattern(RefreshPattern **); -static uint64_t parseTimeUnits(const char *unit, bool allowMsec); static void parse_u_short(unsigned short * var); static void parse_string(char **); static void default_all(void); @@ -536,9 +544,17 @@ /* Handle includes here */ if (tmp_line_len >= 9 && strncmp(tmp_line, "include", 7) == 0 && xisspace(tmp_line[7])) { err_count += parseManyConfigFiles(tmp_line + 8, depth + 1); - } else if (!parse_line(tmp_line)) { - debugs(3, DBG_CRITICAL, HERE << cfg_filename << ":" << config_lineno << " unrecognized: '" << tmp_line << "'"); - ++err_count; + } else { + try { + if (!parse_line(tmp_line)) { + debugs(3, DBG_CRITICAL, ConfigParser::CurrentLocation() << ": unrecognized: '" << tmp_line << "'"); + ++err_count; + } + } catch (...) { + // fatal for now + debugs(3, DBG_CRITICAL, "configuration error: " << CurrentException); + self_destruct(); + } } } @@ -591,13 +607,6 @@ */ configDoConfigure(); - if (!Config.chroot_dir) { - leave_suid(); - setUmask(Config.umask); - _db_init(Debug::cache_log, Debug::debugOptions); - enter_suid(); - } - if (opt_send_signal == -1) { Mgr::RegisterAction("config", "Current Squid Configuration", @@ -1041,88 +1050,133 @@ } } -/* Parse a time specification from the config file. Store the - * result in 'tptr', after converting it to 'units' */ -static time_msec_t -parseTimeLine(const char *units, bool allowMsec, bool expectMoreArguments = false) +template +static const char * +TimeUnitToString() { - time_msec_t u = parseTimeUnits(units, allowMsec); - if (u == 0) { - self_destruct(); - return 0; + const auto minUnit = MinimalUnit(1); + if(minUnit == std::chrono::nanoseconds(1)) + return T_NANOSECOND_STR; + else if (minUnit == std::chrono::microseconds(1)) + return T_MICROSECOND_STR; + else if (minUnit == std::chrono::milliseconds(1)) + return T_MILLISECOND_STR; + else { + assert(minUnit >= std::chrono::seconds(1)); + return T_SECOND_STR; } +} - char *token = ConfigParser::NextToken(); - if (!token) { - self_destruct(); - return 0; - } +/// Assigns 'ns' the number of nanoseconds corresponding to 'unitName'. +/// \param MinimalUnit is a chrono duration type specifying the minimal +/// allowed time unit. +/// \returns true if unitName is correct and its time unit is not less +/// than MinimalUnit. +template +static bool +parseTimeUnit(const char *unitName, std::chrono::nanoseconds &ns) +{ + if (!unitName) + throw TexcHere("missing time unit"); - double d = xatof(token); + if (!strncasecmp(unitName, T_NANOSECOND_STR, strlen(T_NANOSECOND_STR))) + ns = std::chrono::nanoseconds(1); + else if (!strncasecmp(unitName, T_MICROSECOND_STR, strlen(T_MICROSECOND_STR))) + ns = std::chrono::microseconds(1); + else if (!strncasecmp(unitName, T_MILLISECOND_STR, strlen(T_MILLISECOND_STR))) + ns = std::chrono::milliseconds(1); + else if (!strncasecmp(unitName, T_SECOND_STR, strlen(T_SECOND_STR))) + ns = std::chrono::seconds(1); + else if (!strncasecmp(unitName, T_MINUTE_STR, strlen(T_MINUTE_STR))) + ns = std::chrono::minutes(1); + else if (!strncasecmp(unitName, T_HOUR_STR, strlen(T_HOUR_STR))) + ns = std::chrono::hours(1); + else if (!strncasecmp(unitName, T_DAY_STR, strlen(T_DAY_STR))) + ns = std::chrono::hours(24); + else if (!strncasecmp(unitName, T_WEEK_STR, strlen(T_WEEK_STR))) + ns = std::chrono::hours(24 * 7); + else if (!strncasecmp(unitName, T_FORTNIGHT_STR, strlen(T_FORTNIGHT_STR))) + ns = std::chrono::hours(24 * 14); + else if (!strncasecmp(unitName, T_MONTH_STR, strlen(T_MONTH_STR))) + ns = std::chrono::hours(24 * 30); + else if (!strncasecmp(unitName, T_YEAR_STR, strlen(T_YEAR_STR))) + ns = std::chrono::hours(static_cast(HoursPerYear)); + else if (!strncasecmp(unitName, T_DECADE_STR, strlen(T_DECADE_STR))) + ns = std::chrono::hours(static_cast(HoursPerYear * 10)); + else + return false; - time_msec_t m = u; /* default to 'units' if none specified */ + if (ns < MinimalUnit(1)) { + throw TexcHere(ToSBuf("time unit '", unitName, "' is too small to be used in this context, the minimal unit is ", + TimeUnitToString())); + } - if (d) { - if ((token = ConfigParser::PeekAtToken()) && (m = parseTimeUnits(token, allowMsec))) { - (void)ConfigParser::NextToken(); + return true; +} - } else if (!expectMoreArguments) { - self_destruct(); - return 0; +static std::chrono::nanoseconds +ToNanoSeconds(const double value, const std::chrono::nanoseconds &unit) +{ + if (value < 0.0) + throw TexcHere("time must have a positive value"); - } else { - token = NULL; // show default units if dying below - debugs(3, DBG_CRITICAL, "WARNING: No units on '" << config_input_line << "', assuming " << d << " " << units); - } - } else - token = NULL; // show default units if dying below. + if (value > (static_cast(std::chrono::nanoseconds::max().count()) / unit.count())) { + const auto maxYears = std::chrono::duration_cast(std::chrono::nanoseconds::max()).count()/HoursPerYear; + throw TexcHere(ToSBuf("time values cannot exceed ", maxYears, " years")); + } - const auto result = static_cast(m * d); + return std::chrono::duration_cast(unit * value); +} - if (static_cast(result) * 2 != m * d * 2) { - debugs(3, DBG_CRITICAL, "FATAL: Invalid value '" << - d << " " << (token ? token : units) << ": integer overflow (time_msec_t)."); - self_destruct(); +template +static TimeUnit +FromNanoseconds(const std::chrono::nanoseconds &ns, const double parsedValue) +{ + const auto result = std::chrono::duration_cast(ns); + if (!result.count()) { + throw TexcHere(ToSBuf("time value '", parsedValue, + "' is too small to be used in this context, the minimal value is 1 ", + TimeUnitToString())); } return result; } -static uint64_t -parseTimeUnits(const char *unit, bool allowMsec) +/// Parses a time specification from the config file and +/// returns the time as a chrono duration object of 'TimeUnit' type. +template +static TimeUnit +parseTimeLine() { - if (allowMsec && !strncasecmp(unit, T_MILLISECOND_STR, strlen(T_MILLISECOND_STR))) - return 1; - - if (!strncasecmp(unit, T_SECOND_STR, strlen(T_SECOND_STR))) - return 1000; + const auto valueToken = ConfigParser::NextToken(); + if (!valueToken) + throw TexcHere("cannot read a time value"); - if (!strncasecmp(unit, T_MINUTE_STR, strlen(T_MINUTE_STR))) - return 60 * 1000; + const auto parsedValue = xatof(valueToken); - if (!strncasecmp(unit, T_HOUR_STR, strlen(T_HOUR_STR))) - return 3600 * 1000; + if (parsedValue == 0) + return TimeUnit::zero(); - if (!strncasecmp(unit, T_DAY_STR, strlen(T_DAY_STR))) - return 86400 * 1000; + std::chrono::nanoseconds parsedUnitDuration; - if (!strncasecmp(unit, T_WEEK_STR, strlen(T_WEEK_STR))) - return 86400 * 7 * 1000; + const auto token = ConfigParser::PeekAtToken(); - if (!strncasecmp(unit, T_FORTNIGHT_STR, strlen(T_FORTNIGHT_STR))) - return 86400 * 14 * 1000; + if (!parseTimeUnit(token, parsedUnitDuration)) + throw TexcHere(ToSBuf("unknown time unit '", token, "'")); - if (!strncasecmp(unit, T_MONTH_STR, strlen(T_MONTH_STR))) - return static_cast(86400) * 30 * 1000; + (void)ConfigParser::NextToken(); - if (!strncasecmp(unit, T_YEAR_STR, strlen(T_YEAR_STR))) - return static_cast(86400 * 1000 * 365.2522); + const auto nanoseconds = ToNanoSeconds(parsedValue, parsedUnitDuration); - if (!strncasecmp(unit, T_DECADE_STR, strlen(T_DECADE_STR))) - return static_cast(86400 * 1000 * 365.2522 * 10); - - debugs(3, DBG_IMPORTANT, "parseTimeUnits: unknown time unit '" << unit << "'"); + // validate precisions (time-units-small only) + if (TimeUnit(1) <= std::chrono::microseconds(1)) { + if (0 < nanoseconds.count() && nanoseconds.count() < 3) { + debugs(3, DBG_PARSE_NOTE(DBG_IMPORTANT), ConfigParser::CurrentLocation() << ": WARNING: " << + "Squid time measurement precision is likely to be far worse than " << + "the nanosecond-level precision implied by the configured value: " << parsedValue << ' ' << token); + } + } - return 0; + return FromNanoseconds(nanoseconds, parsedValue); } static void @@ -2980,8 +3034,11 @@ void parse_time_t(time_t * var) { - time_msec_t tval = parseTimeLine(T_SECOND_STR, false); - *var = static_cast(tval/1000); + const auto maxTime = std::numeric_limits::max(); + const auto seconds = parseTimeLine(); + if (maxTime < seconds.count()) + throw TexcHere(ToSBuf("directive supports time values up to ", maxTime, " but is given ", seconds.count(), " seconds")); + *var = static_cast(seconds.count()); } static void @@ -3002,7 +3059,7 @@ void parse_time_msec(time_msec_t * var) { - *var = parseTimeLine(T_SECOND_STR, true); + *var = parseTimeLine().count(); } static void @@ -3012,6 +3069,28 @@ } #if UNUSED_CODE +// TODO: add a parameter with 'time_nanoseconds' TYPE and uncomment +static void +dump_time_nanoseconds(StoreEntry *entry, const char *name, const std::chrono::nanoseconds &var) +{ + // std::chrono::nanoseconds::rep is unknown a priori so we cast to (and print) the largest supported integer + storeAppendPrintf(entry, "%s %jd nanoseconds\n", name, static_cast(var.count())); +} + +static void +parse_time_nanoseconds(std::chrono::nanoseconds *var) +{ + *var = parseTimeLine(); +} + +static void +free_time_nanoseconds(std::chrono::nanoseconds *var) +{ + *var = std::chrono::nanoseconds::zero(); +} +#endif + +#if UNUSED_CODE static void dump_size_t(StoreEntry * entry, const char *name, size_t var) { @@ -3740,6 +3819,14 @@ s->secure.parse(token+4); } else if (strcmp(token, "ftp-track-dirs") == 0) { s->ftp_track_dirs = true; + } else if (strcmp(token, "worker-queues") == 0) { +#if !defined(SO_REUSEADDR) +#error missing system #include that #defines SO_* constants +#endif +#if !defined(SO_REUSEPORT) + throw TexcHere(ToSBuf(cfg_directive, ' ', token, " option requires building Squid where SO_REUSEPORT is supported by the TCP stack")); +#endif + s->workerQueues = true; } else { debugs(3, DBG_CRITICAL, "FATAL: Unknown " << cfg_directive << " option '" << token << "'."); self_destruct(); @@ -4408,8 +4495,6 @@ static void parse_icap_service_failure_limit(Adaptation::Icap::Config *cfg) { char *token; - time_t d; - time_t m; cfg->service_failure_limit = GetInteger(); if ((token = ConfigParser::NextToken()) == NULL) @@ -4421,27 +4506,7 @@ return; } - if ((token = ConfigParser::NextToken()) == NULL) { - self_destruct(); - return; - } - - d = static_cast (xatoi(token)); - - m = static_cast (1); - - if (0 == d) - (void) 0; - else if ((token = ConfigParser::NextToken()) == NULL) { - debugs(3, DBG_CRITICAL, "No time-units on '" << config_input_line << "'"); - self_destruct(); - return; - } else if ((m = parseTimeUnits(token, false)) == 0) { - self_destruct(); - return; - } - - cfg->oldest_service_failure = (m * d); + parse_time_t(&cfg->oldest_service_failure); } static void dump_icap_service_failure_limit(StoreEntry *entry, const char *name, const Adaptation::Icap::Config &cfg) @@ -4873,11 +4938,45 @@ FtpEspvDeprecated = false; } +/// Like parseTimeLine() but does not require the timeunit to be specified. +/// If missed, the default 'second' timeunit is assumed. +static std::chrono::seconds +ParseUrlRewriteTimeout() +{ + const auto timeValueToken = ConfigParser::NextToken(); + if (!timeValueToken) + throw TexcHere("cannot read a time value"); + + using Seconds = std::chrono::seconds; + + const auto parsedTimeValue = xatof(timeValueToken); + + if (parsedTimeValue == 0) + return std::chrono::seconds::zero(); + + std::chrono::nanoseconds parsedUnitDuration; + + const auto unitToken = ConfigParser::PeekAtToken(); + if (parseTimeUnit(unitToken, parsedUnitDuration)) + (void)ConfigParser::NextToken(); + else { + const auto defaultParsed = parseTimeUnit(T_SECOND_STR, parsedUnitDuration); + assert(defaultParsed); + debugs(3, DBG_PARSE_NOTE(DBG_IMPORTANT), ConfigParser::CurrentLocation() << + ": WARNING: missing time unit, using deprecated default '" << T_SECOND_STR << "'"); + } + + const auto nanoseconds = ToNanoSeconds(parsedTimeValue, parsedUnitDuration); + + return FromNanoseconds(nanoseconds, parsedTimeValue); +} + static void parse_UrlHelperTimeout(SquidConfig::UrlHelperTimeout *config) { - const auto tval = parseTimeLine(T_SECOND_STR, false, true); - Config.Timeout.urlRewrite = static_cast(tval/1000); + // TODO: do not allow optional timeunit (as the documentation prescribes) + // and use parseTimeLine() instead. + Config.Timeout.urlRewrite = ParseUrlRewriteTimeout().count(); char *key, *value; while(ConfigParser::NextKvPair(key, value)) { diff -u -r -N squid-5.0.1/src/cf.data.pre squid-5.0.2/src/cf.data.pre --- squid-5.0.1/src/cf.data.pre 2020-01-20 17:01:23.000000000 +1300 +++ squid-5.0.2/src/cf.data.pre 2020-04-19 22:50:48.000000000 +1200 @@ -55,6 +55,24 @@ MB - Megabyte GB - Gigabyte + Values with time units + + Time-related directives marked with either "time-units" or + "time-units-small" accept a time unit. The supported time units are: + + nanosecond (time-units-small only) + microsecond (time-units-small only) + millisecond + second + minute + hour + day + week + fortnight + month - 30 days + year - 31557790080 milliseconds (just over 365 days) + decade + Values with spaces, quotes, and other special characters Squid supports directive parameters with spaces, quotes, and other @@ -2428,6 +2446,16 @@ The proxy_protocol_access is required to whitelist downstream proxies which can be trusted. + worker-queues + Ask TCP stack to maintain a dedicated listening queue + for each worker accepting requests at this port. + Requires TCP stack that supports the SO_REUSEPORT socket + option. + + SECURITY WARNING: Enabling worker-specific queues + allows any process running as Squid's effective user to + easily accept requests destined to this port. + If you run Squid on a dual-homed machine with an internal and an external interface we recommend you to specify the internal address:port in http_port. This way Squid will only be @@ -7943,7 +7971,7 @@ DEFAULT_DOC: Address selected by the operating system. IFDEF: USE_WCCP DOC_START - Use this option if you require WCCPv2 to use a specific + Use this option if you require WCCP(v1) to use a specific interface address. The default behavior is to not bind to any specific address. @@ -7956,7 +7984,7 @@ DEFAULT_DOC: Address selected by the operating system. IFDEF: USE_WCCPv2 DOC_START - Use this option if you require WCCP to use a specific + Use this option if you require WCCPv2 to use a specific interface address. The default behavior is to not bind to any specific address. diff -u -r -N squid-5.0.1/src/clients/FtpGateway.cc squid-5.0.2/src/clients/FtpGateway.cc --- squid-5.0.1/src/clients/FtpGateway.cc 2020-01-20 17:01:23.000000000 +1300 +++ squid-5.0.2/src/clients/FtpGateway.cc 2020-04-19 22:50:48.000000000 +1200 @@ -563,8 +563,6 @@ n_tokens = 0; - memset(tokens, 0, sizeof(tokens)); - xbuf = xstrdup(buf); if (flags.tried_nlst) { diff -u -r -N squid-5.0.1/src/clients/HttpTunneler.cc squid-5.0.2/src/clients/HttpTunneler.cc --- squid-5.0.1/src/clients/HttpTunneler.cc 2020-01-20 17:01:23.000000000 +1300 +++ squid-5.0.2/src/clients/HttpTunneler.cc 2020-04-19 22:50:48.000000000 +1200 @@ -206,6 +206,7 @@ #else rd.size = readBuf.spaceSize(); #endif + // XXX: defer read if rd.size <= 0 switch (Comm::ReadNow(rd, readBuf)) { case Comm::INPROGRESS: diff -u -r -N squid-5.0.1/src/clients/Makefile.in squid-5.0.2/src/clients/Makefile.in --- squid-5.0.1/src/clients/Makefile.in 2020-01-20 17:01:33.000000000 +1300 +++ squid-5.0.2/src/clients/Makefile.in 2020-04-20 00:08:52.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -628,6 +628,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/client_side.cc squid-5.0.2/src/client_side.cc --- squid-5.0.1/src/client_side.cc 2020-01-20 17:01:23.000000000 +1300 +++ squid-5.0.2/src/client_side.cc 2020-04-19 22:50:48.000000000 +1200 @@ -139,6 +139,10 @@ #include #include +#if HAVE_SYSTEMD_SD_DAEMON_H +#include +#endif + #if LINGERING_CLOSE #define comm_close comm_lingering_close #endif @@ -3402,7 +3406,8 @@ s->listenConn->local = s->s; s->listenConn->flags = COMM_NONBLOCKING | (s->flags.tproxyIntercept ? COMM_TRANSPARENT : 0) | - (s->flags.natIntercept ? COMM_INTERCEPTION : 0); + (s->flags.natIntercept ? COMM_INTERCEPTION : 0) | + (s->workerQueues ? COMM_REUSEPORT : 0); typedef CommCbFunPtrCallT AcceptCall; if (s->transport.protocol == AnyP::PROTO_HTTP) { @@ -3478,6 +3483,20 @@ << s->listenConn); Must(AddOpenedHttpSocket(s->listenConn)); // otherwise, we have received a fd we did not ask for + +#if USE_SYSTEMD + // When the very first port opens, tell systemd we are able to serve connections. + // Subsequent sd_notify() calls, including calls during reconfiguration, + // do nothing because the first call parameter is 1. + // XXX: Send the notification only after opening all configured ports. + if (opt_foreground || opt_no_daemon) { + const auto result = sd_notify(1, "READY=1"); + if (result < 0) { + debugs(1, DBG_IMPORTANT, "WARNING: failed to send start-up notification to systemd" << + Debug::Extra << "sd_notify() error: " << xstrerr(-result)); + } + } +#endif } void diff -u -r -N squid-5.0.1/src/client_side_reply.cc squid-5.0.2/src/client_side_reply.cc --- squid-5.0.1/src/client_side_reply.cc 2020-01-20 17:01:23.000000000 +1300 +++ squid-5.0.2/src/client_side_reply.cc 2020-04-19 22:50:48.000000000 +1200 @@ -1048,8 +1048,6 @@ clientReplyContext::purgeDoPurgeGet(StoreEntry *newEntry) { if (newEntry) { - /* Move to new() when that is created */ - purgeStatus = Http::scNotFound; /* Release the cached URI */ debugs(88, 4, "clientPurgeRequest: GET '" << newEntry->url() << "'" ); #if USE_HTCP @@ -1103,6 +1101,9 @@ } } + if (purgeStatus == Http::scNone) + purgeStatus = Http::scNotFound; + /* * Make a new entry to hold the reply to be written * to the client. diff -u -r -N squid-5.0.1/src/comm/Connection.h squid-5.0.2/src/comm/Connection.h --- squid-5.0.1/src/comm/Connection.h 2020-01-20 17:01:23.000000000 +1300 +++ squid-5.0.2/src/comm/Connection.h 2020-04-19 22:50:48.000000000 +1200 @@ -49,6 +49,7 @@ #define COMM_DOBIND 0x08 // requires a bind() #define COMM_TRANSPARENT 0x10 // arrived via TPROXY #define COMM_INTERCEPTION 0x20 // arrived via NAT +#define COMM_REUSEPORT 0x40 //< needs SO_REUSEPORT /** * Store data about the physical and logical attributes of a connection. diff -u -r -N squid-5.0.1/src/comm/Makefile.in squid-5.0.2/src/comm/Makefile.in --- squid-5.0.1/src/comm/Makefile.in 2020-01-20 17:01:33.000000000 +1300 +++ squid-5.0.2/src/comm/Makefile.in 2020-04-20 00:08:52.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -633,6 +633,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/comm.cc squid-5.0.2/src/comm.cc --- squid-5.0.1/src/comm.cc 2020-01-20 17:01:23.000000000 +1300 +++ squid-5.0.2/src/comm.cc 2020-04-19 22:50:48.000000000 +1200 @@ -32,6 +32,7 @@ #include "pconn.h" #include "profiler/Profiler.h" #include "sbuf/SBuf.h" +#include "sbuf/Stream.h" #include "SquidConfig.h" #include "StatCounters.h" #include "StoreIOBuffer.h" @@ -471,6 +472,20 @@ if ( addr.isNoAddr() ) debugs(5,0,"CRITICAL: Squid is attempting to bind() port " << addr << "!!"); +#if defined(SO_REUSEPORT) + if (flags & COMM_REUSEPORT) { + int on = 1; + if (setsockopt(new_socket, SOL_SOCKET, SO_REUSEPORT, reinterpret_cast(&on), sizeof(on)) < 0) { + const auto savedErrno = errno; + const auto errorMessage = ToSBuf("cannot enable SO_REUSEPORT socket option when binding to ", + addr, ": ", xstrerr(savedErrno)); + if (reconfiguring) + debugs(5, DBG_IMPORTANT, "ERROR: " << errorMessage); + else + throw TexcHere(errorMessage); + } + } +#endif if (commBind(new_socket, *AI) != Comm::OK) { comm_close(new_socket); return -1; @@ -1217,7 +1232,7 @@ void comm_init(void) { - fd_table =(fde *) xcalloc(Squid_MaxFD, sizeof(fde)); + assert(fd_table); /* make sure the accept() socket FIFO delay queue exists */ Comm::AcceptLimiter::Instance(); @@ -1243,7 +1258,6 @@ delete TheHalfClosed; TheHalfClosed = NULL; - safe_free(fd_table); Comm::CallbackTableDestruct(); } diff -u -r -N squid-5.0.1/src/debug.cc squid-5.0.2/src/debug.cc --- squid-5.0.1/src/debug.cc 2020-01-20 17:01:23.000000000 +1300 +++ squid-5.0.2/src/debug.cc 2020-04-19 22:50:48.000000000 +1200 @@ -10,6 +10,7 @@ #include "squid.h" #include "Debug.h" +#include "fd.h" #include "ipc/Kids.h" #include "SquidTime.h" #include "util.h" @@ -96,10 +97,15 @@ // callers must use nullptr instead of the used-as-the-last-resort stderr assert(newFile != stderr || !stderr); - if (file_) + if (file_) { + fd_close(fileno(file_)); fclose(file_); + } file_ = newFile; // may be nil + if (file_) + fd_open(fileno(file_), FD_LOG, Debug::cache_log); + xfree(name); name = newName ? xstrdup(newName) : nullptr; diff -u -r -N squid-5.0.1/src/DiskIO/AIO/Makefile.in squid-5.0.2/src/DiskIO/AIO/Makefile.in --- squid-5.0.1/src/DiskIO/AIO/Makefile.in 2020-01-20 17:01:31.000000000 +1300 +++ squid-5.0.2/src/DiskIO/AIO/Makefile.in 2020-04-20 00:08:50.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -635,6 +635,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/DiskIO/Blocking/Makefile.in squid-5.0.2/src/DiskIO/Blocking/Makefile.in --- squid-5.0.1/src/DiskIO/Blocking/Makefile.in 2020-01-20 17:01:31.000000000 +1300 +++ squid-5.0.2/src/DiskIO/Blocking/Makefile.in 2020-04-20 00:08:50.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -627,6 +627,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/DiskIO/DiskDaemon/Makefile.in squid-5.0.2/src/DiskIO/DiskDaemon/Makefile.in --- squid-5.0.1/src/DiskIO/DiskDaemon/Makefile.in 2020-01-20 17:01:31.000000000 +1300 +++ squid-5.0.2/src/DiskIO/DiskDaemon/Makefile.in 2020-04-20 00:08:50.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -644,6 +644,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/DiskIO/DiskThreads/Makefile.in squid-5.0.2/src/DiskIO/DiskThreads/Makefile.in --- squid-5.0.1/src/DiskIO/DiskThreads/Makefile.in 2020-01-20 17:01:31.000000000 +1300 +++ squid-5.0.2/src/DiskIO/DiskThreads/Makefile.in 2020-04-20 00:08:50.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -639,6 +639,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/DiskIO/IpcIo/Makefile.in squid-5.0.2/src/DiskIO/IpcIo/Makefile.in --- squid-5.0.1/src/DiskIO/IpcIo/Makefile.in 2020-01-20 17:01:31.000000000 +1300 +++ squid-5.0.2/src/DiskIO/IpcIo/Makefile.in 2020-04-20 00:08:50.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -626,6 +626,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/DiskIO/Makefile.in squid-5.0.2/src/DiskIO/Makefile.in --- squid-5.0.1/src/DiskIO/Makefile.in 2020-01-20 17:01:31.000000000 +1300 +++ squid-5.0.2/src/DiskIO/Makefile.in 2020-04-20 00:08:50.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -688,6 +688,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/DiskIO/Mmapped/Makefile.in squid-5.0.2/src/DiskIO/Mmapped/Makefile.in --- squid-5.0.1/src/DiskIO/Mmapped/Makefile.in 2020-01-20 17:01:32.000000000 +1300 +++ squid-5.0.2/src/DiskIO/Mmapped/Makefile.in 2020-04-20 00:08:50.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -626,6 +626,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/dns/Makefile.in squid-5.0.2/src/dns/Makefile.in --- squid-5.0.1/src/dns/Makefile.in 2020-01-20 17:01:33.000000000 +1300 +++ squid-5.0.2/src/dns/Makefile.in 2020-04-20 00:08:52.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -627,6 +627,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/esi/Context.h squid-5.0.2/src/esi/Context.h --- squid-5.0.1/src/esi/Context.h 2020-01-20 17:01:23.000000000 +1300 +++ squid-5.0.2/src/esi/Context.h 2020-04-19 22:50:48.000000000 +1200 @@ -12,6 +12,7 @@ #include "clientStream.h" #include "err_type.h" #include "esi/Element.h" +#include "esi/Esi.h" #include "esi/Parser.h" #include "http/forward.h" #include "http/StatusCode.h" @@ -113,7 +114,7 @@ { public: - ESIElement::Pointer stack[10]; /* a stack of esi elements that are open */ + ESIElement::Pointer stack[ESI_STACK_DEPTH_LIMIT]; /* a stack of esi elements that are open */ int stackdepth; /* self explanatory */ ESIParser::Pointer theParser; ESIElement::Pointer top(); diff -u -r -N squid-5.0.1/src/esi/Esi.cc squid-5.0.2/src/esi/Esi.cc --- squid-5.0.1/src/esi/Esi.cc 2020-01-20 17:01:23.000000000 +1300 +++ squid-5.0.2/src/esi/Esi.cc 2020-04-19 22:50:48.000000000 +1200 @@ -29,6 +29,7 @@ #include "esi/Expression.h" #include "esi/Segment.h" #include "esi/VarState.h" +#include "FadingCounter.h" #include "fatal.h" #include "http/Stream.h" #include "HttpHdrSc.h" @@ -930,13 +931,18 @@ ESIContext::addStackElement (ESIElement::Pointer element) { /* Put on the stack to allow skipping of 'invalid' markup */ - Must(parserState.stackdepth < 10); + + // throw an error if the stack location would be invalid + if (parserState.stackdepth >= ESI_STACK_DEPTH_LIMIT) + throw Esi::Error("ESI Too many nested elements"); + if (parserState.stackdepth < 0) + throw Esi::Error("ESI elements stack error, probable error in ESI template"); + assert (!failed()); debugs(86, 5, "ESIContext::addStackElement: About to add ESI Node " << element.getRaw()); if (!parserState.top()->addElement(element)) { - debugs(86, DBG_IMPORTANT, "ESIContext::addStackElement: failed to add esi node, probable error in ESI template"); - flags.error = 1; + throw Esi::Error("ESIContext::addStackElement failed, probable error in ESI template"); } else { /* added ok, push onto the stack */ parserState.stack[parserState.stackdepth] = element; @@ -1188,13 +1194,10 @@ assert (len); debugs(86, 5, "literal length is " << len); /* give a literal to the current element */ - Must(parserState.stackdepth < 10); ESIElement::Pointer element (new esiLiteral (this, s, len)); - if (!parserState.top()->addElement(element)) { - debugs(86, DBG_IMPORTANT, "ESIContext::addLiteral: failed to add esi node, probable error in ESI template"); - flags.error = 1; - } + if (!parserState.top()->addElement(element)) + throw Esi::Error("ESIContext::addLiteral failed, probable error in ESI template"); } void @@ -1256,8 +1259,24 @@ PROF_start(esiParsing); - while (buffered.getRaw() && !flags.error) - parseOneBuffer(); + try { + while (buffered.getRaw() && !flags.error) + parseOneBuffer(); + + } catch (Esi::ErrorDetail &errMsg) { // FIXME: non-const for c_str() + // level-2: these are protocol/syntax errors from upstream + debugs(86, 2, "WARNING: ESI syntax error: " << errMsg); + setError(); + setErrorMessage(errMsg.c_str()); + + } catch (...) { + // DBG_IMPORTANT because these are local issues the admin needs to fix + static FadingCounter logEntries; // TODO: set horizon less than infinity + if (logEntries.count(1) < 100) + debugs(86, DBG_IMPORTANT, "ERROR: ESI parser: " << CurrentException); + setError(); + setErrorMessage("ESI parser error"); + } PROF_stop(esiParsing); diff -u -r -N squid-5.0.1/src/esi/Esi.h squid-5.0.2/src/esi/Esi.h --- squid-5.0.1/src/esi/Esi.h 2020-01-20 17:01:23.000000000 +1300 +++ squid-5.0.2/src/esi/Esi.h 2020-04-19 22:50:48.000000000 +1200 @@ -10,6 +10,11 @@ #define SQUID_ESI_H #include "clientStream.h" +#include "sbuf/SBuf.h" + +#if !defined(ESI_STACK_DEPTH_LIMIT) +#define ESI_STACK_DEPTH_LIMIT 20 +#endif /* ESI.c */ extern CSR esiStreamRead; @@ -18,5 +23,14 @@ extern CSS esiStreamStatus; int esiEnableProcessing (HttpReply *); +namespace Esi +{ + +typedef SBuf ErrorDetail; +/// prepare an Esi::ErrorDetail for throw on ESI parser internal errors +inline Esi::ErrorDetail Error(const char *msg) { return ErrorDetail(msg); } + +} // namespace Esi + #endif /* SQUID_ESI_H */ diff -u -r -N squid-5.0.1/src/esi/Expression.cc squid-5.0.2/src/esi/Expression.cc --- squid-5.0.1/src/esi/Expression.cc 2020-01-20 17:01:23.000000000 +1300 +++ squid-5.0.2/src/esi/Expression.cc 2020-04-19 22:50:48.000000000 +1200 @@ -10,6 +10,7 @@ #include "squid.h" #include "Debug.h" +#include "esi/Esi.h" #include "esi/Expression.h" #include "profiler/Profiler.h" @@ -97,6 +98,17 @@ cleanmember(&s[*depth]); } +static void +stackpush(stackmember *stack, stackmember &item, int *depth) +{ + if (*depth < 0) + throw Esi::Error("ESIExpression stack has negative size"); + if (*depth >= ESI_STACK_DEPTH_LIMIT) + throw Esi::Error("ESIExpression stack is full, cannot push"); + + stack[(*depth)++] = item; +} + static evaluate evalnegate; static evaluate evalliteral; static evaluate evalor; @@ -208,6 +220,11 @@ /* invalid stack */ return 1; + if (whereAmI < 0) + throw Esi::Error("negate expression location too small"); + if (*depth >= ESI_STACK_DEPTH_LIMIT) + throw Esi::Error("negate expression too complex"); + if (stack[whereAmI + 1].valuetype != ESI_EXPR_EXPR) /* invalid operand */ return 1; @@ -280,7 +297,7 @@ srv.precedence = 1; - stack[(*depth)++] = srv; + stackpush(stack, srv, depth); /* we're out of way, try adding now */ if (!addmember(stack, depth, candidate)) @@ -327,7 +344,7 @@ srv.precedence = 1; - stack[(*depth)++] = srv; + stackpush(stack, srv, depth); /* we're out of way, try adding now */ if (!addmember(stack, depth, candidate)) @@ -373,7 +390,7 @@ srv.precedence = 1; - stack[(*depth)++] = srv; + stackpush(stack, srv, depth); /* we're out of way, try adding now */ if (!addmember(stack, depth, candidate)) @@ -421,7 +438,7 @@ srv.precedence = 1; - stack[(*depth)++] = srv; + stackpush(stack, srv, depth); /* we're out of way, try adding now */ if (!addmember(stack, depth, candidate)) @@ -469,7 +486,7 @@ srv.precedence = 1; - stack[(*depth)++] = srv; + stackpush(stack, srv, depth); /* we're out of way, try adding now */ if (!addmember(stack, depth, candidate)) @@ -517,7 +534,7 @@ srv.precedence = 1; - stack[(*depth)++] = srv; + stackpush(stack, srv, depth); /* we're out of way, try adding now */ if (!addmember(stack, depth, candidate)) @@ -566,7 +583,7 @@ srv.precedence = 1; - stack[(*depth)++] = srv; + stackpush(stack, srv, depth); /* we're out of way, try adding now */ if (!addmember(stack, depth, candidate)) @@ -613,7 +630,7 @@ srv.precedence = 1; - stack[(*depth)++] = srv; + stackpush(stack, srv, depth); /* we're out of way, try adding now */ if (!addmember(stack, depth, candidate)) @@ -953,6 +970,9 @@ /* !(!(a==b))) is why thats safe */ /* strictly less than until we unwind */ + if (*stackdepth >= ESI_STACK_DEPTH_LIMIT) + throw Esi::Error("ESI expression too complex to add member"); + if (candidate->precedence < stack[*stackdepth - 1].precedence || candidate->precedence < stack[*stackdepth - 2].precedence) { /* must be an operator */ @@ -968,10 +988,10 @@ return 0; } } else { - stack[(*stackdepth)++] = *candidate; + stackpush(stack, *candidate, stackdepth); } } else if (candidate->valuetype != ESI_EXPR_INVALID) - stack[(*stackdepth)++] = *candidate; + stackpush(stack, *candidate, stackdepth); return 1; } @@ -979,7 +999,7 @@ int ESIExpression::Evaluate(char const *s) { - stackmember stack[20]; + stackmember stack[ESI_STACK_DEPTH_LIMIT]; int stackdepth = 0; char const *end; PROF_start(esiExpressionEval); diff -u -r -N squid-5.0.1/src/esi/Makefile.in squid-5.0.2/src/esi/Makefile.in --- squid-5.0.1/src/esi/Makefile.in 2020-01-20 17:01:34.000000000 +1300 +++ squid-5.0.2/src/esi/Makefile.in 2020-04-20 00:08:52.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -648,6 +648,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/eui/Makefile.in squid-5.0.2/src/eui/Makefile.in --- squid-5.0.1/src/eui/Makefile.in 2020-01-20 17:01:34.000000000 +1300 +++ squid-5.0.2/src/eui/Makefile.in 2020-04-20 00:08:52.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -626,6 +626,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/fde.cc squid-5.0.2/src/fde.cc --- squid-5.0.1/src/fde.cc 2020-01-20 17:01:23.000000000 +1300 +++ squid-5.0.2/src/fde.cc 2020-04-19 22:50:48.000000000 +1200 @@ -138,3 +138,10 @@ return buf; } +void +fde::Init() +{ + assert(!Table); + Table = static_cast(xcalloc(Squid_MaxFD, sizeof(fde))); +} + diff -u -r -N squid-5.0.1/src/fde.h squid-5.0.2/src/fde.h --- squid-5.0.1/src/fde.h 2020-01-20 17:01:23.000000000 +1300 +++ squid-5.0.2/src/fde.h 2020-04-19 22:50:48.000000000 +1200 @@ -52,6 +52,13 @@ { public: + + // TODO: Merge with comm_init() to reduce initialization order dependencies. + /// Configures fd_table (a.k.a. fde::Table). + /// Call once, after learning the number of supported descriptors (i.e. + /// setMaxFD()) and before dereferencing fd_table (e.g., before Comm I/O). + static void Init(); + fde() { *ipaddr = 0; *desc = 0; diff -u -r -N squid-5.0.1/src/format/Makefile.in squid-5.0.2/src/format/Makefile.in --- squid-5.0.1/src/format/Makefile.in 2020-01-20 17:01:34.000000000 +1300 +++ squid-5.0.2/src/format/Makefile.in 2020-04-20 00:08:52.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -625,6 +625,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/fs/Makefile.in squid-5.0.2/src/fs/Makefile.in --- squid-5.0.1/src/fs/Makefile.in 2020-01-20 17:01:34.000000000 +1300 +++ squid-5.0.2/src/fs/Makefile.in 2020-04-20 00:08:52.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -653,6 +653,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/fs/ufs/UFSSwapDir.cc squid-5.0.2/src/fs/ufs/UFSSwapDir.cc --- squid-5.0.1/src/fs/ufs/UFSSwapDir.cc 2020-01-20 17:01:23.000000000 +1300 +++ squid-5.0.2/src/fs/ufs/UFSSwapDir.cc 2020-04-19 22:50:48.000000000 +1200 @@ -728,6 +728,9 @@ void Fs::Ufs::UFSSwapDir::openLog() { + if (!IamWorkerProcess()) + return; + assert(NumberOfUFSDirs || !UFSDirToGlobalDirMapping); ++NumberOfUFSDirs; assert(NumberOfUFSDirs <= Config.cacheSwap.n_configured); diff -u -r -N squid-5.0.1/src/ftp/Makefile.in squid-5.0.2/src/ftp/Makefile.in --- squid-5.0.1/src/ftp/Makefile.in 2020-01-20 17:01:34.000000000 +1300 +++ squid-5.0.2/src/ftp/Makefile.in 2020-04-20 00:08:52.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -624,6 +624,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/helper/Makefile.in squid-5.0.2/src/helper/Makefile.in --- squid-5.0.1/src/helper/Makefile.in 2020-01-20 17:01:34.000000000 +1300 +++ squid-5.0.2/src/helper/Makefile.in 2020-04-20 00:08:52.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -625,6 +625,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/http/Makefile.in squid-5.0.2/src/http/Makefile.in --- squid-5.0.1/src/http/Makefile.in 2020-01-20 17:01:34.000000000 +1300 +++ squid-5.0.2/src/http/Makefile.in 2020-04-20 00:08:52.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -670,6 +670,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/http/one/Makefile.in squid-5.0.2/src/http/one/Makefile.in --- squid-5.0.1/src/http/one/Makefile.in 2020-01-20 17:01:34.000000000 +1300 +++ squid-5.0.2/src/http/one/Makefile.in 2020-04-20 00:08:53.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -627,6 +627,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/http/StatusLine.cc squid-5.0.2/src/http/StatusLine.cc --- squid-5.0.1/src/http/StatusLine.cc 2020-01-20 17:01:23.000000000 +1300 +++ squid-5.0.2/src/http/StatusLine.cc 2020-04-19 22:50:48.000000000 +1200 @@ -47,6 +47,17 @@ { assert(p); + auto packedStatus = status(); + auto packedReason = reason(); + + if (packedStatus == Http::scNone) { + static unsigned int reports = 0; + if (++reports <= 100) + debugs(57, DBG_IMPORTANT, "BUG: Generated response lacks status code"); + packedStatus = Http::scInternalServerError; + packedReason = Http::StatusCodeString(packedStatus); // ignore custom reason_ (if any) + } + /* local constants */ /* AYJ: see bug 2469 - RFC2616 confirms stating 'SP characters' plural! */ static const char *Http1StatusLineFormat = "HTTP/%d.%d %3d %s\r\n"; @@ -56,15 +67,15 @@ if (protocol == AnyP::PROTO_ICY) { debugs(57, 9, "packing sline " << this << " using " << p << ":"); debugs(57, 9, "FORMAT=" << IcyStatusLineFormat ); - debugs(57, 9, "ICY " << status() << " " << reason()); - p->appendf(IcyStatusLineFormat, status(), reason()); + debugs(57, 9, "ICY " << packedStatus << " " << packedReason); + p->appendf(IcyStatusLineFormat, packedStatus, packedReason); return; } debugs(57, 9, "packing sline " << this << " using " << p << ":"); debugs(57, 9, "FORMAT=" << Http1StatusLineFormat ); - debugs(57, 9, "HTTP/" << version.major << "." << version.minor << " " << status() << " " << reason()); - p->appendf(Http1StatusLineFormat, version.major, version.minor, status(), reason()); + debugs(57, 9, "HTTP/" << version.major << "." << version.minor << " " << packedStatus << " " << packedReason); + p->appendf(Http1StatusLineFormat, version.major, version.minor, packedStatus, packedReason); } /* diff -u -r -N squid-5.0.1/src/http/url_rewriters/fake/Makefile.in squid-5.0.2/src/http/url_rewriters/fake/Makefile.in --- squid-5.0.1/src/http/url_rewriters/fake/Makefile.in 2020-01-20 17:01:34.000000000 +1300 +++ squid-5.0.2/src/http/url_rewriters/fake/Makefile.in 2020-04-20 00:08:53.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -611,6 +611,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/http/url_rewriters/LFS/Makefile.in squid-5.0.2/src/http/url_rewriters/LFS/Makefile.in --- squid-5.0.1/src/http/url_rewriters/LFS/Makefile.in 2020-01-20 17:01:34.000000000 +1300 +++ squid-5.0.2/src/http/url_rewriters/LFS/Makefile.in 2020-04-20 00:08:53.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -562,6 +562,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/http/url_rewriters/LFS/url_lfs_rewrite.8 squid-5.0.2/src/http/url_rewriters/LFS/url_lfs_rewrite.8 --- squid-5.0.1/src/http/url_rewriters/LFS/url_lfs_rewrite.8 2020-01-20 17:13:33.000000000 +1300 +++ squid-5.0.2/src/http/url_rewriters/LFS/url_lfs_rewrite.8 2020-04-20 00:20:17.000000000 +1200 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "URL_LFS_REWRITE 8" -.TH URL_LFS_REWRITE 8 "2020-01-20" "perl v5.28.1" "User Contributed Perl Documentation" +.TH URL_LFS_REWRITE 8 "2020-04-19" "perl v5.28.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff -u -r -N squid-5.0.1/src/http/url_rewriters/Makefile.in squid-5.0.2/src/http/url_rewriters/Makefile.in --- squid-5.0.1/src/http/url_rewriters/Makefile.in 2020-01-20 17:01:34.000000000 +1300 +++ squid-5.0.2/src/http/url_rewriters/Makefile.in 2020-04-20 00:08:53.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -403,6 +403,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/HttpHeaderTools.cc squid-5.0.2/src/HttpHeaderTools.cc --- squid-5.0.1/src/HttpHeaderTools.cc 2020-01-20 17:01:23.000000000 +1300 +++ squid-5.0.2/src/HttpHeaderTools.cc 2020-04-19 22:50:48.000000000 +1200 @@ -484,6 +484,12 @@ { ACLFilledChecklist checklist(NULL, request, NULL); + checklist.al = al; + if (al && al->reply) { + checklist.reply = al->reply.getRaw(); + HTTPMSGLOCK(checklist.reply); + } + for (HeaderWithAclList::const_iterator hwa = headersAdd.begin(); hwa != headersAdd.end(); ++hwa) { if (!hwa->aclList || checklist.fastCheck(hwa->aclList).allowed()) { const char *fieldValue = NULL; diff -u -r -N squid-5.0.1/src/icmp/Makefile.am squid-5.0.2/src/icmp/Makefile.am --- squid-5.0.1/src/icmp/Makefile.am 2020-01-20 17:01:23.000000000 +1300 +++ squid-5.0.2/src/icmp/Makefile.am 2020-04-19 22:50:48.000000000 +1200 @@ -40,6 +40,7 @@ globals.cc \ SquidConfig.cc \ SquidNew.cc \ + stub_fd.cc \ stub_HelperChildConfig.cc \ stub_libmem.cc \ stub_SBuf.cc \ @@ -101,6 +102,9 @@ stub_HelperChildConfig.cc: $(top_srcdir)/src/tests/stub_HelperChildConfig.cc cp $(top_srcdir)/src/tests/stub_HelperChildConfig.cc $@ +stub_fd.cc: $(top_srcdir)/src/tests/stub_fd.cc STUB.h + cp $(top_srcdir)/src/tests/stub_fd.cc $@ + stub_libmem.cc: $(top_srcdir)/src/tests/stub_libmem.cc STUB.h cp $(top_srcdir)/src/tests/stub_libmem.cc $@ diff -u -r -N squid-5.0.1/src/icmp/Makefile.in squid-5.0.2/src/icmp/Makefile.in --- squid-5.0.1/src/icmp/Makefile.in 2020-01-20 17:01:34.000000000 +1300 +++ squid-5.0.2/src/icmp/Makefile.in 2020-04-20 00:08:53.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -181,7 +181,7 @@ am_pinger_OBJECTS = IcmpPinger.$(OBJEXT) Icmp4.$(OBJEXT) \ Icmp6.$(OBJEXT) pinger.$(OBJEXT) am__objects_1 = debug.$(OBJEXT) globals.$(OBJEXT) \ - SquidConfig.$(OBJEXT) SquidNew.$(OBJEXT) \ + SquidConfig.$(OBJEXT) SquidNew.$(OBJEXT) stub_fd.$(OBJEXT) \ stub_HelperChildConfig.$(OBJEXT) stub_libmem.$(OBJEXT) \ stub_SBuf.$(OBJEXT) time.$(OBJEXT) nodist_pinger_OBJECTS = $(am__objects_1) @@ -218,7 +218,8 @@ ./$(DEPDIR)/debug.Po ./$(DEPDIR)/globals.Po \ ./$(DEPDIR)/net_db.Plo ./$(DEPDIR)/pinger.Po \ ./$(DEPDIR)/stub_HelperChildConfig.Po ./$(DEPDIR)/stub_SBuf.Po \ - ./$(DEPDIR)/stub_libmem.Po ./$(DEPDIR)/time.Po + ./$(DEPDIR)/stub_fd.Po ./$(DEPDIR)/stub_libmem.Po \ + ./$(DEPDIR)/time.Po am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) @@ -659,6 +660,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ @@ -783,6 +786,7 @@ globals.cc \ SquidConfig.cc \ SquidNew.cc \ + stub_fd.cc \ stub_HelperChildConfig.cc \ stub_libmem.cc \ stub_SBuf.cc \ @@ -945,6 +949,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pinger.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stub_HelperChildConfig.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stub_SBuf.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stub_fd.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stub_libmem.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/time.Po@am__quote@ # am--include-marker @@ -1295,6 +1300,7 @@ -rm -f ./$(DEPDIR)/pinger.Po -rm -f ./$(DEPDIR)/stub_HelperChildConfig.Po -rm -f ./$(DEPDIR)/stub_SBuf.Po + -rm -f ./$(DEPDIR)/stub_fd.Po -rm -f ./$(DEPDIR)/stub_libmem.Po -rm -f ./$(DEPDIR)/time.Po -rm -f Makefile @@ -1356,6 +1362,7 @@ -rm -f ./$(DEPDIR)/pinger.Po -rm -f ./$(DEPDIR)/stub_HelperChildConfig.Po -rm -f ./$(DEPDIR)/stub_SBuf.Po + -rm -f ./$(DEPDIR)/stub_fd.Po -rm -f ./$(DEPDIR)/stub_libmem.Po -rm -f ./$(DEPDIR)/time.Po -rm -f Makefile @@ -1422,6 +1429,9 @@ stub_HelperChildConfig.cc: $(top_srcdir)/src/tests/stub_HelperChildConfig.cc cp $(top_srcdir)/src/tests/stub_HelperChildConfig.cc $@ +stub_fd.cc: $(top_srcdir)/src/tests/stub_fd.cc STUB.h + cp $(top_srcdir)/src/tests/stub_fd.cc $@ + stub_libmem.cc: $(top_srcdir)/src/tests/stub_libmem.cc STUB.h cp $(top_srcdir)/src/tests/stub_libmem.cc $@ diff -u -r -N squid-5.0.1/src/ident/Makefile.in squid-5.0.2/src/ident/Makefile.in --- squid-5.0.1/src/ident/Makefile.in 2020-01-20 17:01:34.000000000 +1300 +++ squid-5.0.2/src/ident/Makefile.in 2020-04-20 00:08:53.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -624,6 +624,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/ip/Makefile.in squid-5.0.2/src/ip/Makefile.in --- squid-5.0.1/src/ip/Makefile.in 2020-01-20 17:01:34.000000000 +1300 +++ squid-5.0.2/src/ip/Makefile.in 2020-04-20 00:08:53.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -627,6 +627,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/ipc/Makefile.in squid-5.0.2/src/ipc/Makefile.in --- squid-5.0.1/src/ipc/Makefile.in 2020-01-20 17:01:34.000000000 +1300 +++ squid-5.0.2/src/ipc/Makefile.in 2020-04-20 00:08:53.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -642,6 +642,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/ipc/ReadWriteLock.cc squid-5.0.2/src/ipc/ReadWriteLock.cc --- squid-5.0.1/src/ipc/ReadWriteLock.cc 2020-01-20 17:01:23.000000000 +1300 +++ squid-5.0.2/src/ipc/ReadWriteLock.cc 2020-04-19 22:50:48.000000000 +1200 @@ -91,6 +91,26 @@ unlockExclusive(); } +bool +Ipc::ReadWriteLock::unlockSharedAndSwitchToExclusive() +{ + assert(readers > 0); + if (!writeLevel++) { // we are the first writer + lock "new" readers out + assert(!appending); + unlockShared(); + if (!readers) { + writing = true; + return true; + } + // somebody is still reading: fall through + } else { + // somebody is still writing: just stop reading + unlockShared(); + } + --writeLevel; + return false; +} + void Ipc::ReadWriteLock::startAppending() { diff -u -r -N squid-5.0.1/src/ipc/ReadWriteLock.h squid-5.0.2/src/ipc/ReadWriteLock.h --- squid-5.0.1/src/ipc/ReadWriteLock.h 2020-01-20 17:01:23.000000000 +1300 +++ squid-5.0.2/src/ipc/ReadWriteLock.h 2020-04-19 22:50:48.000000000 +1200 @@ -35,6 +35,9 @@ void unlockExclusive(); ///< undo successful exclusiveLock() void unlockHeaders(); ///< undo successful lockHeaders() void switchExclusiveToShared(); ///< stop writing, start reading + /// same as unlockShared() but also attempts to get a writer lock beforehand + /// \returns whether the writer lock was acquired + bool unlockSharedAndSwitchToExclusive(); void startAppending(); ///< writer keeps its lock but also allows reading diff -u -r -N squid-5.0.1/src/ipc/StartListening.cc squid-5.0.2/src/ipc/StartListening.cc --- squid-5.0.1/src/ipc/StartListening.cc 2020-01-20 17:01:23.000000000 +1300 +++ squid-5.0.2/src/ipc/StartListening.cc 2020-04-19 22:50:48.000000000 +1200 @@ -39,7 +39,10 @@ Must(cbd); cbd->conn = listenConn; - if (UsingSmp()) { // if SMP is on, share + const auto giveEachWorkerItsOwnQueue = listenConn->flags & COMM_REUSEPORT; + if (!giveEachWorkerItsOwnQueue && UsingSmp()) { + // Ask Coordinator for a listening socket. + // All askers share one listening queue. OpenListenerParams p; p.sock_type = sock_type; p.proto = proto; diff -u -r -N squid-5.0.1/src/ipc/StoreMap.cc squid-5.0.2/src/ipc/StoreMap.cc --- squid-5.0.1/src/ipc/StoreMap.cc 2020-01-20 17:01:23.000000000 +1300 +++ squid-5.0.2/src/ipc/StoreMap.cc 2020-04-19 22:50:48.000000000 +1200 @@ -247,10 +247,18 @@ const Anchor &s = anchorAt(fileno); if (s.reading()) return &s; // immediate access by lock holder so no locking + assert(s.writing()); // must be locked for reading or writing + return nullptr; +} + +const Ipc::StoreMap::Anchor * +Ipc::StoreMap::peekAtWriter(const sfileno fileno) const +{ + const Anchor &s = anchorAt(fileno); if (s.writing()) - return NULL; // the caller is not a read lock holder - assert(false); // must be locked for reading or writing - return NULL; + return &s; // immediate access by lock holder so no locking + assert(s.reading()); // must be locked for reading or writing + return nullptr; } const Ipc::StoreMap::Anchor & @@ -442,6 +450,23 @@ debugs(54, 5, "closed entry " << fileno << " for reading " << path); } +void +Ipc::StoreMap::closeForReadingAndFreeIdle(const sfileno fileno) +{ + auto &s = anchorAt(fileno); + assert(s.reading()); + + if (!s.lock.unlockSharedAndSwitchToExclusive()) { + debugs(54, 5, "closed entry " << fileno << " for reading " << path); + return; + } + + assert(s.writing()); + assert(!s.reading()); + freeChain(fileno, s, false); + debugs(54, 5, "closed idle entry " << fileno << " for reading " << path); +} + bool Ipc::StoreMap::openForUpdating(Update &update, const sfileno fileNoHint) { diff -u -r -N squid-5.0.1/src/ipc/StoreMap.h squid-5.0.2/src/ipc/StoreMap.h --- squid-5.0.1/src/ipc/StoreMap.h 2020-01-20 17:01:23.000000000 +1300 +++ squid-5.0.2/src/ipc/StoreMap.h 2020-04-19 22:50:48.000000000 +1200 @@ -259,10 +259,16 @@ /// undoes partial update, unlocks, and cleans up void abortUpdating(Update &update); - /// only works on locked entries; returns nil unless the slice is readable + /// the caller must hold a lock on the entry + /// \returns nullptr unless the slice is readable const Anchor *peekAtReader(const sfileno fileno) const; - /// only works on locked entries; returns the corresponding Anchor + /// the caller must hold a lock on the entry + /// \returns nullptr unless the slice is writeable + const Anchor *peekAtWriter(const sfileno fileno) const; + + /// the caller must hold a lock on the entry + /// \returns the corresponding Anchor const Anchor &peekAtEntry(const sfileno fileno) const; /// free the entry if possible or mark it as waiting to be freed if not @@ -285,6 +291,8 @@ const Anchor *openForReadingAt(const sfileno fileno); /// closes open entry after reading, decrements read level void closeForReading(const sfileno fileno); + /// same as closeForReading() but also frees the entry if it is unlocked + void closeForReadingAndFreeIdle(const sfileno fileno); /// writeable slice within an entry chain created by openForWriting() Slice &writeableSlice(const AnchorId anchorId, const SliceId sliceId); diff -u -r -N squid-5.0.1/src/log/DB/log_db_daemon.8 squid-5.0.2/src/log/DB/log_db_daemon.8 --- squid-5.0.1/src/log/DB/log_db_daemon.8 2020-01-20 17:13:33.000000000 +1300 +++ squid-5.0.2/src/log/DB/log_db_daemon.8 2020-04-20 00:20:18.000000000 +1200 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "LOG_DB_DAEMON 8" -.TH LOG_DB_DAEMON 8 "2020-01-20" "perl v5.28.1" "User Contributed Perl Documentation" +.TH LOG_DB_DAEMON 8 "2020-04-19" "perl v5.28.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff -u -r -N squid-5.0.1/src/log/DB/Makefile.in squid-5.0.2/src/log/DB/Makefile.in --- squid-5.0.1/src/log/DB/Makefile.in 2020-01-20 17:01:34.000000000 +1300 +++ squid-5.0.2/src/log/DB/Makefile.in 2020-04-20 00:08:53.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -562,6 +562,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/log/file/Makefile.in squid-5.0.2/src/log/file/Makefile.in --- squid-5.0.1/src/log/file/Makefile.in 2020-01-20 17:01:34.000000000 +1300 +++ squid-5.0.2/src/log/file/Makefile.in 2020-04-20 00:08:53.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -611,6 +611,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/log/Makefile.in squid-5.0.2/src/log/Makefile.in --- squid-5.0.1/src/log/Makefile.in 2020-01-20 17:01:34.000000000 +1300 +++ squid-5.0.2/src/log/Makefile.in 2020-04-20 00:08:53.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -678,6 +678,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/log/ModDaemon.cc squid-5.0.2/src/log/ModDaemon.cc --- squid-5.0.1/src/log/ModDaemon.cc 2020-01-20 17:01:23.000000000 +1300 +++ squid-5.0.2/src/log/ModDaemon.cc 2020-04-19 22:50:48.000000000 +1200 @@ -298,8 +298,14 @@ } return; } - /* Append this data to the end buffer; create a new one if needed */ + /* Are we eol? If so, prefix with our logfile command byte */ + if (ll->eol == 1) { + logfile_mod_daemon_append(lf, "L", 1); + ll->eol = 0; + } + + /* Append this data to the end buffer; create a new one if needed */ logfile_mod_daemon_append(lf, buf, len); } @@ -307,12 +313,8 @@ logfile_mod_daemon_linestart(Logfile * lf) { l_daemon_t *ll = static_cast(lf->data); - char tb[2]; assert(ll->eol == 1); - ll->eol = 0; - tb[0] = 'L'; - tb[1] = '\0'; - logfile_mod_daemon_append(lf, tb, 1); + // logfile_mod_daemon_writeline() sends the starting command } static void @@ -320,7 +322,8 @@ { l_daemon_t *ll = static_cast(lf->data); logfile_buffer_t *b; - assert(ll->eol == 0); + if (ll->eol == 1) // logfile_mod_daemon_writeline() wrote nothing + return; ll->eol = 1; /* Kick a write off if the head buffer is -full- */ if (ll->bufs.head != NULL) { diff -u -r -N squid-5.0.1/src/main.cc squid-5.0.2/src/main.cc --- squid-5.0.1/src/main.cc 2020-01-20 17:01:23.000000000 +1300 +++ squid-5.0.2/src/main.cc 2020-04-19 22:50:48.000000000 +1200 @@ -1132,9 +1132,6 @@ static void mainInitialize(void) { - /* chroot if configured to run inside chroot */ - mainSetCwd(); - if (opt_catch_signals) { squid_signal(SIGSEGV, death, SA_NODEFER | SA_RESETHAND); squid_signal(SIGBUS, death, SA_NODEFER | SA_RESETHAND); @@ -1149,12 +1146,6 @@ if (icpPortNumOverride != 1) Config.Port.icp = (unsigned short) icpPortNumOverride; - _db_init(Debug::cache_log, Debug::debugOptions); - - // Do not register cache.log descriptor with Comm (for now). - // See https://bugs.squid-cache.org/show_bug.cgi?id=4796 - // fd_open(fileno(debug_log), FD_LOG, Debug::cache_log); - debugs(1, DBG_CRITICAL, "Starting Squid Cache version " << version_string << " for " << CONFIG_HOST_TYPE << "..."); debugs(1, DBG_CRITICAL, "Service Name: " << service_name); @@ -1443,12 +1434,57 @@ } } -static void StartUsingConfig() +/// Start directing debugs() messages to the configured cache.log. +/// Until this function is called, all allowed messages go to stderr. +static void +ConfigureDebugging() +{ + if (opt_no_daemon) { + fd_open(0, FD_LOG, "stdin"); + fd_open(1, FD_LOG, "stdout"); + fd_open(2, FD_LOG, "stderr"); + } + // we should not create cache.log outside chroot environment, if any + // XXX: With Config.chroot_dir set, SMP master process never calls db_init(). + if (!Config.chroot_dir || Chrooted) + _db_init(Debug::cache_log, Debug::debugOptions); +} + +static void +RunConfigUsers() { RunRegisteredHere(RegisteredRunner::claimMemoryNeeds); RunRegisteredHere(RegisteredRunner::useConfig); } +static void +StartUsingConfig() +{ + setMaxFD(); + fde::Init(); + const auto skipCwdAdjusting = IamMasterProcess() && InDaemonMode(); + if (skipCwdAdjusting) { + ConfigureDebugging(); + RunConfigUsers(); + } else if (Config.chroot_dir) { + RunConfigUsers(); + enter_suid(); + // TODO: don't we need to RunConfigUsers() in the configured + // chroot environment? + mainSetCwd(); + leave_suid(); + ConfigureDebugging(); + } else { + ConfigureDebugging(); + RunConfigUsers(); + enter_suid(); + // TODO: since RunConfigUsers() may use a relative path, we + // need to change the process root first + mainSetCwd(); + leave_suid(); + } +} + int SquidMain(int argc, char **argv) { @@ -1585,18 +1621,6 @@ if (opt_send_signal == -1 && IamMasterProcess()) Instance::ThrowIfAlreadyRunning(); -#if TEST_ACCESS - - comm_init(); - - mainInitialize(); - - test_access(); - - return 0; - -#endif - /* send signal to running copy and exit */ if (opt_send_signal != -1) { /* chroot if configured to run inside chroot */ @@ -1628,9 +1652,6 @@ enter_suid(); if (opt_create_swap_dirs) { - /* chroot if configured to run inside chroot */ - mainSetCwd(); - setEffectiveUser(); debugs(0, DBG_CRITICAL, "Creating missing swap directories"); Store::Root().create(); @@ -1642,18 +1663,9 @@ CpuAffinityCheck(); CpuAffinityInit(); - setMaxFD(); - /* init comm module */ comm_init(); - if (opt_no_daemon) { - /* we have to init fdstat here. */ - fd_open(0, FD_LOG, "stdin"); - fd_open(1, FD_LOG, "stdout"); - fd_open(2, FD_LOG, "stderr"); - } - #if USE_WIN32_SERVICE WIN32_svcstatusupdate(SERVICE_START_PENDING, 10000); diff -u -r -N squid-5.0.1/src/Makefile.am squid-5.0.2/src/Makefile.am --- squid-5.0.1/src/Makefile.am 2020-01-20 17:01:23.000000000 +1300 +++ squid-5.0.2/src/Makefile.am 2020-04-19 22:50:48.000000000 +1200 @@ -581,6 +581,7 @@ $(EPOLL_LIBS) \ $(MINGW_LIBS) \ $(KRB5LIBS) \ + $(SYSTEMD_LIBS) \ $(COMPAT_LIB) \ $(XTRA_LIBS) diff -u -r -N squid-5.0.1/src/Makefile.in squid-5.0.2/src/Makefile.in --- squid-5.0.1/src/Makefile.in 2020-01-20 17:01:32.000000000 +1300 +++ squid-5.0.2/src/Makefile.in 2020-04-20 00:08:51.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -454,8 +454,8 @@ $(top_builddir)/lib/libmiscutil.la $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_6) + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_3) \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_6) squid_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(squid_LDFLAGS) $(LDFLAGS) -o $@ @@ -2832,6 +2832,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ @@ -3178,8 +3180,8 @@ $(top_builddir)/lib/libmisccontainers.la \ $(top_builddir)/lib/libmiscencoding.la \ $(top_builddir)/lib/libmiscutil.la $(ATOMICLIB) $(SSLLIB) \ - $(EPOLL_LIBS) $(MINGW_LIBS) $(KRB5LIBS) $(COMPAT_LIB) \ - $(XTRA_LIBS) $(am__append_9) + $(EPOLL_LIBS) $(MINGW_LIBS) $(KRB5LIBS) $(SYSTEMD_LIBS) \ + $(COMPAT_LIB) $(XTRA_LIBS) $(am__append_9) @ENABLE_LOADABLE_MODULES_TRUE@squid_LDFLAGS = -export-dynamic -dlopen force unlinkd_SOURCES = unlinkd_daemon.cc unlinkd_LDADD = \ diff -u -r -N squid-5.0.1/src/mem/Makefile.in squid-5.0.2/src/mem/Makefile.in --- squid-5.0.1/src/mem/Makefile.in 2020-01-20 17:01:34.000000000 +1300 +++ squid-5.0.2/src/mem/Makefile.in 2020-04-20 00:08:53.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -627,6 +627,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/mgr/Makefile.in squid-5.0.2/src/mgr/Makefile.in --- squid-5.0.1/src/mgr/Makefile.in 2020-01-20 17:01:34.000000000 +1300 +++ squid-5.0.2/src/mgr/Makefile.in 2020-04-20 00:08:53.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -642,6 +642,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/Notes.cc squid-5.0.2/src/Notes.cc --- squid-5.0.1/src/Notes.cc 2020-01-20 17:01:23.000000000 +1300 +++ squid-5.0.2/src/Notes.cc 2020-04-19 22:50:48.000000000 +1200 @@ -17,6 +17,7 @@ #include "HttpReply.h" #include "HttpRequest.h" #include "parser/Tokenizer.h" +#include "sbuf/Stream.h" #include "sbuf/StringConvert.h" #include "SquidConfig.h" #include "Store.h" @@ -124,6 +125,36 @@ return result; } +const Notes::Keys & +Notes::BlackList() +{ + // these keys are used for internal Squid-helper communication + static const char *names[] = { + "group", + "ha1", + "log", + "message", + "password", + "rewrite-url", + "status", + "tag", + "ttl", + "url", + "user" + }; + + static Keys keys(std::begin(names), std::end(names)); + return keys; +} + +Notes::Notes(const char *aDescr, const Keys *extraBlacklist, bool allowFormatted): + descr(aDescr), + formattedValues(allowFormatted) +{ + if (extraBlacklist) + blacklist = *extraBlacklist; +} + Note::Pointer Notes::add(const SBuf ¬eKey) { @@ -143,17 +174,18 @@ } void +Notes::banReservedKey(const SBuf &key, const Keys &banned) const +{ + if (std::find(banned.begin(), banned.end(), key) != banned.end()) + throw TextException(ToSBuf("cannot use a reserved ", descr, " name: ", key), Here()); +} + +void Notes::validateKey(const SBuf &key) const { - if (blacklisted) { - for (int i = 0; blacklisted[i] != nullptr; ++i) { - if (!key.cmp(blacklisted[i])) { - fatalf("%s:%d: meta key \"%.*s\" is a reserved %s name", - cfg_filename, config_lineno, key.length(), key.rawContent(), - descr ? descr : ""); - } - } - } + banReservedKey(key, BlackList()); + banReservedKey(key, blacklist); + // TODO: fix code duplication: the same set of specials is produced // by isKeyNameChar(). static const CharacterSet allowedSpecials = CharacterSet::ALPHA + diff -u -r -N squid-5.0.1/src/Notes.h squid-5.0.2/src/Notes.h --- squid-5.0.1/src/Notes.h 2020-01-20 17:01:23.000000000 +1300 +++ squid-5.0.2/src/Notes.h 2020-04-19 22:50:48.000000000 +1200 @@ -109,12 +109,13 @@ { public: typedef RefCount Pointer; + typedef std::vector Keys; ///< unordered annotation names typedef std::vector NotesList; typedef NotesList::iterator iterator; ///< iterates over the notes list typedef NotesList::const_iterator const_iterator; ///< iterates over the notes list - Notes(const char *aDescr, const char **metasBlacklist, bool allowFormatted = true): descr(aDescr), blacklisted(metasBlacklist), formattedValues(allowFormatted) {} - Notes(): descr(nullptr), blacklisted(nullptr), formattedValues(false) {} + explicit Notes(const char *aDescr, const Keys *extraBlacklist = nullptr, bool allowFormatted = true); + Notes() = default; ~Notes() { notes.clear(); } Notes(const Notes&) = delete; Notes &operator=(const Notes&) = delete; @@ -142,10 +143,11 @@ void updateNotePairs(NotePairsPointer pairs, const CharacterSet *delimiters, const AccessLogEntryPointer &al); private: + /// Makes sure the given key is not on the given list of banned names. + void banReservedKey(const SBuf &key, const Keys &banned) const; /// Verifies that the key is not blacklisted (fatal error) and /// does not contain special characters (non-fatal error). - /// If keyLen is not provided, the key is assumed null-terminated. void validateKey(const SBuf &key) const; /// Adds a note to the notes list and returns a pointer to the @@ -156,9 +158,12 @@ Note::Pointer find(const SBuf ¬eKey); NotesList notes; ///< The Note::Pointer objects array list - const char *descr; ///< A short description for notes list - const char **blacklisted; ///< Null terminated list of blacklisted note keys - bool formattedValues; ///< Whether the formatted values are supported + const char *descr = nullptr; ///< identifies note source in error messages + + Keys blacklist; ///< a list of additional prohibited key names + bool formattedValues = false; ///< whether to expand quoted logformat %codes + + static const Notes::Keys &BlackList(); ///< always prohibited key names }; /** diff -u -r -N squid-5.0.1/src/parser/Makefile.in squid-5.0.2/src/parser/Makefile.in --- squid-5.0.1/src/parser/Makefile.in 2020-01-20 17:01:34.000000000 +1300 +++ squid-5.0.2/src/parser/Makefile.in 2020-04-20 00:08:53.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -625,6 +625,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/proxyp/Makefile.in squid-5.0.2/src/proxyp/Makefile.in --- squid-5.0.1/src/proxyp/Makefile.in 2020-01-20 17:01:34.000000000 +1300 +++ squid-5.0.2/src/proxyp/Makefile.in 2020-04-20 00:08:53.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -625,6 +625,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/repl/Makefile.in squid-5.0.2/src/repl/Makefile.in --- squid-5.0.1/src/repl/Makefile.in 2020-01-20 17:01:34.000000000 +1300 +++ squid-5.0.2/src/repl/Makefile.in 2020-04-20 00:08:53.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -637,6 +637,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/sbuf/Makefile.in squid-5.0.2/src/sbuf/Makefile.in --- squid-5.0.1/src/sbuf/Makefile.in 2020-01-20 17:01:34.000000000 +1300 +++ squid-5.0.2/src/sbuf/Makefile.in 2020-04-20 00:08:53.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -628,6 +628,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/security/cert_generators/file/Makefile.in squid-5.0.2/src/security/cert_generators/file/Makefile.in --- squid-5.0.1/src/security/cert_generators/file/Makefile.in 2020-01-20 17:01:34.000000000 +1300 +++ squid-5.0.2/src/security/cert_generators/file/Makefile.in 2020-04-20 00:08:53.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -638,6 +638,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/security/cert_generators/Makefile.in squid-5.0.2/src/security/cert_generators/Makefile.in --- squid-5.0.1/src/security/cert_generators/Makefile.in 2020-01-20 17:01:34.000000000 +1300 +++ squid-5.0.2/src/security/cert_generators/Makefile.in 2020-04-20 00:08:53.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -403,6 +403,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/security/cert_validators/fake/Makefile.in squid-5.0.2/src/security/cert_validators/fake/Makefile.in --- squid-5.0.1/src/security/cert_validators/fake/Makefile.in 2020-01-20 17:01:35.000000000 +1300 +++ squid-5.0.2/src/security/cert_validators/fake/Makefile.in 2020-04-20 00:08:53.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -562,6 +562,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/security/cert_validators/fake/security_fake_certverify.8 squid-5.0.2/src/security/cert_validators/fake/security_fake_certverify.8 --- squid-5.0.1/src/security/cert_validators/fake/security_fake_certverify.8 2020-01-20 17:13:34.000000000 +1300 +++ squid-5.0.2/src/security/cert_validators/fake/security_fake_certverify.8 2020-04-20 00:20:18.000000000 +1200 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SECURITY_FAKE_CERTVERIFY 8" -.TH SECURITY_FAKE_CERTVERIFY 8 "2020-01-20" "perl v5.28.1" "User Contributed Perl Documentation" +.TH SECURITY_FAKE_CERTVERIFY 8 "2020-04-19" "perl v5.28.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff -u -r -N squid-5.0.1/src/security/cert_validators/Makefile.in squid-5.0.2/src/security/cert_validators/Makefile.in --- squid-5.0.1/src/security/cert_validators/Makefile.in 2020-01-20 17:01:35.000000000 +1300 +++ squid-5.0.2/src/security/cert_validators/Makefile.in 2020-04-20 00:08:53.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -403,6 +403,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/security/Makefile.in squid-5.0.2/src/security/Makefile.in --- squid-5.0.1/src/security/Makefile.in 2020-01-20 17:01:34.000000000 +1300 +++ squid-5.0.2/src/security/Makefile.in 2020-04-20 00:08:53.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -671,6 +671,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/servers/Makefile.in squid-5.0.2/src/servers/Makefile.in --- squid-5.0.1/src/servers/Makefile.in 2020-01-20 17:01:35.000000000 +1300 +++ squid-5.0.2/src/servers/Makefile.in 2020-04-20 00:08:53.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -625,6 +625,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/snmp/Makefile.in squid-5.0.2/src/snmp/Makefile.in --- squid-5.0.1/src/snmp/Makefile.in 2020-01-20 17:01:35.000000000 +1300 +++ squid-5.0.2/src/snmp/Makefile.in 2020-04-20 00:08:53.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -628,6 +628,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/ssl/Makefile.in squid-5.0.2/src/ssl/Makefile.in --- squid-5.0.1/src/ssl/Makefile.in 2020-01-20 17:01:35.000000000 +1300 +++ squid-5.0.2/src/ssl/Makefile.in 2020-04-20 00:08:53.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -637,6 +637,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/store/Controller.cc squid-5.0.2/src/store/Controller.cc --- squid-5.0.1/src/store/Controller.cc 2020-01-20 17:01:23.000000000 +1300 +++ squid-5.0.2/src/store/Controller.cc 2020-04-19 22:50:48.000000000 +1200 @@ -334,7 +334,7 @@ return entry; } catch (const std::exception &ex) { debugs(20, 2, "failed with " << *entry << ": " << ex.what()); - entry->release(true); + entry->release(); // fall through } } @@ -355,6 +355,18 @@ const bool found = anchorToCache(entry, inSync); if (found && !inSync) throw TexcHere("cannot sync"); + if (!found) { + // !found should imply hittingRequiresCollapsing() regardless of writer presence + if (!entry.hittingRequiresCollapsing()) { + debugs(20, DBG_IMPORTANT, "BUG: missing ENTRY_REQUIRES_COLLAPSING for " << entry); + throw TextException("transients entry missing ENTRY_REQUIRES_COLLAPSING", Here()); + } + + if (!transients->hasWriter(entry)) { + // prevent others from falling into the same trap + throw TextException("unattached transients entry missing writer", Here()); + } + } } } diff -u -r -N squid-5.0.1/src/store/id_rewriters/file/Makefile.in squid-5.0.2/src/store/id_rewriters/file/Makefile.in --- squid-5.0.1/src/store/id_rewriters/file/Makefile.in 2020-01-20 17:01:35.000000000 +1300 +++ squid-5.0.2/src/store/id_rewriters/file/Makefile.in 2020-04-20 00:08:53.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -562,6 +562,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/store/id_rewriters/file/storeid_file_rewrite.8 squid-5.0.2/src/store/id_rewriters/file/storeid_file_rewrite.8 --- squid-5.0.1/src/store/id_rewriters/file/storeid_file_rewrite.8 2020-01-20 17:13:31.000000000 +1300 +++ squid-5.0.2/src/store/id_rewriters/file/storeid_file_rewrite.8 2020-04-20 00:20:16.000000000 +1200 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "STOREID_FILE_REWRITE 8" -.TH STOREID_FILE_REWRITE 8 "2020-01-20" "perl v5.28.1" "User Contributed Perl Documentation" +.TH STOREID_FILE_REWRITE 8 "2020-04-19" "perl v5.28.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff -u -r -N squid-5.0.1/src/store/id_rewriters/Makefile.in squid-5.0.2/src/store/id_rewriters/Makefile.in --- squid-5.0.1/src/store/id_rewriters/Makefile.in 2020-01-20 17:01:35.000000000 +1300 +++ squid-5.0.2/src/store/id_rewriters/Makefile.in 2020-04-20 00:08:53.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -403,6 +403,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/store/Makefile.in squid-5.0.2/src/store/Makefile.in --- squid-5.0.1/src/store/Makefile.in 2020-01-20 17:01:35.000000000 +1300 +++ squid-5.0.2/src/store/Makefile.in 2020-04-20 00:08:53.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -666,6 +666,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/src/store.cc squid-5.0.2/src/store.cc --- squid-5.0.1/src/store.cc 2020-01-20 17:01:23.000000000 +1300 +++ squid-5.0.2/src/store.cc 2020-04-19 22:50:48.000000000 +1200 @@ -899,7 +899,6 @@ int non_get; int not_entry_cachable; int wrong_content_length; - int negative_cached; int too_big; int too_small; int private_key; @@ -979,10 +978,6 @@ if (store_status == STORE_OK && EBIT_TEST(flags, ENTRY_BAD_LENGTH)) { debugs(20, 2, "StoreEntry::checkCachable: NO: wrong content-length"); ++store_check_cachable_hist.no.wrong_content_length; - } else if (EBIT_TEST(flags, ENTRY_NEGCACHED)) { - debugs(20, 3, "StoreEntry::checkCachable: NO: negative cached"); - ++store_check_cachable_hist.no.negative_cached; - return 0; /* avoid release call below */ } else if (!mem_obj) { // XXX: In bug 4131, we forgetHit() without mem_obj, so we need // this segfault protection, but how can we get such a HIT? @@ -1034,7 +1029,7 @@ storeAppendPrintf(sentry, "no.wrong_content_length\t%d\n", store_check_cachable_hist.no.wrong_content_length); storeAppendPrintf(sentry, "no.negative_cached\t%d\n", - store_check_cachable_hist.no.negative_cached); + 0); // TODO: Remove this backward compatibility hack. storeAppendPrintf(sentry, "no.missing_parts\t%d\n", store_check_cachable_hist.no.missing_parts); storeAppendPrintf(sentry, "no.too_big\t%d\n", @@ -1374,7 +1369,10 @@ #else expires = squid_curtime; #endif - EBIT_SET(flags, ENTRY_NEGCACHED); + if (expires > squid_curtime) { + EBIT_SET(flags, ENTRY_NEGCACHED); + debugs(20, 6, "expires = " << expires << " +" << (expires-squid_curtime) << ' ' << *this); + } } void diff -u -r -N squid-5.0.1/src/store_client.cc squid-5.0.2/src/store_client.cc --- squid-5.0.1/src/store_client.cc 2020-01-20 17:01:23.000000000 +1300 +++ squid-5.0.2/src/store_client.cc 2020-04-19 22:50:48.000000000 +1200 @@ -10,6 +10,7 @@ #include "squid.h" #include "acl/FilledChecklist.h" +#include "base/CodeContext.h" #include "event.h" #include "globals.h" #include "HttpReply.h" @@ -772,13 +773,13 @@ PROF_start(InvokeHandlers); - debugs(90, 3, "InvokeHandlers: " << getMD5Text() ); + debugs(90, 3, mem_obj->nclients << " clients; " << *this << ' ' << getMD5Text()); /* walk the entire list looking for valid callbacks */ + const auto savedContext = CodeContext::Current(); for (node = mem_obj->clients.head; node; node = nx) { sc = (store_client *)node->data; nx = node->next; - debugs(90, 3, "StoreEntry::InvokeHandlers: checking client #" << i ); ++i; if (!sc->_callback.pending()) @@ -787,8 +788,11 @@ if (sc->flags.disk_io_pending) continue; + CodeContext::Reset(sc->_callback.codeContext); + debugs(90, 3, "checking client #" << i); storeClientCopy2(this, sc); } + CodeContext::Reset(savedContext); PROF_stop(InvokeHandlers); } @@ -931,7 +935,12 @@ return callback_handler && callback_data; } -store_client::Callback::Callback(STCB *function, void *data) : callback_handler(function), callback_data (data) {} +store_client::Callback::Callback(STCB *function, void *data): + callback_handler(function), + callback_data(data), + codeContext(CodeContext::Current()) +{ +} #if USE_DELAY_POOLS void diff -u -r -N squid-5.0.1/src/StoreClient.h squid-5.0.2/src/StoreClient.h --- squid-5.0.1/src/StoreClient.h 2020-01-20 17:01:23.000000000 +1300 +++ squid-5.0.2/src/StoreClient.h 2020-04-19 22:50:48.000000000 +1200 @@ -9,6 +9,7 @@ #ifndef SQUID_STORECLIENT_H #define SQUID_STORECLIENT_H +#include "base/forward.h" #include "dlink.h" #include "StoreIOBuffer.h" #include "StoreIOState.h" @@ -124,6 +125,7 @@ bool pending() const; STCB *callback_handler; void *callback_data; + CodeContextPointer codeContext; ///< Store client context } _callback; }; diff -u -r -N squid-5.0.1/src/tests/testRock.cc squid-5.0.2/src/tests/testRock.cc --- squid-5.0.1/src/tests/testRock.cc 2020-01-20 17:01:23.000000000 +1300 +++ squid-5.0.2/src/tests/testRock.cc 2020-04-19 22:50:48.000000000 +1200 @@ -9,6 +9,7 @@ #include "squid.h" #include "ConfigParser.h" #include "DiskIO/DiskIOModule.h" +#include "fde.h" #include "fs/rock/RockSwapDir.h" #include "globals.h" #include "HttpHeader.h" @@ -142,6 +143,8 @@ Mem::Init(); + fde::Init(); + comm_init(); httpHeaderInitModule(); /* must go before any header processing (e.g. the one in errorInitialize) */ diff -u -r -N squid-5.0.1/src/tests/testUfs.cc squid-5.0.2/src/tests/testUfs.cc --- squid-5.0.1/src/tests/testUfs.cc 2020-01-20 17:01:23.000000000 +1300 +++ squid-5.0.2/src/tests/testUfs.cc 2020-04-19 22:50:48.000000000 +1200 @@ -8,6 +8,7 @@ #include "squid.h" #include "DiskIO/DiskIOModule.h" +#include "fde.h" #include "fs/ufs/UFSSwapDir.h" #include "globals.h" #include "HttpHeader.h" @@ -72,6 +73,8 @@ Mem::Init(); + fde::Init(); + comm_init(); httpHeaderInitModule(); /* must go before any header processing (e.g. the one in errorInitialize) */ diff -u -r -N squid-5.0.1/src/Transients.cc squid-5.0.2/src/Transients.cc --- squid-5.0.1/src/Transients.cc 2020-01-20 17:01:23.000000000 +1300 +++ squid-5.0.2/src/Transients.cc 2020-04-19 22:50:48.000000000 +1200 @@ -157,7 +157,7 @@ if (StoreEntry *oldE = locals->at(index)) { debugs(20, 3, "not joining private " << *oldE); assert(EBIT_TEST(oldE->flags, KEY_PRIVATE)); - map->closeForReading(index); + map->closeForReadingAndFreeIdle(index); return nullptr; } @@ -251,6 +251,14 @@ } } +bool +Transients::hasWriter(const StoreEntry &e) +{ + if (!e.hasTransients()) + return false; + return map->peekAtWriter(e.mem_obj->xitTable.index); +} + void Transients::noteFreeMapSlice(const Ipc::StoreMapSliceId) { @@ -325,7 +333,7 @@ map->abortWriting(xitTable.index); } else { assert(isReader(entry)); - map->closeForReading(xitTable.index); + map->closeForReadingAndFreeIdle(xitTable.index); } locals->at(xitTable.index) = nullptr; xitTable.index = -1; diff -u -r -N squid-5.0.1/src/Transients.h squid-5.0.2/src/Transients.h --- squid-5.0.1/src/Transients.h 2020-01-20 17:01:23.000000000 +1300 +++ squid-5.0.2/src/Transients.h 2020-04-19 22:50:48.000000000 +1200 @@ -85,6 +85,8 @@ bool isReader(const StoreEntry &) const; /// whether the entry is in "writing to Transients" I/O state bool isWriter(const StoreEntry &) const; + /// whether we or somebody else is in the "writing to Transients" I/O state + bool hasWriter(const StoreEntry &); static int64_t EntryLimit(); diff -u -r -N squid-5.0.1/src/tunnel.cc squid-5.0.2/src/tunnel.cc --- squid-5.0.1/src/tunnel.cc 2020-01-20 17:01:23.000000000 +1300 +++ squid-5.0.2/src/tunnel.cc 2020-04-19 22:50:48.000000000 +1200 @@ -168,6 +168,8 @@ HappyConnOpenerPointer connOpener; ///< current connection opening job ResolvedPeersPointer destinations; ///< paths for forwarding the request bool destinationsFound; ///< At least one candidate path found + // TODO: remove after fixing deferred reads in TunnelStateData::copyRead() + CodeContext::Pointer codeContext; ///< our creator context // AsyncCalls which we set and may need cancelling. struct { @@ -318,7 +320,8 @@ startTime(squid_curtime), waitingForConnectExchange(false), destinations(new ResolvedPeers()), - destinationsFound(false) + destinationsFound(false), + codeContext(CodeContext::Current()) { debugs(26, 3, "TunnelStateData constructed this=" << this); client.readPendingFunc = &tunnelDelayedClientRead; @@ -690,10 +693,13 @@ return; TunnelStateData *tunnel = static_cast(data); + const auto savedContext = CodeContext::Current(); + CodeContext::Reset(tunnel->codeContext); tunnel->client.readPending = NULL; static uint64_t counter=0; debugs(26, 7, "Client read(2) delayed " << ++counter << " times"); tunnel->copyRead(tunnel->client, TunnelStateData::ReadClient); + CodeContext::Reset(savedContext); } static void @@ -703,10 +709,13 @@ return; TunnelStateData *tunnel = static_cast(data); + const auto savedContext = CodeContext::Current(); + CodeContext::Reset(tunnel->codeContext); tunnel->server.readPending = NULL; static uint64_t counter=0; debugs(26, 7, "Server read(2) delayed " << ++counter << " times"); tunnel->copyRead(tunnel->server, TunnelStateData::ReadServer); + CodeContext::Reset(savedContext); } void @@ -717,6 +726,9 @@ // then we schedule an event to try again in a few I/O cycles. // Allow at least 1 byte to be read every (0.3*10) seconds. int bw = from.bytesWanted(1, SQUID_TCP_SO_RCVBUF); + // XXX: Delay pools must not delay client-to-Squid traffic (i.e. when + // from.readPendingFunc is tunnelDelayedClientRead()). + // XXX: Bug #4913: Use DeferredRead instead. if (bw == 1 && ++from.delayedLoops < 10) { from.readPending = this; eventAdd("tunnelDelayedServerRead", from.readPendingFunc, from.readPending, 0.3, true); diff -u -r -N squid-5.0.1/test-suite/Makefile.in squid-5.0.2/test-suite/Makefile.in --- squid-5.0.1/test-suite/Makefile.in 2020-01-20 17:01:35.000000000 +1300 +++ squid-5.0.2/test-suite/Makefile.in 2020-04-20 00:08:53.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -711,6 +711,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/test-suite/squidconf/time_units squid-5.0.2/test-suite/squidconf/time_units --- squid-5.0.1/test-suite/squidconf/time_units 1970-01-01 12:00:00.000000000 +1200 +++ squid-5.0.2/test-suite/squidconf/time_units 2020-04-19 22:50:48.000000000 +1200 @@ -0,0 +1,59 @@ +## Copyright (C) 1996-2020 The Squid Software Foundation and contributors +## +## Squid software is distributed under GPLv2+ license and includes +## contributions from numerous individuals and organizations. +## Please see the COPYING and CONTRIBUTORS files for details. + +# +# Tests for directives with time units +# + +# a millisecond-precision parameter (time-units) + +# minimum checks +dns_timeout 1 millisecond +dns_timeout 0.001 second + +# check support for the maximum value (expressed in each supported time unit) +dns_timeout 9223372036854 milliseconds +dns_timeout 9223372036 seconds +dns_timeout 153722867 minutes +dns_timeout 2562047 hours +dns_timeout 106751 days +dns_timeout 15250 weeks +dns_timeout 7625 fortnights +dns_timeout 3558 months +dns_timeout 292.27 years +dns_timeout 29.227 decades + + +# a second-precision parameter (time-units) + +# minimum checks +max_stale 1 second +max_stale 0.0167 minute + +# check support for the maximum value (expressed in each supported time unit) +# XXX: Use a 32-bit maximum to avoid breaking tests on 32-bit platforms. +# TODO: Generate these test lines based on the target build platform. +max_stale 2147483647 seconds # 2^31-1 +max_stale 35791394 minutes # floor(max_stale seconds/60) +max_stale 596523 hours # floor(max_stale minutes/60) +max_stale 24855 days # floor(max_stale hours/24) +max_stale 3550 weeks # floor(max_stale days/7) +max_stale 1775 fortnights # floor(max_stale weeks/2) +max_stale 828.5 months # max_stale days/30 +max_stale 68.04 years # approx(max_stale days/365.2522) +max_stale 6.804 decades # max_stale years/10 + +# a multiple-options parameter + +url_rewrite_timeout 1 second on_timeout=bypass +url_rewrite_timeout 0.001 year on_timeout=bypass +url_rewrite_timeout 292 year on_timeout=bypass + +# should be a WARNING (-k parse) +url_rewrite_timeout 1 on_timeout=bypass + +# TODO: a nanosecond-precison parameter (time-units-small) + diff -u -r -N squid-5.0.1/tools/apparmor/Makefile.in squid-5.0.2/tools/apparmor/Makefile.in --- squid-5.0.1/tools/apparmor/Makefile.in 2020-01-20 17:01:35.000000000 +1300 +++ squid-5.0.2/tools/apparmor/Makefile.in 2020-04-20 00:08:54.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -344,6 +344,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/tools/helper-mux/helper-mux.8 squid-5.0.2/tools/helper-mux/helper-mux.8 --- squid-5.0.1/tools/helper-mux/helper-mux.8 2020-01-20 17:13:34.000000000 +1300 +++ squid-5.0.2/tools/helper-mux/helper-mux.8 2020-04-20 00:20:19.000000000 +1200 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "HELPER-MUX 8" -.TH HELPER-MUX 8 "2020-01-20" "perl v5.28.1" "User Contributed Perl Documentation" +.TH HELPER-MUX 8 "2020-04-19" "perl v5.28.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff -u -r -N squid-5.0.1/tools/helper-mux/Makefile.in squid-5.0.2/tools/helper-mux/Makefile.in --- squid-5.0.1/tools/helper-mux/Makefile.in 2020-01-20 17:01:35.000000000 +1300 +++ squid-5.0.2/tools/helper-mux/Makefile.in 2020-04-20 00:08:54.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -562,6 +562,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/tools/Makefile.in squid-5.0.2/tools/Makefile.in --- squid-5.0.1/tools/Makefile.in 2020-01-20 17:01:35.000000000 +1300 +++ squid-5.0.2/tools/Makefile.in 2020-04-20 00:08:53.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -699,6 +699,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/tools/purge/Makefile.in squid-5.0.2/tools/purge/Makefile.in --- squid-5.0.1/tools/purge/Makefile.in 2020-01-20 17:01:35.000000000 +1300 +++ squid-5.0.2/tools/purge/Makefile.in 2020-04-20 00:08:54.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -636,6 +636,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/tools/squidclient/Makefile.in squid-5.0.2/tools/squidclient/Makefile.in --- squid-5.0.1/tools/squidclient/Makefile.in 2020-01-20 17:01:35.000000000 +1300 +++ squid-5.0.2/tools/squidclient/Makefile.in 2020-04-20 00:08:54.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -686,6 +686,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/tools/systemd/Makefile.in squid-5.0.2/tools/systemd/Makefile.in --- squid-5.0.1/tools/systemd/Makefile.in 2020-01-20 17:01:35.000000000 +1300 +++ squid-5.0.2/tools/systemd/Makefile.in 2020-04-20 00:08:54.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -344,6 +344,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@ diff -u -r -N squid-5.0.1/tools/systemd/squid.service squid-5.0.2/tools/systemd/squid.service --- squid-5.0.1/tools/systemd/squid.service 2020-01-20 17:01:23.000000000 +1300 +++ squid-5.0.2/tools/systemd/squid.service 2020-04-19 22:50:48.000000000 +1200 @@ -11,12 +11,13 @@ After=network.target network-online.target nss-lookup.target [Service] -Type=forking +Type=notify PIDFile=/var/run/squid.pid ExecStartPre=/usr/sbin/squid --foreground -z -ExecStart=/usr/sbin/squid -sYC +ExecStart=/usr/sbin/squid --foreground -sYC ExecReload=/bin/kill -HUP $MAINPID KillMode=mixed +NotifyAccess=all [Install] WantedBy=multi-user.target diff -u -r -N squid-5.0.1/tools/sysvinit/Makefile.in squid-5.0.2/tools/sysvinit/Makefile.in --- squid-5.0.1/tools/sysvinit/Makefile.in 2020-01-20 17:01:35.000000000 +1300 +++ squid-5.0.2/tools/sysvinit/Makefile.in 2020-04-20 00:08:54.000000000 +1200 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -344,6 +344,8 @@ STORE_LIBS_TO_BUILD = @STORE_LIBS_TO_BUILD@ STORE_TESTS = @STORE_TESTS@ STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ TR = @TR@ TRUE = @TRUE@ URL_REWRITE_HELPERS = @URL_REWRITE_HELPERS@