]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Merge from trunk
authorAmos Jeffries <squid3@treenet.co.nz>
Sat, 3 Oct 2009 09:48:06 +0000 (22:48 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Sat, 3 Oct 2009 09:48:06 +0000 (22:48 +1300)
configure.in
doc/release-notes/release-3.2.sgml
helpers/basic_auth/NCSA/Makefile.am
helpers/basic_auth/NCSA/basic_ncsa_auth.8 [moved from helpers/basic_auth/NCSA/ncsa_auth.8 with 63% similarity]
helpers/basic_auth/NCSA/basic_ncsa_auth.cc [moved from helpers/basic_auth/NCSA/ncsa_auth.c with 100% similarity]
helpers/basic_auth/NCSA/crypt_md5.cc [moved from helpers/basic_auth/NCSA/crypt_md5.c with 100% similarity]
helpers/basic_auth/NCSA/crypt_md5.h
src/access_log.cc
src/cf.data.pre
test-suite/buildtests/layer-05-nodeps-esi.opts [new file with mode: 0644]

index d9d618fdc5b0a839113031b0065d3232e8202c9d..5ac9366d45c82e49b4ea8d2b09a5f1bcebd8ae6e 100644 (file)
@@ -84,7 +84,6 @@ fi
 AC_PROG_RANLIB
 
 
-CRYPTLIB=''
 REGEXLIB=''    # -lregex
 # LIBREGEX=''  # libregex.a
 
@@ -3020,6 +3019,7 @@ else
 fi
 
 dnl Check for libcrypt
+CRYPTLIB=
 dnl Some of our helpers use crypt(3) which may be in libc, or in
 dnl libcrypt (eg FreeBSD)
 AC_CHECK_LIB(crypt, crypt, [CRYPTLIB="-lcrypt"])
@@ -3027,6 +3027,13 @@ dnl Solaris10 provides MD5 natively through libmd5
 AC_CHECK_LIB(md5, MD5Init, [CRYPTLIB="$CRYPTLIB -lmd5"])
 AC_SUBST(CRYPTLIB)
 
+# check for crypt, may require -lcrypt
+SAVED_LIBS="$LIBS"
+LIBS="$LIBS $CRYPTLIB"
+AC_CHECK_FUNCS(crypt)
+LIBS="$SAVED_LIBS"
+
+
 dnl Check for libdl, used by auth_modules/PAM
 if test "$with_dl" = "yes"; then
     AC_CHECK_LIB(dl, dlopen)
@@ -3263,12 +3270,6 @@ AC_REPLACE_FUNCS(\
        tempnam \
 )
 
-# check for crypt, may require -lcrypt
-SAVED_LIBS="$LIBS"
-LIBS="$LIBS $CRYPTLIB"
-AC_CHECK_FUNCS(crypt)
-LIBS="$SAVED_LIBS"
-
 dnl Magic which checks whether we are forcing a type of comm loop we
 dnl are actually going to (ab)use
  
index 9d1653cf18d656331a814614d86d9cac5c896cef..c9516883b50331603964a885a2348ad47a3bb529 100644 (file)
@@ -55,6 +55,7 @@ Most user-facing changes are reflected in squid.conf (see below).
        <item>squid_db_auth - basic_db_auth - Retrieve authentication details from a simple SQL database table.
        <item>getpwnam_auth - basic_getpwname_auth - Authenticate with local system user accounts.
        <item>squid_ldap_auth - basic_ldap_auth - Authenticate with LDAP user accounts.
+       <item>ncsa_auth - basic_ncsa_auth - Authenticate with NCSA httpd-style password file.
 </itemize>
 
 <sect2>Digest Authentication protocol helpers
index 08ef3d72de6f9ea3a3a8879449ec79d6a49327ee..ba5db5116f6a6ef61dfe818f85d95699e925a86f 100644 (file)
@@ -1,21 +1,12 @@
-#
-#  Makefile for the Squid Object Cache server
-#
-#  $Id$
-#
-#  Uncomment and customize the following to suit your needs:
-#
-
 include $(top_srcdir)/src/Common.am
 
-libexec_PROGRAMS       = ncsa_auth
-ncsa_auth_SOURCES      = ncsa_auth.c crypt_md5.c crypt_md5.h
-man_MANS               = ncsa_auth.8
-EXTRA_DIST             = ncsa_auth.8
+libexec_PROGRAMS       = basic_ncsa_auth
+basic_ncsa_auth_SOURCES        = basic_ncsa_auth.cc crypt_md5.cc crypt_md5.h
+man_MANS               = basic_ncsa_auth.8
+EXTRA_DIST             = basic_ncsa_auth.8
 LDADD = \
-       $(top_builddir)/compat/libcompat.la \
-       -L$(top_builddir)/lib -lmiscutil \
-       $(CRYPTLIB) \
+       $(COMPAT_LIB) \
+       @CRYPTLIB@ \
        $(XTRA_LIBS) \
        $(SSLLIB)
 
similarity index 63%
rename from helpers/basic_auth/NCSA/ncsa_auth.8
rename to helpers/basic_auth/NCSA/basic_ncsa_auth.8
index 85da640986a3fab1d37e4b64b3aa503310f3a8ef..7cf7ff6931c7fee2bf176d83feebfa8997b017df 100644 (file)
 .\"
 .\" HISTORY:
 .\" 2006-05-16, created by Rodrigo Rubira Branco <rrbranco@br.ibm.com>
-.TH ncsa_auth 8 "May 16, 2006" "Squid NCSA Auth helper"
+.TH basic_ncsa_auth 8 "May 16, 2006" "Squid NCSA Auth helper"
 .SH NAME
-ncsa_auth \- NCSA httpd-style password file authentication helper for Squid
+basic_ncsa_auth \- NCSA httpd-style password file authentication helper for Squid
 \fB
 .SH SYNOPSIS
 .nf
 .fam C
-\fBncsa_auth\fP \fIpasswdfile\fP 
+\fBbasic_ncsa_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.
+\fBbasic_ncsa_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).
+The only parameter is the password file.  It must have permissions to be read by the user that Squid is running as.
 .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
