diff -u -r -N squid-3.1.1/ChangeLog squid-3.1.2/ChangeLog --- squid-3.1.1/ChangeLog 2010-03-29 22:02:56.000000000 +1200 +++ squid-3.1.2/ChangeLog 2010-05-01 23:39:52.000000000 +1200 @@ -1,3 +1,21 @@ +Changes to squid-3.1.2 (01 May 2010): + + - Bug 2913: Fix DB auth warning in new perl version + - Bug 2904: Prevent automake creating incomplete files + - Bug 2899: Regression: Restore lost rfc1738_unescape() data type + - Bug 2895: Regression: TPROXY2 compile errors + - Bug 2879: Regression: headers end-finding + - Bug 2874: Accept literal IPv6 address in icap_service URL + - Bug 2860: Regression: WCCPv1 handshake + - Bug 2848: Pass TCP_RST to client on early disconnect + - Debian Bug 578047: Correct behaviour of --enable-ipv6 + - HTTP/1.1: Advertise 1.1 on replies + - AIX / UNIX build fixes + - Cygwin build fixes + - squidclient: -k option to test connection keep-alive or close + - Improved helper build for wider compatibility + - Ensure the PID file directory exists on install + Changes to squid-3.1.1 (29 Mar 2010): - Bug 2873: undefined symbol diff -u -r -N squid-3.1.1/compat/fdsetsize.h squid-3.1.2/compat/fdsetsize.h --- squid-3.1.1/compat/fdsetsize.h 2010-03-29 22:02:56.000000000 +1200 +++ squid-3.1.2/compat/fdsetsize.h 2010-05-01 23:39:52.000000000 +1200 @@ -33,7 +33,7 @@ * __FD_SETSIZE. Ofcourse a user program may NEVER include bits/whatever.h * directly, so this is a dirty hack! */ -#if defined(_SQUID_LINUX_) +#if _SQUID_LINUX_ || _SQUID_KFREEBSD_ #undef CHANGE_FD_SETSIZE #define CHANGE_FD_SETSIZE 0 #include @@ -52,7 +52,7 @@ * --Marian Durkovic * --Peter Wemm */ -#if defined(_SQUID_FREEBSD_) +#if _SQUID_FREEBSD_ #include #if __FreeBSD_version < 220000 #undef CHANGE_FD_SETSIZE @@ -64,7 +64,7 @@ * Trying to redefine CHANGE_FD_SETSIZE causes a slew of warnings * on Mac OS X Server. */ -#if defined(_SQUID_APPLE_) +#if _SQUID_APPLE_ #undef CHANGE_FD_SETSIZE #define CHANGE_FD_SETSIZE 0 #endif diff -u -r -N squid-3.1.1/compat/GnuRegex.c squid-3.1.2/compat/GnuRegex.c --- squid-3.1.1/compat/GnuRegex.c 2010-03-29 22:02:56.000000000 +1200 +++ squid-3.1.2/compat/GnuRegex.c 2010-05-01 23:39:52.000000000 +1200 @@ -24,7 +24,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. */ /* AIX requires this to be the first thing in the file. */ -#if defined (_AIX) && !defined (REGEX_MALLOC) +#if defined (_AIX) && !defined(REGEX_MALLOC) #pragma alloca #endif @@ -48,13 +48,6 @@ #include #endif -#ifdef STDC_HEADERS -#include -#else -char *malloc(); -char *realloc(); -#endif - /* Define the syntax stuff for \<, \>, etc. */ @@ -110,7 +103,7 @@ /* Compile a fastmap for the compiled pattern in BUFFER; used to * accelerate searches. Return 0 if successful and -2 if was an * internal error. */ -static int re_compile_fastmap _RE_ARGS((struct re_pattern_buffer * buffer)); +static int re_compile_fastmap(struct re_pattern_buffer * buffer); /* Search in the string STRING (with length LENGTH) for the pattern @@ -118,25 +111,22 @@ * characters. Return the starting position of the match, -1 for no * match, or -2 for an internal error. Also return register * information in REGS (if REGS and BUFFER->no_sub are nonzero). */ -static int re_search -_RE_ARGS((struct re_pattern_buffer * buffer, const char *string, - int length, int start, int range, struct re_registers * regs)); +static int re_search(struct re_pattern_buffer * buffer, const char *string, + int length, int start, int range, struct re_registers * regs); /* Like `re_search', but search in the concatenation of STRING1 and * STRING2. Also, stop searching at index START + STOP. */ -static int re_search_2 -_RE_ARGS((struct re_pattern_buffer * buffer, const char *string1, - int length1, const char *string2, int length2, - int start, int range, struct re_registers * regs, int stop)); +static int re_search_2(struct re_pattern_buffer * buffer, const char *string1, + int length1, const char *string2, int length2, + int start, int range, struct re_registers * regs, int stop); /* Like `re_search_2', but return how many characters in STRING the regexp * in BUFFER matched, starting at position START. */ -static int re_match_2 -_RE_ARGS((struct re_pattern_buffer * buffer, const char *string1, - int length1, const char *string2, int length2, - int start, struct re_registers * regs, int stop)); +static int re_match_2(struct re_pattern_buffer * buffer, const char *string1, + int length1, const char *string2, int length2, + int start, struct re_registers * regs, int stop); /* isalpha etc. are used for the character classes. */ diff -u -r -N squid-3.1.1/compat/GnuRegex.h squid-3.1.2/compat/GnuRegex.h --- squid-3.1.1/compat/GnuRegex.h 2010-03-29 22:02:56.000000000 +1200 +++ squid-3.1.2/compat/GnuRegex.h 2010-05-01 23:39:52.000000000 +1200 @@ -405,25 +405,11 @@ * unfortunately clutters up the declarations a bit, but I think it's * worth it. */ -#if STDC_HEADERS - -#define _RE_ARGS(args) args - -#else /* not __STDC__ */ - -#define _RE_ARGS(args) () - -#endif /* not __STDC__ */ - /* POSIX compatibility. */ - extern int regcomp _RE_ARGS((regex_t * preg, const char *pattern, int cflags)); - extern int regexec - _RE_ARGS((const regex_t * preg, const char *string, size_t nmatch, - regmatch_t pmatch[], int eflags)); - extern size_t regerror - _RE_ARGS((int errcode, const regex_t * preg, char *errbuf, - size_t errbuf_size)); - extern void regfree _RE_ARGS((regex_t * preg)); + extern int regcomp(regex_t * preg, const char *pattern, int cflags); + extern int regexec(const regex_t * preg, const char *string, size_t nmatch, regmatch_t pmatch[], int eflags); + extern size_t regerror(int errcode, const regex_t * preg, char *errbuf, size_t errbuf_size); + extern void regfree(regex_t * preg); #ifdef __cplusplus } diff -u -r -N squid-3.1.1/compat/os/mswin.h squid-3.1.2/compat/os/mswin.h --- squid-3.1.1/compat/os/mswin.h 2010-03-29 22:02:56.000000000 +1200 +++ squid-3.1.2/compat/os/mswin.h 2010-05-01 23:39:52.000000000 +1200 @@ -177,8 +177,10 @@ #define SIGUSR2 31 /* user defined signal 2 */ typedef unsigned short int ushort; +#if !_SQUID_CYGWIN_ typedef int uid_t; typedef int gid_t; +#endif struct passwd { char *pw_name; /* user name */ @@ -253,16 +255,37 @@ #undef FD_OPEN #undef FD_READ #undef FD_WRITE + +#ifndef EISCONN #define EISCONN WSAEISCONN +#endif +#ifndef EINPROGRESS #define EINPROGRESS WSAEINPROGRESS +#endif +#ifndef EWOULDBLOCK #define EWOULDBLOCK WSAEWOULDBLOCK +#endif +#ifndef EALREADY #define EALREADY WSAEALREADY +#endif +#ifndef ETIMEDOUT #define ETIMEDOUT WSAETIMEDOUT +#endif +#ifndef ECONNREFUSED #define ECONNREFUSED WSAECONNREFUSED +#endif +#ifndef ECONNRESET #define ECONNRESET WSAECONNRESET +#endif +#ifndef ENOTCONN #define ENOTCONN WSAENOTCONN +#endif +#ifndef ERESTART #define ERESTART WSATRY_AGAIN +#endif +#ifndef EAFNOSUPPORT #define EAFNOSUPPORT WSAEAFNOSUPPORT +#endif #undef h_errno #define h_errno errno /* we'll set it ourselves */ @@ -705,6 +728,9 @@ #define open _open /* Needed in win32lib.c */ #endif /* #ifdef __cplusplus */ +#if HAVE_SYS_RESOURCE_H +#include +#else #define RUSAGE_SELF 0 /* calling process */ #define RUSAGE_CHILDREN -1 /* terminated child processes */ @@ -726,6 +752,7 @@ long ru_nvcsw; /* voluntary context switches */ long ru_nivcsw; /* involuntary context switches */ }; +#endif /* HAVE_SYS_RESOURCE_H */ #undef ACL diff -u -r -N squid-3.1.1/configure squid-3.1.2/configure --- squid-3.1.1/configure 2010-03-29 22:03:35.000000000 +1200 +++ squid-3.1.2/configure 2010-05-01 23:40:30.000000000 +1200 @@ -1,7 +1,7 @@ #! /bin/sh # From configure.in Revision. # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.62 for Squid Web Proxy 3.1.1. +# Generated by GNU Autoconf 2.62 for Squid Web Proxy 3.1.2. # # Report bugs to . # @@ -751,8 +751,8 @@ # Identity of this package. PACKAGE_NAME='Squid Web Proxy' PACKAGE_TARNAME='squid' -PACKAGE_VERSION='3.1.1' -PACKAGE_STRING='Squid Web Proxy 3.1.1' +PACKAGE_VERSION='3.1.2' +PACKAGE_STRING='Squid Web Proxy 3.1.2' PACKAGE_BUGREPORT='http://www.squid-cache.org/bugs/' ac_unique_file="src/main.cc" @@ -1692,7 +1692,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 3.1.1 to adapt to many kinds of systems. +\`configure' configures Squid Web Proxy 3.1.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1762,7 +1762,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Squid Web Proxy 3.1.1:";; + short | recursive ) echo "Configuration of Squid Web Proxy 3.1.2:";; esac cat <<\_ACEOF @@ -2094,7 +2094,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Squid Web Proxy configure 3.1.1 +Squid Web Proxy configure 3.1.2 generated by GNU Autoconf 2.62 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -2108,7 +2108,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 3.1.1, which was +It was created by Squid Web Proxy $as_me 3.1.2, which was generated by GNU Autoconf 2.62. Invocation command line was $ $0 $@ @@ -2826,7 +2826,7 @@ # Define the identity of the package. PACKAGE='squid' - VERSION='3.1.1' + VERSION='3.1.2' cat >>confdefs.h <<_ACEOF @@ -46893,25 +46893,23 @@ { $as_echo "$as_me:$LINENO: checking whether to enable IPv6" >&5 $as_echo_n "checking whether to enable IPv6... " >&6; } -use_ipng=yes +use_ipng=auto # Check whether --enable-ipv6 was given. if test "${enable_ipv6+set}" = set; then - enableval=$enable_ipv6; if test "x$enableval" = "xyes" ; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - use_ipng=no - fi + enableval=$enable_ipv6; case $enableval in + yes|no) + use_ipng=$enableval + ;; + *) + ;; + esac -else - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } fi +{ $as_echo "$as_me:$LINENO: result: $use_ipng" >&5 +$as_echo "$use_ipng" >&6; } -if test "$use_ipng" = "yes"; then +if test "$use_ipng" != "no"; then SAVED_LIBS="$LIBS" case "$host" in *-solaris*) @@ -46922,7 +46920,7 @@ esac { $as_echo "$as_me:$LINENO: checking if PF_INET6 is available" >&5 $as_echo_n "checking if PF_INET6 is available... " >&6; } -if { as_var=$use_ipng; eval "test \"\${$as_var+set}\" = set"; }; then +if test "${squid_cv_pf_inet6+set}" = set; then $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then @@ -46971,19 +46969,14 @@ ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - use_ipng=yes - SAVED_LIBS="$LIBS" + squid_cv_pf_inet6="yes" ; SAVED_LIBS="$LIBS" else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - use_ipng=no +squid_cv_pf_inet6="no" fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext @@ -46992,14 +46985,23 @@ fi -ac_res=`eval 'as_val=${'$use_ipng'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } +{ $as_echo "$as_me:$LINENO: result: $squid_cv_pf_inet6" >&5 +$as_echo "$squid_cv_pf_inet6" >&6; } LIBS="$SAVED_LIBS" fi -if test "$use_ipng" = "yes"; then +# NP: semi-silent failure as IPv4-only mode is perfectly usable on this system. +# unless --enable-ipv6 is explicitly used. in which case it's a hard fail. +if test "x$use_ipng" = "xyes" && test "x$squid_cv_pf_inet6" = "xno"; then + { { $as_echo "$as_me:$LINENO: error: IPv6 cannot be built on this system. Basic kernel definitions are missing." >&5 +$as_echo "$as_me: error: IPv6 cannot be built on this system. Basic kernel definitions are missing." >&2;} + { (exit 1); exit 1; }; } +elif test "x$use_ipng" = "xauto" && test "x$squid_cv_pf_inet6" = "xno"; then + { $as_echo "$as_me:$LINENO: WARNING: IPv6 cannot be built on this system. Basic kernel definitions are missing." >&5 +$as_echo "$as_me: WARNING: IPv6 cannot be built on this system. Basic kernel definitions are missing." >&2;} +fi + +if test "$use_ipng" != "no" && test "$squid_cv_pf_inet6" = "yes" ; then cat >>confdefs.h <<\_ACEOF #define USE_IPV6 1 @@ -47211,9 +47213,7 @@ fi else - # NP: semi-silent failure as IPv4-only mode is perfectly usable on this system. - { $as_echo "$as_me:$LINENO: WARNING: IPv6 is not available on this system." >&5 -$as_echo "$as_me: WARNING: IPv6 is not available on this system." >&2;} + # IPv6 is not available, but is not explicitly required. Auto-Disable. cat >>confdefs.h <<\_ACEOF #define USE_IPV6 0 @@ -51146,7 +51146,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 3.1.1, which was +This file was extended by Squid Web Proxy $as_me 3.1.2, which was generated by GNU Autoconf 2.62. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -51199,7 +51199,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ -Squid Web Proxy config.status 3.1.1 +Squid Web Proxy config.status 3.1.2 configured by $0, generated by GNU Autoconf 2.62, with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" diff -u -r -N squid-3.1.1/configure.in squid-3.1.2/configure.in --- squid-3.1.1/configure.in 2010-03-29 22:03:35.000000000 +1200 +++ squid-3.1.2/configure.in 2010-05-01 23:40:30.000000000 +1200 @@ -2,7 +2,7 @@ dnl dnl $Id$ dnl -AC_INIT([Squid Web Proxy],[3.1.1],[http://www.squid-cache.org/bugs/],[squid]) +AC_INIT([Squid Web Proxy],[3.1.2],[http://www.squid-cache.org/bugs/],[squid]) AC_PREREQ(2.61) AC_CONFIG_HEADERS([include/autoconf.h]) AC_CONFIG_AUX_DIR(cfgaux) @@ -2650,18 +2650,20 @@ dnl Enable IPv6 support AC_MSG_CHECKING([whether to enable IPv6]) -use_ipng=yes +use_ipng=auto AC_ARG_ENABLE(ipv6, AS_HELP_STRING([--disable-ipv6],[Disable IPv6 support]), -[ if test "x$enableval" = "xyes" ; then - AC_MSG_RESULT(yes) - else - AC_MSG_RESULT(no) - use_ipng=no - fi -],[AC_MSG_RESULT(yes)]) +[ case $enableval in + yes|no) + use_ipng=$enableval + ;; + *) + ;; + esac +]) +AC_MSG_RESULT($use_ipng) -if test "$use_ipng" = "yes"; then +if test "$use_ipng" != "no"; then SAVED_LIBS="$LIBS" dnl Solaris 10/11 requires -lsocket case "$host" in @@ -2671,7 +2673,7 @@ *) ;; esac - AC_CACHE_CHECK([if PF_INET6 is available], $use_ipng, + AC_CACHE_CHECK([if PF_INET6 is available], squid_cv_pf_inet6, AC_RUN_IFELSE([AC_LANG_SOURCE([[ /* PF_INET6 available check */ # include # include @@ -2681,15 +2683,20 @@ else return 0; } - ]])],[ AC_MSG_RESULT(yes) - use_ipng=yes - SAVED_LIBS="$LIBS" ],[ AC_MSG_RESULT(no) - use_ipng=no ],[]) + ]])],[squid_cv_pf_inet6="yes" ; SAVED_LIBS="$LIBS"],[squid_cv_pf_inet6="no"],[]) ) LIBS="$SAVED_LIBS" fi -if test "$use_ipng" = "yes"; then +# NP: semi-silent failure as IPv4-only mode is perfectly usable on this system. +# unless --enable-ipv6 is explicitly used. in which case it's a hard fail. +if test "x$use_ipng" = "xyes" && test "x$squid_cv_pf_inet6" = "xno"; then + AC_MSG_ERROR([IPv6 cannot be built on this system. Basic kernel definitions are missing.]) +elif test "x$use_ipng" = "xauto" && test "x$squid_cv_pf_inet6" = "xno"; then + AC_MSG_WARN([IPv6 cannot be built on this system. Basic kernel definitions are missing.]) +fi + +if test "$use_ipng" != "no" && test "$squid_cv_pf_inet6" = "yes" ; then AC_DEFINE(USE_IPV6,1,[Enable support for IPv6 ]) SET_IPV6_SETTINGS="" use_v4mapped=yes @@ -2760,8 +2767,7 @@ fi else - # NP: semi-silent failure as IPv4-only mode is perfectly usable on this system. - AC_MSG_WARN([IPv6 is not available on this system.]) + # IPv6 is not available, but is not explicitly required. Auto-Disable. AC_DEFINE(USE_IPV6,0,[Enable support for IPv6]) AC_DEFINE(IPV6_SPECIAL_SPLITSTACK,0,[Enable support for IPv6 on split-stack implementations]) AC_DEFINE(IPV6_SPECIAL_V4MAPPED,0,[Enable v4-mapping through v6 sockets]) diff -u -r -N squid-3.1.1/helpers/basic_auth/DB/config.test squid-3.1.2/helpers/basic_auth/DB/config.test --- squid-3.1.1/helpers/basic_auth/DB/config.test 1970-01-01 12:00:00.000000000 +1200 +++ squid-3.1.2/helpers/basic_auth/DB/config.test 2010-05-01 23:39:52.000000000 +1200 @@ -0,0 +1,7 @@ +#!/bin/sh + +## Test: do we have perl to build the helper scripts? +## Test: do we have pod2man to build the manual? +perl --version >/dev/null && echo | pod2man >/dev/null + +exit $? diff -u -r -N squid-3.1.1/helpers/basic_auth/DB/Makefile.am squid-3.1.2/helpers/basic_auth/DB/Makefile.am --- squid-3.1.1/helpers/basic_auth/DB/Makefile.am 2010-03-29 22:02:56.000000000 +1200 +++ squid-3.1.2/helpers/basic_auth/DB/Makefile.am 2010-05-01 23:39:52.000000000 +1200 @@ -11,7 +11,8 @@ do_subst = sed -e 's,[@]PERL[@],$(PERL),g' man_MANS = squid_db_auth.8 EXTRA_DIST = passwd.sql \ - squid_db_auth.in + squid_db_auth.in \ + config.test squid_db_auth.8: squid_db_auth pod2man squid_db_auth squid_db_auth.8 diff -u -r -N squid-3.1.1/helpers/basic_auth/DB/Makefile.in squid-3.1.2/helpers/basic_auth/DB/Makefile.in --- squid-3.1.1/helpers/basic_auth/DB/Makefile.in 2010-03-29 22:03:12.000000000 +1200 +++ squid-3.1.2/helpers/basic_auth/DB/Makefile.in 2010-05-01 23:40:07.000000000 +1200 @@ -242,7 +242,8 @@ do_subst = sed -e 's,[@]PERL[@],$(PERL),g' man_MANS = squid_db_auth.8 EXTRA_DIST = passwd.sql \ - squid_db_auth.in + squid_db_auth.in \ + config.test all: all-am diff -u -r -N squid-3.1.1/helpers/basic_auth/DB/squid_db_auth.in squid-3.1.2/helpers/basic_auth/DB/squid_db_auth.in --- squid-3.1.1/helpers/basic_auth/DB/squid_db_auth.in 2010-03-29 22:02:56.000000000 +1200 +++ squid-3.1.2/helpers/basic_auth/DB/squid_db_auth.in 2010-05-01 23:39:52.000000000 +1200 @@ -92,9 +92,9 @@ sub close_db() { return if !defined($_dbh); + undef $_sth; $_dbh->disconnect(); undef $_dbh; - undef $_sth; } sub open_db() diff -u -r -N squid-3.1.1/helpers/basic_auth/getpwnam/config.test squid-3.1.2/helpers/basic_auth/getpwnam/config.test --- squid-3.1.1/helpers/basic_auth/getpwnam/config.test 1970-01-01 12:00:00.000000000 +1200 +++ squid-3.1.2/helpers/basic_auth/getpwnam/config.test 2010-05-01 23:39:52.000000000 +1200 @@ -0,0 +1,5 @@ +#!/bin/sh +if [ -f /usr/include/pwd.h ]; then + exit 0 +fi +exit 1 diff -u -r -N squid-3.1.1/helpers/basic_auth/getpwnam/Makefile.am squid-3.1.2/helpers/basic_auth/getpwnam/Makefile.am --- squid-3.1.1/helpers/basic_auth/getpwnam/Makefile.am 2010-03-29 22:02:56.000000000 +1200 +++ squid-3.1.2/helpers/basic_auth/getpwnam/Makefile.am 2010-05-01 23:39:52.000000000 +1200 @@ -20,3 +20,5 @@ -L$(top_builddir)/lib -lmiscutil \ $(CRYPTLIB) \ $(XTRA_LIBS) + +EXTRA_DIST = config.test diff -u -r -N squid-3.1.1/helpers/basic_auth/getpwnam/Makefile.in squid-3.1.2/helpers/basic_auth/getpwnam/Makefile.in --- squid-3.1.1/helpers/basic_auth/getpwnam/Makefile.in 2010-03-29 22:03:13.000000000 +1200 +++ squid-3.1.2/helpers/basic_auth/getpwnam/Makefile.in 2010-05-01 23:40:09.000000000 +1200 @@ -270,6 +270,7 @@ $(CRYPTLIB) \ $(XTRA_LIBS) +EXTRA_DIST = config.test all: all-am .SUFFIXES: diff -u -r -N squid-3.1.1/helpers/basic_auth/LDAP/config.test squid-3.1.2/helpers/basic_auth/LDAP/config.test --- squid-3.1.1/helpers/basic_auth/LDAP/config.test 1970-01-01 12:00:00.000000000 +1200 +++ squid-3.1.2/helpers/basic_auth/LDAP/config.test 2010-05-01 23:39:52.000000000 +1200 @@ -0,0 +1,8 @@ +#!/bin/sh +if [ -f /usr/include/ldap.h ]; then + exit 0 +fi +if [ -f /usr/include/winldap.h ]; then + exit 0 +fi +exit 1 diff -u -r -N squid-3.1.1/helpers/basic_auth/LDAP/Makefile.am squid-3.1.2/helpers/basic_auth/LDAP/Makefile.am --- squid-3.1.1/helpers/basic_auth/LDAP/Makefile.am 2010-03-29 22:02:56.000000000 +1200 +++ squid-3.1.2/helpers/basic_auth/LDAP/Makefile.am 2010-05-01 23:39:52.000000000 +1200 @@ -10,8 +10,8 @@ libexec_PROGRAMS = squid_ldap_auth man_MANS = squid_ldap_auth.8 -EXTRA_DIST = squid_ldap_auth.8 squid_ldap_auth_SOURCES = squid_ldap_auth.c +EXTRA_DIST = squid_ldap_auth.8 config.test LDADD = \ $(top_builddir)/compat/libcompat.la \ diff -u -r -N squid-3.1.1/helpers/basic_auth/LDAP/Makefile.in squid-3.1.2/helpers/basic_auth/LDAP/Makefile.in --- squid-3.1.1/helpers/basic_auth/LDAP/Makefile.in 2010-03-29 22:03:12.000000000 +1200 +++ squid-3.1.2/helpers/basic_auth/LDAP/Makefile.in 2010-05-01 23:40:07.000000000 +1200 @@ -268,8 +268,8 @@ INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/include -I$(top_srcdir)/src \ -I$(top_builddir)/include $(SQUID_CPPUNIT_INC) -I$(srcdir) man_MANS = squid_ldap_auth.8 -EXTRA_DIST = squid_ldap_auth.8 squid_ldap_auth_SOURCES = squid_ldap_auth.c +EXTRA_DIST = squid_ldap_auth.8 config.test LDADD = \ $(top_builddir)/compat/libcompat.la \ -L$(top_builddir)/lib -lmiscutil \ diff -u -r -N squid-3.1.1/helpers/basic_auth/MSNT/config.test squid-3.1.2/helpers/basic_auth/MSNT/config.test --- squid-3.1.1/helpers/basic_auth/MSNT/config.test 1970-01-01 12:00:00.000000000 +1200 +++ squid-3.1.2/helpers/basic_auth/MSNT/config.test 2010-05-01 23:39:52.000000000 +1200 @@ -0,0 +1,9 @@ +#!/bin/sh +# Don't build on Windows +if [ -f /usr/include/w32api/windows.h ]; then + exit 1 +fi +if [ -f /usr/include/windows.h ]; then + exit 1 +fi +exit 0 diff -u -r -N squid-3.1.1/helpers/basic_auth/MSNT/Makefile.am squid-3.1.2/helpers/basic_auth/MSNT/Makefile.am --- squid-3.1.1/helpers/basic_auth/MSNT/Makefile.am 2010-03-29 22:02:56.000000000 +1200 +++ squid-3.1.2/helpers/basic_auth/MSNT/Makefile.am 2010-05-01 23:39:52.000000000 +1200 @@ -1,11 +1,3 @@ -# -# Makefile for the Squid Object Cache server -# -# $Id$ -# -# Uncomment and customize the following to suit your needs: -# - include $(top_srcdir)/src/Common.am MSNTAUTH_CONF = $(sysconfdir)/msntauth.conf @@ -25,7 +17,8 @@ COPYING-2.0 \ msntauth.conf.default \ msntauth-v2.0.lsm \ - README.html + README.html \ + config.test sysconf_DATA = \ msntauth.conf.default diff -u -r -N squid-3.1.1/helpers/basic_auth/MSNT/Makefile.in squid-3.1.2/helpers/basic_auth/MSNT/Makefile.in --- squid-3.1.1/helpers/basic_auth/MSNT/Makefile.in 2010-03-29 22:03:12.000000000 +1200 +++ squid-3.1.2/helpers/basic_auth/MSNT/Makefile.in 2010-05-01 23:40:07.000000000 +1200 @@ -14,14 +14,6 @@ @SET_MAKE@ -# -# Makefile for the Squid Object Cache server -# -# $Id$ -# -# Uncomment and customize the following to suit your needs: -# - VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ @@ -290,7 +282,8 @@ COPYING-2.0 \ msntauth.conf.default \ msntauth-v2.0.lsm \ - README.html + README.html \ + config.test sysconf_DATA = \ msntauth.conf.default diff -u -r -N squid-3.1.1/helpers/basic_auth/mswin_sspi/config.test squid-3.1.2/helpers/basic_auth/mswin_sspi/config.test --- squid-3.1.1/helpers/basic_auth/mswin_sspi/config.test 1970-01-01 12:00:00.000000000 +1200 +++ squid-3.1.2/helpers/basic_auth/mswin_sspi/config.test 2010-05-01 23:39:52.000000000 +1200 @@ -0,0 +1,8 @@ +#!/bin/sh +if [ -f /usr/include/w32api/windows.h ]; then + exit 0 +fi +if [ -f /usr/include/windows.h ]; then + exit 0 +fi +exit 1 diff -u -r -N squid-3.1.1/helpers/basic_auth/mswin_sspi/Makefile.am squid-3.1.2/helpers/basic_auth/mswin_sspi/Makefile.am --- squid-3.1.1/helpers/basic_auth/mswin_sspi/Makefile.am 2010-03-29 22:02:56.000000000 +1200 +++ squid-3.1.2/helpers/basic_auth/mswin_sspi/Makefile.am 2010-05-01 23:39:52.000000000 +1200 @@ -21,4 +21,4 @@ ## we need our local files too (but avoid -I. at all costs) INCLUDES += -I$(srcdir) -EXTRA_DIST = readme.txt +EXTRA_DIST = readme.txt config.test diff -u -r -N squid-3.1.1/helpers/basic_auth/mswin_sspi/Makefile.in squid-3.1.2/helpers/basic_auth/mswin_sspi/Makefile.in --- squid-3.1.1/helpers/basic_auth/mswin_sspi/Makefile.in 2010-03-29 22:03:13.000000000 +1200 +++ squid-3.1.2/helpers/basic_auth/mswin_sspi/Makefile.in 2010-05-01 23:40:09.000000000 +1200 @@ -270,7 +270,7 @@ -lnetapi32 -ladvapi32 -lsspwin32 \ $(XTRA_LIBS) -EXTRA_DIST = readme.txt +EXTRA_DIST = readme.txt config.test all: all-am .SUFFIXES: diff -u -r -N squid-3.1.1/helpers/basic_auth/multi-domain-NTLM/config.test squid-3.1.2/helpers/basic_auth/multi-domain-NTLM/config.test --- squid-3.1.1/helpers/basic_auth/multi-domain-NTLM/config.test 1970-01-01 12:00:00.000000000 +1200 +++ squid-3.1.2/helpers/basic_auth/multi-domain-NTLM/config.test 2010-05-01 23:39:52.000000000 +1200 @@ -0,0 +1,2 @@ +#!/bin/sh +exit 0 diff -u -r -N squid-3.1.1/helpers/basic_auth/multi-domain-NTLM/Makefile.am squid-3.1.2/helpers/basic_auth/multi-domain-NTLM/Makefile.am --- squid-3.1.1/helpers/basic_auth/multi-domain-NTLM/Makefile.am 2010-03-29 22:02:56.000000000 +1200 +++ squid-3.1.2/helpers/basic_auth/multi-domain-NTLM/Makefile.am 2010-05-01 23:39:52.000000000 +1200 @@ -11,4 +11,5 @@ EXTRA_DIST = \ smb_auth.pl \ - README.txt + README.txt \ + config.test diff -u -r -N squid-3.1.1/helpers/basic_auth/multi-domain-NTLM/Makefile.in squid-3.1.2/helpers/basic_auth/multi-domain-NTLM/Makefile.in --- squid-3.1.1/helpers/basic_auth/multi-domain-NTLM/Makefile.in 2010-03-29 22:03:13.000000000 +1200 +++ squid-3.1.2/helpers/basic_auth/multi-domain-NTLM/Makefile.in 2010-05-01 23:40:09.000000000 +1200 @@ -239,7 +239,8 @@ EXTRA_DIST = \ smb_auth.pl \ - README.txt + README.txt \ + config.test all: all-am diff -u -r -N squid-3.1.1/helpers/basic_auth/NCSA/config.test squid-3.1.2/helpers/basic_auth/NCSA/config.test --- squid-3.1.1/helpers/basic_auth/NCSA/config.test 1970-01-01 12:00:00.000000000 +1200 +++ squid-3.1.2/helpers/basic_auth/NCSA/config.test 2010-05-01 23:39:52.000000000 +1200 @@ -0,0 +1,2 @@ +#!/bin/sh +exit 0 diff -u -r -N squid-3.1.1/helpers/basic_auth/NCSA/Makefile.am squid-3.1.2/helpers/basic_auth/NCSA/Makefile.am --- squid-3.1.1/helpers/basic_auth/NCSA/Makefile.am 2010-03-29 22:02:56.000000000 +1200 +++ squid-3.1.2/helpers/basic_auth/NCSA/Makefile.am 2010-05-01 23:39:52.000000000 +1200 @@ -11,7 +11,7 @@ libexec_PROGRAMS = ncsa_auth ncsa_auth_SOURCES = ncsa_auth.c crypt_md5.c crypt_md5.h man_MANS = ncsa_auth.8 -EXTRA_DIST = ncsa_auth.8 +EXTRA_DIST = ncsa_auth.8 config.test LDADD = \ $(top_builddir)/compat/libcompat.la \ -L$(top_builddir)/lib -lmiscutil \ diff -u -r -N squid-3.1.1/helpers/basic_auth/NCSA/Makefile.in squid-3.1.2/helpers/basic_auth/NCSA/Makefile.in --- squid-3.1.1/helpers/basic_auth/NCSA/Makefile.in 2010-03-29 22:03:12.000000000 +1200 +++ squid-3.1.2/helpers/basic_auth/NCSA/Makefile.in 2010-05-01 23:40:08.000000000 +1200 @@ -269,7 +269,7 @@ -I$(top_builddir)/include $(SQUID_CPPUNIT_INC) -I$(srcdir) ncsa_auth_SOURCES = ncsa_auth.c crypt_md5.c crypt_md5.h man_MANS = ncsa_auth.8 -EXTRA_DIST = ncsa_auth.8 +EXTRA_DIST = ncsa_auth.8 config.test LDADD = \ $(top_builddir)/compat/libcompat.la \ -L$(top_builddir)/lib -lmiscutil \ diff -u -r -N squid-3.1.1/helpers/basic_auth/PAM/config.test squid-3.1.2/helpers/basic_auth/PAM/config.test --- squid-3.1.1/helpers/basic_auth/PAM/config.test 1970-01-01 12:00:00.000000000 +1200 +++ squid-3.1.2/helpers/basic_auth/PAM/config.test 2010-05-01 23:39:52.000000000 +1200 @@ -0,0 +1,5 @@ +#!/bin/sh +if [ -f /usr/include/security/pam_appl.h ]; then + exit 0 +fi +exit 1 diff -u -r -N squid-3.1.1/helpers/basic_auth/PAM/Makefile.am squid-3.1.2/helpers/basic_auth/PAM/Makefile.am --- squid-3.1.1/helpers/basic_auth/PAM/Makefile.am 2010-03-29 22:02:56.000000000 +1200 +++ squid-3.1.2/helpers/basic_auth/PAM/Makefile.am 2010-05-01 23:39:52.000000000 +1200 @@ -9,7 +9,7 @@ include $(top_srcdir)/src/Common.am man_MANS = pam_auth.8 -EXTRA_DIST = pam_auth.8 +EXTRA_DIST = pam_auth.8 config.test libexec_PROGRAMS = pam_auth ## we need our local files too (but avoid -I. at all costs) diff -u -r -N squid-3.1.1/helpers/basic_auth/PAM/Makefile.in squid-3.1.2/helpers/basic_auth/PAM/Makefile.in --- squid-3.1.1/helpers/basic_auth/PAM/Makefile.in 2010-03-29 22:03:12.000000000 +1200 +++ squid-3.1.2/helpers/basic_auth/PAM/Makefile.in 2010-05-01 23:40:08.000000000 +1200 @@ -267,7 +267,7 @@ INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/include -I$(top_srcdir)/src \ -I$(top_builddir)/include $(SQUID_CPPUNIT_INC) -I$(srcdir) man_MANS = pam_auth.8 -EXTRA_DIST = pam_auth.8 +EXTRA_DIST = pam_auth.8 config.test LDADD = \ $(top_builddir)/compat/libcompat.la \ -L$(top_builddir)/lib -lmiscutil \ diff -u -r -N squid-3.1.1/helpers/basic_auth/POP3/config.test squid-3.1.2/helpers/basic_auth/POP3/config.test --- squid-3.1.1/helpers/basic_auth/POP3/config.test 1970-01-01 12:00:00.000000000 +1200 +++ squid-3.1.2/helpers/basic_auth/POP3/config.test 2010-05-01 23:39:52.000000000 +1200 @@ -0,0 +1,2 @@ +#!/bin/sh +exit 0 diff -u -r -N squid-3.1.1/helpers/basic_auth/POP3/Makefile.am squid-3.1.2/helpers/basic_auth/POP3/Makefile.am --- squid-3.1.1/helpers/basic_auth/POP3/Makefile.am 2010-03-29 22:02:57.000000000 +1200 +++ squid-3.1.2/helpers/basic_auth/POP3/Makefile.am 2010-05-01 23:39:52.000000000 +1200 @@ -10,4 +10,5 @@ pop3.pl EXTRA_DIST = \ - pop3.pl + pop3.pl \ + config.test diff -u -r -N squid-3.1.1/helpers/basic_auth/POP3/Makefile.in squid-3.1.2/helpers/basic_auth/POP3/Makefile.in --- squid-3.1.1/helpers/basic_auth/POP3/Makefile.in 2010-03-29 22:03:12.000000000 +1200 +++ squid-3.1.2/helpers/basic_auth/POP3/Makefile.in 2010-05-01 23:40:08.000000000 +1200 @@ -238,7 +238,8 @@ pop3.pl EXTRA_DIST = \ - pop3.pl + pop3.pl \ + config.test all: all-am diff -u -r -N squid-3.1.1/helpers/basic_auth/SASL/config.test squid-3.1.2/helpers/basic_auth/SASL/config.test --- squid-3.1.1/helpers/basic_auth/SASL/config.test 1970-01-01 12:00:00.000000000 +1200 +++ squid-3.1.2/helpers/basic_auth/SASL/config.test 2010-05-01 23:39:52.000000000 +1200 @@ -0,0 +1,13 @@ +#!/bin/sh +if [ -f /usr/include/sasl.h -o -f /usr/include/sasl/sasl.h ]; then + if [ -f /usr/lib/libsasl.a -o -f /usr/lib/libsasl2.a ]; then + exit 0 + fi + if [ -f /usr/lib/libsasl.la -o -f /usr/lib/libsasl2.la ]; then + exit 0 + fi + if [ -f /usr/lib/libsasl.so -o -f /usr/lib/libsasl2.so ]; then + exit 0 + fi +fi +exit 1 diff -u -r -N squid-3.1.1/helpers/basic_auth/SASL/Makefile.am squid-3.1.2/helpers/basic_auth/SASL/Makefile.am --- squid-3.1.1/helpers/basic_auth/SASL/Makefile.am 2010-03-29 22:02:56.000000000 +1200 +++ squid-3.1.2/helpers/basic_auth/SASL/Makefile.am 2010-05-01 23:39:52.000000000 +1200 @@ -19,4 +19,4 @@ $(LIBSASL) \ $(XTRA_LIBS) -EXTRA_DIST = squid_sasl_auth squid_sasl_auth.conf +EXTRA_DIST = squid_sasl_auth squid_sasl_auth.conf config.test diff -u -r -N squid-3.1.1/helpers/basic_auth/SASL/Makefile.in squid-3.1.2/helpers/basic_auth/SASL/Makefile.in --- squid-3.1.1/helpers/basic_auth/SASL/Makefile.in 2010-03-29 22:03:12.000000000 +1200 +++ squid-3.1.2/helpers/basic_auth/SASL/Makefile.in 2010-05-01 23:40:08.000000000 +1200 @@ -269,7 +269,7 @@ $(LIBSASL) \ $(XTRA_LIBS) -EXTRA_DIST = squid_sasl_auth squid_sasl_auth.conf +EXTRA_DIST = squid_sasl_auth squid_sasl_auth.conf config.test all: all-am .SUFFIXES: diff -u -r -N squid-3.1.1/helpers/basic_auth/SMB/config.test squid-3.1.2/helpers/basic_auth/SMB/config.test --- squid-3.1.1/helpers/basic_auth/SMB/config.test 1970-01-01 12:00:00.000000000 +1200 +++ squid-3.1.2/helpers/basic_auth/SMB/config.test 2010-05-01 23:39:52.000000000 +1200 @@ -0,0 +1,8 @@ +#!/bin/sh +for prefix in ${SAMBAPREFIX} /usr/local /opt /opt/samba /usr/local/samba /usr +do + if [ -x ${prefix}/bin/smbclient ]; then + exit 0 + fi +done +exit 1 diff -u -r -N squid-3.1.1/helpers/basic_auth/SMB/Makefile.am squid-3.1.2/helpers/basic_auth/SMB/Makefile.am --- squid-3.1.1/helpers/basic_auth/SMB/Makefile.am 2010-03-29 22:02:56.000000000 +1200 +++ squid-3.1.2/helpers/basic_auth/SMB/Makefile.am 2010-05-01 23:39:52.000000000 +1200 @@ -22,7 +22,7 @@ libexec_SCRIPTS = $(SMB_AUTH_HELPER) libexec_PROGRAMS = smb_auth smb_auth_CFLAGS = -DSAMBAPREFIX=\"$(SAMBAPREFIX)\" -DHELPERSCRIPT=\"$(SMB_AUTH_HELPER_PATH)\" -EXTRA_DIST = smb_auth.sh COPYING-2.0 +EXTRA_DIST = smb_auth.sh COPYING-2.0 config.test ## we need our local files too (but avoid -I. at all costs) INCLUDES += -I$(srcdir) diff -u -r -N squid-3.1.1/helpers/basic_auth/SMB/Makefile.in squid-3.1.2/helpers/basic_auth/SMB/Makefile.in --- squid-3.1.1/helpers/basic_auth/SMB/Makefile.in 2010-03-29 22:03:13.000000000 +1200 +++ squid-3.1.2/helpers/basic_auth/SMB/Makefile.in 2010-05-01 23:40:08.000000000 +1200 @@ -279,7 +279,7 @@ SMB_AUTH_HELPER_PATH = $(libexecdir)/$(SMB_AUTH_HELPER) libexec_SCRIPTS = $(SMB_AUTH_HELPER) smb_auth_CFLAGS = -DSAMBAPREFIX=\"$(SAMBAPREFIX)\" -DHELPERSCRIPT=\"$(SMB_AUTH_HELPER_PATH)\" -EXTRA_DIST = smb_auth.sh COPYING-2.0 +EXTRA_DIST = smb_auth.sh COPYING-2.0 config.test LDADD = \ $(top_builddir)/compat/libcompat.la \ -L$(top_builddir)/lib -lmiscutil \ diff -u -r -N squid-3.1.1/helpers/basic_auth/squid_radius_auth/config.test squid-3.1.2/helpers/basic_auth/squid_radius_auth/config.test --- squid-3.1.1/helpers/basic_auth/squid_radius_auth/config.test 1970-01-01 12:00:00.000000000 +1200 +++ squid-3.1.2/helpers/basic_auth/squid_radius_auth/config.test 2010-05-01 23:39:52.000000000 +1200 @@ -0,0 +1,2 @@ +#!/bin/sh +exit 0 diff -u -r -N squid-3.1.1/helpers/basic_auth/squid_radius_auth/Makefile.am squid-3.1.2/helpers/basic_auth/squid_radius_auth/Makefile.am --- squid-3.1.1/helpers/basic_auth/squid_radius_auth/Makefile.am 2010-03-29 22:02:57.000000000 +1200 +++ squid-3.1.2/helpers/basic_auth/squid_radius_auth/Makefile.am 2010-05-01 23:39:52.000000000 +1200 @@ -10,7 +10,7 @@ libexec_PROGRAMS = squid_radius_auth man_MANS = squid_radius_auth.8 -EXTRA_DIST = squid_radius_auth.8 +EXTRA_DIST = squid_radius_auth.8 config.test squid_radius_auth_SOURCES = \ squid_rad_auth.c \ radius.h \ diff -u -r -N squid-3.1.1/helpers/basic_auth/squid_radius_auth/Makefile.in squid-3.1.2/helpers/basic_auth/squid_radius_auth/Makefile.in --- squid-3.1.1/helpers/basic_auth/squid_radius_auth/Makefile.in 2010-03-29 22:03:13.000000000 +1200 +++ squid-3.1.2/helpers/basic_auth/squid_radius_auth/Makefile.in 2010-05-01 23:40:09.000000000 +1200 @@ -268,7 +268,7 @@ INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/include -I$(top_srcdir)/src \ -I$(top_builddir)/include $(SQUID_CPPUNIT_INC) -I$(srcdir) man_MANS = squid_radius_auth.8 -EXTRA_DIST = squid_radius_auth.8 +EXTRA_DIST = squid_radius_auth.8 config.test squid_radius_auth_SOURCES = \ squid_rad_auth.c \ radius.h \ diff -u -r -N squid-3.1.1/helpers/basic_auth/YP/config.test squid-3.1.2/helpers/basic_auth/YP/config.test --- squid-3.1.1/helpers/basic_auth/YP/config.test 1970-01-01 12:00:00.000000000 +1200 +++ squid-3.1.2/helpers/basic_auth/YP/config.test 2010-05-01 23:39:52.000000000 +1200 @@ -0,0 +1,5 @@ +#!/bin/sh +if [ -f /usr/include/rpcsvc/yp_prot.h ]; then + exit 0 +fi +exit 1 diff -u -r -N squid-3.1.1/helpers/basic_auth/YP/Makefile.am squid-3.1.2/helpers/basic_auth/YP/Makefile.am --- squid-3.1.1/helpers/basic_auth/YP/Makefile.am 2010-03-29 22:02:56.000000000 +1200 +++ squid-3.1.2/helpers/basic_auth/YP/Makefile.am 2010-05-01 23:39:52.000000000 +1200 @@ -18,3 +18,5 @@ -L$(top_builddir)/lib -lmiscutil \ $(CRYPTLIB) \ $(XTRA_LIBS) + +EXTRA_DIST = config.test diff -u -r -N squid-3.1.1/helpers/basic_auth/YP/Makefile.in squid-3.1.2/helpers/basic_auth/YP/Makefile.in --- squid-3.1.1/helpers/basic_auth/YP/Makefile.in 2010-03-29 22:03:13.000000000 +1200 +++ squid-3.1.2/helpers/basic_auth/YP/Makefile.in 2010-05-01 23:40:08.000000000 +1200 @@ -269,6 +269,7 @@ $(CRYPTLIB) \ $(XTRA_LIBS) +EXTRA_DIST = config.test all: all-am .SUFFIXES: diff -u -r -N squid-3.1.1/helpers/digest_auth/eDirectory/config.test squid-3.1.2/helpers/digest_auth/eDirectory/config.test --- squid-3.1.1/helpers/digest_auth/eDirectory/config.test 1970-01-01 12:00:00.000000000 +1200 +++ squid-3.1.2/helpers/digest_auth/eDirectory/config.test 2010-05-01 23:39:52.000000000 +1200 @@ -0,0 +1,8 @@ +#!/bin/sh +if [ -f /usr/include/ldap.h ]; then + exit 0 +fi +if [ -f /usr/include/winldap.h ]; then + exit 0 +fi +exit 1 diff -u -r -N squid-3.1.1/helpers/digest_auth/eDirectory/Makefile.am squid-3.1.2/helpers/digest_auth/eDirectory/Makefile.am --- squid-3.1.1/helpers/digest_auth/eDirectory/Makefile.am 2010-03-29 22:02:56.000000000 +1200 +++ squid-3.1.2/helpers/digest_auth/eDirectory/Makefile.am 2010-05-01 23:39:52.000000000 +1200 @@ -28,3 +28,5 @@ $(CRYPTLIB) \ $(XTRA_LIBS) \ $(SSLLIB) + +EXTRA_DIST = config.test diff -u -r -N squid-3.1.1/helpers/digest_auth/eDirectory/Makefile.in squid-3.1.2/helpers/digest_auth/eDirectory/Makefile.in --- squid-3.1.1/helpers/digest_auth/eDirectory/Makefile.in 2010-03-29 22:03:14.000000000 +1200 +++ squid-3.1.2/helpers/digest_auth/eDirectory/Makefile.in 2010-05-01 23:40:09.000000000 +1200 @@ -282,6 +282,7 @@ $(XTRA_LIBS) \ $(SSLLIB) +EXTRA_DIST = config.test all: all-am .SUFFIXES: diff -u -r -N squid-3.1.1/helpers/digest_auth/ldap/config.test squid-3.1.2/helpers/digest_auth/ldap/config.test --- squid-3.1.1/helpers/digest_auth/ldap/config.test 1970-01-01 12:00:00.000000000 +1200 +++ squid-3.1.2/helpers/digest_auth/ldap/config.test 2010-05-01 23:39:52.000000000 +1200 @@ -0,0 +1,8 @@ +#!/bin/sh +if [ -f /usr/include/ldap.h ]; then + exit 0 +fi +if [ -f /usr/include/winldap.h ]; then + exit 0 +fi +exit 1 diff -u -r -N squid-3.1.1/helpers/digest_auth/ldap/Makefile.am squid-3.1.2/helpers/digest_auth/ldap/Makefile.am --- squid-3.1.1/helpers/digest_auth/ldap/Makefile.am 2010-03-29 22:02:56.000000000 +1200 +++ squid-3.1.2/helpers/digest_auth/ldap/Makefile.am 2010-05-01 23:39:52.000000000 +1200 @@ -26,3 +26,5 @@ $(CRYPTLIB) \ $(XTRA_LIBS) \ $(SSLLIB) + +EXTRA_DIST = config.test diff -u -r -N squid-3.1.1/helpers/digest_auth/ldap/Makefile.in squid-3.1.2/helpers/digest_auth/ldap/Makefile.in --- squid-3.1.1/helpers/digest_auth/ldap/Makefile.in 2010-03-29 22:03:14.000000000 +1200 +++ squid-3.1.2/helpers/digest_auth/ldap/Makefile.in 2010-05-01 23:40:09.000000000 +1200 @@ -280,6 +280,7 @@ $(XTRA_LIBS) \ $(SSLLIB) +EXTRA_DIST = config.test all: all-am .SUFFIXES: diff -u -r -N squid-3.1.1/helpers/digest_auth/password/config.test squid-3.1.2/helpers/digest_auth/password/config.test --- squid-3.1.1/helpers/digest_auth/password/config.test 1970-01-01 12:00:00.000000000 +1200 +++ squid-3.1.2/helpers/digest_auth/password/config.test 2010-05-01 23:39:52.000000000 +1200 @@ -0,0 +1,2 @@ +#!/bin/sh +exit 0 diff -u -r -N squid-3.1.1/helpers/digest_auth/password/Makefile.am squid-3.1.2/helpers/digest_auth/password/Makefile.am --- squid-3.1.1/helpers/digest_auth/password/Makefile.am 2010-03-29 22:02:56.000000000 +1200 +++ squid-3.1.2/helpers/digest_auth/password/Makefile.am 2010-05-01 23:39:52.000000000 +1200 @@ -24,3 +24,5 @@ $(CRYPTLIB) \ $(XTRA_LIBS) \ $(SSLLIB) + +EXTRA_DIST = config.test diff -u -r -N squid-3.1.1/helpers/digest_auth/password/Makefile.in squid-3.1.2/helpers/digest_auth/password/Makefile.in --- squid-3.1.1/helpers/digest_auth/password/Makefile.in 2010-03-29 22:03:14.000000000 +1200 +++ squid-3.1.2/helpers/digest_auth/password/Makefile.in 2010-05-01 23:40:10.000000000 +1200 @@ -277,6 +277,7 @@ $(XTRA_LIBS) \ $(SSLLIB) +EXTRA_DIST = config.test all: all-am .SUFFIXES: diff -u -r -N squid-3.1.1/helpers/external_acl/ip_user/config.test squid-3.1.2/helpers/external_acl/ip_user/config.test --- squid-3.1.1/helpers/external_acl/ip_user/config.test 1970-01-01 12:00:00.000000000 +1200 +++ squid-3.1.2/helpers/external_acl/ip_user/config.test 2010-05-01 23:39:52.000000000 +1200 @@ -0,0 +1,5 @@ +#!/bin/sh +if [ -f /usr/include/sys/socket.h ]; then + exit 0 +fi +exit 1 diff -u -r -N squid-3.1.1/helpers/external_acl/ip_user/Makefile.am squid-3.1.2/helpers/external_acl/ip_user/Makefile.am --- squid-3.1.1/helpers/external_acl/ip_user/Makefile.am 2010-03-29 22:02:56.000000000 +1200 +++ squid-3.1.2/helpers/external_acl/ip_user/Makefile.am 2010-05-01 23:39:52.000000000 +1200 @@ -1,11 +1,3 @@ -# -# Makefile for the ip_user external_acl helper by Rodrigo Campos -# -# $Id$ -# -# Uncomment and customize the following to suit your needs: -# - include $(top_srcdir)/src/Common.am ## we need our local files too (but avoid -I. at all costs) @@ -24,7 +16,8 @@ example.conf \ example-deny_all_but.conf \ license \ - README + README \ + config.test LDADD = \ $(top_builddir)/compat/libcompat.la \ diff -u -r -N squid-3.1.1/helpers/external_acl/ip_user/Makefile.in squid-3.1.2/helpers/external_acl/ip_user/Makefile.in --- squid-3.1.1/helpers/external_acl/ip_user/Makefile.in 2010-03-29 22:03:14.000000000 +1200 +++ squid-3.1.2/helpers/external_acl/ip_user/Makefile.in 2010-05-01 23:40:10.000000000 +1200 @@ -14,14 +14,6 @@ @SET_MAKE@ -# -# Makefile for the ip_user external_acl helper by Rodrigo Campos -# -# $Id$ -# -# Uncomment and customize the following to suit your needs: -# - VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -274,7 +266,8 @@ example.conf \ example-deny_all_but.conf \ license \ - README + README \ + config.test LDADD = \ $(top_builddir)/compat/libcompat.la \ diff -u -r -N squid-3.1.1/helpers/external_acl/ldap_group/config.test squid-3.1.2/helpers/external_acl/ldap_group/config.test --- squid-3.1.1/helpers/external_acl/ldap_group/config.test 1970-01-01 12:00:00.000000000 +1200 +++ squid-3.1.2/helpers/external_acl/ldap_group/config.test 2010-05-01 23:39:52.000000000 +1200 @@ -0,0 +1,8 @@ +#!/bin/sh +if [ -f /usr/include/ldap.h ]; then + exit 0 +fi +if [ -f /usr/include/winldap.h ]; then + exit 0 +fi +exit 1 diff -u -r -N squid-3.1.1/helpers/external_acl/ldap_group/Makefile.am squid-3.1.2/helpers/external_acl/ldap_group/Makefile.am --- squid-3.1.1/helpers/external_acl/ldap_group/Makefile.am 2010-03-29 22:02:56.000000000 +1200 +++ squid-3.1.2/helpers/external_acl/ldap_group/Makefile.am 2010-05-01 23:39:52.000000000 +1200 @@ -1,11 +1,3 @@ -# -# Makefile for the Squid LDAP authentication helper -# -# $Id$ -# -# Uncomment and customize the following to suit your needs: -# - include $(top_srcdir)/src/Common.am ## we need our local files too (but avoid -I. at all costs) @@ -14,7 +6,7 @@ libexec_PROGRAMS = squid_ldap_group man_MANS = squid_ldap_group.8 -EXTRA_DIST = squid_ldap_group.8 +EXTRA_DIST = squid_ldap_group.8 config.test squid_ldap_group_SOURCES = squid_ldap_group.c LDADD = \ diff -u -r -N squid-3.1.1/helpers/external_acl/ldap_group/Makefile.in squid-3.1.2/helpers/external_acl/ldap_group/Makefile.in --- squid-3.1.1/helpers/external_acl/ldap_group/Makefile.in 2010-03-29 22:03:14.000000000 +1200 +++ squid-3.1.2/helpers/external_acl/ldap_group/Makefile.in 2010-05-01 23:40:10.000000000 +1200 @@ -14,14 +14,6 @@ @SET_MAKE@ -# -# Makefile for the Squid LDAP authentication helper -# -# $Id$ -# -# Uncomment and customize the following to suit your needs: -# - VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -268,7 +260,7 @@ INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/include -I$(top_srcdir)/src \ -I$(top_builddir)/include $(SQUID_CPPUNIT_INC) -I$(srcdir) man_MANS = squid_ldap_group.8 -EXTRA_DIST = squid_ldap_group.8 +EXTRA_DIST = squid_ldap_group.8 config.test squid_ldap_group_SOURCES = squid_ldap_group.c LDADD = \ $(top_builddir)/compat/libcompat.la \ diff -u -r -N squid-3.1.1/helpers/external_acl/mswin_ad_group/config.test squid-3.1.2/helpers/external_acl/mswin_ad_group/config.test --- squid-3.1.1/helpers/external_acl/mswin_ad_group/config.test 1970-01-01 12:00:00.000000000 +1200 +++ squid-3.1.2/helpers/external_acl/mswin_ad_group/config.test 2010-05-01 23:39:52.000000000 +1200 @@ -0,0 +1,12 @@ +#!/bin/sh +if [ -f /usr/include/w32api/dsrole.h ]; then + if grep -q DsRoleGetPrimaryDomainInformation /usr/include/w32api/dsrole.h; then + exit 0 + fi +fi +if [ -f /usr/include/dsrole.h ]; then + if grep -q DsRoleGetPrimaryDomainInformation /usr/include/dsrole.h; then + exit 0 + fi +fi +exit 1 diff -u -r -N squid-3.1.1/helpers/external_acl/mswin_ad_group/Makefile.am squid-3.1.2/helpers/external_acl/mswin_ad_group/Makefile.am --- squid-3.1.1/helpers/external_acl/mswin_ad_group/Makefile.am 2010-03-29 22:02:56.000000000 +1200 +++ squid-3.1.2/helpers/external_acl/mswin_ad_group/Makefile.am 2010-05-01 23:39:52.000000000 +1200 @@ -1,12 +1,3 @@ -# -# Makefile for the Squid Object Cache server -# -# $Id$ -# -# Uncomment and customize the following to suit your needs: -# - - libexec_PROGRAMS = mswin_check_ad_group mswin_check_ad_group_SOURCES = mswin_check_ad_group.c mswin_check_ad_group.h @@ -23,4 +14,4 @@ -lntdll \ $(XTRA_LIBS) -EXTRA_DIST = readme.txt +EXTRA_DIST = readme.txt config.test diff -u -r -N squid-3.1.1/helpers/external_acl/mswin_ad_group/Makefile.in squid-3.1.2/helpers/external_acl/mswin_ad_group/Makefile.in --- squid-3.1.1/helpers/external_acl/mswin_ad_group/Makefile.in 2010-03-29 22:03:14.000000000 +1200 +++ squid-3.1.2/helpers/external_acl/mswin_ad_group/Makefile.in 2010-05-01 23:40:10.000000000 +1200 @@ -14,14 +14,6 @@ @SET_MAKE@ -# -# Makefile for the Squid Object Cache server -# -# $Id$ -# -# Uncomment and customize the following to suit your needs: -# - VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -268,7 +260,7 @@ -lntdll \ $(XTRA_LIBS) -EXTRA_DIST = readme.txt +EXTRA_DIST = readme.txt config.test all: all-am .SUFFIXES: diff -u -r -N squid-3.1.1/helpers/external_acl/mswin_lm_group/config.test squid-3.1.2/helpers/external_acl/mswin_lm_group/config.test --- squid-3.1.1/helpers/external_acl/mswin_lm_group/config.test 1970-01-01 12:00:00.000000000 +1200 +++ squid-3.1.2/helpers/external_acl/mswin_lm_group/config.test 2010-05-01 23:39:52.000000000 +1200 @@ -0,0 +1,8 @@ +#!/bin/sh +if [ -f /usr/include/w32api/windows.h ]; then + exit 0 +fi +if [ -f /usr/include/windows.h ]; then + exit 0 +fi +exit 1 diff -u -r -N squid-3.1.1/helpers/external_acl/mswin_lm_group/Makefile.am squid-3.1.2/helpers/external_acl/mswin_lm_group/Makefile.am --- squid-3.1.1/helpers/external_acl/mswin_lm_group/Makefile.am 2010-03-29 22:02:57.000000000 +1200 +++ squid-3.1.2/helpers/external_acl/mswin_lm_group/Makefile.am 2010-05-01 23:39:52.000000000 +1200 @@ -24,4 +24,4 @@ -lntdll \ $(XTRA_LIBS) -EXTRA_DIST = readme.txt +EXTRA_DIST = readme.txt config.test diff -u -r -N squid-3.1.1/helpers/external_acl/mswin_lm_group/Makefile.in squid-3.1.2/helpers/external_acl/mswin_lm_group/Makefile.in --- squid-3.1.1/helpers/external_acl/mswin_lm_group/Makefile.in 2010-03-29 22:03:15.000000000 +1200 +++ squid-3.1.2/helpers/external_acl/mswin_lm_group/Makefile.in 2010-05-01 23:40:10.000000000 +1200 @@ -269,7 +269,7 @@ -lntdll \ $(XTRA_LIBS) -EXTRA_DIST = readme.txt +EXTRA_DIST = readme.txt config.test all: all-am .SUFFIXES: diff -u -r -N squid-3.1.1/helpers/external_acl/session/config.test squid-3.1.2/helpers/external_acl/session/config.test --- squid-3.1.1/helpers/external_acl/session/config.test 1970-01-01 12:00:00.000000000 +1200 +++ squid-3.1.2/helpers/external_acl/session/config.test 2010-05-01 23:39:52.000000000 +1200 @@ -0,0 +1,10 @@ +#!/bin/sh + +# Actual intended test +if [ -f /usr/include/db_185.h ]; then + exit 0 +fi +if [ -f /usr/include/db.h ]; then + exit 0 +fi +exit 1 diff -u -r -N squid-3.1.1/helpers/external_acl/session/Makefile.am squid-3.1.2/helpers/external_acl/session/Makefile.am --- squid-3.1.1/helpers/external_acl/session/Makefile.am 2010-03-29 22:02:56.000000000 +1200 +++ squid-3.1.2/helpers/external_acl/session/Makefile.am 2010-05-01 23:39:52.000000000 +1200 @@ -1,11 +1,3 @@ -# -# Makefile for the Squid LDAP authentication helper -# -# $Id$ -# -# Uncomment and customize the following to suit your needs: -# - include $(top_srcdir)/src/Common.am ## we need our local files too (but avoid -I. at all costs) @@ -14,7 +6,7 @@ libexec_PROGRAMS = squid_session man_MANS = squid_session.8 -EXTRA_DIST = squid_session.8 +EXTRA_DIST = squid_session.8 config.test squid_session_SOURCES = squid_session.c LDADD = \ diff -u -r -N squid-3.1.1/helpers/external_acl/session/Makefile.in squid-3.1.2/helpers/external_acl/session/Makefile.in --- squid-3.1.1/helpers/external_acl/session/Makefile.in 2010-03-29 22:03:15.000000000 +1200 +++ squid-3.1.2/helpers/external_acl/session/Makefile.in 2010-05-01 23:40:10.000000000 +1200 @@ -14,14 +14,6 @@ @SET_MAKE@ -# -# Makefile for the Squid LDAP authentication helper -# -# $Id$ -# -# Uncomment and customize the following to suit your needs: -# - VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -267,7 +259,7 @@ INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/include -I$(top_srcdir)/src \ -I$(top_builddir)/include $(SQUID_CPPUNIT_INC) -I$(srcdir) man_MANS = squid_session.8 -EXTRA_DIST = squid_session.8 +EXTRA_DIST = squid_session.8 config.test squid_session_SOURCES = squid_session.c LDADD = \ $(top_builddir)/compat/libcompat.la \ diff -u -r -N squid-3.1.1/helpers/external_acl/unix_group/config.test squid-3.1.2/helpers/external_acl/unix_group/config.test --- squid-3.1.1/helpers/external_acl/unix_group/config.test 1970-01-01 12:00:00.000000000 +1200 +++ squid-3.1.2/helpers/external_acl/unix_group/config.test 2010-05-01 23:39:52.000000000 +1200 @@ -0,0 +1,5 @@ +#!/bin/sh +if [ -f /usr/include/pwd.h ]; then + exit 0 +fi +exit 1 diff -u -r -N squid-3.1.1/helpers/external_acl/unix_group/Makefile.am squid-3.1.2/helpers/external_acl/unix_group/Makefile.am --- squid-3.1.1/helpers/external_acl/unix_group/Makefile.am 2010-03-29 22:02:56.000000000 +1200 +++ squid-3.1.2/helpers/external_acl/unix_group/Makefile.am 2010-05-01 23:39:52.000000000 +1200 @@ -1,11 +1,3 @@ -# -# Makefile for the Squid LDAP authentication helper -# -# $Id$ -# -# Uncomment and customize the following to suit your needs: -# - include $(top_srcdir)/src/Common.am ## we need our local files too (but avoid -I. at all costs) @@ -14,7 +6,7 @@ libexec_PROGRAMS = squid_unix_group man_MANS = squid_unix_group.8 -EXTRA_DIST = squid_unix_group.8 +EXTRA_DIST = squid_unix_group.8 config.test squid_unix_group_SOURCES = check_group.c LDADD = \ diff -u -r -N squid-3.1.1/helpers/external_acl/unix_group/Makefile.in squid-3.1.2/helpers/external_acl/unix_group/Makefile.in --- squid-3.1.1/helpers/external_acl/unix_group/Makefile.in 2010-03-29 22:03:15.000000000 +1200 +++ squid-3.1.2/helpers/external_acl/unix_group/Makefile.in 2010-05-01 23:40:10.000000000 +1200 @@ -14,14 +14,6 @@ @SET_MAKE@ -# -# Makefile for the Squid LDAP authentication helper -# -# $Id$ -# -# Uncomment and customize the following to suit your needs: -# - VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -267,7 +259,7 @@ INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/include -I$(top_srcdir)/src \ -I$(top_builddir)/include $(SQUID_CPPUNIT_INC) -I$(srcdir) man_MANS = squid_unix_group.8 -EXTRA_DIST = squid_unix_group.8 +EXTRA_DIST = squid_unix_group.8 config.test squid_unix_group_SOURCES = check_group.c LDADD = \ $(top_builddir)/compat/libcompat.la \ diff -u -r -N squid-3.1.1/helpers/external_acl/wbinfo_group/config.test squid-3.1.2/helpers/external_acl/wbinfo_group/config.test --- squid-3.1.1/helpers/external_acl/wbinfo_group/config.test 1970-01-01 12:00:00.000000000 +1200 +++ squid-3.1.2/helpers/external_acl/wbinfo_group/config.test 2010-05-01 23:39:52.000000000 +1200 @@ -0,0 +1,12 @@ +#!/bin/sh + +for sambaprefix in ${SAMBAPREFIX} /usr/local /opt /opt/samba /usr/local/samba /usr +do + for perlprefix in /usr /usr/local /opt /opt/perl + do + if [ -x $sambaprefix/bin/wbinfo -a -x $perlprefix/bin/perl ]; then + exit 0 + fi + done +done +exit 1 diff -u -r -N squid-3.1.1/helpers/external_acl/wbinfo_group/Makefile.am squid-3.1.2/helpers/external_acl/wbinfo_group/Makefile.am --- squid-3.1.1/helpers/external_acl/wbinfo_group/Makefile.am 2010-03-29 22:02:56.000000000 +1200 +++ squid-3.1.2/helpers/external_acl/wbinfo_group/Makefile.am 2010-05-01 23:39:52.000000000 +1200 @@ -1,12 +1,4 @@ -# -# Makefile for the Squid LDAP authentication helper -# -# $Id$ -# -# Uncomment and customize the following to suit your needs: -# - libexec_SCRIPTS = wbinfo_group.pl #man_MANS = squid_wbinfo_group.8 #EXTRA_DIST = squid_wbinfo_group.8 -EXTRA_DIST = wbinfo_group.pl +EXTRA_DIST = wbinfo_group.pl config.test diff -u -r -N squid-3.1.1/helpers/external_acl/wbinfo_group/Makefile.in squid-3.1.2/helpers/external_acl/wbinfo_group/Makefile.in --- squid-3.1.1/helpers/external_acl/wbinfo_group/Makefile.in 2010-03-29 22:03:15.000000000 +1200 +++ squid-3.1.2/helpers/external_acl/wbinfo_group/Makefile.in 2010-05-01 23:40:11.000000000 +1200 @@ -14,14 +14,6 @@ @SET_MAKE@ -# -# Makefile for the Squid LDAP authentication helper -# -# $Id$ -# -# Uncomment and customize the following to suit your needs: -# - VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -237,7 +229,7 @@ libexec_SCRIPTS = wbinfo_group.pl #man_MANS = squid_wbinfo_group.8 #EXTRA_DIST = squid_wbinfo_group.8 -EXTRA_DIST = wbinfo_group.pl +EXTRA_DIST = wbinfo_group.pl config.test all: all-am .SUFFIXES: diff -u -r -N squid-3.1.1/helpers/negotiate_auth/mswin_sspi/config.test squid-3.1.2/helpers/negotiate_auth/mswin_sspi/config.test --- squid-3.1.1/helpers/negotiate_auth/mswin_sspi/config.test 1970-01-01 12:00:00.000000000 +1200 +++ squid-3.1.2/helpers/negotiate_auth/mswin_sspi/config.test 2010-05-01 23:39:52.000000000 +1200 @@ -0,0 +1,8 @@ +#!/bin/sh +if [ -f /usr/include/w32api/windows.h ]; then + exit 0 +fi +if [ -f /usr/include/windows.h ]; then + exit 0 +fi +exit 1 diff -u -r -N squid-3.1.1/helpers/negotiate_auth/mswin_sspi/Makefile.am squid-3.1.2/helpers/negotiate_auth/mswin_sspi/Makefile.am --- squid-3.1.1/helpers/negotiate_auth/mswin_sspi/Makefile.am 2010-03-29 22:02:56.000000000 +1200 +++ squid-3.1.2/helpers/negotiate_auth/mswin_sspi/Makefile.am 2010-05-01 23:39:52.000000000 +1200 @@ -16,4 +16,4 @@ LDADD = -L$(top_builddir)/lib -lsspwin32 -ladvapi32 -lmiscutil $(XTRA_LIBS) -EXTRA_DIST = readme.txt +EXTRA_DIST = readme.txt config.test diff -u -r -N squid-3.1.1/helpers/negotiate_auth/mswin_sspi/Makefile.in squid-3.1.2/helpers/negotiate_auth/mswin_sspi/Makefile.in --- squid-3.1.1/helpers/negotiate_auth/mswin_sspi/Makefile.in 2010-03-29 22:03:15.000000000 +1200 +++ squid-3.1.2/helpers/negotiate_auth/mswin_sspi/Makefile.in 2010-05-01 23:40:11.000000000 +1200 @@ -263,7 +263,7 @@ -I$(top_builddir)/include $(SQUID_CPPUNIT_INC) -I$(srcdir) mswin_negotiate_auth_SOURCES = libnegotiatessp.c negotiate_auth.c negotiate.h LDADD = -L$(top_builddir)/lib -lsspwin32 -ladvapi32 -lmiscutil $(XTRA_LIBS) -EXTRA_DIST = readme.txt +EXTRA_DIST = readme.txt config.test all: all-am .SUFFIXES: diff -u -r -N squid-3.1.1/helpers/ntlm_auth/fakeauth/config.test squid-3.1.2/helpers/ntlm_auth/fakeauth/config.test --- squid-3.1.1/helpers/ntlm_auth/fakeauth/config.test 1970-01-01 12:00:00.000000000 +1200 +++ squid-3.1.2/helpers/ntlm_auth/fakeauth/config.test 2010-05-01 23:39:52.000000000 +1200 @@ -0,0 +1,2 @@ +#!/bin/sh +exit 0 diff -u -r -N squid-3.1.1/helpers/ntlm_auth/fakeauth/Makefile.am squid-3.1.2/helpers/ntlm_auth/fakeauth/Makefile.am --- squid-3.1.1/helpers/ntlm_auth/fakeauth/Makefile.am 2010-03-29 22:02:56.000000000 +1200 +++ squid-3.1.2/helpers/ntlm_auth/fakeauth/Makefile.am 2010-05-01 23:39:52.000000000 +1200 @@ -1,11 +1,3 @@ -# -# Makefile for the Squid Object Cache server -# -# $Id$ -# -# Uncomment and customize the following to suit your needs: -# - include $(top_srcdir)/src/Common.am libexec_PROGRAMS = fakeauth_auth @@ -19,3 +11,5 @@ -L$(top_builddir)/lib -lmiscutil \ $(CRYPTLIB) \ $(XTRA_LIBS) + +EXTRA_DIST = config.test diff -u -r -N squid-3.1.1/helpers/ntlm_auth/fakeauth/Makefile.in squid-3.1.2/helpers/ntlm_auth/fakeauth/Makefile.in --- squid-3.1.1/helpers/ntlm_auth/fakeauth/Makefile.in 2010-03-29 22:03:15.000000000 +1200 +++ squid-3.1.2/helpers/ntlm_auth/fakeauth/Makefile.in 2010-05-01 23:40:11.000000000 +1200 @@ -14,14 +14,6 @@ @SET_MAKE@ -# -# Makefile for the Squid Object Cache server -# -# $Id$ -# -# Uncomment and customize the following to suit your needs: -# - VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -270,6 +262,7 @@ $(CRYPTLIB) \ $(XTRA_LIBS) +EXTRA_DIST = config.test all: all-am .SUFFIXES: diff -u -r -N squid-3.1.1/helpers/ntlm_auth/mswin_sspi/config.test squid-3.1.2/helpers/ntlm_auth/mswin_sspi/config.test --- squid-3.1.1/helpers/ntlm_auth/mswin_sspi/config.test 1970-01-01 12:00:00.000000000 +1200 +++ squid-3.1.2/helpers/ntlm_auth/mswin_sspi/config.test 2010-05-01 23:39:52.000000000 +1200 @@ -0,0 +1,8 @@ +#!/bin/sh +if [ -f /usr/include/w32api/windows.h ]; then + exit 0 +fi +if [ -f /usr/include/windows.h ]; then + exit 0 +fi +exit 1 diff -u -r -N squid-3.1.1/helpers/ntlm_auth/mswin_sspi/Makefile.am squid-3.1.2/helpers/ntlm_auth/mswin_sspi/Makefile.am --- squid-3.1.1/helpers/ntlm_auth/mswin_sspi/Makefile.am 2010-03-29 22:02:56.000000000 +1200 +++ squid-3.1.2/helpers/ntlm_auth/mswin_sspi/Makefile.am 2010-05-01 23:39:52.000000000 +1200 @@ -1,9 +1,3 @@ -# -# Makefile for the Squid Object Cache server -# -# $Id$ -# - include $(top_srcdir)/src/Common.am libexec_PROGRAMS = mswin_ntlm_auth @@ -21,4 +15,4 @@ -ladvapi32 \ $(XTRA_LIBS) -EXTRA_DIST = readme.txt +EXTRA_DIST = readme.txt config.test diff -u -r -N squid-3.1.1/helpers/ntlm_auth/mswin_sspi/Makefile.in squid-3.1.2/helpers/ntlm_auth/mswin_sspi/Makefile.in --- squid-3.1.1/helpers/ntlm_auth/mswin_sspi/Makefile.in 2010-03-29 22:03:16.000000000 +1200 +++ squid-3.1.2/helpers/ntlm_auth/mswin_sspi/Makefile.in 2010-05-01 23:40:11.000000000 +1200 @@ -14,12 +14,6 @@ @SET_MAKE@ -# -# Makefile for the Squid Object Cache server -# -# $Id$ -# - VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -270,7 +264,7 @@ -ladvapi32 \ $(XTRA_LIBS) -EXTRA_DIST = readme.txt +EXTRA_DIST = readme.txt config.test all: all-am .SUFFIXES: diff -u -r -N squid-3.1.1/helpers/ntlm_auth/no_check/config.test squid-3.1.2/helpers/ntlm_auth/no_check/config.test --- squid-3.1.1/helpers/ntlm_auth/no_check/config.test 1970-01-01 12:00:00.000000000 +1200 +++ squid-3.1.2/helpers/ntlm_auth/no_check/config.test 2010-05-01 23:39:52.000000000 +1200 @@ -0,0 +1,2 @@ +#!/bin/sh +exit 0 diff -u -r -N squid-3.1.1/helpers/ntlm_auth/no_check/Makefile.am squid-3.1.2/helpers/ntlm_auth/no_check/Makefile.am --- squid-3.1.1/helpers/ntlm_auth/no_check/Makefile.am 2010-03-29 22:02:56.000000000 +1200 +++ squid-3.1.2/helpers/ntlm_auth/no_check/Makefile.am 2010-05-01 23:39:52.000000000 +1200 @@ -10,5 +10,5 @@ EXTRA_DIST = \ no_check.pl \ - README.no_check_ntlm_auth - + README.no_check_ntlm_auth \ + config.test diff -u -r -N squid-3.1.1/helpers/ntlm_auth/no_check/Makefile.in squid-3.1.2/helpers/ntlm_auth/no_check/Makefile.in --- squid-3.1.1/helpers/ntlm_auth/no_check/Makefile.in 2010-03-29 22:03:16.000000000 +1200 +++ squid-3.1.2/helpers/ntlm_auth/no_check/Makefile.in 2010-05-01 23:40:11.000000000 +1200 @@ -237,7 +237,8 @@ libexec_SCRIPTS = no_check.pl EXTRA_DIST = \ no_check.pl \ - README.no_check_ntlm_auth + README.no_check_ntlm_auth \ + config.test all: all-am diff -u -r -N squid-3.1.1/helpers/ntlm_auth/smb_lm/config.test squid-3.1.2/helpers/ntlm_auth/smb_lm/config.test --- squid-3.1.1/helpers/ntlm_auth/smb_lm/config.test 1970-01-01 12:00:00.000000000 +1200 +++ squid-3.1.2/helpers/ntlm_auth/smb_lm/config.test 2010-05-01 23:39:52.000000000 +1200 @@ -0,0 +1,9 @@ +#!/bin/sh +# Don't build on Windows +if [ -f /usr/include/w32api/windows.h ]; then + exit 1 +fi +if [ -f /usr/include/windows.h ]; then + exit 1 +fi +exit 0 diff -u -r -N squid-3.1.1/helpers/ntlm_auth/smb_lm/Makefile.am squid-3.1.2/helpers/ntlm_auth/smb_lm/Makefile.am --- squid-3.1.1/helpers/ntlm_auth/smb_lm/Makefile.am 2010-03-29 22:02:56.000000000 +1200 +++ squid-3.1.2/helpers/ntlm_auth/smb_lm/Makefile.am 2010-05-01 23:39:52.000000000 +1200 @@ -1,7 +1,3 @@ -# -# Makefile for the Squid Object Cache server -# - include $(top_srcdir)/src/Common.am SUBDIRS = smbval @@ -20,3 +16,5 @@ smbval/libsmbvalid.a \ $(CRYPTLIB) \ $(XTRA_LIBS) + +EXTRA_DIST = config.test diff -u -r -N squid-3.1.1/helpers/ntlm_auth/smb_lm/Makefile.in squid-3.1.2/helpers/ntlm_auth/smb_lm/Makefile.in --- squid-3.1.1/helpers/ntlm_auth/smb_lm/Makefile.in 2010-03-29 22:03:16.000000000 +1200 +++ squid-3.1.2/helpers/ntlm_auth/smb_lm/Makefile.in 2010-05-01 23:40:11.000000000 +1200 @@ -14,10 +14,6 @@ @SET_MAKE@ -# -# Makefile for the Squid Object Cache server -# - VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -281,6 +277,7 @@ $(CRYPTLIB) \ $(XTRA_LIBS) +EXTRA_DIST = config.test all: all-recursive .SUFFIXES: diff -u -r -N squid-3.1.1/include/profiling.h squid-3.1.2/include/profiling.h --- squid-3.1.1/include/profiling.h 2010-03-29 22:02:56.000000000 +1200 +++ squid-3.1.2/include/profiling.h 2010-05-01 23:39:52.000000000 +1200 @@ -67,11 +67,8 @@ } #else -static inline hrtime_t -get_tick(void) -{ - return 0; //unsupported on the CPU -} +/* This CPU is unsupported. Short-circuit, no profiling here */ +#define get_tick() 0 #undef USE_XPROF_STATS #endif diff -u -r -N squid-3.1.1/include/rfc2181.h squid-3.1.2/include/rfc2181.h --- squid-3.1.1/include/rfc2181.h 2010-03-29 22:02:56.000000000 +1200 +++ squid-3.1.2/include/rfc2181.h 2010-05-01 23:39:52.000000000 +1200 @@ -21,7 +21,7 @@ */ #define RFC2181_MAXHOSTNAMELEN 256 -/// Back-port macro for old squid code still using SQUIDHOSTNAMELEN without RFC reference. +/** Back-port macro for old squid code still using SQUIDHOSTNAMELEN without RFC reference. */ #define SQUIDHOSTNAMELEN RFC2181_MAXHOSTNAMELEN #endif /* _SQUID_INCLUDE_RFC1123_H */ diff -u -r -N squid-3.1.1/include/version.h squid-3.1.2/include/version.h --- squid-3.1.1/include/version.h 2010-03-29 22:03:35.000000000 +1200 +++ squid-3.1.2/include/version.h 2010-05-01 23:40:30.000000000 +1200 @@ -9,7 +9,7 @@ */ #ifndef SQUID_RELEASE_TIME -#define SQUID_RELEASE_TIME 1269856967 +#define SQUID_RELEASE_TIME 1272713982 #endif #ifndef APP_SHORTNAME diff -u -r -N squid-3.1.1/lib/getfullhostname.c squid-3.1.2/lib/getfullhostname.c --- squid-3.1.1/lib/getfullhostname.c 2010-03-29 22:02:56.000000000 +1200 +++ squid-3.1.2/lib/getfullhostname.c 2010-05-01 23:39:52.000000000 +1200 @@ -62,7 +62,7 @@ #include #endif -#endif // 0 +#endif /* 0 */ #if HAVE_UNISTD_H diff -u -r -N squid-3.1.1/lib/rfc1738.c squid-3.1.2/lib/rfc1738.c --- squid-3.1.1/lib/rfc1738.c 2010-03-29 22:02:56.000000000 +1200 +++ squid-3.1.2/lib/rfc1738.c 2010-05-01 23:39:52.000000000 +1200 @@ -133,7 +133,7 @@ * allocated - KA */ if (do_escape == 1) { - (void) sprintf(q, "%%%02X", (unsigned char) *p); + (void) snprintf(q, (bufsize-(p-buf)), "%%%02X", (unsigned char) *p); q += sizeof(char) * 2; } else { *q = *p; @@ -143,43 +143,10 @@ return (buf); } -#if 0 /* legacy API */ /* - * rfc1738_escape - Returns a static buffer that contains the RFC - * 1738 compliant, escaped version of the given url. + * Converts a ascii hex code into a binary character. */ -char * -rfc1738_escape(const char *url) -{ - return rfc1738_do_escape(url, 0); -} - -/* - * rfc1738_escape_unescaped - Returns a static buffer that contains - * the RFC 1738 compliant, escaped version of the given url. - */ -char * -rfc1738_escape_unescaped(const char *url) -{ - return rfc1738_do_escape(url, -1); -} - -/* - * rfc1738_escape_part - Returns a static buffer that contains the - * RFC 1738 compliant, escaped version of the given url segment. - */ -char * -rfc1738_escape_part(const char *url) -{ - return rfc1738_do_escape(url, 1); -} -#endif /* 0 */ - -/* - * rfc1738_unescape() - Converts escaped characters (%xy numbers) in - * given the string. %% is a %. %ab is the 8-bit hexadecimal number "ab" - */ -static inline int +static int fromhex(char ch) { if (ch >= '0' && ch <= '9') @@ -191,6 +158,10 @@ return -1; } +/* + * rfc1738_unescape() - Converts escaped characters (%xy numbers) in + * given the string. %% is a %. %ab is the 8-bit hexadecimal number "ab" + */ void rfc1738_unescape(char *s) { @@ -203,8 +174,7 @@ j++; /* Skip % */ } else { /* decode */ - char v1, v2; - int x; + int v1, v2, x; v1 = fromhex(s[j + 1]); if (v1 < 0) continue; /* non-hex or \0 */ diff -u -r -N squid-3.1.1/lib/rfc3596.c squid-3.1.2/lib/rfc3596.c --- squid-3.1.1/lib/rfc3596.c 2010-03-29 22:02:56.000000000 +1200 +++ squid-3.1.2/lib/rfc3596.c 2010-05-01 23:39:52.000000000 +1200 @@ -164,7 +164,6 @@ * \return the size of the query */ ssize_t - rfc3596BuildPTRQuery4(const struct in_addr addr, char *buf, size_t sz, unsigned short qid, rfc1035_query * query) { static char rev[RFC1035_MAXHOSTNAMESZ]; @@ -181,13 +180,12 @@ } ssize_t - rfc3596BuildPTRQuery6(const struct in6_addr addr, char *buf, size_t sz, unsigned short qid, rfc1035_query * query) { static char rev[RFC1035_MAXHOSTNAMESZ]; const uint8_t* r = addr.s6_addr; char* p = rev; - int i; // NP: MUST allow signed for loop termination. + int i; /* NP: MUST allow signed for loop termination. */ /* work from the raw addr field. anything else may have representation changes. */ /* The sin6_port and sin6_addr members shall be in network byte order. */ diff -u -r -N squid-3.1.1/Makefile.am squid-3.1.2/Makefile.am --- squid-3.1.1/Makefile.am 2010-03-29 22:02:57.000000000 +1200 +++ squid-3.1.2/Makefile.am 2010-05-01 23:39:52.000000000 +1200 @@ -3,7 +3,7 @@ AUTOMAKE_OPTIONS = dist-bzip2 subdir-objects 1.5 foreign DIST_SUBDIRS = compat lib libltdl snmplib scripts src icons errors contrib doc helpers test-suite tools -SUBDIRS = compat lib @makesnmplib@ +SUBDIRS = compat lib $(makesnmplib) if USE_LOADABLE_MODULES SUBDIRS += libltdl endif diff -u -r -N squid-3.1.1/Makefile.in squid-3.1.2/Makefile.in --- squid-3.1.1/Makefile.in 2010-03-29 22:03:20.000000000 +1200 +++ squid-3.1.2/Makefile.in 2010-05-01 23:40:16.000000000 +1200 @@ -255,7 +255,7 @@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = dist-bzip2 subdir-objects 1.5 foreign DIST_SUBDIRS = compat lib libltdl snmplib scripts src icons errors contrib doc helpers test-suite tools -SUBDIRS = compat lib @makesnmplib@ $(am__append_1) scripts src icons \ +SUBDIRS = compat lib $(makesnmplib) $(am__append_1) scripts src icons \ errors doc helpers test-suite tools DISTCLEANFILES = include/stamp-h include/stamp-h[0-9]* DEFAULT_PINGER = $(libexecdir)/`echo pinger | sed '$(transform);s/$$/$(EXEEXT)/'` diff -u -r -N squid-3.1.1/RELEASENOTES.html squid-3.1.2/RELEASENOTES.html --- squid-3.1.1/RELEASENOTES.html 2010-03-29 22:14:35.000000000 +1200 +++ squid-3.1.2/RELEASENOTES.html 2010-05-01 23:52:31.000000000 +1200 @@ -2,10 +2,10 @@ - Squid 3.1.1 release notes + Squid 3.1.2 release notes -

