]> git.ipfire.org Git - thirdparty/squid.git/log
thirdparty/squid.git
11 years agoInterim. Refactor ACL::dump to SBufList instead of wordlist*
Francesco Chemolli [Fri, 11 Apr 2014 16:00:36 +0000 (18:00 +0200)] 
Interim. Refactor ACL::dump to SBufList instead of wordlist*

11 years agoImplement custom formatting for SBuf size distribution cachemgr report
Francesco Chemolli [Thu, 10 Apr 2014 08:02:55 +0000 (10:02 +0200)] 
Implement custom formatting for SBuf size distribution cachemgr report

11 years agoFix typo in getpwname detection
Amos Jeffries [Wed, 9 Apr 2014 02:24:52 +0000 (14:24 +1200)] 
Fix typo in getpwname detection

11 years agoMemBuf fix: empty MemBufs are not NULL terminated
Christos Tsantilas [Tue, 8 Apr 2014 16:23:46 +0000 (19:23 +0300)] 
MemBuf fix: empty MemBufs are not NULL terminated

This is may cause problems in some cases where the code assume that the MemBuf
is always NULL terminated. For example when an ErrorState object try to use
an empty errorpage template.

This patch terminates the (empty) MemBuf on MemBuf::init method.

11 years agoCleanup: Polish Windows automake conditionals
Amos Jeffries [Tue, 8 Apr 2014 15:52:58 +0000 (03:52 +1200)] 
Cleanup: Polish Windows automake conditionals

Squid coding guidelines are that AM_CONDITIONAL definitions are named
ENABLE_*.

11 years agoCleanup: Make crypt(3) detection dependent on the helpers that use it
Amos Jeffries [Tue, 8 Apr 2014 15:35:12 +0000 (03:35 +1200)] 
Cleanup: Make crypt(3) detection dependent on the helpers that use it

Only run detection for crypt(3) support when the NCSA and getpwnam
helpers which use it are to be built.

Also, move shadow.h detection to depend on getpwnam helper which is the
only code using it.

Also, shuffle the libcrypt and libmd5 detection up into the section with
other crypto libraries so they are known in advance of helper detections
which may require libcrypt.

11 years agoFix OpenSSL detection when an explicit path is given
Amos Jeffries [Tue, 8 Apr 2014 13:09:47 +0000 (06:09 -0700)] 
Fix OpenSSL detection when an explicit path is given

The previous OpenSSL detection was skipping the library checks when an
explicit path was presented. Resulting in no -lssl flag being passed to
the linker.

Rational for this fix:
 pkg-config presents location-neutral details.

 The explicit checks are likewise neutral provided the LIBS environment
  variable has been set with the explicit path.

 User presented path must be used regardless of which the library checks
  are used in detection.

So...

 Always perform the checks with optionally set LIBS and keep the
 user provided path explicitly separate from the pkg-config *_LIBS
 variable. Only assemble the parts into SSLLIB once all have been
 identified.

11 years agoAdd counter for SBuf::c_str() calls
Amos Jeffries [Sun, 6 Apr 2014 07:08:04 +0000 (00:08 -0700)] 
Add counter for SBuf::c_str() calls

It is useful to know how many c_str() calls are being made as each
results in a possible reallocation.

11 years agoftp_epsv ACLs
Christos Tsantilas [Fri, 4 Apr 2014 16:36:47 +0000 (19:36 +0300)] 
ftp_epsv ACLs

This patch add support for ftp_epsv ACLs. The following syntax is supported:
  ftp_epsv on
  ftp_epsv off
  ftp_epsv deny acl1
  ftp_epsv allow acl2 acl3

The action of the first matching line wins. The "ftp_epsv on|off" syntax is
supported for backward compatibility.

This is a Measurement Factory project

11 years agoFix malloc corruption from use-after-free in peer_select.cc
Amos Jeffries [Thu, 3 Apr 2014 10:22:52 +0000 (03:22 -0700)] 
Fix malloc corruption from use-after-free in peer_select.cc

* Cleanup peer server list of existing in ps_state destructor.

* Abort peer selection if the FwdState CBDATA reference has become
  invalid. ps_state::paths pointer is also invalid.

11 years agoHTTP/1.1: update reference to IANA method registry
Amos Jeffries [Mon, 31 Mar 2014 10:28:35 +0000 (03:28 -0700)] 
HTTP/1.1: update reference to IANA method registry

