]> git.ipfire.org Git - thirdparty/squid.git/log
thirdparty/squid.git
10 years agoMerge from trunk rev.13994
Amos Jeffries [Sat, 28 Mar 2015 13:20:21 +0000 (06:20 -0700)] 
Merge from trunk rev.13994

10 years agoRelease Notes: update for 4.x
Amos Jeffries [Sat, 28 Mar 2015 11:12:46 +0000 (04:12 -0700)] 
Release Notes: update for 4.x

10 years agoPrep for 3.5.3
Amos Jeffries [Sat, 28 Mar 2015 10:51:16 +0000 (03:51 -0700)] 
Prep for 3.5.3

10 years agoDocs: update QUICKSTART and INSTALL
Source Maintenance [Thu, 26 Mar 2015 09:52:12 +0000 (09:52 +0000)] 
Docs: update QUICKSTART and INSTALL

10 years agoFix Squid crash while an error page generated
Christos Tsantilas [Thu, 26 Mar 2015 09:21:15 +0000 (11:21 +0200)] 
Fix Squid crash while an error page generated

When squid generated an error page which contains the "%m" formating code
but the authentication information is not available squid dies with
segfault.

This is a Measurement Factory project

10 years agoFix GNU atomics detection support, enable caching for them
Francesco Chemolli [Mon, 23 Mar 2015 14:13:16 +0000 (15:13 +0100)] 
Fix GNU atomics detection support, enable caching for them

10 years agoCrypto-NG: Move Ssl::PeerConnectorAnswer to Security::EncryptorAnswer
Amos Jeffries [Sat, 21 Mar 2015 08:25:19 +0000 (01:25 -0700)] 
Crypto-NG: Move Ssl::PeerConnectorAnswer to Security::EncryptorAnswer

This class was not actually depending on OpenSSL API symbols and by
abstracting it out we can unify the callback handlers for encrypted and
non-encrypted logic paths for several classes that setup connections.

10 years agoRevert changes to external_acl.cc in rev.13985
Amos Jeffries [Sat, 21 Mar 2015 08:00:21 +0000 (01:00 -0700)] 
Revert changes to external_acl.cc in rev.13985

10 years agoMove Ssl::PeerConnectorAnswer to Security::EncryptorAnswer
Amos Jeffries [Fri, 20 Mar 2015 15:10:07 +0000 (08:10 -0700)] 
Move Ssl::PeerConnectorAnswer to Security::EncryptorAnswer

This class was not actually depending on OpenSSL API symbols and by
abstracting it out we can unify the callback handlers for encrypted and
non-encrypted logic paths for several classes that setup connections.

10 years agoSourceFormat Enforcement
Source Maintenance [Thu, 19 Mar 2015 12:12:08 +0000 (12:12 +0000)] 
SourceFormat Enforcement

10 years agoAdd missing SBufStatsAction changes for registration rework
Henrik Nordstrom [Thu, 19 Mar 2015 11:09:24 +0000 (12:09 +0100)] 
Add missing SBufStatsAction changes for registration rework

somehow forgot to add these to previous commit

10 years agoRework SBufStatsAction registration to use explicit code path
Henrik Nordstrom [Thu, 19 Mar 2015 10:16:56 +0000 (11:16 +0100)] 
Rework SBufStatsAction registration to use explicit code path

GCC was not happy about the global level registration "variable" not being used

10 years agostart workers as root
Christos Tsantilas [Tue, 17 Mar 2015 11:59:53 +0000 (13:59 +0200)] 
start workers as root

SMP workers in trunk start without root privileges. This results in startup
failures when workers need to use a privileged port (e.g., 443) or other
root-only features such as TPROXY.

The watch_child function, responsible to watch and start squid workers for
the squid monitor process, called after a enter_suid() call, but the
writePidFile() call, inside the watch_child(), will leave suid mode before exit.

This patch add enter_suid() cals after the writePidFile and removePidFile()
inside the watch_child() function.

This is a Measurement Factory project

10 years agoImplement lazy buffer reallocation for HTTP server connections
Amos Jeffries [Tue, 17 Mar 2015 02:53:05 +0000 (19:53 -0700)] 
Implement lazy buffer reallocation for HTTP server connections

Bug 4206 was caused by early buffers allocated for read I/O being
dropped while waiting for the read to actually take place.

