]> git.ipfire.org Git - thirdparty/squid.git/log
thirdparty/squid.git
10 years agoDeprecate log_icap and log_access configuration directives
Christos Tsantilas [Tue, 18 Jun 2013 06:22:13 +0000 (09:22 +0300)] 
Deprecate log_icap and log_access configuration directives

The log_icap and log_access are not really needed to control requests logging.
Someone can use acls  with access_log and icap_log configuration directives
for this purpose.
Also currently the requests denied for logging using the log_access access list
will not be accounted for in performance counters.

This patch:
 - removes log_icap and log_access options from configuration file.
 - adds the "stats_collection" access list to control performane counters
   accounting.

This is a Measurement Factory project

10 years agoSourceLayout: Add anyp/forward.h predefinition
Amos Jeffries [Thu, 13 Jun 2013 11:08:58 +0000 (05:08 -0600)] 
SourceLayout: Add anyp/forward.h predefinition

Provide the AnyP:: namespace predefines to reduce dependencies.

10 years agoFix icap_log and log_icap acls checking
Christos Tsantilas [Tue, 11 Jun 2013 10:04:48 +0000 (13:04 +0300)] 
Fix icap_log and log_icap acls checking

The HTTP reply related acls does not check for icap_log

10 years agoFix request headers logging for icap_log
Christos Tsantilas [Tue, 11 Jun 2013 09:55:05 +0000 (12:55 +0300)] 
Fix request headers logging for icap_log

The %http::>h does not print the original request headers but the adapted
request headers. Also the %http::>ha does not print adapted headers.

10 years agoFix wrong check inside Format::Format::assemble
Christos Tsantilas [Tue, 11 Jun 2013 09:25:07 +0000 (12:25 +0300)] 
Fix wrong check inside Format::Format::assemble

We are checking for al->request but we are using al->adapted_request. This is
may cause crashes if the al->adapted_request is NULL.

10 years agoMinor fix for cert validator helper messages parsing
Christos Tsantilas [Tue, 11 Jun 2013 09:22:45 +0000 (12:22 +0300)] 
Minor fix for cert validator helper messages parsing

Allow "host=" cert validation message parameter exist anywhere in the message.
Currently supposed to be always the first parameter of the message.

10 years agoSourceFormat Enforcement
Automatic source maintenance [Tue, 11 Jun 2013 08:11:30 +0000 (02:11 -0600)] 
SourceFormat Enforcement

10 years agoSupport forwarding intercepted but not bumped connections to cache_peers.
Alex Rousskov [Mon, 10 Jun 2013 20:46:08 +0000 (14:46 -0600)] 
Support forwarding intercepted but not bumped connections to cache_peers.

When talking to a cache_peer (i.e., sending a CONNECT request before tunneling
the transaction), tunnel code is using a clever hack: Squid does not parse
the CONNECT response from peer but blindly forwards it to the client. This
works great and simplifies code a lot, except when the client connection
was intercepted and, hence, the client did not send a CONNECT request and
is not expecting a CONNECT response.

In those situations, we now accumulate, parse, and strip the peer CONNECT
response (or close connection on errors).

The existing tunnel I/O code is too simple to accommodate that task -- it
cannot accumulate read data (its I/O buffers work in lockstep fashion, writing
everything it reads before reading again). Instead of rewriting the entire
tunnel code to use more complex buffers, I added a temporary accumulation
buffer for the CONNECT response. That buffer is not allocated unless it is
needed and does not grow beyond SQUID_TCP_SO_RCVBUF size, just like the
simple buffers.

10 years agoBug 3722: Invalid markup in Armenian hy ERR_ONLY_IF_CACHED_MISS
Richard Wall [Mon, 10 Jun 2013 11:04:53 +0000 (23:04 +1200)] 
Bug 3722: Invalid markup in Armenian hy ERR_ONLY_IF_CACHED_MISS

10 years agoInstruct clang not to treat unused command line arguments as errors
Francesco Chemolli [Sun, 9 Jun 2013 20:35:58 +0000 (22:35 +0200)] 
Instruct clang not to treat unused command line arguments as errors

10 years agoRelease Notes: fix typo
Amos Jeffries [Sun, 9 Jun 2013 12:36:06 +0000 (06:36 -0600)] 
Release Notes: fix typo

10 years agoFix detection of concurrent ACLChecklist checks, avoiding !accessList asserts.
Alex Rousskov [Sat, 8 Jun 2013 23:21:23 +0000 (17:21 -0600)] 
Fix detection of concurrent ACLChecklist checks, avoiding !accessList asserts.