Squid 3.1.1 release notes

+

Squid 3.1.2 release notes

Squid Developers


@@ -70,7 +70,7 @@

1. Notice

-

The Squid Team are pleased to announce the release of Squid-3.1.1.

+

The Squid Team are pleased to announce the release of Squid-3.1.2.

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

@@ -147,11 +147,13 @@

All this is previous policy you should be accustomed to. Now we get to the new numbering change.

-

Initial branch packages will be generated with a 3.X.0.Z version as testing packages. +

Initial branch packages will be generated with a 3.X.0.Z version as beta testing packages. Packages and Snapshots generated with these 3-dot numbers are expected to be relatively stable regarding feature behaviors. Suitable for testing, but without any guarantees under production loads. This replaces both the old PRE and RC packages.

-

If a large number of bugs are found several *.0.Z packages may be attempted before any is considered production-ready.

+

If a large number of bugs are found several *.0.Z packages may be attempted before any is fully frozen for production use. +To be frozen as stable the code must be compiling well and have passed a period of 14 days with no new bugs reported against +the new code added in that release.

When one of these Squid-3.X.0.Z packages passes our bug-free standards a 3.X.Y numbered release will be made.

diff -u -r -N squid-3.1.1/src/adaptation/ServiceConfig.cc squid-3.1.2/src/adaptation/ServiceConfig.cc --- squid-3.1.1/src/adaptation/ServiceConfig.cc 2010-03-29 22:02:56.000000000 +1200 +++ squid-3.1.2/src/adaptation/ServiceConfig.cc 2010-05-01 23:39:52.000000000 +1200 @@ -125,6 +125,7 @@ Adaptation::ServiceConfig::grokUri(const char *value) { // TODO: find core code that parses URLs and extracts various parts + // AYJ: most of this is duplicate of urlParse() in src/url.cc if (!value || !*value) { debugs(3, 0, HERE << cfg_filename << ':' << config_lineno << ": " << @@ -153,15 +154,32 @@ bool have_port = false; - if ((e = strchr(s, ':')) != NULL) { - have_port = true; - } else if ((e = strchr(s, '/')) != NULL) { - have_port = false; + int len = 0; + if (*s == '[') { + const char *t; + if ((t = strchr(s, ']')) == NULL) + return false; + + s++; + len = t - s; + if ((e = strchr(t, ':')) != NULL) { + have_port = true; + } else if ((e = strchr(t, '/')) != NULL) { + have_port = false; + } else { + return false; + } } else { - return false; + if ((e = strchr(s, ':')) != NULL) { + have_port = true; + } else if ((e = strchr(s, '/')) != NULL) { + have_port = false; + } else { + return false; + } + len = e - s; } - int len = e - s; host.limitInit(s, len); s = e; diff -u -r -N squid-3.1.1/src/client_side.cc squid-3.1.2/src/client_side.cc --- squid-3.1.1/src/client_side.cc 2010-03-29 22:02:56.000000000 +1200 +++ squid-3.1.2/src/client_side.cc 2010-05-01 23:39:52.000000000 +1200 @@ -706,8 +706,8 @@ debugs(33, 3, "clientSetKeepaliveFlag: method = " << RequestMethodStr(request->method)); - /* We are HTTP/1.0 facing clients still */ - HttpVersion http_ver(1,0); + /* We are HTTP/1.1 facing clients now*/ + HttpVersion http_ver(1,1); if (httpMsgIsPersistent(http_ver, req_hdr)) request->flags.proxy_keepalive = 1; diff -u -r -N squid-3.1.1/src/client_side_reply.cc squid-3.1.2/src/client_side_reply.cc --- squid-3.1.1/src/client_side_reply.cc 2010-03-29 22:02:56.000000000 +1200 +++ squid-3.1.2/src/client_side_reply.cc 2010-05-01 23:39:52.000000000 +1200 @@ -1435,8 +1435,8 @@ reply = HTTPMSGLOCK(rep); if (reply->sline.protocol == PROTO_HTTP) { - /* enforce 1.0 reply version (but only on real HTTP traffic) */ - reply->sline.version = HttpVersion(1,0); + /* RFC 2616 requires us to advertise our 1.1 version (but only on real HTTP traffic) */ + reply->sline.version = HttpVersion(1,1); } /* do header conversions */ diff -u -r -N squid-3.1.1/src/comm.cc squid-3.1.2/src/comm.cc --- squid-3.1.1/src/comm.cc 2010-03-29 22:02:56.000000000 +1200 +++ squid-3.1.2/src/comm.cc 2010-05-01 23:39:52.000000000 +1200 @@ -681,6 +681,7 @@ void comm_set_transparent(int fd) { +#if !LINUX_TPROXY2 #if defined(IP_TRANSPARENT) int tos = 1; if (setsockopt(fd, SOL_IP, IP_TRANSPARENT, (char *) &tos, sizeof(int)) < 0) { @@ -692,6 +693,7 @@ #else debugs(50, DBG_CRITICAL, "WARNING: comm_open: setsockopt(IP_TRANSPARENT) not supported on this platform"); #endif /* sockopt */ +#endif /* !LINUX_TPROXY2 */ } /** @@ -1517,7 +1519,7 @@ L.l_linger = 0; if (setsockopt(fd, SOL_SOCKET, SO_LINGER, (char *) &L, sizeof(L)) < 0) - debugs(50, 0, "commResetTCPClose: FD " << fd << ": " << xstrerror()); + debugs(50, DBG_CRITICAL, "ERROR: Closing FD " << fd << " with TCP RST: " << xstrerror()); comm_close(fd); } @@ -2143,8 +2145,8 @@ debugs(5, 5, "commCloseAllSockets: FD " << fd << ": Calling timeout handler"); ScheduleCallHere(callback); } else { - debugs(5, 5, "commCloseAllSockets: FD " << fd << ": calling comm_close()"); - comm_close(fd); + debugs(5, 5, "commCloseAllSockets: FD " << fd << ": calling comm_reset_close()"); + comm_reset_close(fd); } } } diff -u -r -N squid-3.1.1/src/forward.cc squid-3.1.2/src/forward.cc --- squid-3.1.1/src/forward.cc 2010-03-29 22:02:56.000000000 +1200 +++ squid-3.1.2/src/forward.cc 2010-05-01 23:39:52.000000000 +1200 @@ -914,7 +914,7 @@ if (!fs->_peer && request->flags.spoof_client_ip) { // try to set the outgoing address using TPROXY v2 // if it fails we abort any further TPROXY actions on this connection - if (IpInterceptor.SetTproxy2OutgoingAddr(int fd, const IpAddress &src) == -1) { + if (IpInterceptor.SetTproxy2OutgoingAddr(fd, src) == -1) { request->flags.spoof_client_ip = 0; } } diff -u -r -N squid-3.1.1/src/http.cc squid-3.1.2/src/http.cc --- squid-3.1.1/src/http.cc 2010-03-29 22:02:56.000000000 +1200 +++ squid-3.1.2/src/http.cc 2010-05-01 23:39:52.000000000 +1200 @@ -692,7 +692,7 @@ if (!parsed && error > 0) { // unrecoverable parsing error debugs(11, 3, "processReplyHeader: Non-HTTP-compliant header: '" << readBuf->content() << "'"); flags.headers_parsed = 1; - newrep->sline.version = HttpVersion(1,0); + newrep->sline.version = HttpVersion(1,1); newrep->sline.status = error; HttpReply *vrep = setVirginReply(newrep); entry->replaceHttpReply(vrep); @@ -717,7 +717,7 @@ /* Skip 1xx messages for now. Advertised in Via as an internal 1.0 hop */ if (newrep->sline.protocol == PROTO_HTTP && newrep->sline.status >= 100 && newrep->sline.status < 200) { -#if WHEN_HTTP11 +#if WHEN_HTTP11_EXPECT_HANDLED /* When HTTP/1.1 check if the client is expecting a 1xx reply and maybe pass it on */ if (orig_request->header.has(HDR_EXPECT)) { // TODO: pass to the client anyway? @@ -1125,6 +1125,23 @@ if (len == 0) { // reached EOF? eof = 1; flags.do_next_read = 0; + + /* Bug 2789: Replies may terminate with \r\n then EOF instead of \r\n\r\n + * Ensure here that we have at minimum two \r\n when EOF is seen. + * TODO: When headersEnd() is cleaned up to only be called once we can merge + * this as a special case there where it belongs. + */ + if (!flags.headers_parsed) { + /* + * Yes Henrik, there is a point to doing this. When we + * called httpProcessReplyHeader() before, we didn't find + * the end of headers, but now we are definately at EOF, so + * we want to process the reply headers. + */ + /* Fake an "end-of-headers" to work around such broken servers */ + readBuf->append("\r\n", 2); + len = 2; + } } if (!flags.headers_parsed) { // have not parsed headers yet? diff -u -r -N squid-3.1.1/src/HttpReply.cc squid-3.1.2/src/HttpReply.cc --- squid-3.1.1/src/HttpReply.cc 2010-03-29 22:02:56.000000000 +1200 +++ squid-3.1.2/src/HttpReply.cc 2010-05-01 23:39:52.000000000 +1200 @@ -185,7 +185,7 @@ /* rv->cache_control */ /* rv->content_range */ /* rv->keep_alive */ - HttpVersion ver(1,0); + HttpVersion ver(1,1); httpStatusLineSet(&rv->sline, ver, HTTP_NOT_MODIFIED, ""); for (t = 0; ImsEntries[t] != HDR_OTHER; ++t) @@ -202,7 +202,7 @@ /* Not as efficient as skipping the header duplication, * but easier to maintain */ - HttpReply *temp = make304 (); + HttpReply *temp = make304(); MemBuf *rv = temp->pack(); delete temp; return rv; @@ -213,7 +213,7 @@ const char *ctype, int64_t clen, time_t lmt, time_t expiresTime) { HttpHeader *hdr; - HttpVersion ver(1,0); + HttpVersion ver(1,1); httpStatusLineSet(&sline, ver, status, reason); hdr = &header; hdr->putStr(HDR_SERVER, visible_appname_string); @@ -248,7 +248,7 @@ HttpReply::redirect(http_status status, const char *loc) { HttpHeader *hdr; - HttpVersion ver(1,0); + HttpVersion ver(1,1); httpStatusLineSet(&sline, ver, status, httpStatusString(status)); hdr = &header; hdr->putStr(HDR_SERVER, APP_FULLNAME); diff -u -r -N squid-3.1.1/src/ip/IpAddress.cc squid-3.1.2/src/ip/IpAddress.cc --- squid-3.1.1/src/ip/IpAddress.cc 2010-03-29 22:02:56.000000000 +1200 +++ squid-3.1.2/src/ip/IpAddress.cc 2010-05-01 23:39:52.000000000 +1200 @@ -904,7 +904,7 @@ bool IpAddress::operator <(const IpAddress &rhs) const { - if (IsNoAddr() && !rhs.IsNoAddr()) + if (IsAnyAddr() && !rhs.IsAnyAddr()) return true; return ( matchIPAddr(rhs) < 0); diff -u -r -N squid-3.1.1/src/ip/testIpAddress.cc squid-3.1.2/src/ip/testIpAddress.cc --- squid-3.1.1/src/ip/testIpAddress.cc 2010-03-29 22:02:56.000000000 +1200 +++ squid-3.1.2/src/ip/testIpAddress.cc 2010-05-01 23:39:52.000000000 +1200 @@ -332,6 +332,28 @@ CPPUNIT_ASSERT( ( lhsIPA <= rhsIPA ) ); CPPUNIT_ASSERT( !( lhsIPA < rhsIPA ) ); + /* test equality versus ANYADDR */ + lhsIPA.SetAnyAddr(); + rhsIPA.SetAnyAddr(); + CPPUNIT_ASSERT( lhsIPA.matchIPAddr(rhsIPA) == 0 ); + CPPUNIT_ASSERT( ( lhsIPA == rhsIPA ) ); + CPPUNIT_ASSERT( !( lhsIPA != rhsIPA ) ); + CPPUNIT_ASSERT( ( lhsIPA >= rhsIPA ) ); + CPPUNIT_ASSERT( !( lhsIPA > rhsIPA ) ); + CPPUNIT_ASSERT( ( lhsIPA <= rhsIPA ) ); + CPPUNIT_ASSERT( !( lhsIPA < rhsIPA ) ); + + /* test equality versus NOADDR */ + lhsIPA.SetNoAddr(); + rhsIPA.SetNoAddr(); + CPPUNIT_ASSERT( lhsIPA.matchIPAddr(rhsIPA) == 0 ); + CPPUNIT_ASSERT( ( lhsIPA == rhsIPA ) ); + CPPUNIT_ASSERT( !( lhsIPA != rhsIPA ) ); + CPPUNIT_ASSERT( ( lhsIPA >= rhsIPA ) ); + CPPUNIT_ASSERT( !( lhsIPA > rhsIPA ) ); + CPPUNIT_ASSERT( ( lhsIPA <= rhsIPA ) ); + CPPUNIT_ASSERT( !( lhsIPA < rhsIPA ) ); + /* test inequality (less than) */ lhsIPA = valLow; rhsIPA = valHigh; @@ -343,11 +365,55 @@ CPPUNIT_ASSERT( ( lhsIPA <= rhsIPA ) ); CPPUNIT_ASSERT( ( lhsIPA < rhsIPA ) ); + /* test inequality versus ANYADDR (less than) */ + lhsIPA.SetAnyAddr(); + rhsIPA = valHigh; + CPPUNIT_ASSERT( lhsIPA.matchIPAddr(rhsIPA) < 0 ); + CPPUNIT_ASSERT( !( lhsIPA == rhsIPA ) ); + CPPUNIT_ASSERT( ( lhsIPA != rhsIPA ) ); + CPPUNIT_ASSERT( !( lhsIPA >= rhsIPA ) ); + CPPUNIT_ASSERT( !( lhsIPA > rhsIPA ) ); + CPPUNIT_ASSERT( ( lhsIPA <= rhsIPA ) ); + CPPUNIT_ASSERT( ( lhsIPA < rhsIPA ) ); + + /* test inequality versus NOADDR (less than) */ + lhsIPA = valLow; + rhsIPA.SetNoAddr(); + CPPUNIT_ASSERT( lhsIPA.matchIPAddr(rhsIPA) < 0 ); + CPPUNIT_ASSERT( !( lhsIPA == rhsIPA ) ); + CPPUNIT_ASSERT( ( lhsIPA != rhsIPA ) ); + CPPUNIT_ASSERT( !( lhsIPA >= rhsIPA ) ); + CPPUNIT_ASSERT( !( lhsIPA > rhsIPA ) ); + CPPUNIT_ASSERT( ( lhsIPA <= rhsIPA ) ); + CPPUNIT_ASSERT( ( lhsIPA < rhsIPA ) ); + /* test inequality (greater than) */ lhsIPA = valHigh; rhsIPA = valLow; CPPUNIT_ASSERT( lhsIPA.matchIPAddr(rhsIPA) > 0 ); CPPUNIT_ASSERT( !( lhsIPA == rhsIPA ) ); + CPPUNIT_ASSERT( ( lhsIPA != rhsIPA ) ); + CPPUNIT_ASSERT( ( lhsIPA >= rhsIPA ) ); + CPPUNIT_ASSERT( ( lhsIPA > rhsIPA ) ); + CPPUNIT_ASSERT( !( lhsIPA <= rhsIPA ) ); + CPPUNIT_ASSERT( !( lhsIPA < rhsIPA ) ); + + /* test inequality (greater than) */ + lhsIPA = valHigh; + rhsIPA.SetAnyAddr(); + CPPUNIT_ASSERT( lhsIPA.matchIPAddr(rhsIPA) > 0 ); + CPPUNIT_ASSERT( !( lhsIPA == rhsIPA ) ); + CPPUNIT_ASSERT( ( lhsIPA != rhsIPA ) ); + CPPUNIT_ASSERT( ( lhsIPA >= rhsIPA ) ); + CPPUNIT_ASSERT( ( lhsIPA > rhsIPA ) ); + CPPUNIT_ASSERT( !( lhsIPA <= rhsIPA ) ); + CPPUNIT_ASSERT( !( lhsIPA < rhsIPA ) ); + + /* test inequality versus NOADDR (greater than) */ + lhsIPA.SetNoAddr(); + rhsIPA = valLow; + CPPUNIT_ASSERT( lhsIPA.matchIPAddr(rhsIPA) > 0 ); + CPPUNIT_ASSERT( !( lhsIPA == rhsIPA ) ); CPPUNIT_ASSERT( ( lhsIPA != rhsIPA ) ); CPPUNIT_ASSERT( ( lhsIPA >= rhsIPA ) ); CPPUNIT_ASSERT( ( lhsIPA > rhsIPA ) ); diff -u -r -N squid-3.1.1/src/Makefile.am squid-3.1.2/src/Makefile.am --- squid-3.1.1/src/Makefile.am 2010-03-29 22:02:56.000000000 +1200 +++ squid-3.1.2/src/Makefile.am 2010-05-01 23:39:52.000000000 +1200 @@ -733,10 +733,10 @@ snmp_core.o snmp_agent.o: ../snmplib/libsnmp.a $(top_srcdir)/include/cache_snmp.h globals.cc: globals.h mk-globals-c.pl - $(AWK) -f $(srcdir)/mk-globals-c.awk < $(srcdir)/globals.h > $@ + $(AWK) -f $(srcdir)/mk-globals-c.awk < $(srcdir)/globals.h > $@ || ($(RM) -f $@ && exit 1) string_arrays.c: enums.h mk-string-arrays.pl - $(AWK) -f $(srcdir)/mk-string-arrays.awk < $(srcdir)/enums.h > $@ + $(AWK) -f $(srcdir)/mk-string-arrays.awk < $(srcdir)/enums.h > $@ || ($(RM) -f $@ && exit 1) cache_diff: cache_diff.o debug.o globals.o store_key_md5.o $(CC) -o $@ $(LDFLAGS) $@.o debug.o globals.o store_key_md5.o $(STD_APP_LIBS) @@ -755,7 +755,7 @@ ./cf_gen cf.data $(srcdir)/cf.data.depend cf_gen_defines.h: $(srcdir)/cf_gen_defines $(srcdir)/cf.data.pre - $(AWK) -f $(srcdir)/cf_gen_defines <$(srcdir)/cf.data.pre >cf_gen_defines.h + $(AWK) -f $(srcdir)/cf_gen_defines <$(srcdir)/cf.data.pre >$@ || ($(RM) -f $@ && exit 1) ## FIXME: generate a sed command file from configure. Then this doesn't @@ -804,7 +804,8 @@ $(INSTALL_DATA) squid.conf.default $(DESTDIR)$(DEFAULT_CONFIG_FILE).default; \ echo "$(INSTALL_DATA) squid.conf.documented $(DESTDIR)$(DEFAULT_CONFIG_FILE).documented"; \ $(INSTALL_DATA) squid.conf.documented $(DESTDIR)$(DEFAULT_CONFIG_FILE).documented; \ - $(mkinstalldirs) $(DESTDIR)$(DEFAULT_LOG_PREFIX) + $(mkinstalldirs) $(DESTDIR)$(DEFAULT_LOG_PREFIX); \ + $(mkinstalldirs) $(DESTDIR)`dirname $(DEFAULT_PIDFILE)` uninstall-local: squid.conf.default @$(SHELL) $(top_srcdir)/scripts/remove-cfg.sh "$(RM)" $(DESTDIR)$(DEFAULT_MIME_TABLE) $(srcdir)/mime.conf.default diff -u -r -N squid-3.1.1/src/Makefile.in squid-3.1.2/src/Makefile.in --- squid-3.1.1/src/Makefile.in 2010-03-29 22:03:18.000000000 +1200 +++ squid-3.1.2/src/Makefile.in 2010-05-01 23:40:13.000000000 +1200 @@ -4522,10 +4522,10 @@ snmp_core.o snmp_agent.o: ../snmplib/libsnmp.a $(top_srcdir)/include/cache_snmp.h globals.cc: globals.h mk-globals-c.pl - $(AWK) -f $(srcdir)/mk-globals-c.awk < $(srcdir)/globals.h > $@ + $(AWK) -f $(srcdir)/mk-globals-c.awk < $(srcdir)/globals.h > $@ || ($(RM) -f $@ && exit 1) string_arrays.c: enums.h mk-string-arrays.pl - $(AWK) -f $(srcdir)/mk-string-arrays.awk < $(srcdir)/enums.h > $@ + $(AWK) -f $(srcdir)/mk-string-arrays.awk < $(srcdir)/enums.h > $@ || ($(RM) -f $@ && exit 1) cache_diff: cache_diff.o debug.o globals.o store_key_md5.o $(CC) -o $@ $(LDFLAGS) $@.o debug.o globals.o store_key_md5.o $(STD_APP_LIBS) @@ -4543,7 +4543,7 @@ ./cf_gen cf.data $(srcdir)/cf.data.depend cf_gen_defines.h: $(srcdir)/cf_gen_defines $(srcdir)/cf.data.pre - $(AWK) -f $(srcdir)/cf_gen_defines <$(srcdir)/cf.data.pre >cf_gen_defines.h + $(AWK) -f $(srcdir)/cf_gen_defines <$(srcdir)/cf.data.pre >$@ || ($(RM) -f $@ && exit 1) cf.data: cf.data.pre Makefile sed \ @@ -4589,7 +4589,8 @@ $(INSTALL_DATA) squid.conf.default $(DESTDIR)$(DEFAULT_CONFIG_FILE).default; \ echo "$(INSTALL_DATA) squid.conf.documented $(DESTDIR)$(DEFAULT_CONFIG_FILE).documented"; \ $(INSTALL_DATA) squid.conf.documented $(DESTDIR)$(DEFAULT_CONFIG_FILE).documented; \ - $(mkinstalldirs) $(DESTDIR)$(DEFAULT_LOG_PREFIX) + $(mkinstalldirs) $(DESTDIR)$(DEFAULT_LOG_PREFIX); \ + $(mkinstalldirs) $(DESTDIR)`dirname $(DEFAULT_PIDFILE)` uninstall-local: squid.conf.default @$(SHELL) $(top_srcdir)/scripts/remove-cfg.sh "$(RM)" $(DESTDIR)$(DEFAULT_MIME_TABLE) $(srcdir)/mime.conf.default diff -u -r -N squid-3.1.1/src/wccp.cc squid-3.1.2/src/wccp.cc --- squid-3.1.1/src/wccp.cc 2010-03-29 22:02:56.000000000 +1200 +++ squid-3.1.2/src/wccp.cc 2010-05-01 23:39:52.000000000 +1200 @@ -59,18 +59,18 @@ }; struct wccp_cache_entry_t { - IpAddress ip_addr; + struct in_addr ip_addr; int revision; char hash[WCCP_HASH_SIZE]; int reserved; }; struct wccp_i_see_you_t { - int type; - int version; - int change; - int id; - int number; + int32_t type; + int32_t version; + int32_t change; + int32_t id; + int32_t number; struct wccp_cache_entry_t wccp_cache_entry[WCCP_ACTIVE_CACHES]; }; @@ -288,10 +288,10 @@ for (loop = 0; loop < (unsigned) ntohl(wccp_i_see_you.number); loop++) { assert(loop < WCCP_ACTIVE_CACHES); - if (wccp_i_see_you.wccp_cache_entry[loop].ip_addr < local_ip) + if (local_ip > wccp_i_see_you.wccp_cache_entry[loop].ip_addr) return 0; - if (wccp_i_see_you.wccp_cache_entry[loop].ip_addr == local_ip) + if (local_ip == wccp_i_see_you.wccp_cache_entry[loop].ip_addr) found = 1; } diff -u -r -N squid-3.1.1/tools/squidclient.cc squid-3.1.2/tools/squidclient.cc --- squid-3.1.1/tools/squidclient.cc 2010-03-29 22:02:56.000000000 +1200 +++ squid-3.1.2/tools/squidclient.cc 2010-05-01 23:39:52.000000000 +1200 @@ -135,7 +135,7 @@ fprintf(stderr, "Version: %s\n" "Usage: %s [-arsv] [-g count] [-h remote host] [-H 'string'] [-i IMS] [-I ping-interval] [-j 'Host-header']" - "[-l local-host] [-m method] [-p port] [-P file] [-t count] [-T timeout] [-u proxy-user] [-U www-user] " + "[-k] [-l local-host] [-m method] [-p port] [-P file] [-t count] [-T timeout] [-u proxy-user] [-U www-user] " "[-V version] [-w proxy-password] [-W www-password] url\n" "\n" "Options:\n" @@ -146,6 +146,7 @@ " -i IMS If-Modified-Since time (in Epoch seconds).\n" " -I interval Ping interval in seconds (default 1 second).\n" " -j hosthdr Host header content\n" + " -k Keep the connection active. Default is to do only one request then close.\n" " -l host Specify a local IP address to bind to. Default is none.\n" " -m method Request method, default is GET.\n" " -p port Port number of cache. Default is %d.\n" @@ -444,10 +445,10 @@ } else strcat(msg, "Connection: keep-alive\r\n"); } - } else { - if (!keep_alive) - strcat(msg, "Connection: close\r\n"); } + /* HTTP/1.1 may need close */ + if (!keep_alive) + strcat(msg, "Connection: close\r\n"); strcat(msg, extra_hdrs); strcat(msg, "\r\n");