11 years agoCleanup: better OpenSSL detection
Amos Jeffries [Mon, 31 Mar 2014 09:15:02 +0000 (02:15 -0700)] 
Cleanup: better OpenSSL detection

* remove duplicate header files detection

* remove hard dependency on pkg-config. Use library ABI checks if
  pkg-config is unavailable or broken.

* remove unnecessary if conditions by using proper nesting in the event
  user does NOT provide a custom location for the library.

* produce a hard error if OpenSSL is required by user but not found.

* always list all library objects in configure final decision output.

11 years agoHTTP/1.1: Update registered status codes from IANA registry
Amos Jeffries [Mon, 31 Mar 2014 06:57:27 +0000 (23:57 -0700)] 
HTTP/1.1: Update registered status codes from IANA registry

IETF HTTPbis WG has created an IANA registry for HTTP status codes at
http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml

Update our registered codes and strings to match the registry entries.

11 years agoCleanup: make loadable modules build variables follow Squid3 coding guidelines
Amos Jeffries [Mon, 31 Mar 2014 04:46:50 +0000 (21:46 -0700)] 
Cleanup: make loadable modules build variables follow Squid3 coding guidelines

Squid-3 coding guidelines mandate that AM_CONDITIONAL variables begin
with ENABLE_* and AC_DEFINE macros begin with USE_* to resolve confusion
over which is relevant.

11 years agoFix test suite parameters after --enable-ssl change
Amos Jeffries [Sun, 30 Mar 2014 21:28:10 +0000 (09:28 +1200)] 
Fix test suite parameters after --enable-ssl change

11 years agoCleanup: replace USE_SSL wrapper macro with USE_OPENSSL
Amos Jeffries [Sun, 30 Mar 2014 12:00:34 +0000 (05:00 -0700)] 
Cleanup: replace USE_SSL wrapper macro with USE_OPENSSL

Squid-3 currently only supports OpenSSL for SSL/TLS components. This
makes the support type explicit and prepares for alternative SSL
libraries to be added in future with different macro wrappers.

11 years agoFix buffer overruns in generated NTLM tokens
Amos Jeffries [Sun, 30 Mar 2014 06:46:34 +0000 (23:46 -0700)] 
Fix buffer overruns in generated NTLM tokens

The NTLM token payload (string value) encoding was not protecting fully
against 16-bit and 8-bit wrap errors and signedness conversions.
This protects against the wrap and conversion errors by truncating at
the maximum field length. That length limit is vastly larger than NTLM
protocol specified field sizes and permitted HTTP header sizes so is not
expected to cause issues with existing implementations.

11 years agocrypto-ng: Drop --enable-ssl build option
Amos Jeffries [Sun, 30 Mar 2014 06:41:27 +0000 (23:41 -0700)] 
crypto-ng: Drop --enable-ssl build option

This confgure option was fully overlapping --with-openssl.
Simplify the build options and cleanup in preparation for crypto-ng as
SSL functionality will be enabled by default in future when any of the
supported SSL/TLS libraries is available.

11 years agosquidclient: fix header includes for GSSAPI code
Amos Jeffries [Sun, 30 Mar 2014 04:20:16 +0000 (22:20 -0600)] 
squidclient: fix header includes for GSSAPI code

11 years agoUpdates to qos_flows documentation
Andrew Beverley [Sun, 30 Mar 2014 04:17:07 +0000 (22:17 -0600)] 
Updates to qos_flows documentation

minor updates to the qos_flows documentation based on recent squid-users
questions.

11 years agosquidclient: shuffle GSSAPI logic into separate file(s)
Amos Jeffries [Sun, 30 Mar 2014 01:47:38 +0000 (18:47 -0700)] 
squidclient: shuffle GSSAPI logic into separate file(s)

11 years agoC++11: Upgrade auto-detection to use the formal -std=c++11
Amos Jeffries [Sat, 29 Mar 2014 11:15:13 +0000 (04:15 -0700)] 
C++11: Upgrade auto-detection to use the formal -std=c++11

When the latest compilers added support for -std=c++11 they also dropped
the temporary -std=c++0x option without backward-compatible support. So
for the newest compilers we have not been testing the C++11 code.

As a result of this change Squid will no longer attempt to enable the
partial support in older compilers with -std=c++0x.

Also, update the compiler option test macro from autoconf project.