Concurrent checks are not supported, but it is possible for the same
ACLChecklist to be used for a sequence of checks, alternating fastCheck(void)
and fastCheck(list) calls. We needed a different/dedicated mechanism to detect
check concurrency (added ACLChecklist::occupied_), and we needed to preserve
(and then restore) pre-set accessList during fastCheck(list) checks.

10 years agoKill some old unused & unmaintained code for sending an error response
Henrik Nordstrom [Fri, 7 Jun 2013 08:49:36 +0000 (20:49 +1200)] 
Kill some old unused & unmaintained code for sending an error response

... on timeout before seeing a request

Ported from 2.7 rev.11516

10 years agoSourceLayout: shuffle forward.h/cc to FwdState.h/cc
Amos Jeffries [Fri, 7 Jun 2013 04:35:25 +0000 (22:35 -0600)] 
SourceLayout: shuffle forward.h/cc to FwdState.h/cc

Our convenience libraries are using the filename forward.h for forward
declarations of symbols. This clashes with the old deprecated naming
of src/forward.h at times.

Rename the src/forward.* files to FwdState.* inline with current coding
guidelines and add a source maintenance check to avoid this problem in
future.

10 years agoFix configure with --disable-internal-dns compile error
Zhanpeng Chen [Fri, 7 Jun 2013 02:32:36 +0000 (20:32 -0600)] 
Fix configure with --disable-internal-dns compile error

dns.cc: In function variable_list* snmp_netDnsFn(variable_list*,s=nint*):
dns.cc:150:5: error: snmpDebugOid was not declared in this scope

10 years agoSourceFormat Enforcement
Automatic source maintenance [Fri, 7 Jun 2013 00:18:11 +0000 (18:18 -0600)] 
SourceFormat Enforcement

10 years agoDo not log bogus ERRORs when url_rewrite_access bypasses url_rewriter.
Alex Rousskov [Thu, 6 Jun 2013 16:43:29 +0000 (10:43 -0600)] 
Do not log bogus ERRORs when url_rewrite_access bypasses url_rewriter.

The code uses HelperReply() object as a fake reply when url_rewrite_access
ACLs did not match. That fake reply had Unknown result code, which made Squid
log ERRORs to cache.log. We now use Error result code, just like
store_id_access does.

TODO: Bypass the overheads of creating and processing a fake reply by moving
all post-processing actions and checks into a new dedicated method and calling
that method when url_rewrite_access does not match. Do the same to the StoreID
code.

10 years agobasic_sasl_auth: Fix helper auto-detection
Amos Jeffries [Thu, 6 Jun 2013 15:39:53 +0000 (03:39 +1200)] 
basic_sasl_auth: Fix helper auto-detection

The helpers update in rev.12782 revealed SASL detection errors in the
use of ./configure script variables. This fixes the SASL library checks
and updates them to use the configure variable naming scheme.

10 years agoPolished icap_service and ecap_service documentation.
Alex Rousskov [Thu, 6 Jun 2013 14:21:25 +0000 (08:21 -0600)] 
Polished icap_service and ecap_service documentation.

10 years agoTying validation errors to certificates
Christos Tsantilas [Thu, 6 Jun 2013 13:53:16 +0000 (16:53 +0300)] 
Tying validation errors to certificates

When Squid sends errors to the certificate validation daemon, the daemon cannot
tell which certificate caused which error. This is especially bad because the
validator has to return that same information in the response (the response
format requires the validator to match the error to the certificate).
This patch adjust the validation request format to provide that information
using a set of the following key=value pairs:

    error_name_N=the name of the certificate error number N
    error_cert_N=the ID of the certificate which caused error_name_N

where N is non-negative integer. N values start from zero and increase
sequentially.

This is a Measurement Factory project

10 years agoRedo r12887 (bug 2066 fix) which introduced several related bugs:
Alex Rousskov [Wed, 5 Jun 2013 15:38:09 +0000 (09:38 -0600)] 
Redo r12887 (bug 2066 fix) which introduced several related bugs:

  - fatal() if chroot is given
  - no chdir to / after chroot if coredump_dir is given
  - wrong detection of "none" coredump_dir
  - chdir to uninitialized pathbuf if no chroot is given

This emergency fix helps Squid start better but may need more testing/work.