In order to prevent future bugs in the server connection read logics we
implement the same lazy/late grow behaviour as required to fix bug 4206.

10 years agoPolish rev.13980 debugs
Amos Jeffries [Tue, 17 Mar 2015 02:51:04 +0000 (19:51 -0700)] 
Polish rev.13980 debugs

10 years agoFix bug 4206 equivalent code in new ICAP logic
Amos Jeffries [Mon, 16 Mar 2015 10:28:37 +0000 (03:28 -0700)] 
Fix bug 4206 equivalent code in new ICAP logic

10 years agoMerge from trunk rev.13981
Amos Jeffries [Mon, 16 Mar 2015 10:24:04 +0000 (03:24 -0700)] 
Merge from trunk rev.13981

10 years agoBug 4206: Regression in expect:100-continue
Mike Mitchell [Mon, 16 Mar 2015 09:52:13 +0000 (02:52 -0700)] 
Bug 4206: Regression in expect:100-continue

10 years agoCleanup: extend SBuf debugging information
Amos Jeffries [Sun, 15 Mar 2015 18:13:19 +0000 (11:13 -0700)] 
Cleanup: extend SBuf debugging information

It can be hard determining what simple operations (ie cow(), grow()) are
being done no what SBuf object. Add the SBuf::id to debugs() output on
many more operations.

10 years agoBug 4204: ./configure does not abort when required helpers cannot be built
Amos Jeffries [Sun, 15 Mar 2015 17:24:53 +0000 (10:24 -0700)] 
Bug 4204: ./configure does not abort when required helpers cannot be built

10 years agoBug 4213: negotiate_kerberos_auth: freeing non-dynamic memory
Amos Jeffries [Sun, 15 Mar 2015 13:02:21 +0000 (06:02 -0700)] 
Bug 4213: negotiate_kerberos_auth: freeing non-dynamic memory

10 years agoBug 4215: double-free in CBDATA with --enable-debug-cbdata
Amos Jeffries [Sun, 15 Mar 2015 02:05:44 +0000 (19:05 -0700)] 
Bug 4215: double-free in CBDATA with --enable-debug-cbdata

10 years agoCleanup: RebuildState does not need ref-counting
Amos Jeffries [Sat, 14 Mar 2015 21:50:29 +0000 (14:50 -0700)] 
Cleanup: RebuildState does not need ref-counting

10 years agoCleanup: Drop unused CBDATA free_func parameter
Amos Jeffries [Sat, 14 Mar 2015 17:53:38 +0000 (10:53 -0700)] 
Cleanup: Drop unused CBDATA free_func parameter

10 years agoC++11: wrap move semantics operators
Amos Jeffries [Sat, 14 Mar 2015 04:42:10 +0000 (21:42 -0700)] 
C++11: wrap move semantics operators

Allowing older not-quite-C++11 compilers to build for a while longer.

Move is a performance optimization.

10 years agoRename 3.HEAD to 4.0.0
Source Maintenance [Fri, 13 Mar 2015 16:57:58 +0000 (16:57 +0000)] 
Rename 3.HEAD to 4.0.0

10 years agoPortability: check 64-bit GNU atomic operators are useable
Amos Jeffries [Fri, 13 Mar 2015 11:26:27 +0000 (04:26 -0700)] 
Portability: check 64-bit GNU atomic operators are useable

Sometimes (namely 32-bit OpenBSD libstdc++) do not fully implement the
GNU atomic operators for both 32-bit and 64-bit. But Squid makes use of
both types if the compiler deems them required.

We need to check them all before declaring the atomics usable, or not.

 Thanks to Stuart Henderson for identifying the issue.

10 years agoTests: extend pre-compiler unit tests to check macro permutations
Amos Jeffries [Thu, 12 Mar 2015 01:30:21 +0000 (18:30 -0700)] 
Tests: extend pre-compiler unit tests to check macro permutations

We are getting come complaints about precompiler issues building with
#if FOO && FOO || FOO boolean constructs using undefined macros.

The particualr form reported so far dies when building the test, so will
be found earlier than these checks are run. This is to ensure its not a
widespread subtle error in other "working" installations.

10 years agoMerged from trunk rev.13970
Amos Jeffries [Wed, 11 Mar 2015 08:11:17 +0000 (01:11 -0700)] 
Merged from trunk rev.13970