11 years agoAdd some missing Sbuf.h includes
Amos Jeffries [Sat, 29 Mar 2014 00:15:56 +0000 (12:15 +1200)] 
Add some missing Sbuf.h includes

11 years agoBetter fix for rev.13324
Amos Jeffries [Thu, 27 Mar 2014 09:09:24 +0000 (03:09 -0600)] 
Better fix for rev.13324

11 years agoFix min() parameter types after rev.13324
Amos Jeffries [Mon, 24 Mar 2014 08:53:06 +0000 (01:53 -0700)] 
Fix min() parameter types after rev.13324

11 years agoParser-NG: Convert the ConnStateData input buffer to SBuf
Amos Jeffries [Mon, 24 Mar 2014 04:57:32 +0000 (21:57 -0700)] 
Parser-NG: Convert the ConnStateData input buffer to SBuf

Prepare the way to efficiently parse client requests using SBuf based
parser-ng.

IoCallback stores a raw-pointer to the ConnStateData::In::buf member
object rather than an SBuf reference to the backing MemBlob or char*
store so that only the short (blocking) FD_READ_METHOD() call needs to
provide any synchronous guarantees. We also particularly need a direct
(raw) pointer to the ConnStateData member to prevent the possible
read/consume collisions causing problems with the ConnStateData callback
and avoid having to merge two separate SBuf.

11 years agoBasic auth cache and SslBump fix
Christos Tsantilas [Sun, 23 Mar 2014 10:28:52 +0000 (12:28 +0200)] 
Basic auth cache and SslBump fix

This patch fixes the following bug:
 1) A user sends a CONNECT request with valid credentials
 2) Squid checks the credentials and adds the user to the user cache
 3) The same user sends a CONNECT request with invalid credentials
 4) Squid overwrites the entry in the user cache and denies the second
    CONNECT request
 5) The user sends a GET request on the first SSL connection which is
    established by now
 6) Squid knows that it does not need to check the credentials on the
    bumped connection but still somehow checks again whether the user is
    successfully authenticated
 7) Due to the second CONNECT request the user is regarded as not
    successfully authenticated
 8) Squid denies the GET request of the first SSL connection with 403
    ERR_CACHE_ACCESS_DENIED

On proxies with Basic authentication and SSL bumping, this can be used
to prevent a legitimate user from making any HTTPS requests

This is a Measurement Factory project

11 years agoPortability: invert the basic_nis_auth header check
Amos Jeffries [Sun, 23 Mar 2014 05:17:14 +0000 (23:17 -0600)] 
Portability: invert the basic_nis_auth header check

autoconf macro will set its action-if-found if *any* of the headers is
found. Since these are mandatory headers being tested for we need to
disable if any are missing rather than enable on finding one works.

11 years agoPortability: basic_nis_auth depends on rpcsvc/ypclnt.h
Amos Jeffries [Sun, 23 Mar 2014 04:44:40 +0000 (16:44 +1200)] 
Portability: basic_nis_auth depends on rpcsvc/ypclnt.h

... which is not availabel on all platforms (such as MinGW on Windows).

11 years agoMerge from trunk
Amos Jeffries [Sun, 23 Mar 2014 02:56:12 +0000 (19:56 -0700)] 
Merge from trunk

11 years agoFix if-else mismatch in rev.13319
Amos Jeffries [Sat, 22 Mar 2014 12:58:52 +0000 (06:58 -0600)] 
Fix if-else mismatch in rev.13319

11 years agoPortability: Basic auth NIS helper depends on crypt()
Amos Jeffries [Sat, 22 Mar 2014 12:03:18 +0000 (06:03 -0600)] 
Portability: Basic auth NIS helper depends on crypt()

Detect crypt.h before permitting the helper to build.

Also, if crypt() function is missing build the helper to output BH code
with an error message instead of failing to build.

11 years agoxmalloc cleanup: remove code relying on XMALLOC_TRACE, XMALLOC_DEBUG, and mallinfo(3).
Francesco Chemolli [Wed, 19 Mar 2014 17:35:01 +0000 (18:35 +0100)] 
xmalloc cleanup: remove code relying on XMALLOC_TRACE, XMALLOC_DEBUG, and mallinfo(3).

11 years agoOpenBSD portability fix: detect struct iovec better
Francesco Chemolli [Wed, 19 Mar 2014 08:03:13 +0000 (09:03 +0100)] 
OpenBSD portability fix: detect struct iovec better