+\fBbasic_ncsa_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)
+\fBbasic_ncsa_auth\fP must have access to the password file to be executed.
 .SH AUTHOR
 Manpage written by Rodrigo Rubira Branco <rrbranco@br.ibm.com>
+.SH SEE ALSO
+\fBhtpasswd\fP(1), \fBsquid\fP(8)
index 47c4e7787fa6433f02c70f44afd184dea40b10fb..fa44d3d38e949b3015892b232294a3639b38956d 100644 (file)
  *    to64(salt+4, rand(), 4);
  *    salt[0] = '\0';
  */
+#ifndef _CRYPT_MD5_H
+#define _CRYPT_MD5_H
+
 char *crypt_md5(const char *pw, const char *salt);
 
 /* MD5 hash without salt */
 char *md5sum(const char *s);
+
+#endif /* _CRYPT_MD5_H */
index d71baee48f82cbcae16d364a823c9556bec756cc..1f04f346c338aed1424ba17aea91d8770fa1380f 100644 (file)
@@ -2058,9 +2058,13 @@ accessLogInit(void)
 
         LogfileStatus = LOG_ENABLE;
 
-#if USE_ADAPTATION || ICAP_CLIENT
+#if USE_ADAPTATION
         alLogformatHasAdaptToken = false;
+#endif
+#if ICAP_CLIENT
         alLogformatHasIcapToken = false;