10 years agoDocument that on_unsupported_protocol works for bumped tunnels.
Christos Tsantilas [Thu, 5 Mar 2015 18:59:04 +0000 (20:59 +0200)] 
Document that on_unsupported_protocol works for bumped tunnels.

10 years agoFix uninitialized member of ps_state
Amos Jeffries [Thu, 5 Mar 2015 12:00:45 +0000 (04:00 -0800)] 
Fix uninitialized member of ps_state

 Detected by Coverity Scan. Issue 740575

10 years agoAbort Host header lookup if line ends without an LF.
Amos Jeffries [Thu, 5 Mar 2015 10:19:47 +0000 (02:19 -0800)] 
Abort Host header lookup if line ends without an LF.

 Detected by Coverity Scan. Issue 1270007

10 years agoRemove useless checks in rev.13951
Amos Jeffries [Thu, 5 Mar 2015 10:09:39 +0000 (02:09 -0800)] 
Remove useless checks in rev.13951

Being overly paranoid it seems.

 Detected by Coverity Scan. Issue 1273436

10 years agoFix uninitialized members in Security::PeerOptions rev.13952
Amos Jeffries [Thu, 5 Mar 2015 10:05:07 +0000 (02:05 -0800)] 
Fix uninitialized members in Security::PeerOptions rev.13952

 Detected by Coverity Scan. Issue 1273438

10 years agoFix uninitialized members in Http1::ResponseParser
Amos Jeffries [Thu, 5 Mar 2015 10:00:37 +0000 (02:00 -0800)] 
Fix uninitialized members in Http1::ResponseParser

 Detected by Coverity Scan. Issue 1273439

10 years agoFix typo added tweaking rev.13962
Amos Jeffries [Tue, 3 Mar 2015 14:51:22 +0000 (06:51 -0800)] 
Fix typo added tweaking rev.13962

10 years agoSourceFormat Enforcement
Source Maintenance [Mon, 2 Mar 2015 18:12:08 +0000 (18:12 +0000)] 
SourceFormat Enforcement

10 years agoPortability: only use SSL compression when available
Stuart Henderson [Mon, 2 Mar 2015 14:50:43 +0000 (06:50 -0800)] 
Portability: only use SSL compression when available

Compression in SSL/TLS is deprecated. LibreSSL, BoringSSL, and some
OpenSSL builds do not contain support for it at all.

10 years agoRemove SSLv2 support in SSL BIO code
Amos Jeffries [Mon, 2 Mar 2015 14:39:21 +0000 (06:39 -0800)] 
Remove SSLv2 support in SSL BIO code

We are not supporting SSLv2 features anymore.

10 years agoAdd missing copyright blurbs from rev.13954
Amos Jeffries [Sun, 1 Mar 2015 08:37:07 +0000 (00:37 -0800)] 
Add missing copyright blurbs from rev.13954

10 years agoSource Maintenance: update src/acl/Address.h wrapper macro
Amos Jeffries [Sun, 1 Mar 2015 07:20:52 +0000 (23:20 -0800)] 
Source Maintenance: update src/acl/Address.h wrapper macro

10 years agoCleanup: convert BodyPipe to MEMPROXY_CLASS
Amos Jeffries [Sun, 1 Mar 2015 01:44:26 +0000 (17:44 -0800)] 
Cleanup: convert BodyPipe to MEMPROXY_CLASS

BodyPipe is ref-counted. Such classes should not be using CBDATA_CLASS
for smart pointer referencing and memory management. They use RefCount
for smart pointer referencing, MEMPROXY_CLASS for memory management.

10 years agoRemove needless XXX comment
Amos Jeffries [Sat, 28 Feb 2015 03:54:28 +0000 (19:54 -0800)] 
Remove needless XXX comment

10 years agoMerged from trunk rev.13957
Amos Jeffries [Sat, 28 Feb 2015 00:41:08 +0000 (16:41 -0800)] 
Merged from trunk rev.13957

10 years agoPortability: fix compile errors on ICC after rev.13954
Amos Jeffries [Fri, 27 Feb 2015 12:12:32 +0000 (04:12 -0800)] 
Portability: fix compile errors on ICC after rev.13954

"type qualifier on return type is meaningless"

10 years agoFix signed/unsigned comparison compile error on 64-bit
Amos Jeffries [Fri, 27 Feb 2015 03:55:39 +0000 (19:55 -0800)] 
Fix signed/unsigned comparison compile error on 64-bit