10 years agoFixed r12859 (Boolean ACLs) bugs related to ACL parsing and dumping:
Christos Tsantilas [Wed, 5 Jun 2013 15:02:11 +0000 (09:02 -0600)] 
Fixed r12859 (Boolean ACLs) bugs related to ACL parsing and dumping:

- BoolOps.cc:94: "false" assertion when parsing ssl_bump directive.

- Infinite loop with RAM growth in dump_wordlist when dumping Squid
  configuration for cache manager.

- Segfault on not configured (nil) access lists in dump_acl_access.

10 years agoSourceFormat Enforcement
Automatic source maintenance [Wed, 5 Jun 2013 00:13:22 +0000 (18:13 -0600)] 
SourceFormat Enforcement

10 years agoDrop Ip::Address(Ip::Address *) constructor entirely
Amos Jeffries [Tue, 4 Jun 2013 05:12:39 +0000 (23:12 -0600)] 
Drop Ip::Address(Ip::Address *) constructor entirely

Has been deprecated for a while and appears to no longer be required by
any of the current code. The reference& copy-constructor can easily be
used in its place.

10 years agoFix NULL-dereference added in rev.12779
Amos Jeffries [Tue, 4 Jun 2013 04:21:48 +0000 (22:21 -0600)] 
Fix NULL-dereference added in rev.12779

With the change of helper responses from Notes to NotePairs the errNote
in NTLM ERR/NA responses was altered to a potentially NULL char*, and
allowed to be printed in debugs() level 4.

This updated NTLM and Negotiate halpers to print the helper response as
"Result: ..." in identical fashion.

  Detected by Coverity Scan. Issue 1020655.

10 years agoBug 2066: squid does not do chdir() after chroot()
Amos Jeffries [Tue, 4 Jun 2013 04:09:31 +0000 (22:09 -0600)] 
Bug 2066: squid does not do chdir() after chroot()

The earlier workaround applied only fixed 1 of the 3 places performing
chroot().
 This makes chroot and chdir integral parts of setting up Squids running
directory and alters teh chroot() calls to be mainSetCwnd() calls. Which
fixes several potential problems with core dumps from squid -z or -k
executions ending up in unexpected locations, regardless of whether
chroot() and coredump_dir are configured.

 Detected by Coverity Scan. Issue 740335.

10 years agoFix assert unsigned-vs-0 comparison
Amos Jeffries [Tue, 4 Jun 2013 03:55:55 +0000 (21:55 -0600)] 
Fix assert unsigned-vs-0 comparison

Nodes::size_type is unsigned and cannot be <0.

 Detected by Coverity Scan. Issue 1026516.

10 years agoFix string termination in snmplib
Amos Jeffries [Tue, 4 Jun 2013 02:59:47 +0000 (20:59 -0600)] 
Fix string termination in snmplib

strncpy() does not null-terminate if the source string is larger or equal
to the destination buffer length.

 Detected by Coverity Scan. Issue 1025738.

10 years agoFix typo-omission in rev.12882
Amos Jeffries [Mon, 3 Jun 2013 15:37:00 +0000 (09:37 -0600)] 
Fix typo-omission in rev.12882

10 years agoFix basic_pam_auth helper detection
Amos Jeffries [Mon, 3 Jun 2013 14:38:26 +0000 (08:38 -0600)] 
Fix basic_pam_auth helper detection

The m4_include() for this helpers test script was omitted from rev.12782.
Add that in, and shuffle the PAM-specific configure tests into the helper
required.m4 script.

10 years agoPolish: update Ip::Address to follow Squid coding guidelines
Amos Jeffries [Mon, 3 Jun 2013 14:05:16 +0000 (08:05 -0600)] 
Polish: update Ip::Address to follow Squid coding guidelines

* lower-case initial word for camelCase method names
* _ suffix for private variables.
* upper-case for static methods
* InitAddrInfo() and FreeAddrInfo() are static, do not use as methods

Not all methods are camelCased due to meaning irregularities and there
are other guidelines not being followed which also need to be fixed.

10 years agoPrepare external_acl_type format codes for libformat upgrade
Amos Jeffries [Sun, 2 Jun 2013 15:17:28 +0000 (03:17 +1200)] 
Prepare external_acl_type format codes for libformat upgrade

Add upgrade warnings for the %> and %< header codes which will change
radically in a future version when libformat is integrated.

Also, while we are at it support the other logformat codes which map 1:1
but silently for now and only on parse.

10 years agoFix incorrect external_acl_type codes
Amos Jeffries [Sun, 2 Jun 2013 14:32:18 +0000 (02:32 +1200)] 
Fix incorrect external_acl_type codes