11 years agoBug 4019: Regression in 3.4 r13079
Martin Stolle [Tue, 18 Mar 2014 20:21:30 +0000 (14:21 -0600)] 
Bug 4019: Regression in 3.4 r13079

11 years agoFix documentation for high_memory_warning config option and make it conditional
Francesco Chemolli [Tue, 18 Mar 2014 10:05:32 +0000 (11:05 +0100)] 
Fix documentation for high_memory_warning config option and make it conditional

11 years agoRemoved last vestiges of mallinfo
Francesco Chemolli [Tue, 18 Mar 2014 08:42:54 +0000 (09:42 +0100)] 
Removed last vestiges of mallinfo

11 years agoRemove all code referring to mallinfo(3)
Francesco Chemolli [Mon, 17 Mar 2014 14:27:13 +0000 (15:27 +0100)] 
Remove all code referring to mallinfo(3)

11 years agoRemoved lib/malloc_trace.cc
Francesco Chemolli [Mon, 17 Mar 2014 11:20:35 +0000 (12:20 +0100)] 
Removed lib/malloc_trace.cc

11 years agoRemoved MEM_GEN_TRACE
Francesco Chemolli [Mon, 17 Mar 2014 11:18:01 +0000 (12:18 +0100)] 
Removed MEM_GEN_TRACE

11 years agoRemove XMALLOC_DEBUG
Francesco Chemolli [Mon, 17 Mar 2014 11:04:57 +0000 (12:04 +0100)] 
Remove XMALLOC_DEBUG

11 years agoRemove XMALLOC_TRACE and references to sbrk(2)
Francesco Chemolli [Mon, 17 Mar 2014 09:25:17 +0000 (10:25 +0100)] 
Remove XMALLOC_TRACE and references to sbrk(2)

11 years agoRemove XMALLOC_TRACE and all references to sbrk(2)
Francesco Chemolli [Sun, 16 Mar 2014 12:44:59 +0000 (13:44 +0100)] 
Remove XMALLOC_TRACE and all references to sbrk(2)

11 years agoBug 4041: Missing files in compat/Makefile.am
Changming [Sun, 16 Mar 2014 03:52:45 +0000 (15:52 +1200)] 
Bug 4041: Missing files in compat/Makefile.am

11 years agocrypto-ng: use libnettle MD5 algorithm support
Amos Jeffries [Sun, 16 Mar 2014 03:08:55 +0000 (15:08 +1200)] 
crypto-ng: use libnettle MD5 algorithm support

Transitional patch detects libnettle when available and uses it without
yet forcing it as a required dependency.

11 years agoPolish up the diff
Amos Jeffries [Sat, 15 Mar 2014 11:42:55 +0000 (04:42 -0700)] 
Polish up the diff

11 years agoSync with trunk rev.13312
Amos Jeffries [Sat, 15 Mar 2014 02:50:12 +0000 (19:50 -0700)] 
Sync with trunk rev.13312

11 years agoPush SBuf down into Comm::IoCallback
Amos Jeffries [Sat, 15 Mar 2014 02:30:08 +0000 (19:30 -0700)] 
Push SBuf down into Comm::IoCallback

Use a pointer to the SBuf instead of the rawSpace() because using a SBuf
copy can potentially cause different MemBlob to exist behind the Comm
read classes and the caller (ConnStateData) class. They need to be kept
identical so as not to loose any existing bytes in the I/O buffer when
a read callback handler is run.

Pointer to SBuf also avoids race conditions between comm_read async calls
and BodyPipe notifications which can potentially change the MemBlob
underneath comm_read() and invalidate te char* buffer pointer used
previously.

11 years agoMaintenance: Fix build issue in snapshots
Amos Jeffries [Fri, 14 Mar 2014 11:51:02 +0000 (00:51 +1300)] 
Maintenance: Fix build issue in snapshots

11 years agoRemove useless code after rev.13309
Amos Jeffries [Fri, 14 Mar 2014 09:26:31 +0000 (22:26 +1300)] 
Remove useless code after rev.13309

The state variables used to store and present the redirector and store_id
helper parameters is no longer necessary.

  Detected by Coverity Scan. Issue 1191964.

11 years agoAuthor: Nikolai Gorchilov <niki@x3me.net>
Nikolai Gorchilov [Thu, 13 Mar 2014 21:11:47 +0000 (15:11 -0600)] 
Author: Nikolai Gorchilov <niki@x3me.net>
Use request URI instead of StoreID when forwarding requests to cache peers.