+#endif
+#if USE_ADAPTATION || ICAP_CLIENT
         for (logformat_token * curr_token = (log->logFormat?log->logFormat->format:NULL); curr_token; curr_token = curr_token->next) {
 #if USE_ADAPTATION
             if (curr_token->type == LTF_ADAPTATION_SUM_XACT_TIMES ||
index 43484ed1c3c3969818e959cb27760dc230d8f0c6..bafb2e1285d9479905f825968ee7821de50b15b7 100644 (file)
@@ -307,25 +307,29 @@ DOC_START
 
        auth_param negotiate keep_alive on
 
-NOCOMMENT_START
+       
+       Examples:
+
 #Recommended minimum configuration per scheme:
 #auth_param negotiate program <uncomment and complete this line to activate>
 #auth_param negotiate children 5
 #auth_param negotiate keep_alive on
+#
 #auth_param ntlm program <uncomment and complete this line to activate>
 #auth_param ntlm children 5
 #auth_param ntlm keep_alive on
+#
 #auth_param digest program <uncomment and complete this line>
 #auth_param digest children 5
 #auth_param digest realm Squid proxy-caching web server
 #auth_param digest nonce_garbage_interval 5 minutes
 #auth_param digest nonce_max_duration 30 minutes
 #auth_param digest nonce_max_count 50
+#
 #auth_param basic program <uncomment and complete this line>
 #auth_param basic children 5
 #auth_param basic realm Squid proxy-caching web server
 #auth_param basic credentialsttl 2 hours
-NOCOMMENT_END
 DOC_END
 
 NAME: authenticate_cache_garbage_interval
@@ -685,26 +689,28 @@ DOC_START
          # effect in rules that affect the reply data stream such as
          # http_reply_access.
 
-Examples:
-acl macaddress arp 09:00:2b:23:45:67
-acl myexample dst_as 1241
-acl password proxy_auth REQUIRED
-acl fileupload req_mime_type -i ^multipart/form-data$
-acl javascript rep_mime_type -i ^application/x-javascript$
+       Examples:
+               acl macaddress arp 09:00:2b:23:45:67
+               acl myexample dst_as 1241
+               acl password proxy_auth REQUIRED
+               acl fileupload req_mime_type -i ^multipart/form-data$
+               acl javascript rep_mime_type -i ^application/x-javascript$
 
 NOCOMMENT_START
-#Recommended minimum configuration:
+#
+# Recommended minimum configuration:
+#
 acl manager proto cache_object
 acl localhost src 127.0.0.1/32
 acl to_localhost dst 127.0.0.0/8 0.0.0.0/32
-#
+
 # Example rule allowing access from your local networks.
 # Adapt to list your (internal) IP networks from where browsing
 # should be allowed
 acl localnet src 10.0.0.0/8    # RFC1918 possible internal network
 acl localnet src 172.16.0.0/12 # RFC1918 possible internal network
 acl localnet src 192.168.0.0/16        # RFC1918 possible internal network
-#
+
 acl SSL_ports port 443
 acl Safe_ports port 80         # http
 acl Safe_ports port 21         # ftp
@@ -836,22 +842,28 @@ DOC_START
        See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
 
 NOCOMMENT_START
-#Recommended minimum configuration:
+
+#
+# Recommended minimum Access Permission configuration:
 #
 # Only allow cachemgr access from localhost
 http_access allow manager localhost
 http_access deny manager
-# Deny requests to unknown ports
+
+# Deny requests to certain unsafe ports
 http_access deny !Safe_ports
-# Deny CONNECT to other than SSL ports
+
+# Deny CONNECT to other than secure SSL ports
 http_access deny CONNECT !SSL_ports
-#
+
 # We strongly recommend the following be uncommented to protect innocent
 # web applications running on the proxy server who think the only
 # one who can access services on "localhost" is a local user
 #http_access deny to_localhost
+
 #
 # INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
+#
 
 # Example rule allowing access from your local networks.
 # Adapt localnet in the ACL section to list your (internal) IP networks
@@ -899,11 +911,10 @@ DOC_START
 
        This clause only supports fast acl types.
        See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
-NOCOMMENT_START
-#Allow ICP queries from local networks only
+
+# Allow ICP queries from local networks only
 #icp_access allow localnet
 #icp_access deny all
-NOCOMMENT_END
 DOC_END
 
 NAME: htcp_access
@@ -926,11 +937,10 @@ DOC_START
 
        This clause only supports fast acl types.
        See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
-NOCOMMENT_START
-#Allow HTCP queries from local networks only
+
+# Allow HTCP queries from local networks only
 #htcp_access allow localnet
 #htcp_access deny all
-NOCOMMENT_END
 DOC_END
 
 NAME: htcp_clr_access
@@ -949,7 +959,8 @@ DOC_START
 
        This clause only supports fast acl types.
        See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
-#Allow HTCP CLR requests from trusted peers
+
+# Allow HTCP CLR requests from trusted peers
 acl htcp_clr_peer src 172.16.1.2
 htcp_clr_access allow htcp_clr_peer
 DOC_END
@@ -1170,6 +1181,7 @@ DOC_START
        visible on the internal address.
 
 NOCOMMENT_START
+
 # Squid normally listens to port 3128
 http_port @DEFAULT_HTTP_PORT@
 NOCOMMENT_END
@@ -1551,17 +1563,17 @@ DOC_START
    
        This clause only supports fast acl types.
        See http://wiki.squid-cache.org/SquidFaq/SquidAcl for details.
-NOCOMMENT_START
-# Example: Bump all requests except those originating from localhost and 
-# those going to webax.com or example.com sites.
-#
-# acl localhost src 127.0.0.1/32
-# acl broken_sites dstdomain .webax.com
-# acl broken_sites dstdomain .example.com
-# ssl_bump deny localhost
-# ssl_bump deny broken_sites
-# ssl_bump allow all
-NOCOMMENT_END
+
+
+       # Example: Bump all requests except those originating from localhost and 
+       # those going to webax.com or example.com sites.
+
+       acl localhost src 127.0.0.1/32
+       acl broken_sites dstdomain .webax.com
+       acl broken_sites dstdomain .example.com
+       ssl_bump deny localhost
+       ssl_bump deny broken_sites
+       ssl_bump allow all
 DOC_END
 
 NAME: sslproxy_flags
@@ -1605,10 +1617,7 @@ DOC_START
 
        See also: sslproxy_flags and DONT_VERIFY_PEER.
 
-NOCOMMENT_START
-#Default setting:
-# sslproxy_cert_error deny all
-NOCOMMENT_END
+       Default setting:  sslproxy_cert_error deny all
 DOC_END
 
 
@@ -2062,7 +2071,8 @@ DOC_START
        list this option multiple times.
        Note: never_direct overrides this option.
 NOCOMMENT_START
-#We recommend you to use at least the following line.
+
+# We recommend you to use at least the following line.
 hierarchy_stoplist cgi-bin ?
 NOCOMMENT_END
 DOC_END
@@ -2301,7 +2311,9 @@ DOC_START
        which can be changed with the --with-coss-membuf-size=N configure
        option.
 NOCOMMENT_START
-# cache_dir ufs @DEFAULT_SWAP_DIR@ 100 16 256
+
+# Uncomment and adjust the following to add a disk cache directory.
+#cache_dir ufs @DEFAULT_SWAP_DIR@ 100 16 256
 NOCOMMENT_END
 DOC_END
 
@@ -2669,9 +2681,9 @@ DOC_START
        saved and for how long.  To disable, enter "none" or remove the line.
        There are not really utilities to analyze this data, so you can safely
        disable it.
-NOCOMMENT_START
-# cache_store_log @DEFAULT_STORE_LOG@
-NOCOMMENT_END
+
+       Example:
+               cache_store_log @DEFAULT_STORE_LOG@
 DOC_END
 
 NAME: cache_swap_state cache_swap_log
@@ -2924,6 +2936,7 @@ DOC_START
        and coredump files will be left there.
 
 NOCOMMENT_START
+
 # Leave coredumps in the first cache dir
 coredump_dir @DEFAULT_SWAP_DIR@
 NOCOMMENT_END
@@ -3317,8 +3330,9 @@ DOC_START
        to change one. The default setting is only active if none is
        used.
 
-Suggested default:
 NOCOMMENT_START
+
+# Add any of your own refresh_pattern entries above these.
 refresh_pattern ^ftp:          1440    20%     10080
 refresh_pattern ^gopher:       1440    0%      1440
 refresh_pattern -i (/cgi-bin/|\?) 0    0%      0
@@ -4144,13 +4158,10 @@ DOC_START
        default is `0' which disables sending the announcement
        messages.
 
-       To enable announcing your cache, just uncomment the line
-       below.
+       To enable announcing your cache, just set an announce period.
 
-NOCOMMENT_START
-#To enable announcing your cache, just uncomment the line below.
-#announce_period 1 day
-NOCOMMENT_END
+       Example:
+               announce_period 1 day
 DOC_END
 
 NAME: announce_host
@@ -4749,9 +4760,9 @@ DOC_START
        SNMP support set this to a suitable port number. Port number
        3401 is often used for the Squid SNMP agent. By default it's
        set to "0" (disabled)
-NOCOMMENT_START
-#snmp_port 3401
-NOCOMMENT_END
+
+       Example:
+               snmp_port 3401
 DOC_END
 
 NAME: snmp_access
@@ -4820,9 +4831,9 @@ DOC_START
        The port number where Squid sends and receives ICP queries to
        and from neighbor caches.  The standard UDP port for ICP is 3130.
        Default is disabled (0).
-NOCOMMENT_START
-#icp_port @DEFAULT_ICP_PORT@
-NOCOMMENT_END
+
+       Example:
+               icp_port @DEFAULT_ICP_PORT@
 DOC_END
 
 NAME: htcp_port
@@ -4834,9 +4845,9 @@ DOC_START
        The port number where Squid sends and receives HTCP queries to
        and from neighbor caches.  To turn it on you want to set it to
        4827. By default it is set to "0" (disabled).
-NOCOMMENT_START
-#htcp_port 4827
-NOCOMMENT_END
+
+       Example:
+               htcp_port 4827
 DOC_END
 
 NAME: log_icp_queries
diff --git a/test-suite/buildtests/layer-05-nodeps-esi.opts b/test-suite/buildtests/layer-05-nodeps-esi.opts
new file mode 100644 (file)
index 0000000..5d7b751
--- /dev/null
@@ -0,0 +1,16 @@
+#
+#
+# Component Missing Libraries Check - everything MUST work at this level
+MAKETEST="distcheck"
+#
+# Currently tested components with plug-in-play capability:
+#
+#      ESI - optional libexpat, libxml2
+#
+# NP: there must be no overlap in code for plugging the libraries in/out.
+#     this means we can test the absence of all in one run and save time.
+#
+OPTS="--enable-esi --without-expat --without-xml2"
+
+# Fix the distclean testing.
+export DISTCHECK_CONFIGURE_FLAGS="${OPTS}"