diff -ruN squid-2.6.RC1/ChangeLog squid-2.6.RC2/ChangeLog --- squid-2.6.RC1/ChangeLog Wed Jun 7 18:22:02 2006 +++ squid-2.6.RC2/ChangeLog Sun Jun 25 13:38:25 2006 @@ -1,4 +1,4 @@ -Changes to squid-2.6 (not yet released) +Changes to squid-2.6 (Planned release 1 Jul 2006) - New --enable-default-hostsfile configure option - Added username info to active_requests cachemgr stats diff -ruN squid-2.6.RC1/RELEASENOTES.html squid-2.6.RC2/RELEASENOTES.html --- squid-2.6.RC1/RELEASENOTES.html Tue Jun 20 15:01:37 2006 +++ squid-2.6.RC2/RELEASENOTES.html Sun Jun 25 13:39:40 2006 @@ -2,12 +2,12 @@ - Squid 2.6.PRE2 release notes + Squid 2.6.STABLE1 release notes -

Squid 2.6.PRE2 release notes

+

Squid 2.6.STABLE1 release notes

-

Squid Developers

$Id: release-2.6.html,v 1.15 2006/06/12 21:37:42 hno Exp $ +

Squid Developers

$Id: release-2.6.html,v 1.17 2006/06/25 12:06:39 serassio Exp $
This document contains the release notes for version 2.6 of Squid. Squid is a WWW Cache application developed by the Web Caching community. @@ -87,7 +87,7 @@
https_port

Many new options. Reconstructs URLs as https:// by default.

cache_peer

Many new options to support origin servers and SSL encryption

ssl_engine

New directive for hardware assisted SSL encryption

-
sslproxy_*

New directives defining how to gateway http->https

+
sslproxy_*

New directives defining how to gateway http->https

sslpassword_program

New helper directive to query an external program for SSL key encryption password (if any)

no_cache

Renamed to cache to better reflect the functionaliy. no_cache still accepted.

cache

New name for the old no_cache directive.

@@ -139,9 +139,7 @@
Bug #1590

"ETag Loop" warnings in cache.log

Bug -#761

assertion failed: cbdata.c:249: "c->locks > 0" when using diskd

-
Bug -#888

ntlm_user_pool assertion error on shutdown

+#761

assertion failed: cbdata.c:249: "c->locks > 0" when using diskd

Bug #1420

302 responses with an Expires header is always cached

Bug @@ -201,15 +199,15 @@

4. Windows support:

This Squid version can run on Windows as a system service using the Cygwin environment.
-Windows NT4 and following are supported.
+Windows NT 4 and later are supported.
On Windows 2000/XP/2003 the service is configured to use the Windows Service Recovery option restarting automatically after 60 seconds.

-
Usage

Some new command line options was added for Windows service support:

+
Usage

Some new command line options was added for the Windows service support:

The service installation is made with -i command line switch, it's possible to use -f switch at -the same time for specify a different config-file settings for the Squid Service that is stored -on Windows Registry.

+the same time for specify a different config-file settings for the Squid Service that will be +stored on the Windows Registry.

A new -n switch specify the Windows Service Name, so multiple Squid instance are allowed. "Squid" is the default when the switch is not used.

So, to install the service, the syntax is:

@@ -218,7 +216,7 @@ squid -i [-f file] [-n name]

-

Service uninstallation is made with -r command line switch plus the appropriate -n switch.

+

Service uninstallation is made with -r command line switch with the appropriate -n switch.

The -k switch family must be used with the appropriate -f and -n switches, so the syntax is:

@@ -226,7 +224,7 @@
 
where service-name is the name specified with -n options at service install time.

-

To use Squid original command line, the new -O switch must be used ONCE, the sintax is:

+

To use the Squid original command line, the new -O switch must be used ONCE, the syntax is:

 squid -O cmdline [-n service-name]
@@ -236,10 +234,10 @@
 needed only when a non default service name is in use.

Don't use the "Start parameters" in the Windows 2000/XP/2003 Service applet: they are specific to Windows services functionality and Squid is not designed for understand they.

-

Example:

+

In the following example the command line of the "squidsvc" Squid service is set to "-D -u 3130":

-squid -O "-D -a 8080" -n squidsvc
+squid -O "-D -u 3130" -n squidsvc
 