TODO: There are more bugs like that, including using Store IDs in ICP requests.

11 years agourl_rewrite_extras and store_id_extras patch fixes
Christos Tsantilas [Thu, 13 Mar 2014 10:56:38 +0000 (12:56 +0200)] 
url_rewrite_extras and store_id_extras patch fixes

Fixes to patch "Add url_rewrite_extras and store_id_extras for redirector and store_id helpers",r13308:
  - Fix cf_gen.cc:gen_conf(..) function to not escape quotes before write to
    conf file
  - The Format::Format name is used to inform the user about parsing problems.
    Fix the names of related objects for the new redirecor_extras and
    store_id_extras directives.
  - cf.data.pre: The NAME tag take as argument only the name of directive. Fix
    the new redirecor_extras and store_id_extras related tags.

11 years agoAdd url_rewrite_extras and store_id_extras for redirector and store_id helpers
Christos Tsantilas [Wed, 12 Mar 2014 16:46:27 +0000 (18:46 +0200)] 
Add url_rewrite_extras and store_id_extras for redirector and store_id helpers

The url_rewrite_extras/store_id_extras is a "quoted string" with logformat
%macro support. It is used to modify the request line for redirector and
storeId helpers.

The url rewrite and store_id helpers request format now is:
       url [<SP> extras]
and the default value for extras is:
  "%>a/%>A %un %>rm myip=%la myport=%lp"

Example usage:
   url_rewrite_extras "Note1=%{Note1}note Note2=%{Note2}note"

This is a Measurement Factory project.

11 years agoPrep for 3.3.12 and 3.4.4
Amos Jeffries [Sun, 9 Mar 2014 03:06:51 +0000 (20:06 -0700)] 
Prep for 3.3.12 and 3.4.4

11 years agoAvoid assertions on Range requests that trigger Squid-generated errors.
Alex Rousskov [Sat, 8 Mar 2014 17:28:23 +0000 (10:28 -0700)] 
Avoid assertions on Range requests that trigger Squid-generated errors.

Added HttpRequest::ignoreRange() to encapsulate range ignoring logic.
Currently the new method only contains the code common among all callers. More
work is needed to check whether further caller homogenization is possible.

Documented that ClientSocketContext::getNextRangeOffset() may sometimes be
called before it is ready to do its job.

11 years agoShuffle maybeMakeSpaceAvailable() to ConnStateData::In
Amos Jeffries [Sat, 8 Mar 2014 00:47:39 +0000 (16:47 -0800)] 
Shuffle maybeMakeSpaceAvailable() to ConnStateData::In

maybeMakeSpaceAvailable() is an operation only for the buffer from
ConnStateData::In.

11 years agoAvoid buffer overrun by comm_read()
Amos Jeffries [Sat, 8 Mar 2014 00:18:11 +0000 (16:18 -0800)] 
Avoid buffer overrun by comm_read()

It seems the space details provided by SBuf do not necesarily match the
existing MemBlob size. If for example actions like consume() have shifted
the SBuf down the MemBlob buffer.

Use spaceSize() to guarantee that the underlying MemBlob store still
provides sufficient buffer to fill without overflowing.

11 years agoSync with trunek rev.13305
Amos Jeffries [Fri, 7 Mar 2014 13:20:02 +0000 (05:20 -0800)] 
Sync with trunek rev.13305

This pulls in the MemBlob memcpy/memmove change required to safely use
SBuf as a I/O buffer.

11 years agoConvert ConnStateData::In::buf to an SBuf
Amos Jeffries [Fri, 7 Mar 2014 13:17:37 +0000 (05:17 -0800)] 
Convert ConnStateData::In::buf to an SBuf

11 years agoProtect MemBlob::append() against raw-space writes
Amos Jeffries [Fri, 7 Mar 2014 11:18:03 +0000 (04:18 -0700)] 
Protect MemBlob::append() against raw-space writes

There is no guarantee that the 'unused' area of MemBlob is actually
unused. For example if a read buffer was being filled into the
rawSpace() of a SBuf or MemBlob it will overlap with this empty area
until a read call updates the related size state in MemBlob/SBuf.

For these cases we must use memmove() which guarantees no buffer
corruption will take place on memory overlaps.