Documentation describes %USER_CA_CERT_* codes for outputing the CA cert
attributes. However the directive parser and internals were all
referencing it as %CA_CERT_*.

This updates the internals to match documentation, and adds an upgrade
notice for any installations using the old token name.

10 years agoSupport multicast DNS
Amos Jeffries [Sun, 2 Jun 2013 11:47:05 +0000 (05:47 -0600)] 
Support multicast DNS

Resolve .local domain names using mDNS one-shot queries ahead of regular
recursive DNS qeuries.

* adds the mDNS multicast group IPs as always-present entries in the
  nameservers list.

* filters each request. ".local" lookups are permitted to both the mDNS
  resolvers and the recursive resolvers, other requests are only
  permitted to the regular recursive resolvers.

10 years agoCleanup: remove several HTTPMSGLOCK/HTTPMSGUNLOCK
Amos Jeffries [Sat, 1 Jun 2013 15:20:56 +0000 (09:20 -0600)] 
Cleanup: remove several HTTPMSGLOCK/HTTPMSGUNLOCK

Convert the TunnelStateData and UrnStateData HttpRequest* to Pointer.

10 years agoRelease Notes: initial details for Store-ID and Annotations
Amos Jeffries [Sat, 1 Jun 2013 13:28:13 +0000 (07:28 -0600)] 
Release Notes: initial details for Store-ID and Annotations

10 years agoBug 3854: pt3: redo pt2 fix and revert rev.12587
Amos Jeffries [Sat, 1 Jun 2013 13:05:38 +0000 (07:05 -0600)] 
Bug 3854: pt3: redo pt2 fix and revert rev.12587

The fix in rev.12857 works for Unix and Linux systems. But BSD based
systems it results in TextException errors via sub-includes from the stub

10 years agoFix typo in rev.12859
Amos Jeffries [Sat, 1 Jun 2013 10:01:13 +0000 (04:01 -0600)] 
Fix typo in rev.12859

cbdataReference() is a macro with a design which means it requires usage
in the form of an assignment. ie a = cbdataReference(B); , or as a
parameter in equivalent to a variable.

Not using it in either of those manners results in syntax errors about a
',' from any strict compiler, and many older versions of GCC.

10 years agoPolish: more debug info from squidclient
Amos Jeffries [Fri, 31 May 2013 09:29:21 +0000 (03:29 -0600)] 
Polish: more debug info from squidclient

10 years agoAdd some missing includes
Amos Jeffries [Fri, 31 May 2013 06:42:09 +0000 (00:42 -0600)] 
Add some missing includes

10 years agoCleanup: remove useless includes
Amos Jeffries [Thu, 30 May 2013 14:58:49 +0000 (08:58 -0600)] 
Cleanup: remove useless includes

10 years agoAdd missing include dlink.h for mem.cc
Amos Jeffries [Thu, 30 May 2013 14:58:11 +0000 (08:58 -0600)] 
Add missing include dlink.h for mem.cc

10 years agoCleanup: remove useless includes
Amos Jeffries [Thu, 30 May 2013 10:42:01 +0000 (04:42 -0600)] 
Cleanup: remove useless includes

10 years agoRemove useless includes
Amos Jeffries [Thu, 30 May 2013 10:14:55 +0000 (04:14 -0600)] 
Remove useless includes

10 years agoRemove useless includes
Amos Jeffries [Thu, 30 May 2013 10:10:29 +0000 (04:10 -0600)] 
Remove useless includes

10 years agoRemove useless includes
Amos Jeffries [Thu, 30 May 2013 09:57:42 +0000 (03:57 -0600)] 
Remove useless includes

10 years agoRemove useless include
Amos Jeffries [Thu, 30 May 2013 09:51:25 +0000 (03:51 -0600)] 
Remove useless include

11 years agoMake GCC on CentOS 5.3 happier by removing an unused static function
Alex Rousskov [Wed, 29 May 2013 00:55:39 +0000 (18:55 -0600)] 
Make GCC on CentOS 5.3 happier by removing an unused static function

parse_acl_access was unused when USE_HTTP_VIOLATIONS was not defined.

11 years agoSourceFormat Enforcement
Automatic source maintenance [Wed, 29 May 2013 00:13:21 +0000 (18:13 -0600)] 
SourceFormat Enforcement