@@ -266,7 +264,7 @@ -
  • The WIN32 equivalent of '/dev/null' is 'NUL'
  • +
  • The Windows equivalent of '/dev/null' is 'NUL'
  • Squid doesn't know how to run external helpers based on scripts, like .bat, .cmd, .vbs, .pl, etc. So in squid.conf the interpreter path must be always specified, for example: diff -ruN squid-2.6.RC1/configure squid-2.6.RC2/configure --- squid-2.6.RC1/configure Tue Jun 20 15:01:20 2006 +++ squid-2.6.RC2/configure Sun Jun 25 13:39:21 2006 @@ -1,7 +1,7 @@ #! /bin/sh -# From configure.in Revision: 1.377 . +# From configure.in Revision: 1.380 . # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59 for Squid Web Proxy 2.6.RC1. +# Generated by GNU Autoconf 2.59 for Squid Web Proxy 2.6.RC2. # # Report bugs to . # @@ -270,8 +270,8 @@ # Identity of this package. PACKAGE_NAME='Squid Web Proxy' PACKAGE_TARNAME='squid' -PACKAGE_VERSION='2.6.RC1' -PACKAGE_STRING='Squid Web Proxy 2.6.RC1' +PACKAGE_VERSION='2.6.RC2' +PACKAGE_STRING='Squid Web Proxy 2.6.RC2' PACKAGE_BUGREPORT='http://www.squid-cache.org/bugs/' ac_default_prefix=/usr/local/squid @@ -781,7 +781,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 2.6.RC1 to adapt to many kinds of systems. +\`configure' configures Squid Web Proxy 2.6.RC2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -847,7 +847,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Squid Web Proxy 2.6.RC1:";; + short | recursive ) echo "Configuration of Squid Web Proxy 2.6.RC2:";; esac cat <<\_ACEOF @@ -974,9 +974,6 @@ Programmers Guide section authentication schemes for details on how to build your custom auth scheme module - --enable-auth-modules=\"list of helpers\" - Backwards compatibility alias for - --enable-basic-auth-helpers --enable-basic-auth-helpers=\"list of helpers\" This option selects which basic scheme proxy_auth helpers to build and install as part of the normal @@ -1160,7 +1157,7 @@ test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF -Squid Web Proxy configure 2.6.RC1 +Squid Web Proxy configure 2.6.RC2 generated by GNU Autoconf 2.59 Copyright (C) 2003 Free Software Foundation, Inc. @@ -1174,7 +1171,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 2.6.RC1, which was +It was created by Squid Web Proxy $as_me 2.6.RC2, which was generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ @@ -1820,7 +1817,7 @@ # Define the identity of the package. PACKAGE='squid' - VERSION='2.6.RC1' + VERSION='2.6.RC2' cat >>confdefs.h <<_ACEOF @@ -4742,39 +4739,13 @@ -BASIC_AUTH_HELPERS="" -# Check whether --enable-auth-modules or --disable-auth-modules was given. -if test "${enable_auth_modules+set}" = set; then - enableval="$enable_auth_modules" - echo "--enable-auth-modules is obsolete. Please use the new" - echo "option --enable-basic-auth-helpers" - sleep 5 - case "$enableval" in - yes) - for helper in $srcdir/helpers/basic_auth/*; do - if test -f $helper/Makefile.in; then - BASIC_AUTH_HELPERS="$BASIC_AUTH_HELPERS `basename $helper`" - fi - done - ;; - no) - ;; - *) - BASIC_AUTH_HELPERS="`echo $enableval| sed -e 's/,/ /g;s/ */ /g'`" - esac - -fi; # Check whether --enable-basic-auth-helpers or --disable-basic-auth-helpers was given. if test "${enable_basic_auth_helpers+set}" = set; then enableval="$enable_basic_auth_helpers" case "$enableval" in yes) - BASIC_AUTH_HELPERS="" - for helper in $srcdir/helpers/basic_auth/*; do - if test -f $helper/Makefile.in; then - BASIC_AUTH_HELPERS="$BASIC_AUTH_HELPERS `basename $helper`" - fi - done + echo "ERROR: --enable-basic-auth-helpers requires an argument" + exit 1 ;; no) ;; @@ -4804,11 +4775,8 @@ enableval="$enable_ntlm_auth_helpers" case "$enableval" in yes) - for helper in $srcdir/helpers/ntlm_auth/*; do - if test -f $helper/Makefile.in; then - NTLM_AUTH_HELPERS="$NTLM_AUTH_HELPERS `basename $helper`" - fi - done + echo "ERROR: --enable-ntlm-auth-helpers requires an argument" + exit 1 ;; no) ;; @@ -4836,11 +4804,8 @@ enableval="$enable_digest_auth_helpers" case "$enableval" in yes) - for helper in $srcdir/helpers/digest_auth/*; do - if test -f $helper/Makefile.in; then - DIGEST_AUTH_HELPERS="$DIGEST_AUTH_HELPERS `basename $helper`" - fi - done + echo "ERROR: --enable-digest-auth-helpers requires an argument" + exit 1 ;; no) ;; @@ -4868,11 +4833,8 @@ enableval="$enable_negotiate_auth_helpers" case "$enableval" in yes) - for helper in $srcdir/helpers/negotiate_auth/*; do - if test -f $helper/Makefile.in; then - NEGOTIATE_AUTH_HELPERS="$NEGOTIATE_AUTH_HELPERS `basename $helper`" - fi - done + echo "ERROR: --enable-negotiate-auth-helpers requires an argument" + exit 1 ;; no) ;; @@ -4913,11 +4875,8 @@ enableval="$enable_external_acl_helpers" case "$enableval" in yes) - for helper in $srcdir/helpers/external_acl/*; do - if test -f $helper/Makefile.in; then - EXTERNAL_ACL_HELPERS="$EXTERNAL_ACL_HELPERS `basename $helper`" - fi - done + echo "ERROR: --enable-external-acl-helpers requires an argument" + exit 1 ;; no) ;; @@ -8610,9 +8569,9 @@ _ACEOF -echo "$as_me:$LINENO: checking for short" >&5 -echo $ECHO_N "checking for short... $ECHO_C" >&6 -if test "${ac_cv_type_short+set}" = set; then +echo "$as_me:$LINENO: checking for char" >&5 +echo $ECHO_N "checking for char... $ECHO_C" >&6 +if test "${ac_cv_type_char+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -8625,9 +8584,9 @@ int main () { -if ((short *) 0) +if ((char *) 0) return 0; -if (sizeof (short)) +if (sizeof (char)) return 0; ; return 0; @@ -8655,24 +8614,24 @@ ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_type_short=yes + ac_cv_type_char=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_short=no +ac_cv_type_char=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5 -echo "${ECHO_T}$ac_cv_type_short" >&6 +echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5 +echo "${ECHO_T}$ac_cv_type_char" >&6 -echo "$as_me:$LINENO: checking size of short" >&5 -echo $ECHO_N "checking size of short... $ECHO_C" >&6 -if test "${ac_cv_sizeof_short+set}" = set; then +echo "$as_me:$LINENO: checking size of char" >&5 +echo $ECHO_N "checking size of char... $ECHO_C" >&6 +if test "${ac_cv_sizeof_char+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test "$ac_cv_type_short" = yes; then + if test "$ac_cv_type_char" = yes; then # The cast to unsigned long works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. @@ -8689,7 +8648,7 @@ int main () { -static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)]; +static int test_array [1 - 2 * !(((long) (sizeof (char))) >= 0)]; test_array [0] = 0 ; @@ -8730,7 +8689,7 @@ int main () { -static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)]; test_array [0] = 0 ; @@ -8787,7 +8746,7 @@ int main () { -static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)]; +static int test_array [1 - 2 * !(((long) (sizeof (char))) < 0)]; test_array [0] = 0 ; @@ -8828,7 +8787,7 @@ int main () { -static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long) (sizeof (char))) >= $ac_mid)]; test_array [0] = 0 ; @@ -8893,7 +8852,7 @@ int main () { -static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)]; test_array [0] = 0 ; @@ -8932,10 +8891,10 @@ rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in -?*) ac_cv_sizeof_short=$ac_lo;; -'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77 +?*) ac_cv_sizeof_char=$ac_lo;; +'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77 See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (short), 77 +echo "$as_me: error: cannot compute sizeof (char), 77 See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } ;; esac @@ -8954,8 +8913,8 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -long longval () { return (long) (sizeof (short)); } -unsigned long ulongval () { return (long) (sizeof (short)); } +long longval () { return (long) (sizeof (char)); } +unsigned long ulongval () { return (long) (sizeof (char)); } #include #include int @@ -8965,17 +8924,17 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) exit (1); - if (((long) (sizeof (short))) < 0) + if (((long) (sizeof (char))) < 0) { long i = longval (); - if (i != ((long) (sizeof (short)))) + if (i != ((long) (sizeof (char)))) exit (1); fprintf (f, "%ld\n", i); } else { unsigned long i = ulongval (); - if (i != ((long) (sizeof (short)))) + if (i != ((long) (sizeof (char)))) exit (1); fprintf (f, "%lu\n", i); } @@ -8996,16 +8955,16 @@ ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_sizeof_short=`cat conftest.val` + ac_cv_sizeof_char=`cat conftest.val` else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77 +{ { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77 See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (short), 77 +echo "$as_me: error: cannot compute sizeof (char), 77 See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi @@ -9014,19 +8973,19 @@ fi rm -f conftest.val else - ac_cv_sizeof_short=0 + ac_cv_sizeof_char=0 fi fi -echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5 -echo "${ECHO_T}$ac_cv_sizeof_short" >&6 +echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5 +echo "${ECHO_T}$ac_cv_sizeof_char" >&6 cat >>confdefs.h <<_ACEOF -#define SIZEOF_SHORT $ac_cv_sizeof_short +#define SIZEOF_CHAR $ac_cv_sizeof_char _ACEOF -echo "$as_me:$LINENO: checking for int" >&5 -echo $ECHO_N "checking for int... $ECHO_C" >&6 -if test "${ac_cv_type_int+set}" = set; then +echo "$as_me:$LINENO: checking for short" >&5 +echo $ECHO_N "checking for short... $ECHO_C" >&6 +if test "${ac_cv_type_short+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -9039,9 +8998,9 @@ int main () { -if ((int *) 0) +if ((short *) 0) return 0; -if (sizeof (int)) +if (sizeof (short)) return 0; ; return 0; @@ -9069,24 +9028,24 @@ ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_type_int=yes + ac_cv_type_short=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_int=no +ac_cv_type_short=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5 -echo "${ECHO_T}$ac_cv_type_int" >&6 +echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5 +echo "${ECHO_T}$ac_cv_type_short" >&6 -echo "$as_me:$LINENO: checking size of int" >&5 -echo $ECHO_N "checking size of int... $ECHO_C" >&6 -if test "${ac_cv_sizeof_int+set}" = set; then +echo "$as_me:$LINENO: checking size of short" >&5 +echo $ECHO_N "checking size of short... $ECHO_C" >&6 +if test "${ac_cv_sizeof_short+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test "$ac_cv_type_int" = yes; then + if test "$ac_cv_type_short" = yes; then # The cast to unsigned long works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. @@ -9103,7 +9062,7 @@ int main () { -static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)]; +static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)]; test_array [0] = 0 ; @@ -9144,7 +9103,7 @@ int main () { -static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)]; test_array [0] = 0 ; @@ -9201,7 +9160,7 @@ int main () { -static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)]; +static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)]; test_array [0] = 0 ; @@ -9242,7 +9201,7 @@ int main () { -static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)]; test_array [0] = 0 ; @@ -9307,7 +9266,7 @@ int main () { -static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)]; test_array [0] = 0 ; @@ -9346,10 +9305,10 @@ rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in -?*) ac_cv_sizeof_int=$ac_lo;; -'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77 +?*) ac_cv_sizeof_short=$ac_lo;; +'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77 See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (int), 77 +echo "$as_me: error: cannot compute sizeof (short), 77 See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } ;; esac @@ -9368,8 +9327,8 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -long longval () { return (long) (sizeof (int)); } -unsigned long ulongval () { return (long) (sizeof (int)); } +long longval () { return (long) (sizeof (short)); } +unsigned long ulongval () { return (long) (sizeof (short)); } #include #include int @@ -9379,17 +9338,17 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) exit (1); - if (((long) (sizeof (int))) < 0) + if (((long) (sizeof (short))) < 0) { long i = longval (); - if (i != ((long) (sizeof (int)))) + if (i != ((long) (sizeof (short)))) exit (1); fprintf (f, "%ld\n", i); } else { unsigned long i = ulongval (); - if (i != ((long) (sizeof (int)))) + if (i != ((long) (sizeof (short)))) exit (1); fprintf (f, "%lu\n", i); } @@ -9410,16 +9369,16 @@ ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_sizeof_int=`cat conftest.val` + ac_cv_sizeof_short=`cat conftest.val` else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77 +{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77 See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (int), 77 +echo "$as_me: error: cannot compute sizeof (short), 77 See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi @@ -9428,19 +9387,19 @@ fi rm -f conftest.val else - ac_cv_sizeof_int=0 + ac_cv_sizeof_short=0 fi fi -echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5 -echo "${ECHO_T}$ac_cv_sizeof_int" >&6 +echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5 +echo "${ECHO_T}$ac_cv_sizeof_short" >&6 cat >>confdefs.h <<_ACEOF -#define SIZEOF_INT $ac_cv_sizeof_int +#define SIZEOF_SHORT $ac_cv_sizeof_short _ACEOF -echo "$as_me:$LINENO: checking for long" >&5 -echo $ECHO_N "checking for long... $ECHO_C" >&6 -if test "${ac_cv_type_long+set}" = set; then +echo "$as_me:$LINENO: checking for int" >&5 +echo $ECHO_N "checking for int... $ECHO_C" >&6 +if test "${ac_cv_type_int+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -9453,9 +9412,9 @@ int main () { -if ((long *) 0) +if ((int *) 0) return 0; -if (sizeof (long)) +if (sizeof (int)) return 0; ; return 0; @@ -9483,24 +9442,24 @@ ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_type_long=yes + ac_cv_type_int=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_long=no +ac_cv_type_int=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5 -echo "${ECHO_T}$ac_cv_type_long" >&6 +echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5 +echo "${ECHO_T}$ac_cv_type_int" >&6 -echo "$as_me:$LINENO: checking size of long" >&5 -echo $ECHO_N "checking size of long... $ECHO_C" >&6 -if test "${ac_cv_sizeof_long+set}" = set; then +echo "$as_me:$LINENO: checking size of int" >&5 +echo $ECHO_N "checking size of int... $ECHO_C" >&6 +if test "${ac_cv_sizeof_int+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test "$ac_cv_type_long" = yes; then + if test "$ac_cv_type_int" = yes; then # The cast to unsigned long works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. @@ -9517,7 +9476,7 @@ int main () { -static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)]; +static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)]; test_array [0] = 0 ; @@ -9558,7 +9517,7 @@ int main () { -static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)]; test_array [0] = 0 ; @@ -9615,7 +9574,7 @@ int main () { -static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)]; +static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)]; test_array [0] = 0 ; @@ -9656,7 +9615,7 @@ int main () { -static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)]; test_array [0] = 0 ; @@ -9721,7 +9680,7 @@ int main () { -static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)]; test_array [0] = 0 ; @@ -9760,10 +9719,10 @@ rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in -?*) ac_cv_sizeof_long=$ac_lo;; -'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77 +?*) ac_cv_sizeof_int=$ac_lo;; +'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77 See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (long), 77 +echo "$as_me: error: cannot compute sizeof (int), 77 See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } ;; esac @@ -9782,8 +9741,8 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -long longval () { return (long) (sizeof (long)); } -unsigned long ulongval () { return (long) (sizeof (long)); } +long longval () { return (long) (sizeof (int)); } +unsigned long ulongval () { return (long) (sizeof (int)); } #include #include int @@ -9793,17 +9752,17 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) exit (1); - if (((long) (sizeof (long))) < 0) + if (((long) (sizeof (int))) < 0) { long i = longval (); - if (i != ((long) (sizeof (long)))) + if (i != ((long) (sizeof (int)))) exit (1); fprintf (f, "%ld\n", i); } else { unsigned long i = ulongval (); - if (i != ((long) (sizeof (long)))) + if (i != ((long) (sizeof (int)))) exit (1); fprintf (f, "%lu\n", i); } @@ -9824,16 +9783,16 @@ ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_sizeof_long=`cat conftest.val` + ac_cv_sizeof_int=`cat conftest.val` else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77 +{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77 See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (long), 77 +echo "$as_me: error: cannot compute sizeof (int), 77 See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi @@ -9842,19 +9801,19 @@ fi rm -f conftest.val else - ac_cv_sizeof_long=0 + ac_cv_sizeof_int=0 fi fi -echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5 -echo "${ECHO_T}$ac_cv_sizeof_long" >&6 +echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5 +echo "${ECHO_T}$ac_cv_sizeof_int" >&6 cat >>confdefs.h <<_ACEOF -#define SIZEOF_LONG $ac_cv_sizeof_long +#define SIZEOF_INT $ac_cv_sizeof_int _ACEOF -echo "$as_me:$LINENO: checking for long long" >&5 -echo $ECHO_N "checking for long long... $ECHO_C" >&6 -if test "${ac_cv_type_long_long+set}" = set; then +echo "$as_me:$LINENO: checking for long" >&5 +echo $ECHO_N "checking for long... $ECHO_C" >&6 +if test "${ac_cv_type_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF @@ -9867,9 +9826,9 @@ int main () { -if ((long long *) 0) +if ((long *) 0) return 0; -if (sizeof (long long)) +if (sizeof (long)) return 0; ; return 0; @@ -9897,24 +9856,24 @@ ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_type_long_long=yes + ac_cv_type_long=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_long_long=no +ac_cv_type_long=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5 -echo "${ECHO_T}$ac_cv_type_long_long" >&6 +echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5 +echo "${ECHO_T}$ac_cv_type_long" >&6 -echo "$as_me:$LINENO: checking size of long long" >&5 -echo $ECHO_N "checking size of long long... $ECHO_C" >&6 -if test "${ac_cv_sizeof_long_long+set}" = set; then +echo "$as_me:$LINENO: checking size of long" >&5 +echo $ECHO_N "checking size of long... $ECHO_C" >&6 +if test "${ac_cv_sizeof_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - if test "$ac_cv_type_long_long" = yes; then + if test "$ac_cv_type_long" = yes; then # The cast to unsigned long works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. @@ -9931,7 +9890,7 @@ int main () { -static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)]; +static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)]; test_array [0] = 0 ; @@ -9972,7 +9931,7 @@ int main () { -static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)]; test_array [0] = 0 ; @@ -10029,7 +9988,7 @@ int main () { -static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)]; +static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)]; test_array [0] = 0 ; @@ -10070,7 +10029,7 @@ int main () { -static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)]; +static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)]; test_array [0] = 0 ; @@ -10135,7 +10094,7 @@ int main () { -static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)]; +static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)]; test_array [0] = 0 ; @@ -10174,10 +10133,10 @@ rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in -?*) ac_cv_sizeof_long_long=$ac_lo;; -'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77 +?*) ac_cv_sizeof_long=$ac_lo;; +'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77 See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (long long), 77 +echo "$as_me: error: cannot compute sizeof (long), 77 See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } ;; esac @@ -10196,8 +10155,8 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -long longval () { return (long) (sizeof (long long)); } -unsigned long ulongval () { return (long) (sizeof (long long)); } +long longval () { return (long) (sizeof (long)); } +unsigned long ulongval () { return (long) (sizeof (long)); } #include #include int @@ -10207,17 +10166,17 @@ FILE *f = fopen ("conftest.val", "w"); if (! f) exit (1); - if (((long) (sizeof (long long))) < 0) + if (((long) (sizeof (long))) < 0) { long i = longval (); - if (i != ((long) (sizeof (long long)))) + if (i != ((long) (sizeof (long)))) exit (1); fprintf (f, "%ld\n", i); } else { unsigned long i = ulongval (); - if (i != ((long) (sizeof (long long)))) + if (i != ((long) (sizeof (long)))) exit (1); fprintf (f, "%lu\n", i); } @@ -10238,16 +10197,16 @@ ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_sizeof_long_long=`cat conftest.val` + ac_cv_sizeof_long=`cat conftest.val` else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) -{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77 +{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77 See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (long long), 77 +echo "$as_me: error: cannot compute sizeof (long), 77 See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi @@ -10256,11 +10215,425 @@ fi rm -f conftest.val else - ac_cv_sizeof_long_long=0 + ac_cv_sizeof_long=0 fi fi -echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5 -echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6 +echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5 +echo "${ECHO_T}$ac_cv_sizeof_long" >&6 +cat >>confdefs.h <<_ACEOF +#define SIZEOF_LONG $ac_cv_sizeof_long +_ACEOF + + +echo "$as_me:$LINENO: checking for long long" >&5 +echo $ECHO_N "checking for long long... $ECHO_C" >&6 +if test "${ac_cv_type_long_long+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +if ((long long *) 0) + return 0; +if (sizeof (long long)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_long_long=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type_long_long=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5 +echo "${ECHO_T}$ac_cv_type_long_long" >&6 + +echo "$as_me:$LINENO: checking size of long long" >&5 +echo $ECHO_N "checking size of long long... $ECHO_C" >&6 +if test "${ac_cv_sizeof_long_long+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$ac_cv_type_long_long" = yes; then + # The cast to unsigned long works around a bug in the HP C Compiler + # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects + # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. + # This bug is HP SR number 8606223364. + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_lo= ac_hi= +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_lo=`expr '(' $ac_mid ')' + 1` +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof_long_long=$ac_lo;; +'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77 +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (long long), 77 +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } ;; +esac +else + if test "$cross_compiling" = yes; then + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run test program while cross compiling +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +long longval () { return (long) (sizeof (long long)); } +unsigned long ulongval () { return (long) (sizeof (long long)); } +#include +#include +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + exit (1); + if (((long) (sizeof (long long))) < 0) + { + long i = longval (); + if (i != ((long) (sizeof (long long)))) + exit (1); + fprintf (f, "%ld\n", i); + } + else + { + unsigned long i = ulongval (); + if (i != ((long) (sizeof (long long)))) + exit (1); + fprintf (f, "%lu\n", i); + } + exit (ferror (f) || fclose (f) != 0); + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_long_long=`cat conftest.val` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77 +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (long long), 77 +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +rm -f conftest.val +else + ac_cv_sizeof_long_long=0 +fi +fi +echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5 +echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6 cat >>confdefs.h <<_ACEOF #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long _ACEOF @@ -10339,6 +10712,152 @@ _ACEOF +echo "$as_me:$LINENO: checking size of uint8_t" >&5 +echo $ECHO_N "checking size of uint8_t... $ECHO_C" >&6 +if test "${ac_cv_sizeof_uint8_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run test program while cross compiling +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#if STDC_HEADERS +#include +#include +#endif +#if HAVE_INTTYPES_H +#include +#endif +#if HAVE_SYS_TYPES_H +#include +#endif +#if HAVE_SYS_BITYPES_H +#include +#endif +int main() +{ + FILE *f=fopen("conftestval", "w"); + if (!f) return(1); + fprintf(f, "%d\n", (int)sizeof(uint8_t)); + return(0); +} + +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_uint8_t=`cat conftestval` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_sizeof_uint8_t=0 +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +echo "$as_me:$LINENO: result: $ac_cv_sizeof_uint8_t" >&5 +echo "${ECHO_T}$ac_cv_sizeof_uint8_t" >&6 + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_UINT8_T $ac_cv_sizeof_uint8_t +_ACEOF + + +echo "$as_me:$LINENO: checking size of u_int8_t" >&5 +echo $ECHO_N "checking size of u_int8_t... $ECHO_C" >&6 +if test "${ac_cv_sizeof_u_int8_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run test program while cross compiling +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#if STDC_HEADERS +#include +#include +#endif +#if HAVE_INTTYPES_H +#include +#endif +#if HAVE_SYS_TYPES_H +#include +#endif +#if HAVE_SYS_BITYPES_H +#include +#endif +int main() +{ + FILE *f=fopen("conftestval", "w"); + if (!f) return(1); + fprintf(f, "%d\n", (int)sizeof(u_int8_t)); + return(0); +} + +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_u_int8_t=`cat conftestval` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_sizeof_u_int8_t=0 +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +echo "$as_me:$LINENO: result: $ac_cv_sizeof_u_int8_t" >&5 +echo "${ECHO_T}$ac_cv_sizeof_u_int8_t" >&6 + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_U_INT8_T $ac_cv_sizeof_u_int8_t +_ACEOF + + echo "$as_me:$LINENO: checking size of int16_t" >&5 echo $ECHO_N "checking size of int16_t... $ECHO_C" >&6 if test "${ac_cv_sizeof_int16_t+set}" = set; then @@ -10997,6 +11516,111 @@ +if test "x$ac_cv_sizeof_uint8_t" = "x1"; then + echo "$as_me:$LINENO: checking for u_int8_t" >&5 +echo $ECHO_N "checking for u_int8_t... $ECHO_C" >&6 +if test "${ac_cv_type_u_int8_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* What a mess.. many systems have added the (now standard) bit types + * in their own ways, so we need to scan a wide variety of headers to + * find them.. + */ +#include +#if STDC_HEADERS +#include +#include +#endif +#if HAVE_INTTYPES_H +#include +#endif +#if HAVE_SYS_TYPES_H +#include +#endif +#if HAVE_SYS_BITYPES_H +#include +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "(^|[^a-zA-Z_0-9])u_int8_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + ac_cv_type_u_int8_t=yes +else + ac_cv_type_u_int8_t=no +fi +rm -f conftest* + +fi +echo "$as_me:$LINENO: result: $ac_cv_type_u_int8_t" >&5 +echo "${ECHO_T}$ac_cv_type_u_int8_t" >&6 +if test $ac_cv_type_u_int8_t = no; then + +cat >>confdefs.h <<\_ACEOF +#define u_int8_t uint8_t +_ACEOF + +fi + +elif test "x$ac_cv_sizeof_char" = "x1"; then + echo "$as_me:$LINENO: checking for u_int8_t" >&5 +echo $ECHO_N "checking for u_int8_t... $ECHO_C" >&6 +if test "${ac_cv_type_u_int8_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* What a mess.. many systems have added the (now standard) bit types + * in their own ways, so we need to scan a wide variety of headers to + * find them.. + */ +#include +#if STDC_HEADERS +#include +#include +#endif +#if HAVE_INTTYPES_H +#include +#endif +#if HAVE_SYS_TYPES_H +#include +#endif +#if HAVE_SYS_BITYPES_H +#include +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "(^|[^a-zA-Z_0-9])u_int8_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + ac_cv_type_u_int8_t=yes +else + ac_cv_type_u_int8_t=no +fi +rm -f conftest* + +fi +echo "$as_me:$LINENO: result: $ac_cv_type_u_int8_t" >&5 +echo "${ECHO_T}$ac_cv_type_u_int8_t" >&6 +if test $ac_cv_type_u_int8_t = no; then + +cat >>confdefs.h <<\_ACEOF +#define u_int8_t unsigned char +_ACEOF + +fi + +fi if test "x$ac_cv_sizeof_short" = "x2"; then echo "$as_me:$LINENO: checking for int16_t" >&5 echo $ECHO_N "checking for int16_t... $ECHO_C" >&6 @@ -16792,7 +17416,7 @@ } >&5 cat >&5 <<_CSEOF -This file was extended by Squid Web Proxy $as_me 2.6.RC1, which was +This file was extended by Squid Web Proxy $as_me 2.6.RC2, which was generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -16855,7 +17479,7 @@ cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -Squid Web Proxy config.status 2.6.RC1 +Squid Web Proxy config.status 2.6.RC2 configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" diff -ruN squid-2.6.RC1/configure.in squid-2.6.RC2/configure.in --- squid-2.6.RC1/configure.in Tue Jun 20 15:01:20 2006 +++ squid-2.6.RC2/configure.in Sun Jun 25 13:39:21 2006 @@ -1,16 +1,16 @@ dnl dnl Configuration input file for Squid dnl -dnl $Id: configure.in,v 1.377 2006/06/20 20:51:21 hno Exp $ +dnl $Id: configure.in,v 1.380 2006/06/25 19:38:25 hno Exp $ dnl dnl dnl -AC_INIT(Squid Web Proxy, 2.6.RC1, http://www.squid-cache.org/bugs/, squid) +AC_INIT(Squid Web Proxy, 2.6.RC2, http://www.squid-cache.org/bugs/, squid) AC_PREREQ(2.52) AM_CONFIG_HEADER(include/autoconf.h) AC_CONFIG_AUX_DIR(cfgaux) AM_INIT_AUTOMAKE -AC_REVISION($Revision: 1.377 $)dnl +AC_REVISION($Revision: 1.380 $)dnl AC_PREFIX_DEFAULT(/usr/local/squid) AM_MAINTAINER_MODE @@ -1197,29 +1197,6 @@ AC_SUBST(AUTH_OBJS) AC_SUBST(AUTH_LIBS) -dnl Select basic auth scheme helpers to build -BASIC_AUTH_HELPERS="" -AC_ARG_ENABLE(auth-modules, -[ --enable-auth-modules=\"list of helpers\" - Backwards compatibility alias for - --enable-basic-auth-helpers], -[ echo "--enable-auth-modules is obsolete. Please use the new" - echo "option --enable-basic-auth-helpers" - sleep 5 - case "$enableval" in - yes) - for helper in $srcdir/helpers/basic_auth/*; do - if test -f $helper/Makefile.in; then - BASIC_AUTH_HELPERS="$BASIC_AUTH_HELPERS `basename $helper`" - fi - done - ;; - no) - ;; - *) - BASIC_AUTH_HELPERS="`echo $enableval| sed -e 's/,/ /g;s/ */ /g'`" - esac -]) AC_ARG_ENABLE(basic-auth-helpers, [ --enable-basic-auth-helpers=\"list of helpers\" This option selects which basic scheme proxy_auth @@ -1228,12 +1205,8 @@ helpers see the helpers/basic_auth directory.], [ case "$enableval" in yes) - BASIC_AUTH_HELPERS="" - for helper in $srcdir/helpers/basic_auth/*; do - if test -f $helper/Makefile.in; then - BASIC_AUTH_HELPERS="$BASIC_AUTH_HELPERS `basename $helper`" - fi - done + echo "ERROR: --enable-basic-auth-helpers requires an argument" + exit 1 ;; no) ;; @@ -1266,11 +1239,8 @@ the helpers/ntlm_auth directory.], [ case "$enableval" in yes) - for helper in $srcdir/helpers/ntlm_auth/*; do - if test -f $helper/Makefile.in; then - NTLM_AUTH_HELPERS="$NTLM_AUTH_HELPERS `basename $helper`" - fi - done + echo "ERROR: --enable-ntlm-auth-helpers requires an argument" + exit 1 ;; no) ;; @@ -1301,11 +1271,8 @@ helpers/digest_auth directory.], [ case "$enableval" in yes) - for helper in $srcdir/helpers/digest_auth/*; do - if test -f $helper/Makefile.in; then - DIGEST_AUTH_HELPERS="$DIGEST_AUTH_HELPERS `basename $helper`" - fi - done + echo "ERROR: --enable-digest-auth-helpers requires an argument" + exit 1 ;; no) ;; @@ -1336,11 +1303,8 @@ helpers/negotiate_auth directory.], [ case "$enableval" in yes) - for helper in $srcdir/helpers/negotiate_auth/*; do - if test -f $helper/Makefile.in; then - NEGOTIATE_AUTH_HELPERS="$NEGOTIATE_AUTH_HELPERS `basename $helper`" - fi - done + echo "ERROR: --enable-negotiate-auth-helpers requires an argument" + exit 1 ;; no) ;; @@ -1381,11 +1345,8 @@ helpers/external_acl directory.], [ case "$enableval" in yes) - for helper in $srcdir/helpers/external_acl/*; do - if test -f $helper/Makefile.in; then - EXTERNAL_ACL_HELPERS="$EXTERNAL_ACL_HELPERS `basename $helper`" - fi - done + echo "ERROR: --enable-external-acl-helpers requires an argument" + exit 1 ;; no) ;; @@ -1815,11 +1776,14 @@ dnl Check for typedefs AC_CHECK_SIZEOF(void *) +AC_CHECK_SIZEOF(char) AC_CHECK_SIZEOF(short) AC_CHECK_SIZEOF(int) AC_CHECK_SIZEOF(long) AC_CHECK_SIZEOF(long long) AC_CHECK_SIZEOF_SYSTYPE(__int64) +AC_CHECK_SIZEOF_SYSTYPE(uint8_t) +AC_CHECK_SIZEOF_SYSTYPE(u_int8_t) AC_CHECK_SIZEOF_SYSTYPE(int16_t) AC_CHECK_SIZEOF_SYSTYPE(uint16_t) AC_CHECK_SIZEOF_SYSTYPE(u_int16_t) @@ -1830,6 +1794,12 @@ AC_CHECK_SIZEOF_SYSTYPE(uint64_t) AC_CHECK_SIZEOF_SYSTYPE(u_int64_t) +dnl u_int8_t +if test "x$ac_cv_sizeof_uint8_t" = "x1"; then + AC_CHECK_SYSTYPE(u_int8_t,uint8_t) +elif test "x$ac_cv_sizeof_char" = "x1"; then + AC_CHECK_SYSTYPE(u_int8_t,unsigned char) +fi dnl int16_t if test "x$ac_cv_sizeof_short" = "x2"; then AC_CHECK_SYSTYPE(int16_t,short) diff -ruN squid-2.6.RC1/doc/squid.8.in squid-2.6.RC2/doc/squid.8.in --- squid-2.6.RC1/doc/squid.8.in Fri Jun 2 10:37:29 2006 +++ squid-2.6.RC2/doc/squid.8.in Sun Jun 25 09:24:13 2006 @@ -139,6 +139,7 @@ .SH SEE ALSO .BR cachemgr.cgi "(8), " +.BR ncsa_auth "(8), " .BR pam_auth "(8), " .BR squid_ldap_auth "(8), " .BR squid_ldap_group "(8), " diff -ruN squid-2.6.RC1/helpers/basic_auth/NCSA/Makefile.am squid-2.6.RC2/helpers/basic_auth/NCSA/Makefile.am --- squid-2.6.RC1/helpers/basic_auth/NCSA/Makefile.am Thu Jun 15 13:30:37 2006 +++ squid-2.6.RC2/helpers/basic_auth/NCSA/Makefile.am Thu Jun 22 19:03:58 2006 @@ -1,12 +1,14 @@ # # Makefile for the Squid Object Cache server # -# $Id: Makefile.am,v 1.4 2006/06/15 19:30:37 hno Exp $ +# $Id: Makefile.am,v 1.5 2006/06/23 01:03:58 hno Exp $ # # Uncomment and customize the following to suit your needs: # 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 LDADD = -L$(top_builddir)/lib -lmiscutil $(CRYPTLIB) $(XTRA_LIBS) $(SSLLIB) INCLUDES = -I$(top_srcdir)/include diff -ruN squid-2.6.RC1/helpers/basic_auth/NCSA/Makefile.in squid-2.6.RC2/helpers/basic_auth/NCSA/Makefile.in --- squid-2.6.RC1/helpers/basic_auth/NCSA/Makefile.in Thu Jun 15 18:12:33 2006 +++ squid-2.6.RC2/helpers/basic_auth/NCSA/Makefile.in Fri Jun 23 18:12:39 2006 @@ -17,7 +17,7 @@ # # Makefile for the Squid Object Cache server # -# $Id: Makefile.in,v 1.33 2006/06/16 00:12:33 hno Exp $ +# $Id: Makefile.in,v 1.34 2006/06/24 00:12:39 hno Exp $ # # Uncomment and customize the following to suit your needs: # @@ -55,7 +55,7 @@ mkinstalldirs = $(SHELL) $(top_srcdir)/cfgaux/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/autoconf.h CONFIG_CLEAN_FILES = -am__installdirs = "$(DESTDIR)$(libexecdir)" +am__installdirs = "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(man8dir)" libexecPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(libexec_PROGRAMS) am_ncsa_auth_OBJECTS = ncsa_auth.$(OBJEXT) crypt_md5.$(OBJEXT) @@ -73,6 +73,9 @@ LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(ncsa_auth_SOURCES) DIST_SOURCES = $(ncsa_auth_SOURCES) +man8dir = $(mandir)/man8 +NROFF = nroff +MANS = $(man_MANS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -246,6 +249,8 @@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ ncsa_auth_SOURCES = ncsa_auth.c crypt_md5.c crypt_md5.h +man_MANS = ncsa_auth.8 +EXTRA_DIST = ncsa_auth.8 LDADD = -L$(top_builddir)/lib -lmiscutil $(CRYPTLIB) $(XTRA_LIBS) $(SSLLIB) INCLUDES = -I$(top_srcdir)/include all: all-am @@ -331,6 +336,51 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` uninstall-info-am: +install-man8: $(man8_MANS) $(man_MANS) + @$(NORMAL_INSTALL) + test -z "$(man8dir)" || $(mkdir_p) "$(DESTDIR)$(man8dir)" + @list='$(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS)'; \ + l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ + for i in $$l2; do \ + case "$$i" in \ + *.8*) list="$$list $$i" ;; \ + esac; \ + done; \ + for i in $$list; do \ + if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ + else file=$$i; fi; \ + ext=`echo $$i | sed -e 's/^.*\\.//'`; \ + case "$$ext" in \ + 8*) ;; \ + *) ext='8' ;; \ + esac; \ + inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ + inst=`echo $$inst | sed -e 's/^.*\///'`; \ + inst=`echo $$inst | sed '$(transform)'`.$$ext; \ + echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \ + $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst"; \ + done +uninstall-man8: + @$(NORMAL_UNINSTALL) + @list='$(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS)'; \ + l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ + for i in $$l2; do \ + case "$$i" in \ + *.8*) list="$$list $$i" ;; \ + esac; \ + done; \ + for i in $$list; do \ + ext=`echo $$i | sed -e 's/^.*\\.//'`; \ + case "$$ext" in \ + 8*) ;; \ + *) ext='8' ;; \ + esac; \ + inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ + inst=`echo $$inst | sed -e 's/^.*\///'`; \ + inst=`echo $$inst | sed '$(transform)'`.$$ext; \ + echo " rm -f '$(DESTDIR)$(man8dir)/$$inst'"; \ + rm -f "$(DESTDIR)$(man8dir)/$$inst"; \ + done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ @@ -409,9 +459,9 @@ done check-am: all-am check: check-am -all-am: Makefile $(PROGRAMS) +all-am: Makefile $(PROGRAMS) $(MANS) installdirs: - for dir in "$(DESTDIR)$(libexecdir)"; do \ + for dir in "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(man8dir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-am @@ -458,13 +508,13 @@ info-am: -install-data-am: +install-data-am: install-man install-exec-am: install-libexecPROGRAMS install-info: install-info-am -install-man: +install-man: install-man8 installcheck-am: @@ -485,7 +535,10 @@ ps-am: -uninstall-am: uninstall-info-am uninstall-libexecPROGRAMS +uninstall-am: uninstall-info-am uninstall-libexecPROGRAMS \ + uninstall-man + +uninstall-man: uninstall-man8 .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libexecPROGRAMS ctags distclean distclean-compile \ @@ -493,11 +546,11 @@ html-am info info-am install install-am install-data \ install-data-am install-exec install-exec-am install-info \ install-info-am install-libexecPROGRAMS install-man \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-info-am \ - uninstall-libexecPROGRAMS + install-man8 install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ + ps ps-am tags uninstall uninstall-am uninstall-info-am \ + uninstall-libexecPROGRAMS uninstall-man uninstall-man8 # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -ruN squid-2.6.RC1/helpers/basic_auth/NCSA/crypt_md5.c squid-2.6.RC2/helpers/basic_auth/NCSA/crypt_md5.c --- squid-2.6.RC1/helpers/basic_auth/NCSA/crypt_md5.c Thu Jun 15 13:30:37 2006 +++ squid-2.6.RC2/helpers/basic_auth/NCSA/crypt_md5.c Thu Jun 22 19:03:58 2006 @@ -16,6 +16,7 @@ */ #include +#include #include "config.h" #include "md5.h" @@ -166,3 +167,30 @@ return passwd; } + +/* Created by Ramon de Carvalho + Refined by Rodrigo Rubira Branco +*/ +char *md5sum(const char *s){ + static unsigned char digest[16]; + MD5_CTX ctx; + int idx; + static char sum[33]; + + memset(digest,0,16); + + MD5Init(&ctx); + MD5Update(&ctx,(const unsigned char *)s,strlen(s)); + MD5Final(digest,&ctx); + + for(idx=0;idx<16;idx++) + sprintf(&sum[idx*2],"%02x",digest[idx]); + + sum[33]='\0'; + + /* Don't leave anything around in vm they could use. */ + memset(digest, 0, sizeof digest); + + return sum; +} + diff -ruN squid-2.6.RC1/helpers/basic_auth/NCSA/crypt_md5.h squid-2.6.RC2/helpers/basic_auth/NCSA/crypt_md5.h --- squid-2.6.RC1/helpers/basic_auth/NCSA/crypt_md5.h Thu Jun 15 13:30:37 2006 +++ squid-2.6.RC2/helpers/basic_auth/NCSA/crypt_md5.h Thu Jun 22 19:03:58 2006 @@ -13,3 +13,6 @@ * salt[0] = '\0'; */ char *crypt_md5(const char *pw, const char *salt); + +/* MD5 hash without salt */ +char *md5sum(const char *s); diff -ruN squid-2.6.RC1/helpers/basic_auth/NCSA/ncsa_auth.8 squid-2.6.RC2/helpers/basic_auth/NCSA/ncsa_auth.8 --- squid-2.6.RC1/helpers/basic_auth/NCSA/ncsa_auth.8 Wed Dec 31 17:00:00 1969 +++ squid-2.6.RC2/helpers/basic_auth/NCSA/ncsa_auth.8 Thu Jun 22 19:03:58 2006 @@ -0,0 +1,38 @@ +.\" This file is distributed in the hope that it will be useful, +.\" but WITHOUT ANY WARRANTY; without even the implied warranty of +.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See +.\" the GNU General Public License for more details. +.\" +.\" You should have received a copy of the GNU General Public License +.\" along with this file; if not, write to the Free Software +.\" Foundation, Inc., 59 Temple Place, Suite 330, Boston, +.\" MA 02111-1307 USA +.\" +.\" HISTORY: +.\" 2006-05-16, created by Rodrigo Rubira Branco +.TH ncsa_auth 8 "May 16, 2006" "Squid NCSA Auth helper" +.SH NAME +ncsa_auth \- NCSA httpd-style password file authentication helper for Squid +\fB +.SH SYNOPSIS +.nf +.fam C +\fBncsa_auth\fP \fIpasswdfile\fP +.fam T +.fi +.SH DESCRIPTION +\fBncsa_auth\fP allows Squid to read and authenticate user and password information from an NCSA/Apache httpd-style password file when using basic HTTP authentication. +.PP +The only parameter is the password file. It must have permissions to be read by the user that Squid is running as (cache_effective_user in squid.conf). +.PP +This password file can be manipulated using htpasswd. +.SH OPTIONS +Only specify the password file name. +.SH EXAMPLE +\fBncsa_auth\fP /etc/squid/squid.pass +.SH SECURITY +\fBncsa_auth\fP must have access to the password file to be executed. +.SH SEE ALSO +\fBhtpasswd\fP(1), \fBsquid\fP(8) +.SH AUTHOR +Manpage written by Rodrigo Rubira Branco diff -ruN squid-2.6.RC1/helpers/basic_auth/NCSA/ncsa_auth.c squid-2.6.RC2/helpers/basic_auth/NCSA/ncsa_auth.c --- squid-2.6.RC1/helpers/basic_auth/NCSA/ncsa_auth.c Thu Jun 15 13:30:37 2006 +++ squid-2.6.RC2/helpers/basic_auth/NCSA/ncsa_auth.c Thu Jun 22 19:03:58 2006 @@ -144,6 +144,8 @@ printf("OK\n"); } else if (strcmp(u->passwd, (char *) crypt_md5(passwd, u->passwd)) == 0) { printf("OK\n"); + } else if (strcmp(u->passwd, (char *) md5sum(passwd)) == 0) { /* md5 without salt and magic strings - Added by Ramon de Carvalho and Rodrigo Rubira Branco */ + printf("OK\n"); } else { printf("ERR Wrong password\n"); } diff -ruN squid-2.6.RC1/helpers/digest_auth/ldap/ldap_backend.c squid-2.6.RC2/helpers/digest_auth/ldap/ldap_backend.c --- squid-2.6.RC1/helpers/digest_auth/ldap/ldap_backend.c Mon May 15 19:21:29 2006 +++ squid-2.6.RC2/helpers/digest_auth/ldap/ldap_backend.c Wed Jun 21 14:51:42 2006 @@ -14,7 +14,7 @@ #include #include "ldap_backend.h" -#ifdef _SQUID_MSWIN_ /* Native Windows port and MinGW */ +#ifdef _SQUID_MSWIN_ /* Native Windows port and MinGW */ #define snprintf _snprintf #include @@ -27,15 +27,15 @@ #define LDAP_OPT_X_TLS 0x6000 #endif /* Some tricks to allow dynamic bind with ldap_start_tls_s entry point at - run time. + * run time. */ #undef ldap_start_tls_s #if LDAP_UNICODE #define LDAP_START_TLS_S "ldap_start_tls_sW" -typedef WINLDAPAPI ULONG (LDAPAPI * PFldap_start_tls_s) (IN PLDAP, OUT PULONG, OUT LDAPMessage **, IN PLDAPControlW *, IN PLDAPControlW *); +typedef WINLDAPAPI ULONG(LDAPAPI * PFldap_start_tls_s) (IN PLDAP, OUT PULONG, OUT LDAPMessage **, IN PLDAPControlW *, IN PLDAPControlW *); #else #define LDAP_START_TLS_S "ldap_start_tls_sA" -typedef WINLDAPAPI ULONG (LDAPAPI * PFldap_start_tls_s) (IN PLDAP, OUT PULONG, OUT LDAPMessage **, IN PLDAPControlA *, IN PLDAPControlA *); +typedef WINLDAPAPI ULONG(LDAPAPI * PFldap_start_tls_s) (IN PLDAP, OUT PULONG, OUT LDAPMessage **, IN PLDAPControlA *, IN PLDAPControlA *); #endif /* LDAP_UNICODE */ PFldap_start_tls_s Win32_ldap_start_tls_s; #define ldap_start_tls_s(l,s,c) Win32_ldap_start_tls_s(l,NULL,NULL,s,c) @@ -306,18 +306,18 @@ int rc; /* On Windows ldap_start_tls_s is available starting from Windows XP, - so we need to bind at run-time with the function entry point + * so we need to bind at run-time with the function entry point */ #ifdef _SQUID_MSWIN_ if (use_tls) { - HMODULE WLDAP32Handle; + HMODULE WLDAP32Handle; - WLDAP32Handle = GetModuleHandle("wldap32"); - if ((Win32_ldap_start_tls_s = (PFldap_start_tls_s) GetProcAddress(WLDAP32Handle, LDAP_START_TLS_S)) == NULL) { - fprintf( stderr, PROGRAM_NAME ": ERROR: TLS (-Z) not supported on this platform.\n"); + WLDAP32Handle = GetModuleHandle("wldap32"); + if ((Win32_ldap_start_tls_s = (PFldap_start_tls_s) GetProcAddress(WLDAP32Handle, LDAP_START_TLS_S)) == NULL) { + fprintf(stderr, PROGRAM_NAME ": ERROR: TLS (-Z) not supported on this platform.\n"); exit(1); - } + } } #endif @@ -363,10 +363,18 @@ ldap_unbind(ld); ld = NULL; } - if (use_tls && (version == LDAP_VERSION3) && (ldap_start_tls_s(ld, NULL, NULL) == LDAP_SUCCESS)) { - fprintf(stderr, "Could not Activate TLS connection\n"); + if (use_tls) { +#ifdef LDAP_OPT_X_TLS + if ((version == LDAP_VERSION3) && (ldap_start_tls_s(ld, NULL, NULL) == LDAP_SUCCESS)) { + fprintf(stderr, "Could not Activate TLS connection\n"); + ldap_unbind(ld); + ld = NULL; + } +#else + fprintf(stderr, "TLS not supported with your LDAP library\n"); ldap_unbind(ld); ld = NULL; +#endif } #endif squid_ldap_set_timelimit(timelimit); diff -ruN squid-2.6.RC1/include/autoconf.h.in squid-2.6.RC2/include/autoconf.h.in --- squid-2.6.RC1/include/autoconf.h.in Sun Jun 11 15:00:26 2006 +++ squid-2.6.RC2/include/autoconf.h.in Wed Jun 21 14:33:46 2006 @@ -651,6 +651,9 @@ /* Print stacktraces on fatal errors */ #undef PRINT_STACK_TRACE +/* The size of a `char', as computed by sizeof. */ +#undef SIZEOF_CHAR + /* The size of a `int', as computed by sizeof. */ #undef SIZEOF_INT @@ -687,6 +690,9 @@ /* Size of SIZEOF_UINT64_T */ #undef SIZEOF_UINT64_T +/* Size of SIZEOF_UINT8_T */ +#undef SIZEOF_UINT8_T + /* Size of SIZEOF_U_INT16_T */ #undef SIZEOF_U_INT16_T @@ -696,6 +702,9 @@ /* Size of SIZEOF_U_INT64_T */ #undef SIZEOF_U_INT64_T +/* Size of SIZEOF_U_INT8_T */ +#undef SIZEOF_U_INT8_T + /* The size of a `void *', as computed by sizeof. */ #undef SIZEOF_VOID_P @@ -892,3 +901,6 @@ /* Have unsigned long long datatype */ #undef u_int64_t + +/* Have unsigned char datatype */ +#undef u_int8_t diff -ruN squid-2.6.RC1/include/version.h squid-2.6.RC2/include/version.h --- squid-2.6.RC1/include/version.h Tue Jun 20 15:01:20 2006 +++ squid-2.6.RC2/include/version.h Sun Jun 25 13:39:21 2006 @@ -9,5 +9,5 @@ */ #ifndef SQUID_RELEASE_TIME -#define SQUID_RELEASE_TIME 1150837278 +#define SQUID_RELEASE_TIME 1151264358 #endif diff -ruN squid-2.6.RC1/src/access_log.c squid-2.6.RC2/src/access_log.c --- squid-2.6.RC1/src/access_log.c Sat Jun 3 15:04:53 2006 +++ squid-2.6.RC2/src/access_log.c Sun Jun 25 13:28:28 2006 @@ -1,6 +1,6 @@ /* - * $Id: access_log.c,v 1.81 2006/06/03 21:04:53 serassio Exp $ + * $Id: access_log.c,v 1.82 2006/06/25 19:28:28 hno Exp $ * * DEBUG: section 46 Access Log * AUTHOR: Duane Wessels @@ -896,10 +896,10 @@ logformat_token *t; logformat *format; struct logformat_token_table_entry *te; - debug(46, 0) ("accessLogDumpLogFormat called\n"); + debug(46, 4) ("accessLogDumpLogFormat called\n"); for (format = definitions; format; format = format->next) { - debug(46, 0) ("Dumping logformat definition for %s\n", format->name); + debug(46, 4) ("Dumping logformat definition for %s\n", format->name); storeAppendPrintf(entry, "logformat %s ", format->name); for (t = format->format; t; t = t->next) { if (t->type == LFT_STRING) diff -ruN squid-2.6.RC1/src/cache_cf.c squid-2.6.RC2/src/cache_cf.c --- squid-2.6.RC1/src/cache_cf.c Sat Jun 17 17:29:41 2006 +++ squid-2.6.RC2/src/cache_cf.c Thu Jun 22 20:13:33 2006 @@ -1,6 +1,6 @@ /* - * $Id: cache_cf.c,v 1.444 2006/06/17 23:29:41 hno Exp $ + * $Id: cache_cf.c,v 1.448 2006/06/23 02:13:33 hno Exp $ * * DEBUG: section 3 Configuration File Parsing * AUTHOR: Harvest Derived @@ -1583,6 +1583,7 @@ p->http_port = (u_short) i; i = GetInteger(); p->icp.port = (u_short) i; + p->connection_auth = -1; /* auto */ while ((token = strtok(NULL, w_space))) { if (!strcasecmp(token, "proxy-only")) { p->options.proxy_only = 1; @@ -1702,12 +1703,22 @@ safe_free(p->ssldomain); p->ssldomain = xstrdup(token + 10); #endif + } else if (strcmp(token, "front-end-https=off") == 0) { + p->front_end_https = 0; } else if (strcmp(token, "front-end-https") == 0) { p->front_end_https = 1; } else if (strcmp(token, "front-end-https=on") == 0) { p->front_end_https = 1; } else if (strcmp(token, "front-end-https=auto") == 0) { - p->front_end_https = 2; + p->front_end_https = -1; + } else if (strcmp(token, "connection-auth=off") == 0) { + p->connection_auth = 0; + } else if (strcmp(token, "connection-auth") == 0) { + p->connection_auth = 1; + } else if (strcmp(token, "connection-auth=on") == 0) { + p->connection_auth = 1; + } else if (strcmp(token, "connection-auth=auto") == 0) { + p->connection_auth = -1; } else { debug(3, 0) ("parse_peer: token='%s'\n", token); self_destruct(); @@ -2701,6 +2712,8 @@ } else if (strncmp(token, "vport=", 6) == 0) { s->vport = xatoi(token + 6); s->accel = 1; + } else if (strcmp(token, "no-connection-auth") == 0) { + s->no_connection_auth = 1; } else if (strncmp(token, "urlgroup=", 9) == 0) { s->urlgroup = xstrdup(token + 9); } else if (strncmp(token, "protocol=", 9) == 0) { @@ -2762,6 +2775,8 @@ storeAppendPrintf(e, " vhost"); if (s->vport) storeAppendPrintf(e, " vport"); + if (s->no_connection_auth) + storeAppendPrintf(e, " no-connection-auth"); } static void dump_http_port_list(StoreEntry * e, const char *n, const http_port_list * s) diff -ruN squid-2.6.RC1/src/cf.data.pre squid-2.6.RC2/src/cf.data.pre --- squid-2.6.RC1/src/cf.data.pre Sat Jun 17 17:31:03 2006 +++ squid-2.6.RC2/src/cf.data.pre Thu Jun 22 20:10:01 2006 @@ -1,6 +1,6 @@ # -# $Id: cf.data.pre,v 1.345 2006/06/17 23:31:03 hno Exp $ +# $Id: cf.data.pre,v 1.349 2006/06/23 02:10:01 hno Exp $ # # # SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -94,6 +94,11 @@ url_rewrite_program) protocol= Protocol to reconstruct accelerated requests with. Defaults to http. + no-connection-auth + Prevent forwarding of Microsoft + connection oriented authentication + (NTLM, Negotiate and Kerberos) + If you run Squid on a dual-homed machine with an internal and an external interface we recommend you to specify the @@ -451,6 +456,7 @@ sslcipher=... ssloptions=... front-end-https[=on|auto] + connection-auth[=on|off|auto] use 'proxy-only' to specify objects fetched from this cache should not be saved locally. @@ -642,6 +648,12 @@ only be added if the request is forwarded as a https:// URL. + use connection-auth=off to tell Squid that this peer does + not support Microsoft connection oriented authentication, + and any such challenges received from there should be + ignored. Default is auto to automatically determine the + status of the peer peer. + NOTE: non-ICP/HTCP neighbors must be specified as 'parent'. DOC_END @@ -4981,6 +4993,7 @@ If set to "off" then such HTTP errors will cause the request or response to be rejected. DOC_END + NAME: linux_tproxy IFDEF: LINUX_TPROXY COMMENT: on|off diff -ruN squid-2.6.RC1/src/client_side.c squid-2.6.RC2/src/client_side.c --- squid-2.6.RC1/src/client_side.c Tue Jun 20 14:43:27 2006 +++ squid-2.6.RC2/src/client_side.c Thu Jun 22 20:10:01 2006 @@ -1,6 +1,6 @@ /* - * $Id: client_side.c,v 1.648 2006/06/20 20:43:27 hno Exp $ + * $Id: client_side.c,v 1.651 2006/06/23 02:10:01 hno Exp $ * * DEBUG: section 33 Client-side Routines * AUTHOR: Duane Wessels @@ -1463,6 +1463,8 @@ #endif request->flags.nocache = 1; } + if (http->conn->port->no_connection_auth) + request->flags.no_connection_auth = 1; if (Config.onoff.pipeline_prefetch) request->flags.no_connection_auth = 1; @@ -4990,29 +4992,38 @@ { ConnStateData *conn = data; conn->pinning.fd = -1; + if (conn->pinning.peer) { + cbdataUnlock(conn->pinning.peer); + conn->pinning.peer = NULL; + } safe_free(conn->pinning.host); /* NOTE: pinning.pinned should be kept. This combined with fd == -1 at the end of a request indicates that the host * connection has gone away */ } void -clientPinConnection(ConnStateData * conn, const char *host, int port, int fd) +clientPinConnection(ConnStateData * conn, int fd, const request_t * request, peer * peer) { + const char *host = request->host; + const int port = request->port; if (!cbdataValid(conn)) comm_close(fd); if (conn->pinning.fd == fd) return; - assert(conn->pinning.fd == -1); + else if (conn->pinning.fd != -1) + comm_close(conn->pinning.fd); conn->pinning.fd = fd; - safe_free(conn->pinning.host); conn->pinning.host = xstrdup(host); conn->pinning.port = port; conn->pinning.pinned = 1; + conn->pinning.peer = peer; + if (peer) + cbdataLock(conn->pinning.peer); comm_add_close_handler(fd, clientPinnedConnectionClosed, conn); } int -clientGetPinnedConnection(ConnStateData * conn, request_t * request) +clientGetPinnedInfo(const ConnStateData * conn, const request_t * request, peer ** peer) { int fd = conn->pinning.fd; @@ -5020,13 +5031,35 @@ return -1; if (request && strcasecmp(conn->pinning.host, request->host) != 0) { + err: comm_close(fd); return -1; } - if (request && conn->pinning.port != request->port) { + if (request && conn->pinning.port != request->port) + goto err; + if (conn->pinning.peer && !cbdataValid(conn->pinning.peer)) + goto err; + *peer = conn->pinning.peer; + return fd; +} + +int +clientGetPinnedConnection(ConnStateData * conn, const request_t * request, const peer * peer) +{ + int fd = conn->pinning.fd; + + if (fd < 0) + return -1; + + if (request && strcasecmp(conn->pinning.host, request->host) != 0) { + err: comm_close(fd); return -1; } + if (peer != conn->pinning.peer) + goto err; + cbdataUnlock(conn->pinning.peer); + conn->pinning.peer = NULL; conn->pinning.fd = -1; comm_remove_close_handler(fd, clientPinnedConnectionClosed, conn); return fd; diff -ruN squid-2.6.RC1/src/comm.c squid-2.6.RC2/src/comm.c --- squid-2.6.RC1/src/comm.c Sun Jun 11 11:06:25 2006 +++ squid-2.6.RC2/src/comm.c Sun Jun 25 09:53:14 2006 @@ -1,6 +1,6 @@ /* - * $Id: comm.c,v 1.351 2006/06/11 17:06:25 serassio Exp $ + * $Id: comm.c,v 1.352 2006/06/25 15:53:14 serassio Exp $ * * DEBUG: section 5 Socket Functions * AUTHOR: Harvest Derived @@ -118,7 +118,7 @@ return F->local_port; addr_len = sizeof(addr); if (getsockname(fd, (struct sockaddr *) &addr, &addr_len)) { - debug(50, 1) ("comm_local_port: Failed to retrieve TCP/UDP port number for socket: FD %d: %s\n", fd, xstrerror()); + debug(5, 1) ("comm_local_port: Failed to retrieve TCP/UDP port number for socket: FD %d: %s\n", fd, xstrerror()); return 0; } F->local_port = ntohs(addr.sin_port); @@ -138,7 +138,7 @@ statCounter.syscalls.sock.binds++; if (bind(s, (struct sockaddr *) &S, sizeof(S)) == 0) return COMM_OK; - debug(50, 0) ("commBind: Cannot bind socket FD %d to %s:%d: %s\n", + debug(5, 0) ("commBind: Cannot bind socket FD %d to %s:%d: %s\n", s, S.sin_addr.s_addr == INADDR_ANY ? "*" : inet_ntoa(S.sin_addr), (int) port, @@ -184,11 +184,11 @@ switch (errno) { case ENFILE: case EMFILE: - debug(50, 1) ("comm_open: socket failure: %s\n", xstrerror()); + debug(5, 1) ("comm_open: socket failure: %s\n", xstrerror()); fdAdjustReserved(); break; default: - debug(50, 0) ("comm_open: socket failure: %s\n", xstrerror()); + debug(5, 0) ("comm_open: socket failure: %s\n", xstrerror()); } return -1; } @@ -197,10 +197,10 @@ #ifdef IP_TOS tos = TOS; if (setsockopt(new_socket, IPPROTO_IP, IP_TOS, (char *) &tos, sizeof(int)) < 0) - debug(50, 1) ("comm_open: setsockopt(IP_TOS) on FD %d: %s\n", + debug(5, 1) ("comm_open: setsockopt(IP_TOS) on FD %d: %s\n", new_socket, xstrerror()); #else - debug(50, 0) ("comm_open: setsockopt(IP_TOS) not supported on this platform\n"); + debug(5, 0) ("comm_open: setsockopt(IP_TOS) not supported on this platform\n"); #endif } /* update fdstat */ @@ -253,7 +253,7 @@ { int x; if ((x = listen(sock, Squid_MaxFD >> 2)) < 0) { - debug(50, 0) ("comm_listen: listen(%d, %d): %s\n", + debug(5, 0) ("comm_listen: listen(%d, %d): %s\n", Squid_MaxFD >> 2, sock, xstrerror()); return x; @@ -373,7 +373,7 @@ if (F->tos) { int tos = F->tos; if (setsockopt(cs->fd, IPPROTO_IP, IP_TOS, (char *) &tos, sizeof(int)) < 0) - debug(50, 1) ("commResetFD: setsockopt(IP_TOS) on FD %d: %s\n", cs->fd, xstrerror()); + debug(5, 1) ("commResetFD: setsockopt(IP_TOS) on FD %d: %s\n", cs->fd, xstrerror()); } #endif if (F->flags.close_on_exec) @@ -545,13 +545,13 @@ statCounter.syscalls.sock.accepts++; if ((sock = accept(fd, (struct sockaddr *) &P, &Slen)) < 0) { if (ignoreErrno(errno)) { - debug(50, 5) ("comm_accept: FD %d: %s\n", fd, xstrerror()); + debug(5, 5) ("comm_accept: FD %d: %s\n", fd, xstrerror()); return COMM_NOMESSAGE; } else if (ENFILE == errno || EMFILE == errno) { - debug(50, 3) ("comm_accept: FD %d: %s\n", fd, xstrerror()); + debug(5, 3) ("comm_accept: FD %d: %s\n", fd, xstrerror()); return COMM_ERROR; } else { - debug(50, 1) ("comm_accept: FD %d: %s\n", fd, xstrerror()); + debug(5, 1) ("comm_accept: FD %d: %s\n", fd, xstrerror()); return COMM_ERROR; } } @@ -670,7 +670,7 @@ L.l_onoff = 1; L.l_linger = 0; if (setsockopt(fd, SOL_SOCKET, SO_LINGER, (char *) &L, sizeof(L)) < 0) - debug(50, 0) ("commResetTCPClose: FD %d: %s\n", fd, xstrerror()); + debug(5, 0) ("commResetTCPClose: FD %d: %s\n", fd, xstrerror()); F->flags.close_request = 1; comm_close(fd); } @@ -708,7 +708,7 @@ static void comm_close_ssl_timeout(int fd, void *unused) { - debug(50, 1) ("comm_close_ssl: FD %d: timeout\n", fd); + debug(5, 1) ("comm_close_ssl: FD %d: timeout\n", fd); comm_close_ssl_finish(fd); } @@ -768,7 +768,7 @@ #ifdef _SQUID_LINUX_ if (ECONNREFUSED != errno) #endif - debug(50, 1) ("comm_udp_sendto: FD %d, %s, port %d: %s\n", + debug(5, 1) ("comm_udp_sendto: FD %d, %s, port %d: %s\n", fd, inet_ntoa(to_addr->sin_addr), (int) htons(to_addr->sin_port), @@ -916,7 +916,7 @@ L.l_onoff = 0; /* off */ L.l_linger = 0; if (setsockopt(fd, SOL_SOCKET, SO_LINGER, (char *) &L, sizeof(L)) < 0) - debug(50, 0) ("commSetNoLinger: FD %d: %s\n", fd, xstrerror()); + debug(5, 0) ("commSetNoLinger: FD %d: %s\n", fd, xstrerror()); fd_table[fd].flags.nolinger = 1; } @@ -925,14 +925,14 @@ { int on = 1; if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, (char *) &on, sizeof(on)) < 0) - debug(50, 1) ("commSetReuseAddr: FD %d: %s\n", fd, xstrerror()); + debug(5, 1) ("commSetReuseAddr: FD %d: %s\n", fd, xstrerror()); } static void commSetTcpRcvbuf(int fd, int size) { if (setsockopt(fd, SOL_SOCKET, SO_RCVBUF, (char *) &size, sizeof(size)) < 0) - debug(50, 1) ("commSetTcpRcvbuf: FD %d, SIZE %d: %s\n", + debug(5, 1) ("commSetTcpRcvbuf: FD %d, SIZE %d: %s\n", fd, size, xstrerror()); } @@ -949,7 +949,7 @@ if (fd_table[fd].type != FD_PIPE) { #endif if (ioctl(fd, FIONBIO, &nonblocking) < 0) { - debug(50, 0) ("commSetNonBlocking: FD %d: %s %u\n", fd, xstrerror(), fd_table[fd].type); + debug(5, 0) ("commSetNonBlocking: FD %d: %s %u\n", fd, xstrerror(), fd_table[fd].type); return COMM_ERROR; } #ifdef _SQUID_CYGWIN_ @@ -958,11 +958,11 @@ #endif #ifndef _SQUID_MSWIN_ if ((flags = fcntl(fd, F_GETFL, dummy)) < 0) { - debug(50, 0) ("FD %d: fcntl F_GETFL: %s\n", fd, xstrerror()); + debug(5, 0) ("FD %d: fcntl F_GETFL: %s\n", fd, xstrerror()); return COMM_ERROR; } if (fcntl(fd, F_SETFL, flags | SQUID_NONBLOCK) < 0) { - debug(50, 0) ("commSetNonBlocking: FD %d: %s\n", fd, xstrerror()); + debug(5, 0) ("commSetNonBlocking: FD %d: %s\n", fd, xstrerror()); return COMM_ERROR; } #endif @@ -983,12 +983,12 @@ int flags; int dummy = 0; if ((flags = fcntl(fd, F_GETFL, dummy)) < 0) { - debug(50, 0) ("FD %d: fcntl F_GETFL: %s\n", fd, xstrerror()); + debug(5, 0) ("FD %d: fcntl F_GETFL: %s\n", fd, xstrerror()); return COMM_ERROR; } if (fcntl(fd, F_SETFL, flags & (~SQUID_NONBLOCK)) < 0) { #endif - debug(50, 0) ("commUnsetNonBlocking: FD %d: %s\n", fd, xstrerror()); + debug(5, 0) ("commUnsetNonBlocking: FD %d: %s\n", fd, xstrerror()); return COMM_ERROR; } fd_table[fd].flags.nonblocking = 0; @@ -1002,11 +1002,11 @@ int flags; int dummy = 0; if ((flags = fcntl(fd, F_GETFL, dummy)) < 0) { - debug(50, 0) ("FD %d: fcntl F_GETFL: %s\n", fd, xstrerror()); + debug(5, 0) ("FD %d: fcntl F_GETFL: %s\n", fd, xstrerror()); return; } if (fcntl(fd, F_SETFD, flags | FD_CLOEXEC) < 0) - debug(50, 0) ("FD %d: set close-on-exec failed: %s\n", fd, xstrerror()); + debug(5, 0) ("FD %d: set close-on-exec failed: %s\n", fd, xstrerror()); fd_table[fd].flags.close_on_exec = 1; #endif } @@ -1017,7 +1017,7 @@ { int on = 1; if (setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, (char *) &on, sizeof(on)) < 0) - debug(50, 1) ("commSetTcpNoDelay: FD %d: %s\n", fd, xstrerror()); + debug(5, 1) ("commSetTcpNoDelay: FD %d: %s\n", fd, xstrerror()); fd_table[fd].flags.nodelay = 1; } #endif @@ -1063,11 +1063,11 @@ } else if (len < 0) { /* An error */ if (fd_table[fd].flags.socket_eof) { - debug(50, 2) ("commHandleWrite: FD %d: write failure: %s.\n", + debug(5, 2) ("commHandleWrite: FD %d: write failure: %s.\n", fd, xstrerror()); CommWriteStateCallbackAndFree(fd, COMM_ERROR); } else if (ignoreErrno(errno)) { - debug(50, 10) ("commHandleWrite: FD %d: write failure: %s.\n", + debug(5, 10) ("commHandleWrite: FD %d: write failure: %s.\n", fd, xstrerror()); commSetSelect(fd, COMM_SELECT_WRITE, @@ -1075,7 +1075,7 @@ state, 0); } else { - debug(50, 2) ("commHandleWrite: FD %d: write failure: %s.\n", + debug(5, 2) ("commHandleWrite: FD %d: write failure: %s.\n", fd, xstrerror()); CommWriteStateCallbackAndFree(fd, COMM_ERROR); } diff -ruN squid-2.6.RC1/src/comm_epoll.c squid-2.6.RC2/src/comm_epoll.c --- squid-2.6.RC1/src/comm_epoll.c Thu Jun 8 06:53:20 2006 +++ squid-2.6.RC2/src/comm_epoll.c Sun Jun 25 09:53:14 2006 @@ -1,6 +1,6 @@ /* - * $Id: comm_epoll.c,v 1.22 2006/06/08 12:53:20 hno Exp $ + * $Id: comm_epoll.c,v 1.23 2006/06/25 15:53:14 serassio Exp $ * * DEBUG: section 5 Socket Functions * @@ -155,7 +155,7 @@ if (msec > MAX_POLL_TIME) msec = MAX_POLL_TIME; - debug(50, 3) ("comm_epoll: timeout %d\n", msec); + debug(5, 3) ("comm_select: timeout %d\n", msec); if (epoll_fds == 0) { assert(shutting_down); @@ -178,7 +178,7 @@ if (ignoreErrno(errno)) return COMM_OK; - debug(5, 1) ("comm_epoll: epoll failure: %s\n", xstrerror()); + debug(5, 1) ("comm_select: epoll failure: %s\n", xstrerror()); return COMM_ERROR; } statHistCount(&statCounter.select_fds_hist, num); @@ -193,7 +193,7 @@ return COMM_OK; } else { getCurrentTime(); - debug(5, 8) ("comm_epoll: time out: %ld.\n", (long int) squid_curtime); + debug(5, 8) ("comm_select: time out: %ld.\n", (long int) squid_curtime); return COMM_TIMEOUT; } } diff -ruN squid-2.6.RC1/src/comm_kqueue.c squid-2.6.RC2/src/comm_kqueue.c --- squid-2.6.RC1/src/comm_kqueue.c Thu Jun 8 06:53:20 2006 +++ squid-2.6.RC2/src/comm_kqueue.c Sun Jun 25 09:53:14 2006 @@ -1,6 +1,6 @@ /* - * $Id: comm_kqueue.c,v 1.5 2006/06/08 12:53:20 hno Exp $ + * $Id: comm_kqueue.c,v 1.6 2006/06/25 15:53:14 serassio Exp $ * * DEBUG: section 5 Socket Functions * @@ -129,7 +129,7 @@ timeout.tv_sec = msec / 1000; timeout.tv_nsec = (msec % 1000) * 1000000; - debug(50, 3) ("comm_kqueue: timeout %d\n", msec); + debug(5, 3) ("comm_select: timeout %d\n", msec); /* Check for disk io callbacks */ storeDirCallback(); @@ -149,7 +149,7 @@ if (ignoreErrno(errno)) return COMM_OK; - debug(5, 1) ("comm_kqueue: kevent failure: %s\n", xstrerror()); + debug(5, 1) ("comm_select: kevent failure: %s\n", xstrerror()); return COMM_ERROR; } if (num == 0) { @@ -162,7 +162,7 @@ int fd = (int) ke[i].ident; if (ke[i].flags & EV_ERROR) { errno = ke[i].data; - debug(5, 3) ("comm_kqueue: kqueue event error: %s\n", + debug(5, 3) ("comm_select: kqueue event error: %s\n", xstrerror()); continue; /* XXX! */ } @@ -174,7 +174,7 @@ comm_call_handlers(fd, 0, 1); break; default: - debug(5, 1) ("comm_kqueue: unexpected event: %d\n", + debug(5, 1) ("comm_select: unexpected event: %d\n", ke[i].filter); break; } diff -ruN squid-2.6.RC1/src/comm_poll.c squid-2.6.RC2/src/comm_poll.c --- squid-2.6.RC1/src/comm_poll.c Fri Jun 9 13:13:37 2006 +++ squid-2.6.RC2/src/comm_poll.c Sun Jun 25 09:53:14 2006 @@ -1,6 +1,6 @@ /* - * $Id: comm_poll.c,v 1.17 2006/06/09 19:13:37 serassio Exp $ + * $Id: comm_poll.c,v 1.18 2006/06/25 15:53:14 serassio Exp $ * * DEBUG: section 5 Socket Functions * @@ -394,12 +394,12 @@ num = poll(pfds, nfds, msec); statCounter.select_loops++; if (num < 0 && !ignoreErrno(errno)) { - debug(5, 0) ("comm_poll: poll failure: %s\n", xstrerror()); + debug(5, 0) ("comm_select: poll failure: %s\n", xstrerror()); assert(errno != EINVAL); return COMM_ERROR; /* NOTREACHED */ } - debug(5, num ? 5 : 8) ("comm_poll: %d+%u FDs ready\n", num, npending); + debug(5, num ? 5 : 8) ("comm_select: %d+%u FDs ready\n", num, npending); statHistCount(&statCounter.select_fds_hist, num); /* Check timeout handlers ONCE each second. */ if (squid_curtime > last_timeout) { @@ -458,7 +458,7 @@ F = &fd_table[fd]; if (revents & (POLLRDNORM | POLLIN | POLLHUP | POLLERR)) { PF *hdl = F->read_handler; - debug(5, 6) ("comm_poll: FD %d ready for reading\n", fd); + debug(5, 6) ("comm_select: FD %d ready for reading\n", fd); if (hdl == NULL) (void) 0; /* Nothing to do */ #if DELAY_POOLS @@ -480,7 +480,7 @@ } if (revents & (POLLWRNORM | POLLOUT | POLLHUP | POLLERR)) { PF *hdl = F->write_handler; - debug(5, 5) ("comm_poll: FD %d ready for writing\n", fd); + debug(5, 5) ("comm_select: FD %d ready for writing\n", fd); if (hdl != NULL) { F->write_handler = NULL; F->write_pending = COMM_PENDING_NORMAL; @@ -508,7 +508,7 @@ if (F->close_handler) { commCallCloseHandlers(fd); } else if (F->timeout_handler) { - debug(5, 0) ("comm_poll: Calling Timeout Handler\n"); + debug(5, 0) ("comm_select: Calling Timeout Handler\n"); F->timeout_handler(fd, F->timeout_data); } F->close_handler = NULL; @@ -549,7 +549,7 @@ return COMM_OK; } while (timeout > current_dtime); - debug(5, 8) ("comm_poll: time out: %ld.\n", (long int) squid_curtime); + debug(5, 8) ("comm_select: time out: %ld.\n", (long int) squid_curtime); return COMM_TIMEOUT; } diff -ruN squid-2.6.RC1/src/defines.h squid-2.6.RC2/src/defines.h --- squid-2.6.RC1/src/defines.h Sat Jun 10 10:08:07 2006 +++ squid-2.6.RC2/src/defines.h Sun Jun 25 09:07:31 2006 @@ -1,6 +1,6 @@ /* - * $Id: defines.h,v 1.116 2006/06/10 16:08:07 serassio Exp $ + * $Id: defines.h,v 1.117 2006/06/25 15:07:31 serassio Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -309,7 +309,7 @@ #define _WIN_SQUID_SERVICE_CONTROL_RECONFIGURE 129 #define _WIN_SQUID_SERVICE_CONTROL_DEBUG 130 #define _WIN_SQUID_SERVICE_CONTROL_INTERRUPT 131 -#define _WIN_SQUID_DEFAULT_SERVICE_NAME "SquidNT" +#define _WIN_SQUID_DEFAULT_SERVICE_NAME "Squid" #define _WIN_SQUID_SERVICE_OPTION "--ntservice" #define _WIN_SQUID_RUN_MODE_INTERACTIVE 0 #define _WIN_SQUID_RUN_MODE_SERVICE 1 diff -ruN squid-2.6.RC1/src/enums.h squid-2.6.RC2/src/enums.h --- squid-2.6.RC1/src/enums.h Sat Jun 17 17:31:03 2006 +++ squid-2.6.RC2/src/enums.h Thu Jun 22 15:52:29 2006 @@ -1,6 +1,6 @@ /* - * $Id: enums.h,v 1.232 2006/06/17 23:31:03 hno Exp $ + * $Id: enums.h,v 1.233 2006/06/22 21:52:29 hno Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -326,6 +326,7 @@ ANY_OLD_PARENT, USERHASH_PARENT, SOURCEHASH_PARENT, + PINNED, HIER_MAX } hier_code; diff -ruN squid-2.6.RC1/src/forward.c squid-2.6.RC2/src/forward.c --- squid-2.6.RC1/src/forward.c Mon Jun 19 17:40:53 2006 +++ squid-2.6.RC2/src/forward.c Thu Jun 22 15:52:29 2006 @@ -1,6 +1,6 @@ /* - * $Id: forward.c,v 1.109 2006/06/19 23:40:53 hno Exp $ + * $Id: forward.c,v 1.112 2006/06/22 21:52:29 hno Exp $ * * DEBUG: section 17 Request Forwarding * AUTHOR: Duane Wessels @@ -110,6 +110,8 @@ storeReleaseRequest(e); } } + if (EBIT_TEST(e->flags, ENTRY_DEFER_READ)) + storeResetDefer(e); if (storePendingNClients(e) > 0) assert(!EBIT_TEST(e->flags, ENTRY_FWD_HDR_WAIT)); p = fwdStateServerPeer(fwdState); @@ -453,24 +455,6 @@ return aclMapTOS(Config.accessList.outgoing_tos, &ch); } -static int -getPinnedFD(request_t * request) -{ - int fd; - ConnStateData *conn = request->pinned_connection; - if (!conn) - return -1; - - fd = clientGetPinnedConnection(conn, request); - - /* No pinned connection. Fall back */ - if (fd < 0 && !request->flags.connection_auth) { - cbdataUnlock(request->pinned_connection); - request->pinned_connection = NULL; - } - return fd; -} - static void fwdConnectStart(void *data) { @@ -511,9 +495,13 @@ ftimeout = 5; if (ftimeout < ctimeout) ctimeout = ftimeout; - if (fwdState->request->pinned_connection) { - fd = getPinnedFD(fwdState->request); + if (fs->code == PINNED) { + fd = clientGetPinnedConnection(fwdState->request->pinned_connection, fwdState->request, fs->peer); if (fd >= 0) { +#if 0 + if (!fs->peer) + fs->code = HIER_DIRECT; +#endif fwdState->server_fd = fd; fwdState->n_tries++; fwdState->request->flags.auth = 1; @@ -523,6 +511,13 @@ fwdConnectDone(fd, COMM_OK, fwdState); return; } + /* Failure. Fall back on next path */ + cbdataUnlock(fwdState->request->pinned_connection); + fwdState->request->pinned_connection = NULL; + fwdState->servers = fs->next; + fwdServerFree(fs); + fwdConnectStart(fwdState); + return; } #if LINUX_TPROXY if (fd == -1 && (Config.onoff.linux_tproxy) && @@ -907,7 +902,7 @@ else { int i = delayMostBytesWanted(mem, INT_MAX); if (0 == i) { - /* No storeDeferrRead here as it's not store dependent. + /* No storeDeferRead here as it's not store dependent. * Will get changed the day delay pools interact nicely * with the store.. */ @@ -989,6 +984,9 @@ debug(17, 3) ("fwdUnregister: %s\n", storeUrl(fwdState->entry)); assert(fd == fwdState->server_fd); assert(fd > -1); + commSetDefer(fd, NULL, NULL); + if (EBIT_TEST(fwdState->entry->flags, ENTRY_DEFER_READ)) + storeResumeRead(fwdState->entry); comm_remove_close_handler(fd, fwdServerClosed, fwdState); fwdState->server_fd = -1; } @@ -1010,8 +1008,6 @@ assert(e->mem_obj->chksum == url_checksum(e->mem_obj->url)); #endif fwdLogReplyStatus(fwdState->n_tries, e->mem_obj->reply->sline.status); - if (EBIT_TEST(e->flags, ENTRY_DEFER_READ)) - storeResumeRead(e); if (fwdReforward(fwdState)) { debug(17, 3) ("fwdComplete: re-forwarding %d %s\n", e->mem_obj->reply->sline.status, diff -ruN squid-2.6.RC1/src/fs/coss/store_dir_coss.c squid-2.6.RC2/src/fs/coss/store_dir_coss.c --- squid-2.6.RC1/src/fs/coss/store_dir_coss.c Sat May 27 11:20:18 2006 +++ squid-2.6.RC2/src/fs/coss/store_dir_coss.c Thu Jun 22 16:05:00 2006 @@ -1,6 +1,6 @@ /* - * $Id: store_dir_coss.c,v 1.46 2006/05/27 17:20:18 serassio Exp $ + * $Id: store_dir_coss.c,v 1.47 2006/06/22 22:05:00 adrian Exp $ * * DEBUG: section 47 Store COSS Directory Routines * AUTHOR: Eric Stern @@ -661,7 +661,7 @@ if (size <= 0) fatal("storeCossDirParse: invalid size value"); - cs = xmalloc(sizeof(CossInfo)); + cs = xcalloc(1, sizeof(CossInfo)); if (cs == NULL) fatal("storeCossDirParse: couldn't xmalloc() CossInfo!\n"); diff -ruN squid-2.6.RC1/src/helper.c squid-2.6.RC2/src/helper.c --- squid-2.6.RC1/src/helper.c Sat Jun 3 15:04:53 2006 +++ squid-2.6.RC2/src/helper.c Sat Jun 24 03:46:38 2006 @@ -1,6 +1,6 @@ /* - * $Id: helper.c,v 1.59 2006/06/03 21:04:53 serassio Exp $ + * $Id: helper.c,v 1.60 2006/06/24 09:46:38 serassio Exp $ * * DEBUG: section 84 Helper process maintenance * AUTHOR: Harvest Derived? @@ -598,10 +598,10 @@ debug(84, 0) ("WARNING: %s #%d (FD %d) exited\n", hlp->id_name, srv->index + 1, fd); if (hlp->n_active <= hlp->n_to_start / 2) { - debug(80, 0) ("Too few %s processes are running\n", hlp->id_name); + debug(84, 0) ("Too few %s processes are running\n", hlp->id_name); if (hlp->last_restart > squid_curtime - 30) fatalf("The %s helpers are crashing too rapidly, need help!\n", hlp->id_name); - debug(80, 0) ("Starting new helpers\n"); + debug(84, 0) ("Starting new helpers\n"); helperOpenServers(hlp); } } @@ -638,10 +638,10 @@ debug(84, 0) ("WARNING: %s #%d (FD %d) exited\n", hlp->id_name, srv->index + 1, fd); if (hlp->n_active <= hlp->n_to_start / 2) { - debug(80, 0) ("Too few %s processes are running\n", hlp->id_name); + debug(84, 0) ("Too few %s processes are running\n", hlp->id_name); if (hlp->last_restart > squid_curtime - 30) fatalf("The %s helpers are crashing too rapidly, need help!\n", hlp->id_name); - debug(80, 0) ("Starting new helpers\n"); + debug(84, 0) ("Starting new helpers\n"); helperStatefulOpenServers(hlp); } } diff -ruN squid-2.6.RC1/src/http.c squid-2.6.RC2/src/http.c --- squid-2.6.RC1/src/http.c Wed Jun 7 13:43:51 2006 +++ squid-2.6.RC2/src/http.c Thu Jun 22 15:52:29 2006 @@ -1,6 +1,6 @@ /* - * $Id: http.c,v 1.409 2006/06/07 19:43:51 hno Exp $ + * $Id: http.c,v 1.411 2006/06/22 21:52:29 hno Exp $ * * DEBUG: section 11 Hypertext Transfer Protocol (HTTP) * AUTHOR: Harvest Derived @@ -588,6 +588,18 @@ if (!httpState->peer) return 1; + if (!httpState->peer->connection_auth) + return 0; + + if (rep->sline.status != HTTP_UNAUTHORIZED) + return 1; + + if (httpState->peer->connection_auth == 1) + return 1; + + if (httpState->peer->options.originserver) + return 1; + if (req->pinned_connection) if (req->pinned_connection->pinning.host) return 1; @@ -801,11 +813,8 @@ #endif comm_remove_close_handler(fd, httpStateFree, httpState); fwdUnregister(fd, httpState->fwd); - if (orig_request->pinned_connection) { - if (peer_supports_connection_pinning(httpState)) - clientPinConnection(orig_request->pinned_connection, orig_request->host, orig_request->port, fd); - else - comm_close(fd); + if (orig_request->pinned_connection && !orig_request->flags.no_connection_auth) { + clientPinConnection(orig_request->pinned_connection, fd, orig_request, httpState->peer); } else if (httpState->peer) { if (httpState->peer->options.originserver) pconnPush(fd, httpState->peer->name, httpState->peer->http_port, httpState->orig_request->host, client_addr, client_port); diff -ruN squid-2.6.RC1/src/icp_v2.c squid-2.6.RC2/src/icp_v2.c --- squid-2.6.RC1/src/icp_v2.c Mon May 15 19:08:28 2006 +++ squid-2.6.RC2/src/icp_v2.c Sun Jun 25 09:53:14 2006 @@ -1,6 +1,6 @@ /* - * $Id: icp_v2.c,v 1.71 2006/05/16 01:08:28 hno Exp $ + * $Id: icp_v2.c,v 1.72 2006/06/25 15:53:14 serassio Exp $ * * DEBUG: section 12 Internet Cache Protocol * AUTHOR: Duane Wessels @@ -367,7 +367,7 @@ /* or maybe an EHOSTUNREACH "No route to host" message */ if (errno != ECONNREFUSED && errno != EHOSTUNREACH) #endif - debug(50, 1) ("icpHandleUdp: FD %d recvfrom: %s\n", + debug(12, 1) ("icpHandleUdp: FD %d recvfrom: %s\n", sock, xstrerror()); break; } @@ -458,7 +458,7 @@ x = getsockname(theOutIcpConnection, (struct sockaddr *) &xaddr, &len); if (x < 0) - debug(50, 1) ("theOutIcpConnection FD %d: getsockname: %s\n", + debug(12, 1) ("theOutIcpConnection FD %d: getsockname: %s\n", theOutIcpConnection, xstrerror()); else theOutICPAddr = xaddr.sin_addr; diff -ruN squid-2.6.RC1/src/ipc.c squid-2.6.RC2/src/ipc.c --- squid-2.6.RC1/src/ipc.c Fri Jun 9 08:22:38 2006 +++ squid-2.6.RC2/src/ipc.c Sat Jun 24 03:41:36 2006 @@ -1,6 +1,6 @@ /* - * $Id: ipc.c,v 1.36 2006/06/09 14:22:38 hno Exp $ + * $Id: ipc.c,v 1.37 2006/06/24 09:41:36 serassio Exp $ * * DEBUG: section 54 Interprocess Communication * AUTHOR: Duane Wessels @@ -112,11 +112,11 @@ int p2c[2]; int c2p[2]; if (pipe(p2c) < 0) { - debug(50, 0) ("ipcCreate: pipe: %s\n", xstrerror()); + debug(54, 0) ("ipcCreate: pipe: %s\n", xstrerror()); return -1; } if (pipe(c2p) < 0) { - debug(50, 0) ("ipcCreate: pipe: %s\n", xstrerror()); + debug(54, 0) ("ipcCreate: pipe: %s\n", xstrerror()); return -1; } fd_open(prfd = p2c[0], FD_PIPE, "IPC FIFO Parent Read"); @@ -128,7 +128,7 @@ int fds[2]; int buflen = 32768; if (socketpair(AF_UNIX, SOCK_STREAM, 0, fds) < 0) { - debug(50, 0) ("ipcCreate: socketpair: %s\n", xstrerror()); + debug(54, 0) ("ipcCreate: socketpair: %s\n", xstrerror()); return -1; } setsockopt(fds[0], SOL_SOCKET, SO_SNDBUF, (void *) &buflen, sizeof(buflen)); @@ -140,7 +140,7 @@ } else if (type == IPC_UNIX_DGRAM) { int fds[2]; if (socketpair(AF_UNIX, SOCK_DGRAM, 0, fds) < 0) { - debug(50, 0) ("ipcCreate: socketpair: %s\n", xstrerror()); + debug(54, 0) ("ipcCreate: socketpair: %s\n", xstrerror()); return -1; } fd_open(prfd = pwfd = fds[0], FD_PIPE, "IPC UNIX DGRAM Parent"); @@ -166,7 +166,7 @@ len = sizeof(PS); memset(&PS, '\0', len); if (getsockname(pwfd, (struct sockaddr *) &PS, &len) < 0) { - debug(50, 0) ("ipcCreate: getsockname: %s\n", xstrerror()); + debug(54, 0) ("ipcCreate: getsockname: %s\n", xstrerror()); return ipcCloseAllFD(prfd, pwfd, crfd, cwfd); } debug(54, 3) ("ipcCreate: FD %d sockaddr %s:%d\n", @@ -174,7 +174,7 @@ len = sizeof(CS); memset(&CS, '\0', len); if (getsockname(crfd, (struct sockaddr *) &CS, &len) < 0) { - debug(50, 0) ("ipcCreate: getsockname: %s\n", xstrerror()); + debug(54, 0) ("ipcCreate: getsockname: %s\n", xstrerror()); return ipcCloseAllFD(prfd, pwfd, crfd, cwfd); } debug(54, 3) ("ipcCreate: FD %d sockaddr %s:%d\n", @@ -182,7 +182,7 @@ } if (type == IPC_TCP_SOCKET) { if (listen(crfd, 1) < 0) { - debug(50, 1) ("ipcCreate: listen FD %d: %s\n", crfd, xstrerror()); + debug(54, 1) ("ipcCreate: listen FD %d: %s\n", crfd, xstrerror()); return ipcCloseAllFD(prfd, pwfd, crfd, cwfd); } debug(54, 3) ("ipcCreate: FD %d listening...\n", crfd); @@ -190,7 +190,7 @@ /* flush or else we get dup data if unbuffered_logs is set */ logsFlush(); if ((pid = fork()) < 0) { - debug(50, 1) ("ipcCreate: fork: %s\n", xstrerror()); + debug(54, 1) ("ipcCreate: fork: %s\n", xstrerror()); return ipcCloseAllFD(prfd, pwfd, crfd, cwfd); } if (pid > 0) { /* parent */ @@ -209,8 +209,8 @@ else x = read(prfd, hello_buf, HELLO_BUF_SZ - 1); if (x < 0) { - debug(50, 0) ("ipcCreate: PARENT: hello read test failed\n"); - debug(50, 0) ("--> read: %s\n", xstrerror()); + debug(54, 0) ("ipcCreate: PARENT: hello read test failed\n"); + debug(54, 0) ("--> read: %s\n", xstrerror()); return ipcCloseAllFD(prfd, pwfd, crfd, cwfd); } else if (strcmp(hello_buf, hello_string)) { debug(54, 0) ("ipcCreate: PARENT: hello read test failed\n"); @@ -244,7 +244,7 @@ if (type == IPC_TCP_SOCKET) { debug(54, 3) ("ipcCreate: calling accept on FD %d\n", crfd); if ((fd = accept(crfd, NULL, NULL)) < 0) { - debug(50, 0) ("ipcCreate: FD %d accept: %s\n", crfd, xstrerror()); + debug(54, 0) ("ipcCreate: FD %d accept: %s\n", crfd, xstrerror()); _exit(1); } debug(54, 3) ("ipcCreate: CHILD accepted new FD %d\n", fd); @@ -257,14 +257,14 @@ if (type == IPC_UDP_SOCKET) { x = send(cwfd, hello_string, strlen(hello_string) + 1, 0); if (x < 0) { - debug(50, 0) ("sendto FD %d: %s\n", cwfd, xstrerror()); - debug(50, 0) ("ipcCreate: CHILD: hello write test failed\n"); + debug(54, 0) ("sendto FD %d: %s\n", cwfd, xstrerror()); + debug(54, 0) ("ipcCreate: CHILD: hello write test failed\n"); _exit(1); } } else { if (write(cwfd, hello_string, strlen(hello_string) + 1) < 0) { - debug(50, 0) ("write FD %d: %s\n", cwfd, xstrerror()); - debug(50, 0) ("ipcCreate: CHILD: hello write test failed\n"); + debug(54, 0) ("write FD %d: %s\n", cwfd, xstrerror()); + debug(54, 0) ("ipcCreate: CHILD: hello write test failed\n"); _exit(1); } } @@ -306,7 +306,7 @@ #endif execvp(prog, (char *const *) args); debug_log = fdopen(2, "a+"); - debug(50, 0) ("ipcCreate: %s: %s\n", prog, xstrerror()); + debug(54, 0) ("ipcCreate: %s: %s\n", prog, xstrerror()); _exit(1); return 0; } diff -ruN squid-2.6.RC1/src/neighbors.c squid-2.6.RC2/src/neighbors.c --- squid-2.6.RC1/src/neighbors.c Mon May 15 19:08:29 2006 +++ squid-2.6.RC2/src/neighbors.c Thu Jun 22 15:52:29 2006 @@ -1,6 +1,6 @@ /* - * $Id: neighbors.c,v 1.308 2006/05/16 01:08:29 hno Exp $ + * $Id: neighbors.c,v 1.309 2006/06/22 21:52:29 hno Exp $ * * DEBUG: section 15 Neighbor Routines * AUTHOR: Harvest Derived @@ -38,7 +38,6 @@ /* count mcast group peers every 15 minutes */ #define MCAST_COUNT_RATE 900 -static int peerAllowedToUse(const peer *, request_t *); static int peerWouldBePinged(const peer *, request_t *); static void neighborRemove(peer *); static void neighborAlive(peer *, const MemObject *, const icp_common_t *); @@ -114,7 +113,7 @@ * this function figures out if it is appropriate to fetch REQUEST * from PEER. */ -static int +int peerAllowedToUse(const peer * p, request_t * request) { const struct _domain_ping *d = NULL; diff -ruN squid-2.6.RC1/src/peer_select.c squid-2.6.RC2/src/peer_select.c --- squid-2.6.RC1/src/peer_select.c Wed May 24 20:40:25 2006 +++ squid-2.6.RC2/src/peer_select.c Thu Jun 22 17:26:46 2006 @@ -1,6 +1,6 @@ /* - * $Id: peer_select.c,v 1.127 2006/05/25 02:40:25 hno Exp $ + * $Id: peer_select.c,v 1.129 2006/06/22 23:26:46 hno Exp $ * * DEBUG: section 44 Peer Selection Algorithm * AUTHOR: Duane Wessels @@ -61,6 +61,7 @@ "ANY_PARENT", "USERHASH_PARENT", "SOURCEHASH_PARENT", + "PINNED", "INVALID CODE" }; @@ -87,6 +88,7 @@ static void peerHandleHtcpReply(peer *, peer_t, htcpReplyData *, void *); #endif static int peerCheckNetdbDirect(ps_state * psstate); +static void peerGetPinned(ps_state * ps); static void peerGetSomeNeighbor(ps_state *); static void peerGetSomeNeighborReplies(ps_state *); static void peerGetSomeDirect(ps_state *); @@ -274,6 +276,8 @@ debug(44, 3) ("peerSelectFoo: direct = %s\n", DirectStr[ps->direct]); } + if (!entry || entry->ping_status == PING_NONE) + peerGetPinned(ps); if (entry == NULL) { (void) 0; } else if (entry->ping_status == PING_NONE) { @@ -302,6 +306,31 @@ break; } peerSelectCallback(ps); +} + +/* + * peerGetPinned + * + * Selects a pinned connection + */ +static void +peerGetPinned(ps_state * ps) +{ + request_t *request = ps->request; + peer *peer; + if (!request->pinned_connection) + return; + if (clientGetPinnedInfo(request->pinned_connection, request, &peer) != -1) { + if (peer && peerAllowedToUse(peer, request)) { + peerAddFwdServer(&ps->servers, peer, PINNED); + if (ps->entry) + ps->entry->ping_status = PING_DONE; /* Skip ICP */ + } else if (!peer && ps->direct != DIRECT_NO) { + peerAddFwdServer(&ps->servers, NULL, PINNED); + if (ps->entry) + ps->entry->ping_status = PING_DONE; /* Skip ICP */ + } + } } /* diff -ruN squid-2.6.RC1/src/protos.h squid-2.6.RC2/src/protos.h --- squid-2.6.RC1/src/protos.h Mon Jun 19 17:01:11 2006 +++ squid-2.6.RC2/src/protos.h Thu Jun 22 15:52:29 2006 @@ -1,6 +1,6 @@ /* - * $Id: protos.h,v 1.500 2006/06/19 23:01:11 hno Exp $ + * $Id: protos.h,v 1.501 2006/06/22 21:52:29 hno Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -140,8 +140,9 @@ extern void clientOpenListenSockets(void); extern void clientHttpConnectionsClose(void); extern int isTcpHit(log_type); -extern void clientPinConnection(ConnStateData * conn, const char *host, int port, int fd); -int clientGetPinnedConnection(ConnStateData * conn, request_t * request); +extern void clientPinConnection(ConnStateData * conn, int fd, const request_t * request, peer * peer); +extern int clientGetPinnedInfo(const ConnStateData * conn, const request_t * request, peer ** peer); +extern int clientGetPinnedConnection(ConnStateData * conn, const request_t * request, const peer * peer); extern int commSetNonBlocking(int fd); extern int commUnsetNonBlocking(int fd); @@ -675,6 +676,7 @@ extern void neighborsHtcpReply(const cache_key *, htcpReplyData *, const struct sockaddr_in *); #endif extern void peerAddFwdServer(FwdServer ** FS, peer * p, hier_code code); +extern int peerAllowedToUse(const peer *, request_t *); extern void netdbInit(void); extern void netdbHandlePingReply(const struct sockaddr_in *from, int hops, int rtt); diff -ruN squid-2.6.RC1/src/structs.h squid-2.6.RC2/src/structs.h --- squid-2.6.RC1/src/structs.h Sat Jun 17 17:31:03 2006 +++ squid-2.6.RC2/src/structs.h Thu Jun 22 20:10:01 2006 @@ -1,6 +1,6 @@ /* - * $Id: structs.h,v 1.481 2006/06/17 23:31:03 hno Exp $ + * $Id: structs.h,v 1.485 2006/06/23 02:10:01 hno Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -361,10 +361,11 @@ char *name; /* visible name */ char *defaultsite; /* default web site */ char *urlgroup; /* default urlgroup */ - unsigned int transparent:1; /* transparent proxy */ - unsigned int accel:1; /* HTTP accelerator */ - unsigned int vhost:1; /* uses host header */ - unsigned int vport:1; /* virtual port support */ + unsigned int transparent; /* transparent proxy */ + unsigned int accel; /* HTTP accelerator */ + unsigned int vhost; /* uses host header */ + unsigned int vport; /* virtual port support */ + unsigned int no_connection_auth; /* Don't support connection oriented auth */ }; #if USE_SSL @@ -1242,6 +1243,7 @@ char *host; /* host name of pinned connection */ int port; /* port of pinned connection */ int pinned; /* this connection was pinned */ + peer *peer; /* peer the connection goes via */ } pinning; }; @@ -1475,6 +1477,7 @@ SSL_SESSION *sslSession; #endif int front_end_https; + int connection_auth; }; struct _net_db_name { diff -ruN squid-2.6.RC1/src/urn.c squid-2.6.RC2/src/urn.c --- squid-2.6.RC1/src/urn.c Mon Jun 5 16:47:01 2006 +++ squid-2.6.RC2/src/urn.c Sun Jun 25 09:32:31 2006 @@ -1,6 +1,6 @@ /* - * $Id: urn.c,v 1.78 2006/06/05 22:47:01 hno Exp $ + * $Id: urn.c,v 1.79 2006/06/25 15:32:31 serassio Exp $ * * DEBUG: section 52 URN Parsing * AUTHOR: Kostas Anagnostakis @@ -72,7 +72,7 @@ assert(urls != NULL); for (i = 0; NULL != urls[i].url; i++) urlcnt++; - debug(53, 3) ("urnFindMinRtt: Counted %d URLs\n", i); + debug(52, 3) ("urnFindMinRtt: Counted %d URLs\n", i); if (1 == urlcnt) { debug(52, 3) ("urnFindMinRtt: Only one URL - return it!\n"); return urls; @@ -236,9 +236,9 @@ urls = urnParseReply(s, urnState->request->method); for (i = 0; NULL != urls[i].url; i++) urlcnt++; - debug(53, 3) ("urnFindMinRtt: Counted %d URLs\n", i); + debug(52, 3) ("urnHandleReply: Counted %d URLs\n", i); if (urls == NULL) { /* unkown URN error */ - debug(52, 3) ("urnTranslateDone: unknown URN %s\n", storeUrl(e)); + debug(52, 3) ("urnHandleReply: unknown URN %s\n", storeUrl(e)); err = errorCon(ERR_URN_RESOLVE, HTTP_NOT_FOUND); err->request = requestLink(urnState->request); err->url = xstrdup(storeUrl(e)); @@ -280,7 +280,7 @@ httpReplySetHeaders(rep, version, HTTP_MOVED_TEMPORARILY, NULL, "text/html", mb.size, 0, squid_curtime); if (urnState->flags.force_menu) { - debug(51, 3) ("urnHandleReply: forcing menu\n"); + debug(52, 3) ("urnHandleReply: forcing menu\n"); } else if (min_u) { httpHeaderPutStr(&rep->header, HDR_LOCATION, min_u->url); } diff -ruN squid-2.6.RC1/src/win32.c squid-2.6.RC2/src/win32.c --- squid-2.6.RC1/src/win32.c Wed May 24 14:48:38 2006 +++ squid-2.6.RC2/src/win32.c Sat Jun 24 03:35:40 2006 @@ -1,6 +1,6 @@ /* - * $Id: win32.c,v 1.10 2006/05/24 20:48:38 serassio Exp $ + * $Id: win32.c,v 1.11 2006/06/24 09:35:40 serassio Exp $ * * * * * * * * * Legal stuff * * * * * * * * @@ -75,7 +75,7 @@ { {SC_ACTION_RESTART, 60000}}; static SERVICE_DESCRIPTION Squid_ServiceDescription = -{SOFTWARENAME " " VERSION " WWW Proxy Server"}; +{SOFTWARENAME " " VERSION " " PACKAGE_NAME}; static SERVICE_FAILURE_ACTIONS Squid_ServiceFailureActions = {INFINITE, NULL, NULL, 1, Squid_SCAction}; static char REGKEY[256] = "SOFTWARE\\" VENDOR "\\" SOFTWARENAME "\\" WIN32_VERSION "\\";