10 years agoSourceFormat Enforcement
Source Maintenance [Thu, 26 Feb 2015 18:12:07 +0000 (18:12 +0000)] 
SourceFormat Enforcement

10 years agoParser-NG: HTTP Response Parser upgrade
Amos Jeffries [Thu, 26 Feb 2015 13:19:35 +0000 (05:19 -0800)] 
Parser-NG: HTTP Response Parser upgrade

1) convert the HTTP server read buffer to an SBuf using the same design
and Comm::Read API implemented previously for the client connections.

The buffer remains default initialized at 16KB per connection but is no
longer absolutely limited to 256KB. Instead it is limited by
configuration options controlling maximum server input sizes on
read_ahead_gap and response message headers.

The Client API has been extended with a new method to estimate size
requirements of an SBuf I/O buffer. Modelled on and deprecating the
existing MemBuf estimator.

The Comm::ReadNow() API is extended to allow limited-size read(2)
operations by setting the CommIoCbParams::size parameter.

The HttpStateData buffer is partially detached from
StoreEntry::delayAwareRead() API due to requirements of the
Comm::ReadNow() API. Instead StoreEntry::bytesWanted() is used directly
to determine read(2) size, and DeferredRead are generated only when
ReadNow() is actually and immediately to be deferred. Theoretically this
means less read operations get deferred in some high load cases.
Practically it means there is no longer an AsyncCall queue plus socket
wait delay between delay_pools promising a read size, doing the
read(2), and accounting for the bytes received - accuracy should be much
improved under load.

This introduces one temporary performance regression converting the SBuf
content to MemBuf for chunked decoder to process.

2) add Http1::ResponseParser class for parsing HTTP response messages.

Modelled on the same design as used for the HTTP RequestParser, and
inheriting from a mutual parent Http1::Parser.

The Parser is Tokeniser based, incremental and 'consumes' bytes out of
the buffer as they are parsed.

The Tokenizer int64 API is updated to handle limited-length scans and
optional +/- symbols.

This Parser class recognises HTTP/1.x and ICY/1 syntax messages. Any
unknown syntax input is assumed to be HTTP "0.9" and it will
gateway/transform the response to HTTP/1.1.
 NOTE: these are all semantic actions performed by the code being
replaced in (3). Only the form and OO scoping has changed.

The mime header block detection operation is generalized into the
Http1::Parser for use by both RequestParser and ResponseParser. The
request_parse_status error code has also been adapted for shared use.

3) integrate the HTTP1::ResponseParser with HttpStateData server
response processing.

This is largely code shuffling. Though I have extended the EOF \r\n hack
such that it enables Squid to parse truncated response headers now.

10 years agoSourceFormat Enforcement
Source Maintenance [Thu, 26 Feb 2015 12:12:11 +0000 (12:12 +0000)] 
SourceFormat Enforcement

10 years agoMerge from trunk rev.13952
Amos Jeffries [Thu, 26 Feb 2015 10:41:51 +0000 (02:41 -0800)] 
Merge from trunk rev.13952

10 years agoBug 2741 (partial): Initial libsecurity API
Amos Jeffries [Thu, 26 Feb 2015 10:37:41 +0000 (02:37 -0800)] 
Bug 2741 (partial): Initial libsecurity API

The first step(s) towards a generic TLS/SSL security API for Squid.