11 years agoCopyright: Remove explicit claims on src/ by Treehouse Networks Ltd.
Amos Jeffries [Thu, 6 Mar 2014 05:41:17 +0000 (18:41 +1300)] 
Copyright: Remove explicit claims on src/ by Treehouse Networks Ltd.

Amos Jeffries is listed as author in CONTRIBUTORS and Treehouse Networks
Ltd. listed in SPONSORS and commit messages.

11 years agoCopyright: Relicense helpers by Treehouse Networks Ltd.
Amos Jeffries [Thu, 6 Mar 2014 03:55:41 +0000 (20:55 -0700)] 
Copyright: Relicense helpers by Treehouse Networks Ltd.

Update the license on helper code designed and authored by myself using
the BSD 2-clause license. This makes the example helper code and license
more legally acceptible for use as a basis of proprietary helpers while
remaining compatible with GPL for distribution with Squid.

11 years agoLanguages: Georgian dialect
Amos Jeffries [Wed, 5 Mar 2014 22:34:18 +0000 (11:34 +1300)] 
Languages: Georgian dialect

11 years agoLanguages: Georgian
Amos Jeffries [Wed, 5 Mar 2014 22:30:03 +0000 (11:30 +1300)] 
Languages: Georgian

11 years agoTranslation: update POT content
Amos Jeffries [Wed, 5 Mar 2014 22:25:04 +0000 (11:25 +1300)] 
Translation: update POT content

11 years agoBetter fix for CMSG definitions
Amos Jeffries [Wed, 5 Mar 2014 12:08:54 +0000 (01:08 +1300)] 
Better fix for CMSG definitions

It turns out autoconf versions are not consistent with $ symbol escaping
which can cause incorrect definitions. Revert to AC_CHECK_TYPE instead.
Its a bit more verbose in configure.ac but works more often than not.

11 years agoPortability: define CMSG related structures individually
Amos Jeffries [Wed, 5 Mar 2014 06:32:34 +0000 (19:32 +1300)] 
Portability: define CMSG related structures individually

Some OS provide the CMSG related definitions and others only partially
define them. Sometimes (Windows particularly) this varies between build
environments.

Checking for each symbol separately and providing only those needed
avoids problems we have been having with missing or redefined symbols
on Windows and elsewhere.

11 years agoAdd debug messages indicating type/reason for HITs
Amos Jeffries [Tue, 4 Mar 2014 10:40:36 +0000 (23:40 +1300)] 
Add debug messages indicating type/reason for HITs

11 years agoFix helper ID number assignment
Amos Jeffries [Tue, 4 Mar 2014 10:33:08 +0000 (23:33 +1300)] 
Fix helper ID number assignment

Since helpers are now dynamically started the old method of allocating
an ID number based on the current start sequence can result in many
helpers being assigned overlapping ID numbers.

Use InstanceID template instead to assure a unique incremental ID is
assigned to each helper no matter when it is started.

11 years agoFix syntax error in pinger
Francesco Chemolli [Mon, 24 Feb 2014 12:20:29 +0000 (13:20 +0100)] 
Fix syntax error in pinger

11 years agoMigrated RegisteredRunners to a multi-action interface.
Alex Rousskov [Fri, 21 Feb 2014 16:14:05 +0000 (09:14 -0700)] 
Migrated RegisteredRunners to a multi-action interface.

Old generic two-action RegisteredRunners were good for handling paired
create/destroy events, but not all main.cc events fit that model well. In
fact, even the old runners implemented the destruction action for one event
only (rrAfterConfig); all other runners implemented a single action.

The adjusted API better supports runners that are interested in any number
of the supported events. It also allows a single runner object to handle
multiple events, which simplifies current code and may help with better
[re]configuration handling in the future.

Added startShutdown() and finishShutdown() events. The former will be needed
for authentication module shutdown and more polished shutdown initiation code
in general (patch pending). The latter is needed for final cleanup code that
previously ran as the destruction action for rrAfterConfig. finishShutdown()
also destroys all runners.

Note that the master process in SMP mode does not run startShutdown because
that process lacks the main loop and startShutdown() promises at least one
main loop iteration (to help with clean connections closures, for example).

Added syncConfig() event that will be needed for the standby pool
implementation (patch pending) and future code that reacts to Squid
configuration changes caused by reconfiguration.

"after config" event is now called "use config" to better match verb+noun or
action+object naming scheme.

11 years agoFixed stalled concurrent rock store reads by insuring their ID uniqueness.
Alex Rousskov [Fri, 21 Feb 2014 15:45:01 +0000 (08:45 -0700)] 
Fixed stalled concurrent rock store reads by insuring their ID uniqueness.