11 years agoMake GCC on CentOS 5.3 happier by explicitly #including <sstream>
Alex Rousskov [Tue, 28 May 2013 23:28:39 +0000 (17:28 -0600)] 
Make GCC on CentOS 5.3 happier by explicitly #including <sstream>
(used by aclParseAclList() template) in acl/Gadgets.h.

11 years agoMake GCC on CentOS 5.3 happier by explicitly #including <sstream>
Alex Rousskov [Tue, 28 May 2013 22:38:54 +0000 (16:38 -0600)] 
Make GCC on CentOS 5.3 happier by explicitly #including <sstream>
used by aclParseAclList() template.

11 years agoCleanup: Removed unused #include.
Alex Rousskov [Tue, 28 May 2013 22:33:15 +0000 (16:33 -0600)] 
Cleanup: Removed unused #include.

11 years agoCleanup: Removed unused #include.
Alex Rousskov [Tue, 28 May 2013 22:31:57 +0000 (16:31 -0600)] 
Cleanup: Removed unused #include.

11 years agoImprove ACL handling. Support all-of and any-of ACL types.
Alex Rousskov [Tue, 28 May 2013 16:29:39 +0000 (10:29 -0600)] 
Improve ACL handling. Support all-of and any-of ACL types.

This commit encapsulated many significant ACL changes, including:

* Expressiveness: Two new boolean ACLs (all-of and any-of) that allow
admins to group ACLs as needed, to express complex conditions more
naturally, with fewer squid.conf lines. Conditions such as "(a or b) and
(c or d)" are easily expressed now. Explicit groups of ACLs of different
types can now be configured, named, and used in any ACL expression.

* Correctness and performance: When a slow ACL (that has suspended
checks to wait for an async lookup) is ready to resume checking, Squid
resumes checking from that ACL, instead of rechecking all ACLs for the
same action (or the same squid.conf directive) again.

* Internals: Store ACL-related configurations as an expression tree,
streamlining the code and clearing the way for future math-style/natural
ACL conditions support. The usual boolean operators (and, or, and not)
form intermediate nodes while good old configurable ACLs become tree
leaves. The new all-of and any-of ACLs use the boolean operators (and
also become intermediate nodes, of course).

11 years agoAddressed a few code styling XXXs.
Alex Rousskov [Tue, 28 May 2013 15:05:58 +0000 (09:05 -0600)] 
Addressed a few code styling XXXs.

11 years agoSimplified prepNonBlocking() to address an XXX: Moved finished() check to
Alex Rousskov [Tue, 28 May 2013 14:45:02 +0000 (08:45 -0600)] 
Simplified prepNonBlocking() to address an XXX: Moved finished() check to
resumeNonBlockingCheck().

11 years agoMerged from trunk (r12858).
Alex Rousskov [Tue, 28 May 2013 14:31:59 +0000 (08:31 -0600)] 
Merged from trunk (r12858).

11 years agoSourceFormat
Alex Rousskov [Tue, 28 May 2013 14:28:15 +0000 (08:28 -0600)] 
SourceFormat

11 years agoFix build on Intel's compiler suite.
Francesco Chemolli [Tue, 28 May 2013 13:24:54 +0000 (15:24 +0200)] 
Fix build on Intel's compiler suite.

Forcing 64-bit file operations on 64-bit systems exposes
an issue in stdlibc++, which is covered by gcc but not by
icc in non-gcc mode. This patch prevents forcing 64-bit
file operations on systems where long int is 64-bit or more.
It also properly protects a couple of gcc-specific #pragma.

11 years agoBug 3854: pt2: link stub_fd with squidclient
Amos Jeffries [Mon, 27 May 2013 13:19:53 +0000 (07:19 -0600)] 
Bug 3854: pt2: link stub_fd with squidclient

AIX and possibly other systems still require fde:: symbols pulled in by
ip/libip. Link the stub since the symbols are actually in dead code.

11 years agoBug 3854: pt1: compile errors on AIX
Amos Jeffries [Mon, 27 May 2013 03:47:21 +0000 (21:47 -0600)] 
Bug 3854: pt1: compile errors on AIX

11 years agoSourceFormat Enforcement
Automatic source maintenance [Mon, 27 May 2013 00:13:12 +0000 (18:13 -0600)] 
SourceFormat Enforcement

11 years agoAdd IPC kid type for helper child processes
Amos Jeffries [Sun, 26 May 2013 04:12:20 +0000 (22:12 -0600)] 
Add IPC kid type for helper child processes

11 years agoEnable length configuration for pipeline_prefetch queue
Amos Jeffries [Sun, 26 May 2013 01:57:47 +0000 (19:57 -0600)] 
Enable length configuration for pipeline_prefetch queue