Creates the basic security/libsecurity.la library and Security::
namespace infrastructure. Symbols provided by this API are always
available instead of conditionally compiled (unlike the ssl/* code for
OpenSSL use).

Merge the TLS/SSL context parameters into a Security::PeerOptions
object instead of maintaining multiple member variables in the
CachePeer and SquidConfig objects.

Squid now provides an error if SSL-specific squid.conf parameters are
used for a Squid without OpenSSL support, instead of silently ignoring
them.

10 years agoMerged from trunk
Amos Jeffries [Thu, 26 Feb 2015 10:25:12 +0000 (02:25 -0800)] 
Merged from trunk

10 years agoBug 2907: high CPU usage on CONNECT when using delay pools
Amos Jeffries [Thu, 26 Feb 2015 06:05:02 +0000 (22:05 -0800)] 
Bug 2907: high CPU usage on CONNECT when using delay pools

When delay pools are active on a CONNECT tunnel and the pool is drained
the I/O loop cycles very often transferring 1 byte until the pool is
topped-up at the end of the second.

Instead of looping constantly trying to read 1 byte at a time, add an
asynchronous event to wait for a few I/O cycles or until more bytes can
be read.

To protect against infinite loops of waiting when many tunnels are
competing for the pool allowance we only delay for a limited number of
loops before allowing at least 1 byte through. Also, the amount of time
waited is an odd fraction of 1 second so re-tries naturally spread
across any given second fairly, with connections rotating closer or
further from the time when pool topup happens. That behaviour still
allows some variance in service times, but overall the CPU consumption
and (as a result) total proxy speed appears to be much improved.

NP: Initial production testing shows a 36% RPS speed increase,
    with a 50% reduction in total CPU usage.

10 years agoSourceFormat Enforcement
Source Maintenance [Wed, 25 Feb 2015 18:12:07 +0000 (18:12 +0000)] 
SourceFormat Enforcement

10 years agoFake CONNECT exceeds concurrent requests limit part2: wrap Openssl related code insid...
Christos Tsantilas [Wed, 25 Feb 2015 16:22:15 +0000 (18:22 +0200)] 
Fake CONNECT exceeds concurrent requests limit part2: wrap Openssl related code inside "#if USE_OPENSSL ..."

10 years agoFake CONNECT exceeds concurrent requests limit.
Christos Tsantilas [Wed, 25 Feb 2015 15:53:29 +0000 (17:53 +0200)] 
Fake CONNECT exceeds concurrent requests limit.

Squid closes the SSL client connection with "Failed to start fake CONNECT
request for ssl spliced connection". This happens especially often when
the pipeline_prefetch configuration parameter is set to "0" (i.e., default).

When a transparent SSL connection is peeked and then spliced in step2, we are
generating a fake CONNECT request. The fake CONNECT request is counted as a
new pipelined request and may exceed the configured limit. This patch solves
this problem by raising the limit for that request.

Needs more work to better identify the requests that need a different limit.

This is a Measurement Factory project.

10 years agoBug 3805: support shared memory on MacOS X in Mem::IPC::Segment
Joshua Root [Wed, 25 Feb 2015 13:32:14 +0000 (14:32 +0100)] 
Bug 3805: support shared memory on MacOS X in Mem::IPC::Segment

MacOS X doesn't support the O_TRUNC flag to shm_open; it is redundant anyway
because the shared memory segment is truncated immediately after opening
as per best practices. With this support Squid can now be built and run
under MacOS X.

10 years agoCandidate for fixing MacOS SHM
Francesco Chemolli [Tue, 24 Feb 2015 10:32:15 +0000 (11:32 +0100)] 
Candidate for fixing MacOS SHM

10 years agoAllow removal of delayed read events on connection close
Amos Jeffries [Mon, 23 Feb 2015 08:09:21 +0000 (00:09 -0800)] 
Allow removal of delayed read events on connection close

.. also use the TunnelStateData directly instead of wrapped in
generic_cbdata so the event engine can identify dead tunnels.
Its a cbdata class anyway so the generic_cbdata was redundant.

10 years agoRemove cache_peer_domain directive
Amos Jeffries [Mon, 23 Feb 2015 06:34:49 +0000 (22:34 -0800)] 
Remove cache_peer_domain directive

Identical functionality is provided through cache_peer_access.

While this check appears at face value to be simpler than ACLs, the
reality is that:
* the difference is simply the time it takes to initialize and destruct
  an on-stack Checklist,
* processing the checks may take longer than ACLs (linked-list of string
  comparisons vs single tree lookup),
* ACLs are the common case due to their extra flexibility, and
* extra work is being done per-transaction just to check which of the
  two features is in use.

By removing we gain less code and configuration directives to work
around in the long term.

10 years agoUse RefCount::dereference() correctly in move assignment
Amos Jeffries [Sat, 21 Feb 2015 12:29:16 +0000 (04:29 -0800)] 
Use RefCount::dereference() correctly in move assignment

The dereference() member is actually an update operation on the stored
pointer. We can and should just use it to steal the others pointer
instead of using it on our own then stealing.

10 years agoBug 2907: high CPU usage on CONNECT when using delay pools
Amos Jeffries [Sat, 21 Feb 2015 03:31:22 +0000 (19:31 -0800)] 
Bug 2907: high CPU usage on CONNECT when using delay pools

When delay pools are active on a CONNECT tunnel and teh pool is drained
the I/O loop cycles very often transferring 1 byte until the pool is
topped-up at the end of the second.

Instead of looping constantly trying to read 1 byte at a time, add an
asynchronous event to wait for a few I/O cycles or until more bytes can
be read.

To protect against infinite loops of waiting when many tunnels are
competing for the pool allowance we only delay for a limited number of
loops before allowing at least 1 byte through. Also, the amount of time
waited is an odd fraction of 1 second so re-tries naturally spread
across any given second fairly, with connections rotating closer or
further from the time when pool topup happens.

10 years agoFix testHeaders
Francesco Chemolli [Fri, 20 Feb 2015 19:50:41 +0000 (20:50 +0100)] 
Fix testHeaders

Author: Amos Jeffries

10 years agoFix typo in rev.13942
Amos Jeffries [Fri, 20 Feb 2015 11:56:13 +0000 (03:56 -0800)] 
Fix typo in rev.13942

10 years agoFix RefCount move assignment
Francesco Chemolli [Fri, 20 Feb 2015 10:16:12 +0000 (11:16 +0100)] 
Fix RefCount move assignment

10 years agoImplement move constructor and assignment for RefCount
Francesco Chemolli [Fri, 20 Feb 2015 08:58:14 +0000 (09:58 +0100)] 
Implement move constructor and assignment for RefCount

10 years agoFix TestHeaders unit tests
Amos Jeffries [Fri, 20 Feb 2015 08:24:22 +0000 (00:24 -0800)] 
Fix TestHeaders unit tests

10 years agoDrop needless stdbool.h
Amos Jeffries [Fri, 20 Feb 2015 04:39:48 +0000 (20:39 -0800)] 
Drop needless stdbool.h

10 years agoMerge from trunk rev.13939
Amos Jeffries [Fri, 20 Feb 2015 03:25:12 +0000 (19:25 -0800)] 
Merge from trunk rev.13939

10 years agoPortability fix: remove delegating constructors from SBuf
Francesco Chemolli [Thu, 19 Feb 2015 21:30:25 +0000 (22:30 +0100)] 
Portability fix: remove delegating constructors from SBuf

10 years agoSourceFormat Enforcement
Source Maintenance [Thu, 19 Feb 2015 18:12:06 +0000 (18:12 +0000)] 
SourceFormat Enforcement

10 years agoMerged from trunk
Francesco Chemolli [Thu, 19 Feb 2015 17:03:22 +0000 (18:03 +0100)] 
Merged from trunk

10 years agoMCorrectly mentioned SBuf debug section
Francesco Chemolli [Thu, 19 Feb 2015 17:03:03 +0000 (18:03 +0100)] 
MCorrectly mentioned SBuf debug section

10 years agoImplemented c++11 move operations for RefCount
Francesco Chemolli [Thu, 19 Feb 2015 16:11:58 +0000 (17:11 +0100)] 
Implemented c++11 move operations for RefCount

10 years agoImplement move-constructors for SBuf, improve debug output for SBuf and Tokenizer
Francesco Chemolli [Thu, 19 Feb 2015 15:59:13 +0000 (16:59 +0100)] 
Implement move-constructors for SBuf, improve debug output for SBuf and Tokenizer

10 years agoMerged from trunk
Francesco Chemolli [Thu, 19 Feb 2015 15:43:05 +0000 (16:43 +0100)] 
Merged from trunk

10 years agoImplemented move ctor counting, removed some experimental commented code
Francesco Chemolli [Thu, 19 Feb 2015 14:52:46 +0000 (15:52 +0100)] 
Implemented move ctor counting, removed some experimental commented code

10 years agoImplemented selective debugs() output for unit tests
Francesco Chemolli [Thu, 19 Feb 2015 14:52:14 +0000 (15:52 +0100)] 
Implemented selective debugs() output for unit tests

10 years agoext_wbinfo_group_acl: Perl 5.20 syntax errors
drserge [Thu, 19 Feb 2015 03:00:51 +0000 (19:00 -0800)] 
ext_wbinfo_group_acl: Perl 5.20 syntax errors

With Perl 5.20 the helper exits with many errors similar to:

  Global symbol "$groupSID" requires explicit package name at
    /usr/libexec/squid/ext_wbinfo_group_acl

10 years agobasic_nis_auth: fail authentication on crypt() failures
Amos Jeffries [Thu, 19 Feb 2015 02:50:51 +0000 (18:50 -0800)] 
basic_nis_auth: fail authentication on crypt() failures

... instead of crashing the helper.

"
Starting with glibc 2.17 (eglibc 2.17), crypt() fails with EINVAL (w/
NULL return) if the salt violates specifications. Additionally, on
FIPS-140 enabled Linux systems, DES or MD5 encrypted passwords passed to
crypt() fail with EPERM (w/ NULL return).
"

10 years agobasic_getpwnam_auth: fail authentication on crypt() failures
Amos Jeffries [Thu, 19 Feb 2015 02:48:23 +0000 (18:48 -0800)] 
basic_getpwnam_auth: fail authentication on crypt() failures

... instead of crashing the helper.

"
Starting with glibc 2.17 (eglibc 2.17), crypt() fails with EINVAL (w/
NULL return) if the salt violates specifications. Additionally, on
FIPS-140 enabled Linux systems, DES or MD5 encrypted passwords passed to
crypt() fail with EPERM (w/ NULL return).
"

10 years agoFix issues with move SBuf::compare, implement SBuf move constructors and move assignm...
Francesco Chemolli [Wed, 18 Feb 2015 16:13:33 +0000 (17:13 +0100)] 
Fix issues with move SBuf::compare, implement SBuf move constructors and move assignment, implement move operations counters.

10 years agoInstrumented SBuf::compare and many Tokenizer methods with debug statements.
Francesco Chemolli [Wed, 18 Feb 2015 11:25:46 +0000 (12:25 +0100)] 
Instrumented SBuf::compare and many Tokenizer methods with debug statements.

10 years agoRelease Notes 3.6 whitespace polish
Amos Jeffries [Wed, 18 Feb 2015 10:28:33 +0000 (02:28 -0800)] 
Release Notes 3.6 whitespace polish

10 years agoPrep for 3.5.2 and 3.4.12
Amos Jeffries [Wed, 18 Feb 2015 10:22:51 +0000 (02:22 -0800)] 
Prep for 3.5.2 and 3.4.12

10 years agoext_kerberos_ldap_group_acl: Heimdal support improvements
Markus Moeller [Wed, 18 Feb 2015 02:30:34 +0000 (18:30 -0800)] 
ext_kerberos_ldap_group_acl: Heimdal support improvements

* fix build errors on FreeBSD with Heimdal library

* remove PAC support from being built when not needed

* update man(8) page documentation po4a syntax

10 years agoInterim: implement move constructor and tryto rework SBuf::compare
Francesco Chemolli [Tue, 17 Feb 2015 17:46:12 +0000 (18:46 +0100)] 
Interim: implement move constructor and tryto rework SBuf::compare

10 years agoInterim: implement SBuf move constructor, TODO: fix SBuf::compare
Francesco Chemolli [Mon, 16 Feb 2015 16:19:19 +0000 (17:19 +0100)] 
Interim: implement SBuf move constructor, TODO: fix SBuf::compare

10 years agosslproxy_options in peek-and-splice mode
Christos Tsantilas [Sun, 15 Feb 2015 19:42:55 +0000 (21:42 +0200)] 
sslproxy_options in peek-and-splice mode

Problem description:
  - Squid sslproxy_options deny the use of TLSv1_2 SSL protocol:
     sslproxy_options NO_TLSv1_2
  - Squid uses peek mode for bumped connections.
  - Web client sends an TLSv1_2 hello message and squid in peek mode, forwards
    the client hello message to server
  - Web server respond with an TLSv1_2 hello message
  - Squid while parsing server hello message aborts with an error because
    sslproxy_options deny the use ot TLSv1_2 protocol.

This patch fixes squid to ignore sslproxy_options when peek or stare bumping
mode selected on bumpStep2 bumping step.
The sslproxy_options applied if bump (server-first or client-first) mode
selected on bumpStep1 or bumpStep2 bumping step.
Also applied for "GET https://..." requests.

This is a Measurement Factory project

10 years agoFix memory leaks in cachemgr.cgi URL parser
Amos Jeffries [Sun, 15 Feb 2015 08:24:23 +0000 (00:24 -0800)] 
Fix memory leaks in cachemgr.cgi URL parser

  Detected by Coverity Scan. Issue 1256164

10 years agoRelease Notes: fix mirrors link URL
Amos Jeffries [Thu, 12 Feb 2015 15:26:42 +0000 (07:26 -0800)] 
Release Notes: fix mirrors link URL

10 years agoHTTP/1.1: Remove refresh_pattern ignore-auth violation
Amos Jeffries [Thu, 12 Feb 2015 02:24:06 +0000 (18:24 -0800)] 
HTTP/1.1: Remove refresh_pattern ignore-auth violation

The original intent for this option was to improve caching. However
HTTP/1.1 permits caching of authenticated messages under conditions
which Squid does check for and obey already.

The legacy popularity of this option from old Squid without the HTTP/1.1
compliant behaviour is now just forming a security and privacy abuse.

10 years agoParser-NG: HTTP request-line parser replacement
Amos Jeffries [Tue, 10 Feb 2015 22:55:58 +0000 (14:55 -0800)] 
Parser-NG: HTTP request-line parser replacement

Converts the request-line parse method from a char* string parser to
using ::Parser::Tokenizer based processing.

* The characters for each token are now limited to the RFC 7230
compliant values. The URI is taken as a whole token and characters which
are valid in only one sub-token segment are accepted regardless of their
position. In relaxed parse that is extended beyond the valid URI
characters to include the whitespace characters.

* Whitespace tolerance is extended to include "binary" whitespace VTAB,
HTAB, CR and FF characters specified in RFC 7230.

* The Squid specific tolerance for whitespace prefix to method is
removed. RFC 2730 clarifies that tolerance before request-line is
specfifically and only for whole empty lines (sequences of CRLF or LF).

* The unit tests are extended to check strict and relaxed parse within
the new characterset limits. Drip-feed incremental test updated to check
both parser modes explicitly.

* ::Parser:Tokenizer is extended with methods to skip or retrieve a
token at the suffix of the stored buffer. This is used by the whitespace
tolerant parse to process the URL and HTTP-version tokens from the line
"backwards" from the LF position.

CoAdvisor and Polygraph show no differences. Which is expected since
coadvisor does not test RFC 7230 edge cases (yet), and polygraph is not
stressing incremental parse capabilities.

10 years agoext_ldap_group_acl:fix man(8) page documentation
Amos Jeffries [Tue, 10 Feb 2015 21:10:03 +0000 (13:10 -0800)] 
ext_ldap_group_acl:fix man(8) page documentation

10 years agoBug 4073: Cygwin compile errors
Eldar Akchurin [Tue, 10 Feb 2015 03:44:32 +0000 (19:44 -0800)] 
Bug 4073: Cygwin compile errors

Remove the definition of _SQUID_WINDOWS_ for Cygwin builds. The blend
of win32 and Linux environments is sufficiently different to have major
build issues. We have a precedent in kFreeBSD blend of BSD and Linux to
consider Cygwin a blend and first-class OS.

Also, temporarily disable the Win32-specific libraries and objects until
they can be properly tested.

Fix some small remaining compile errors after the above.

 Cygwin Windows build is sponsored by Diladele B.V.

10 years agoWindows: fix build errors after rev.13867
Amos Jeffries [Mon, 9 Feb 2015 18:12:51 +0000 (10:12 -0800)] 
Windows: fix build errors after rev.13867

10 years agoSourceFormat Enforcement
Source Maintenance [Mon, 9 Feb 2015 18:12:05 +0000 (18:12 +0000)] 
SourceFormat Enforcement

10 years agoSNI information is not set on transparent bumping mode
Christos Tsantilas [Mon, 9 Feb 2015 16:13:27 +0000 (18:13 +0200)] 
SNI information is not set on transparent bumping mode

Forward SNI (obtained from an intercepted client connection) to servers
when SslBump peeks or stares at the server certificate.

SslBump was not forwarding SNI to servers when Squid obtained SNI from an
intercepted client while peeking (or staring) at client Hello.

This is a Measurement Factory project

10 years agoMerge from trynk rev.13918
Amos Jeffries [Mon, 9 Feb 2015 13:56:23 +0000 (05:56 -0800)] 
Merge from trynk rev.13918

10 years agoBug 4176: Digest auth too many helper lookups
Amos Jeffries [Sun, 8 Feb 2015 11:40:30 +0000 (03:40 -0800)] 
Bug 4176: Digest auth too many helper lookups