Added a check to prevent similar bugs from occurring in the future.

11 years agoCleanup: un-wrap C++ header includes
Amos Jeffries [Fri, 21 Feb 2014 10:46:19 +0000 (03:46 -0700)] 
Cleanup: un-wrap C++ header includes

Coding guideline is now that standard C++ headers are not to be
wrapped in HAVE_ macros.

* Remove HAVE_ macros for currently wrapped C++ headers.
  Includes removing autoconf checks.

* Replace C includes with C++ includes where possible

Also, <cstdio> / <stdio.h> has issues on 64-bit systems and a
portable fixed version is provided by libcompat via squid.h
It should not be included anywhere in the Squid sources.

11 years agoLanguages: updated Serbian aliases
Marko Cupac [Fri, 21 Feb 2014 10:10:21 +0000 (03:10 -0700)] 
Languages: updated Serbian aliases

11 years agoBug 3186, Bug 3628: Digest authentication always sending stale=false for nonce
Henrik Nordstrom [Fri, 21 Feb 2014 02:19:52 +0000 (19:19 -0700)] 
Bug 3186, Bug 3628: Digest authentication always sending stale=false for nonce

11 years agoFix compile issues in rev.13288
Amos Jeffries [Thu, 20 Feb 2014 23:33:29 +0000 (12:33 +1300)] 
Fix compile issues in rev.13288

11 years agosquidclient: --ping mode module support
Amos Jeffries [Thu, 20 Feb 2014 13:03:07 +0000 (06:03 -0700)] 
squidclient: --ping mode module support

  Module support:

Update squidclient support modules with different logics
and configuration option sets as a basis for multiple
protocol support.

A mechanism is added to allow each module to have its own
command line option set. Any option unknown to the current
module handler drops back to the main loop for processing.

  --ping mode module:

Break the existing code "ping mode" operations and command
line processing out from the main squidclient.cc into Ping.*

Ping-specific short command line options are now only parsed
after a mode flag (--ping) is presented. This frees up the
-g and -I options for use by other non-ping modules in future.

Also, shuffle squidclient code into its own directory
tools/squidclient/ to keep the tool code files clearly
identifiable now that they are multiplying.

11 years agoBug 3628: Digest auth sending stale=false on nonce mismatch
Henrik Nordstrom [Thu, 20 Feb 2014 01:50:39 +0000 (18:50 -0700)] 
Bug 3628: Digest auth sending stale=false on nonce mismatch

11 years agodynamic_cert_mem_cache_size option related fixes part2: "make check" fails
Christos Tsantilas [Wed, 19 Feb 2014 18:48:16 +0000 (20:48 +0200)] 
dynamic_cert_mem_cache_size option related fixes part2: "make check" fails

11 years agodynamic_cert_mem_cache_size option related fixes
Christos Tsantilas [Wed, 19 Feb 2014 17:53:27 +0000 (19:53 +0200)] 
dynamic_cert_mem_cache_size option related fixes

This patch fixes the following problems:

1) The dynamic_cert_mem_cache_size does not change on reconfigure

2) When dynamic_cert_mem_cache_size of http_port set to 0 then:

   a) The dynamic certs cache is grow unlimited.
      This patch just disables certificates caching when this option set to 0.

   b) Huge amount of memory appeared as free cache memory in  "Cached ssl
      certificates statistic" page of cache manager.
      This problem caused because of a signed to unsigned int conversion.

This is a Measurement Factory project

11 years agoFix uses of std::remove to actually resize the data structures which were cleaned-up.
Francesco Chemolli [Wed, 19 Feb 2014 17:01:30 +0000 (18:01 +0100)] 
Fix uses of std::remove to actually resize the data structures which were cleaned-up.

11 years agoFix pthread library detection on FreeBSD 10
Amos Jeffries [Tue, 18 Feb 2014 13:57:16 +0000 (06:57 -0700)] 
Fix pthread library detection on FreeBSD 10

We should not be using "cut -b1" anywhere to determine OS version
number. It drops digits out of the major version number.

11 years agoFix umask default on crash report generated email
Amos Jeffries [Tue, 18 Feb 2014 11:39:58 +0000 (04:39 -0700)] 
Fix umask default on crash report generated email