Updates the queue length magic numbers (2) by making pipeline_prefetch a
numeric queus length instead of aon/off toggle.

Also, adds configuration file consistency check for pipeline enabled
when client prsistent connections disable.

11 years agoMerged from trunk (r12852).
Alex Rousskov [Sun, 26 May 2013 01:08:42 +0000 (19:08 -0600)] 
Merged from trunk (r12852).

11 years agoWindows: include 'functional' before defining stdlib API wrapper functions
Amos Jeffries [Sat, 25 May 2013 09:02:59 +0000 (03:02 -0600)] 
Windows: include 'functional' before defining stdlib API wrapper functions

We currently use of #define to replace functions in the stdlib API with
versions which use the Windows API and error reporting.
Some of these result in precompiler replacement of systen internal
symbols. In this case member functions called bind() in templates of
<functional> API get replaced by Squid::bind() symbol.

11 years agonote ACL
Christos Tsantilas [Sat, 25 May 2013 07:13:09 +0000 (10:13 +0300)] 
note ACL

This patch investigates the new note ACL type, to match transaction annotation.
Syntax:
   acl aclname note name [value ...]

Without values, matches any annotation with a given name. With value(s), matches
any annotation with a given name that also has one of the given values.
Annotation sources include note and adaptation_meta directives as well as helper
and eCAP responses.

This is a Measurement Factory project

11 years agoAvoid segfaults on seriously malformed requests when ICAP logging is enabled.
Alex Rousskov [Fri, 24 May 2013 23:40:50 +0000 (17:40 -0600)] 
Avoid segfaults on seriously malformed requests when ICAP logging is enabled.

11 years agoAsk for SSL key password when started with -N but without sslpassword_program.
Alex Rousskov [Fri, 24 May 2013 15:14:50 +0000 (09:14 -0600)] 
Ask for SSL key password when started with -N but without sslpassword_program.

Do not give SSL a password-asking callback if sslpassword_program is not
configured. Without a callback, OpenSSL itself asks for the password (which
works if Squid runs in foreground because of -N).

The fix applies to Ssl::readCertChainAndPrivateKeyFromFiles() context only.
This is not the only place where we read private keys. Some other places are
working correctly, but others may need more work. Also,
Ssl::readCertChainAndPrivateKeyFromFiles() may not really work if
sslpassword_program _is_ configured because "user data" pointer will be nil.

11 years agoSourceFormat Enforcement
Automatic source maintenance [Fri, 24 May 2013 00:13:23 +0000 (18:13 -0600)] 
SourceFormat Enforcement

11 years agobasic_ncsa_auth: fix unused variable warnings (typo in rev.12762)
Amos Jeffries [Thu, 23 May 2013 15:40:07 +0000 (03:40 +1200)] 
basic_ncsa_auth: fix unused variable warnings (typo in rev.12762)

When libcrypto is absent the passwordLength variable becomes unused.
Detected by Windows build farm node.

11 years agoCleanup: Merge AccessLogEntry 'helperNotes' and 'configNotes' members to 'notes'...
Christos Tsantilas [Thu, 23 May 2013 08:18:09 +0000 (11:18 +0300)] 
Cleanup: Merge AccessLogEntry 'helperNotes' and 'configNotes' members to 'notes' member

There is not any need to store notes added using Note cfg option and notes added
from helper to separated member. This patch merge them to the same
AccessLogEntry::note member.

This is a Measurement Factory project

11 years agoAdd pt-bz (Belize Portuguee) dialect to translations
Amos Jeffries [Wed, 22 May 2013 06:33:05 +0000 (00:33 -0600)] 
Add pt-bz (Belize Portuguee) dialect to translations

In absence of information on whether Belize Portuguese dialect can be
presented with Brazillian or European Portuguese texts or whether they
require a third translation use a symlink entry for pt-bz to pt-br based
on the geographical distance for dialect locale alternatives.

11 years agoHonor zero-padded logformat codes again.
Alex Rousskov [Wed, 22 May 2013 01:04:34 +0000 (19:04 -0600)] 
Honor zero-padded logformat codes again.

Trunk r12628 "Turn flags to bool" set Token::zero to false instead of true,
resulting in extra spaces occasionally logged in front of such popular and
default fields as %03tu, screwing up log parsers.

11 years agoSourceFormat Enforcement
Automatic source maintenance [Wed, 22 May 2013 00:13:36 +0000 (18:13 -0600)] 
SourceFormat Enforcement

11 years agoDetect and use -march=natuve when possible
Amos Jeffries [Tue, 21 May 2013 05:39:18 +0000 (23:39 -0600)] 
Detect and use -march=natuve when possible

Clang++ 3.2 fails to detect some CPUs correctly and requires the
additional checks enabled by this option to build working executables.

This option supported by GCC 4.3 and later enables additional CPU
detection and enables CPU-specific optimizations. In the interests of
better performance this patch enables it whenever is it available and
possible to use (cross-compilers cannot use it).

11 years agoBug 1991: kqueue causes SSL to hang
Ming Fu [Tue, 21 May 2013 05:17:23 +0000 (23:17 -0600)] 
Bug 1991: kqueue causes SSL to hang

Compare the code in normal select and epoll v.s. kqueue. The select use a 0
wait time to get out of select wait in order to handle a list of read_pendings.
However, epoll add the read_pending to read and write event monitor. At a first
look, this seems strange as why read pending has anything to do with write. It
became obvious when the write ready event is triggered. During a write ready
event, if read_pending is on, the read callback is called before the write
callback. As the write buffer is unlikely to be full for an extended period, a
write callback is guaranteed in the immediate future for the read_pending
socket by waiting on write.

The patch follows that same logic as epoll and applies it on kqueue.

11 years agoPolish: src/auth/AclProxyAuth.cc whitespace
Amos Jeffries [Tue, 21 May 2013 04:47:37 +0000 (22:47 -0600)] 
Polish: src/auth/AclProxyAuth.cc whitespace

11 years agoFix --enable-log-daemon-helpers auto-detect helpers
Amos Jeffries [Sun, 19 May 2013 12:56:18 +0000 (06:56 -0600)] 
Fix --enable-log-daemon-helpers auto-detect helpers

The code initializing default values and determining helper detection
was significantly different from other helpers detection logics. Combined
with rev.12786 logic changes resulted in the detection always failing.

Update the --enable-log-deemon-heleprs option to work identically to the
--enable-external-acl-helpers option.

11 years agoPolish debugging output in ASN acls
Francesco Chemolli [Sun, 19 May 2013 07:11:51 +0000 (01:11 -0600)] 
Polish debugging output in ASN acls

11 years agoPrep for 3.3.5
Amos Jeffries [Sun, 19 May 2013 06:06:07 +0000 (00:06 -0600)] 
Prep for 3.3.5

11 years agoBug 3851: Delay Pool class 5 tag:levels displayed incorrectly in cache manager
Amos Jeffries [Sun, 19 May 2013 02:19:16 +0000 (20:19 -0600)] 
Bug 3851: Delay Pool class 5 tag:levels displayed incorrectly in cache manager

11 years agoFix typos in rev.12786
Amos Jeffries [Sat, 18 May 2013 12:20:54 +0000 (06:20 -0600)] 
Fix typos in rev.12786

Also, update some EGREP tests to COMPILE_IFELSE

11 years agoautoconf.h exist in buildir, not srcdir.
Amos Jeffries [Sat, 18 May 2013 11:18:37 +0000 (05:18 -0600)] 
autoconf.h exist in buildir, not srcdir.

rev.12827 only works for in-tree builds.

11 years agoSourceFormat Enforcement
Automatic source maintenance [Sat, 18 May 2013 00:13:18 +0000 (18:13 -0600)] 
SourceFormat Enforcement

11 years agoAvoid annotation leaks by properly destroying NotePairs entries.
Alex Rousskov [Fri, 17 May 2013 23:05:23 +0000 (17:05 -0600)] 
Avoid annotation leaks by properly destroying NotePairs entries.

The leak was added with the "note" directive (r12414).

Also removed empty default constructor as unneeded.

11 years agoPolish: convert ACLFilledChecklist to CBDATA_CLASS2
Amos Jeffries [Fri, 17 May 2013 11:07:15 +0000 (05:07 -0600)] 
Polish: convert ACLFilledChecklist to CBDATA_CLASS2

11 years agoAdd missing piece omitted from rev.9677.
Silamael [Fri, 17 May 2013 08:36:45 +0000 (02:36 -0600)] 
Add missing piece omitted from rev.9677.

rev.9677 created forward_max_tries direcive but omitted one of the
checks. This adds that check and allows forward_max_tries to be set
to values greater than 10.