11 years agoBug 4029: intercepted HTTPS requests bypass caching checks
Rajiv Desai [Mon, 17 Feb 2014 14:05:24 +0000 (06:05 -0800)] 
Bug 4029: intercepted HTTPS requests bypass caching checks

11 years agoFix shadowed variable in rev.13279
Amos Jeffries [Sun, 16 Feb 2014 09:50:29 +0000 (22:50 +1300)] 
Fix shadowed variable in rev.13279

11 years agosquidclient: support long options on command line
Amos Jeffries [Sun, 16 Feb 2014 06:14:16 +0000 (23:14 -0700)] 
squidclient: support long options on command line

11 years agosquidclient: polish and documentation
Amos Jeffries [Sun, 16 Feb 2014 05:55:24 +0000 (22:55 -0700)] 
squidclient: polish and documentation

11 years agosquidclient: support verbosity levels
Amos Jeffries [Sun, 16 Feb 2014 05:15:45 +0000 (22:15 -0700)] 
squidclient: support verbosity levels

This makes the -v option repeatable. By default no debug is displayed.
Each time -v is repeated the level of debug message verbosity is raised.

Three levels of verbosity are currently defined:
 0 - no output except ERROR messages.
 1 - display HTTP request sent
 2 - display actions taken connecting to server

11 years agosquidclient: polish and update help display
Amos Jeffries [Sun, 16 Feb 2014 03:22:24 +0000 (20:22 -0700)] 
squidclient: polish and update help display

11 years agoFix memory leak regression in SNMP from rev.13274
Amos Jeffries [Thu, 13 Feb 2014 22:22:35 +0000 (11:22 +1300)] 
Fix memory leak regression in SNMP from rev.13274

Variable "name" going out of scope leaks the storage it points to if any
of the parse was done by incomplete.

 Detected by Coverity Scan. Issue 1174204.

11 years agoBug 4001: remove use of strsep()
Amos Jeffries [Thu, 13 Feb 2014 07:02:35 +0000 (20:02 +1300)] 
Bug 4001: remove use of strsep()

The strsep() function is not defined by POSIX. Additionally
auto-tools has been having some obscure issues detecting
or linking the provided implementation into libcompat on
Windows and Solaris respectively. Which are the two known
OS requiring it.

Investigation of its use in Squid revealed that it can be
replaced with strcspan() which is both portable and more
efficient since it also removes the need for several
strdup()/free() operations used to protect Squid from
strsep() memory fiddling.

11 years agoBug 4026: SSL and adaptation_access does not handle aborted connections
Nathan Hoad [Thu, 13 Feb 2014 06:09:26 +0000 (19:09 +1300)] 
Bug 4026: SSL and adaptation_access does not handle aborted connections

11 years agoRevert rev.13271
Amos Jeffries [Thu, 13 Feb 2014 05:41:14 +0000 (18:41 +1300)] 
Revert rev.13271

11 years agoBug 4026: SSL and adaptation_access does not handle aborted connections
Nathan Hoad [Thu, 13 Feb 2014 05:29:15 +0000 (18:29 +1300)] 
Bug 4026: SSL and adaptation_access does not handle aborted connections

11 years agoRefactor Vector and Stack to STL counterparts
Francesco Chemolli [Wed, 12 Feb 2014 10:43:26 +0000 (11:43 +0100)] 
Refactor Vector and Stack to STL counterparts

11 years agoStreamline storeLateRelease
Francesco Chemolli [Wed, 12 Feb 2014 09:19:06 +0000 (10:19 +0100)] 
Streamline storeLateRelease

11 years agoFix crash bug in HttpHeader::clean()
Francesco Chemolli [Wed, 12 Feb 2014 08:51:26 +0000 (09:51 +0100)] 
Fix crash bug in HttpHeader::clean()

11 years agoRemove Vector, Stack and related unit tests
Francesco Chemolli [Tue, 11 Feb 2014 13:14:09 +0000 (14:14 +0100)] 
Remove Vector, Stack and related unit tests

11 years agoReworked all clients of Stack to std::stack
Francesco Chemolli [Tue, 11 Feb 2014 12:05:47 +0000 (13:05 +0100)] 
Reworked all clients of Stack to std::stack

11 years agoReworked cbdata to use std::vector to be able to have a random access iterator
Francesco Chemolli [Tue, 11 Feb 2014 12:02:07 +0000 (13:02 +0100)] 
Reworked cbdata to use std::vector to be able to have a random access iterator