11 years agoSourceFormat Enforcement
Automatic source maintenance [Fri, 17 May 2013 00:13:27 +0000 (18:13 -0600)] 
SourceFormat Enforcement

11 years agoUse case-insensitive comparison for HTTP header names in *_header_access
Alex Rousskov [Thu, 16 May 2013 21:00:29 +0000 (15:00 -0600)] 
Use case-insensitive comparison for HTTP header names in *_header_access
and *_header_replace directives.

11 years agoBug 3744: squid terminated: FATAL: Bungled (null) line 3: sslproxy_cert_sign signTrus...
Christos Tsantilas [Thu, 16 May 2013 14:41:02 +0000 (17:41 +0300)] 
Bug 3744: squid terminated: FATAL: Bungled (null) line 3: sslproxy_cert_sign signTrusted all

This bug is a Makefile dependencies  problem.

 - The cf_gen includes the  cf_gen_defines.cci so this file should included in
   cf_gen dependencies.
 - Currently the cf_gen_defines.cci exist in cf_gen.$(OBJEXT) dependencies but
   does not have any effect because the obj file never build and used.
 - Also the  cf_gen_defines.cci file depends on autoconf.h so this file should
   added to to cf_gen_defines.cc dependencies.
   All of the sources has the autoconf.h file in their dependencies.
   But the cf_gen_defines.cci is auto-generated and does not exist when the
   dependencies computed.

This is a Measurement Factory project

11 years ago"LruMap bug fix and other polishing touches" patch: fix compile error
Christos Tsantilas [Thu, 16 May 2013 07:06:50 +0000 (10:06 +0300)] 
"LruMap bug fix and other polishing touches" patch: fix compile error

11 years agoRelease Notes: rebuild HTML notes for 3.4
Amos Jeffries [Thu, 16 May 2013 03:19:46 +0000 (21:19 -0600)] 
Release Notes: rebuild HTML notes for 3.4

11 years agoLruMap bug fix and other polishing touches
Christos Tsantilas [Wed, 15 May 2013 16:43:04 +0000 (19:43 +0300)] 
LruMap bug fix and other polishing touches

The  LruMap::findEntry may return destroyed entries to the caller.

11 years agoBug 3816: SSL_get_certificate call inside Ssl::verifySslCertificate crashes squid...
Christos Tsantilas [Wed, 15 May 2013 15:56:40 +0000 (18:56 +0300)] 
Bug 3816: SSL_get_certificate call inside Ssl::verifySslCertificate crashes squid, part3

Change the libraries order in LIBS variable inside SQUID_CHECK_OPENSSL_GETCERTIFICATE_WORKS check.
Looks that play a role in some cases (when openssl provided only as static
library in my tests).

11 years agoBug 3759: OpenSSL compilation error on stock Fedora17, RHEL, CentOS 6 systems
Christos Tsantilas [Wed, 15 May 2013 15:41:43 +0000 (18:41 +0300)] 
Bug 3759: OpenSSL compilation error on stock Fedora17, RHEL, CentOS 6 systems

OpenSSL-1.0.x has changes in TXT_DB interface over the earlier openSSL releases.
Also looks that the IMPLEMENT_LHASH_* macros are not correctly implemented and
causes compile failures.
Some of the linux distributions to overcome the above problems trying to patch
openSSL SDK. For squid this is means that the current checks based on openSSL
version can not work.

This patch try to detect at configure time:
 - if the TXT_DB uses the new implementation investigated in openSSL-1.0.x
   releases
 - If the IMPLEMENT_LHASH_* openSSL  macros are correctly implemented.

Then uses the autoconf defines to implement the correct workarounds for used
openSSL SDK.

This is a Measurement Factory project

11 years agoDrop terminal comments and garbage options from cache_peer lines
Amos Jeffries [Tue, 14 May 2013 18:36:45 +0000 (12:36 -0600)] 
Drop terminal comments and garbage options from cache_peer lines

11 years agoPolishing to address squid-dev review comments.
Alex Rousskov [Tue, 14 May 2013 18:26:49 +0000 (12:26 -0600)] 
Polishing to address squid-dev review comments.

11 years agoRelease Notes: update status of Squid-2 options
Amos Jeffries [Tue, 14 May 2013 17:54:30 +0000 (11:54 -0600)] 
Release Notes: update status of Squid-2 options

11 years agoPort from 2.6: external acl %ACL and %DATA tags
Henrik Nordstrom [Tue, 14 May 2013 17:53:18 +0000 (11:53 -0600)] 
Port from 2.6: external acl %ACL and %DATA tags