]> git.ipfire.org Git - thirdparty/squid.git/log
thirdparty/squid.git
8 years agoFix memory leak of lastAclData
Nathan Hoad [Fri, 11 Mar 2016 15:03:20 +0000 (04:03 +1300)] 
Fix memory leak of lastAclData

8 years agoCleanup: improved EUI debugging
Amos Jeffries [Thu, 10 Mar 2016 14:46:28 +0000 (03:46 +1300)] 
Cleanup: improved EUI debugging

8 years agoFix memory leak of HttpRequest objects
Nathan Hoad [Thu, 10 Mar 2016 06:55:17 +0000 (19:55 +1300)] 
Fix memory leak of HttpRequest objects

8 years agoCleanup: remove last goto in libsslsquid
Amos Jeffries [Mon, 7 Mar 2016 16:03:45 +0000 (05:03 +1300)] 
Cleanup: remove last goto in libsslsquid

8 years agoSquid crashes on shutdown while cleaning up idle ICAP connections.
Christos Tsantilas [Thu, 3 Mar 2016 00:49:45 +0000 (13:49 +1300)] 
Squid crashes on shutdown while cleaning up idle ICAP connections.

The global Adaptation::Icap::TheConfig object is automatically
destroyed when Squid exits. Its destructor destroys Icap::ServiceRep
objects that, in turn, close all open connections in the idle
connections pool. Since this happens after comm_exit has destroyed all
Comm structures associated with those connections, Squid crases.

This is a Measurement Factory project.

8 years agoImplement sbuf/forward.h and use it
Francesco Chemolli [Wed, 2 Mar 2016 09:47:11 +0000 (10:47 +0100)] 
Implement sbuf/forward.h and use it

8 years agoMake use of sbuf/forward.h
Francesco Chemolli [Tue, 1 Mar 2016 16:19:49 +0000 (17:19 +0100)] 
Make use of sbuf/forward.h

8 years agoSort sbuf/Makefile.am
Francesco Chemolli [Tue, 1 Mar 2016 15:52:09 +0000 (16:52 +0100)] 
Sort sbuf/Makefile.am

8 years agoadd sbuf/forward.h
Francesco Chemolli [Tue, 1 Mar 2016 15:51:56 +0000 (16:51 +0100)] 
add sbuf/forward.h

8 years agoRename files in sbuf/ to better adhere to standards
Francesco Chemolli [Tue, 1 Mar 2016 10:37:15 +0000 (11:37 +0100)] 
Rename files in sbuf/ to better adhere  to standards

8 years agoMerged from trunk
Francesco Chemolli [Tue, 1 Mar 2016 10:35:55 +0000 (11:35 +0100)] 
Merged from trunk

8 years agoSource maintenance
Francesco Chemolli [Tue, 1 Mar 2016 10:25:13 +0000 (11:25 +0100)] 
Source maintenance

8 years agoRename sbuf/SBufList and sbuf/SBufStream
Francesco Chemolli [Tue, 1 Mar 2016 09:58:44 +0000 (10:58 +0100)] 
Rename sbuf/SBufList and sbuf/SBufStream

8 years agoRFC 7725: Add registry entry for 451 status text
Amos Jeffries [Tue, 1 Mar 2016 02:57:50 +0000 (15:57 +1300)] 
RFC 7725: Add registry entry for 451 status text

While Squid does not generate these messages automatically we still have
to relay the status line text accurately, and admin may want to use it
for deny_info status.

8 years agoBug 4447:FwdState.cc:447 "serverConnection() == conn" assertion, part2
Christos Tsantilas [Mon, 29 Feb 2016 20:00:34 +0000 (22:00 +0200)] 
Bug 4447:FwdState.cc:447 "serverConnection() == conn" assertion, part2

Fix to allow make check  work again.

8 years agoBug 4447:FwdState.cc:447 "serverConnection() == conn" assertion
Christos Tsantilas [Mon, 29 Feb 2016 18:43:03 +0000 (20:43 +0200)] 
Bug 4447:FwdState.cc:447 "serverConnection() == conn" assertion

After certain failures, FwdState::retryOrBail() may be called twice,
once from FwdState::unregisterdServerEnd() [called from
HttpStateData::swanSong()] and once from the FwdState's own connection
close handler. This may result in two concurrent connections to the
remote server, followed by an assertion upon a connection closure.

This patch:

 - After HttpStateData failures, instead of closing the squid-to-peer
   connection directly (and, hence, triggering closure handlers), calls
   HttpStateData::closeServer() and mustStop() for a cleaner exit with
   fewer wasteful side effects and better debugging.

 - Creates and remembers a FwdState close handler AsyncCall so that
   comm_remove_close_handler() can cancel an already scheduled callback.
   The conversion to the AsyncCall was necessary because legacy [close
   handler callbacks] cannot be canceled once scheduled.

This is a Measurement Factory project.

8 years agoMerged from trunk
Francesco Chemolli [Mon, 29 Feb 2016 10:33:39 +0000 (11:33 +0100)] 
Merged from trunk

8 years agoRename some files in sbuf/ and apply include paths consistently
Francesco Chemolli [Mon, 29 Feb 2016 10:11:37 +0000 (11:11 +0100)] 
Rename some files in sbuf/ and apply include paths consistently

8 years agoSourceFormat Enforcement
Source Maintenance [Sun, 28 Feb 2016 12:12:11 +0000 (12:12 +0000)] 
SourceFormat Enforcement

8 years agoDocs: release notes update
Marcos Mello [Sun, 28 Feb 2016 11:03:39 +0000 (00:03 +1300)] 
Docs: release notes update

8 years agoCleanup: separate SBufStats from SBuf.h
Amos Jeffries [Sun, 28 Feb 2016 07:49:02 +0000 (20:49 +1300)] 
Cleanup: separate SBufStats from SBuf.h

8 years agoRemove most *_DEPENDENCIES clauses from src/Makefile.am, they are not necessary
Francesco Chemolli [Sat, 27 Feb 2016 09:26:00 +0000 (10:26 +0100)] 
Remove most *_DEPENDENCIES clauses from src/Makefile.am, they are not necessary

8 years agorename SBufStringConvert.h to StringConvert.h
Francesco Chemolli [Fri, 26 Feb 2016 16:45:24 +0000 (17:45 +0100)] 
rename SBufStringConvert.h to StringConvert.h

8 years agorenamed SBufExceptions to sbuf/Exceptions
Francesco Chemolli [Fri, 26 Feb 2016 16:36:24 +0000 (17:36 +0100)] 
renamed SBufExceptions to sbuf/Exceptions

8 years agorenamed SBufDetailedStats.h to sbuf/DetailedStats.h
Francesco Chemolli [Fri, 26 Feb 2016 15:53:52 +0000 (16:53 +0100)] 
renamed SBufDetailedStats.h to sbuf/DetailedStats.h

8 years agorenamed sbuf/SBufAlgos.h to sbuf/Algorithms.h
Francesco Chemolli [Fri, 26 Feb 2016 15:44:19 +0000 (16:44 +0100)] 
renamed sbuf/SBufAlgos.h to sbuf/Algorithms.h

8 years agoMerged from trunk
Francesco Chemolli [Fri, 26 Feb 2016 15:18:52 +0000 (16:18 +0100)] 
Merged from trunk

8 years agoSourceFormat Enforcement
Source Maintenance [Fri, 26 Feb 2016 00:11:57 +0000 (00:11 +0000)] 
SourceFormat Enforcement

8 years agoRefactor SBuf into own library and simplify link time dependencies
Francesco Chemolli [Thu, 25 Feb 2016 21:30:10 +0000 (22:30 +0100)] 
Refactor SBuf into own library and simplify link time dependencies

8 years agoImplement audit suggestions
Francesco Chemolli [Thu, 25 Feb 2016 18:01:29 +0000 (19:01 +0100)] 
Implement audit suggestions

8 years agoMerged from trunk
Francesco Chemolli [Thu, 25 Feb 2016 16:49:08 +0000 (17:49 +0100)] 
Merged from trunk

8 years agoavoid unnecessary SBuf copies
Francesco Chemolli [Thu, 25 Feb 2016 16:44:46 +0000 (17:44 +0100)] 
avoid unnecessary SBuf copies

8 years agoFix include paths in some unit tests
Francesco Chemolli [Thu, 25 Feb 2016 16:43:51 +0000 (17:43 +0100)] 
Fix include paths in some unit tests

8 years agoavoid unnecessary SBuf copies
Francesco Chemolli [Thu, 25 Feb 2016 16:43:21 +0000 (17:43 +0100)] 
avoid unnecessary SBuf copies

8 years agoImprove documentation
Francesco Chemolli [Thu, 25 Feb 2016 16:34:29 +0000 (17:34 +0100)] 
Improve documentation

8 years agoShuffle libbase in its proper order, fix formatting, remove some unneeded files
Francesco Chemolli [Thu, 25 Feb 2016 16:11:03 +0000 (17:11 +0100)] 
Shuffle libbase in its proper order, fix formatting, remove some unneeded files

8 years agoRemoved spurious file in libsbuf SOURCES
Francesco Chemolli [Thu, 25 Feb 2016 15:57:10 +0000 (16:57 +0100)] 
Removed spurious file in libsbuf SOURCES

8 years agoRemove some _DEPENDENCIES declarations for unit tests
Francesco Chemolli [Thu, 25 Feb 2016 15:50:26 +0000 (16:50 +0100)] 
Remove some _DEPENDENCIES declarations for unit tests

8 years agoRemoved unnecessary stubs from unit tests
Francesco Chemolli [Thu, 25 Feb 2016 14:59:21 +0000 (15:59 +0100)] 
Removed unnecessary stubs from unit tests

8 years agoRemoved unnecessary stubs from unit tests
Francesco Chemolli [Thu, 25 Feb 2016 13:18:24 +0000 (14:18 +0100)] 
Removed unnecessary stubs from unit tests

8 years agoBug 4450: wait() related cleanup
Marcos Mello [Thu, 25 Feb 2016 01:52:52 +0000 (14:52 +1300)] 
Bug 4450: wait() related cleanup

8 years agoDocs: release notes about process manager changes
Amos Jeffries [Thu, 25 Feb 2016 00:16:34 +0000 (13:16 +1300)] 
Docs: release notes about process manager changes

8 years agoBug 3826: Add --foreground option to fix -z process behaviour
Marcos Mello [Wed, 24 Feb 2016 23:55:48 +0000 (12:55 +1300)] 
Bug 3826: Add --foreground option to fix -z process behaviour

8 years agoMove SBuf<->String conversion to own header.
Francesco Chemolli [Wed, 24 Feb 2016 18:12:43 +0000 (19:12 +0100)] 
Move SBuf<->String conversion to own header.

8 years agoRemove SBUF_SOURCE from src/Makefile.am
Francesco Chemolli [Wed, 24 Feb 2016 12:35:14 +0000 (13:35 +0100)] 
Remove SBUF_SOURCE from src/Makefile.am

8 years agoMove SBufDetailedStats to src/sbuf
Francesco Chemolli [Wed, 24 Feb 2016 12:16:16 +0000 (13:16 +0100)] 
Move SBufDetailedStats to src/sbuf

8 years agoBug 3826: SMP compatibility with systemd
Marcos Mello [Tue, 23 Feb 2016 22:27:43 +0000 (11:27 +1300)] 
Bug 3826: SMP compatibility with systemd

** These changes require capabilities changes specific to Squid-4 and
   require systemd 209+

NOTE: 'squid -z' command does not yet support SMP with systemd.

Differences from the Squid-3 tools/systemd/squid.service:

- After=nss-lookup.target, for people running a local DNS server like BIND.
  Since there is no requirement dependency, it is a NOP when no such
  service is running.

- Type=forking and squid without -N in ExecStart: SMP now works.

- PIDFile=/var/run/squid.pid to tell systemd what pid is the main one. This
  is actually optional with Squid 4, because systemd will consider its first
  child as the main pid. But let's be safe. DEFAULT_PID_FILE could be used
  here with proper autoconf/automake magic...

- ExecReload calls kill rather than 'squid -k reconfigure'. systemd already
  knows the main pid.

- KillMode=mixed. The old KillMode=process sends SIGTERM (and SIGKILL after
  TimeoutStopSec) only to main daemon process. 'mixed' OTOH sends SIGTERM
  only to main process, but SIGKILL to all services' cgroup processes after
  timeout. With 'mixed' systemd ensures if daemon shutdown fails it will
  clean up all the remains. 'mixed' requires systemd >= 209.

8 years ago4.0.7 SQUID_4_0_7
Amos Jeffries [Tue, 23 Feb 2016 17:40:44 +0000 (06:40 +1300)] 
4.0.7

8 years agoPrep for 4.0.7 and 3.5.15
Amos Jeffries [Tue, 23 Feb 2016 16:16:32 +0000 (05:16 +1300)] 
Prep for 4.0.7 and 3.5.15

8 years agoinitial version of libsbuf
Francesco Chemolli [Tue, 23 Feb 2016 08:51:22 +0000 (09:51 +0100)] 
initial version of libsbuf

8 years agoauthor: "William Lima" <william.lima@hscbrasil.com.br>
Christos Tsantilas [Mon, 22 Feb 2016 18:01:23 +0000 (20:01 +0200)] 
author: "William Lima" <william.lima@hscbrasil.com.br>
Fix memory leak when the cache of sslcrtvalidator_program is disabled via ttl=0

8 years agoLog noise reduction: No eCAP debugging messages at DBG_IMPORTANT level.
Alex Rousskov [Sun, 21 Feb 2016 18:07:04 +0000 (11:07 -0700)] 
Log noise reduction: No eCAP debugging messages at DBG_IMPORTANT level.

8 years agoMacOS fix: shorten testRock store path to fit in shm segment filename size limitation...
Francesco Chemolli [Sun, 21 Feb 2016 08:53:50 +0000 (09:53 +0100)] 
MacOS fix: shorten testRock store path to fit in shm segment filename size limitations; change some tools.cc stubs into nops

8 years agoSourceFormat Enforcement
Source Maintenance [Sat, 20 Feb 2016 00:12:02 +0000 (00:12 +0000)] 
SourceFormat Enforcement

8 years agoFix propagation of response status line parsing error details.
Alex Rousskov [Fri, 19 Feb 2016 21:26:00 +0000 (14:26 -0700)] 
Fix propagation of response status line parsing error details.

This is a follow-up patch to trunk r14548 (Bug 4432). Now that the
calling code is using the right field to get the parsing error details
(parseStatusCode), we need to fix the code that sets those parsing error
details [in case of response status line parsing errors].

TODO: To minimize chances of similar "I forgot to set parseStatusCode"
bugs slipping through, hide that data member behind a method that
returns scInvalidHeader (or a new scInternalSquidError) if parseError_
is still zero. Rename parseStatusCode to parseError_ and stop confusing
it with the response status code.

8 years agoThrow instead of asserting on some String overflows.
Alex Rousskov [Fri, 19 Feb 2016 21:23:08 +0000 (14:23 -0700)] 
Throw instead of asserting on some String overflows.

Note that Client-caught exceptions result in HTTP 500 (Internal Server
Error) responses with X-Squid-Error set to "ERR_CANNOT_FORWARD 0".

Also avoid stuck Client jobs on exceptions. See trunk r8266 for a
similar fix with a detailed discussion. Here, I added doneWithFwd
instead of setting fwd to NULL because we dereference fwd (and store
pointers to things stored in fwd!) in many places. I think it is too
risky to just clear refcounted FwdState pointer (except in the
destructor where doing so is pointless).

Using doneWithFwd correctly is difficult because there are many ways we
can be "done" with FwdState, including:

    * calling fwd->complete(),
    * calling fwd->handleUnregisteredServerEnd(), and
    * closing the connection that FwdState monitors for closures.

The latter is especially tricky case because the closing is initiated in
many places, the process is asynchronous, and not all control
connections are monitored by FwdState.

For example, the updated control connection closure handler assumes that
it is being used for either external closures or internal closures
incorrectly used instead of mustStop()/abortAll(). In both cases, either
FwdState is still monitoring the connection (OK) or we forgot to call
one of its "done" methods listed above before closing. The latter would
be a bug, but I did not find any signs of it and fixing it would be
outside this change scope anyway.

Also unified String size limit checks [that I could find].

8 years agoexternal_acl parameters separated by %20 instead of space
Christos Tsantilas [Fri, 19 Feb 2016 17:19:25 +0000 (19:19 +0200)] 
external_acl parameters separated by %20 instead of space

If an external ACL is configured with more than one parameter as shown
in the example below, then Squid sends those parameters to the
external_acl helper separated by %20 characters instead of spaces:

  acl TEST external ACLTYPE param1=val1 param2=val2

This change fixes regression introduced in trunk r14351 (Support
logformat %macros in external_acl_type format) but more work may
be needed to make Squid behave as squid.conf.documented promises.

This is a Measurement Factory project.

8 years agoRevert r14303: Migrate StoreEntry to using MEMPROXY_CLASS
Amos Jeffries [Fri, 19 Feb 2016 15:06:42 +0000 (04:06 +1300)] 
Revert r14303: Migrate StoreEntry to using MEMPROXY_CLASS

This change has been identified as the trigger for several object caching
errors. The real cause is not yet known, but reverting this optimisation
avoids it, so is being done for stability.

This resolves bugs 4370 and maybe also 4354 and 4355

8 years agoBug 3870: assertion failed: String.cc: 'len_ + len <65536' in ESI::CustomParser
William Lima [Thu, 18 Feb 2016 12:48:08 +0000 (01:48 +1300)] 
Bug 3870: assertion failed: String.cc: 'len_ + len <65536' in ESI::CustomParser

The custom ESI parser used in absence of libxml2 or libexpat parsers was
restricted to handling 64KB buffers but under some conditions could expand
to over 64KB during the parse process. Hitting this assertion.

TODO: the parser can now be redesigned to make use of Tokenizer and
      CharacterSet parsing tools. But that is left for later work.

8 years agoBug 4432: assertion failed: store.cc:1919: "isEmpty()"
Alex Rousskov [Thu, 18 Feb 2016 04:11:36 +0000 (21:11 -0700)] 
Bug 4432: assertion failed: store.cc:1919: "isEmpty()"

When we failed to parse a response:

* Do not use parsing leftovers, such as HTTP response status code. Doing
  so screws up error detection logic in continueAfterParsingHeader() and
  leads to stuck transactions instead of error responses.

* Do not store the fake half-baked response (via replaceHttpReply).
  Doing so leads to assertions.  The fake response is only meant for
  continueAfterParsingHeader().

I also removed a misleading XXX about connection closure. Our
continueAfterParsingHeader() handles errors, not processReplyHeader().

TODO: The error detection/propagation code is ugly and should be
rewritten [using C++ exceptions].

8 years agoBug 4111: leave_suid() does not properly handle error codes returned by setuid
tangqinghao [Thu, 18 Feb 2016 02:48:41 +0000 (15:48 +1300)] 
Bug 4111: leave_suid() does not properly handle error codes returned by setuid

... this will cause privilege escalation in the rare case that setuid fails.
So far there are no known cases of this happening when downgrading from root.

Also fixes several incorrect uses of errno which may have been obscuring
error message details if it did happen.

8 years agoSourceLayout: Move the Runner which manages SSL SessionCache to libsecurity
Amos Jeffries [Wed, 17 Feb 2016 21:03:29 +0000 (10:03 +1300)] 
SourceLayout: Move the Runner which manages SSL SessionCache to libsecurity

Unfortunately the OpenSSL session cache callbacks cannot also be moved
due to circular dependency issues. However, when those are resolved by
later libsecurity API additions the callbacks will be much easier to
shift. For now the three symbols shared between the two libraries are
exposed by libsslsquid in the Ssl:: namespace.

Cache initialization is now moved into the Runner. Binding its state
initialization more tightly to the memory allocation and initialization.
Which also removes the need for explicit main.cc dependency.

One issue was uncovered during this:

* While ssl/support.h was defining a destruct_session_cache() function
that appeared to release the cache memory, it was not actually being
used anywhere. Which unless a fortuitous sequence of events is happening
means that the memory for the cache entries may not be released properly.
On the other hand the cache should only be erased on shutdown so the
effects of this are minor.

The unused function has been removed and the issue is now expicitly
noted in the Runner shutdown handling method for future investigation.

8 years ago4.0.6 SQUID_4_0_6
Amos Jeffries [Mon, 15 Feb 2016 15:53:15 +0000 (04:53 +1300)] 
4.0.6

8 years agoPrep for 4.0.6 and 3.5.14
Amos Jeffries [Mon, 15 Feb 2016 11:40:22 +0000 (00:40 +1300)] 
Prep for 4.0.6 and 3.5.14

8 years agoFix compile error in CPU affinity
Amos Jeffries [Mon, 15 Feb 2016 06:59:09 +0000 (19:59 +1300)] 
Fix compile error in CPU affinity

struct cpu_set_t may be defined (eg on Hurd) even if the CPU affinity API
is not fully existing, or a non-working stub.

8 years agoDocs: Fix many mentions of ssl_crtd
Amos Jeffries [Sat, 13 Feb 2016 16:10:26 +0000 (05:10 +1300)] 
Docs: Fix many mentions of ssl_crtd

8 years agoBug 4436: Fix DEFAULT_SSL_CRTD
Marcos Mello [Sat, 13 Feb 2016 16:09:01 +0000 (05:09 +1300)] 
Bug 4436: Fix DEFAULT_SSL_CRTD

8 years agoSourceFormat Enforcement
Source Maintenance [Sat, 13 Feb 2016 12:12:10 +0000 (12:12 +0000)] 
SourceFormat Enforcement

8 years agoCert Validation memory leaks
Christos Tsantilas [Sat, 13 Feb 2016 07:51:20 +0000 (09:51 +0200)] 
Cert Validation memory leaks

In the case SSL errors detected by certificate validator helper the objects
stored in Ssl::ServerBump::sslErrors  member and will never released.
This member normally points to an Ssl::CertErrors list attached to the related
SSL object which is responsible to release this list.
When the cert validator detects errors a new errors list created and attached
to the related Ssl::ServerBump::sslErrors member but the SSL objects still
hold the old one. The old list released but not the new one.

This patch also fixes the case the cbdata protected  Ssl::CertErrors list,
still is used through the related Ssl::ServerBump object but it is not valid
any more, because the SSL object which hold it gone.

This patch instead of storing the Ssl::CertErrors list to Ssl::ServerBump
object stores the SSL object and increases its reference to avoid be released

This is a Measurement Factory project

8 years agoBug 4437: Fix Segfault on Certain SSL Handshake Errors
Christos Tsantilas [Sat, 13 Feb 2016 05:44:58 +0000 (18:44 +1300)] 
Bug 4437: Fix Segfault on Certain SSL Handshake Errors

Squid after an unsuccesfull try to connect to the remote server may make two
concurrent retries to connect to the remote SSL server, calling twice the
FwdState::retryOrBail() method, which may result to unexpected behaviour.

Prevent this by just closing the connection to the remote SSL server inside
FwdState::connectedToPeer method on error and instead of calling the
FwdState::retryOrBail method, just allow comm_close handler to retry the
connection if required.

  This is a Measurement Factory project

8 years agoFix %un logging external ACL username
Amos Jeffries [Fri, 12 Feb 2016 16:24:48 +0000 (05:24 +1300)] 
Fix %un logging external ACL username

8 years agoFix "dial: Ssl::PeerConnector::sslCrtvdHandleReply threw exception: callback != NULL"
Christos Tsantilas [Fri, 12 Feb 2016 10:45:47 +0000 (12:45 +0200)] 
Fix "dial: Ssl::PeerConnector::sslCrtvdHandleReply threw exception: callback != NULL"

This bug investigated after the r14528 patch.
The (forgotten?) Ssl::PeekingPeerConnector::callback member is always NULL and
hides the callback member of the parent Ssl::PeerConnector class. This is has
as result the failure of "Must(callback != NULL)" clause inside the
Ssl::PeekingPeerConnector::tunnelInsteadOfNegotiating method investigated with
the r14528 patch.

This is a Measurement Factory project

8 years agoBug 4431: C code is not compiled with CFLAGS
Marcos Mello [Fri, 12 Feb 2016 04:49:39 +0000 (17:49 +1300)] 
Bug 4431: C code is not compiled with CFLAGS

8 years agoFix mgr:config report 'qos_flows mark' output
Yuriy M. Kaminskiy [Wed, 10 Feb 2016 10:57:30 +0000 (23:57 +1300)] 
Fix mgr:config report 'qos_flows mark' output

8 years agoCleanup: const correctness for SBuf iterators
Amos Jeffries [Wed, 10 Feb 2016 09:36:47 +0000 (22:36 +1300)] 
Cleanup: const correctness for SBuf iterators

The SBuf iterator has almost all properties of a const_iterator but the
begin/end methods producing it had the syntax for returning a non-const
iterator. This leads to several const related problems despite the
SBufIterator providing a const API:

 1) range-for loops cannot be used on const SBuf
 2) begin/end/rbegin/rend operators cannot be used on const SBuf

Also, the SBufIterator API for operator*() used a temporary char
which, wile const, allows the compiler to implicitly use move semantics
on the return value and allows some (thankfully unused) &*itr() syntax
to compile when it should not be possible.
To avoid even the potential of that causing hidden issues in future we
convert the operator*() to the API definition used widely within the STL
const_iterator's (const char &operator*() const).

8 years ago4.0.5 SQUID_4_0_5
Amos Jeffries [Wed, 10 Feb 2016 06:56:37 +0000 (19:56 +1300)] 
4.0.5

8 years agoBug 4429: http(s)_port options= error message missing characters
Amos Jeffries [Tue, 9 Feb 2016 13:35:45 +0000 (02:35 +1300)] 
Bug 4429: http(s)_port options= error message missing characters

8 years agoCleanup: convenience library renaming
Amos Jeffries [Tue, 9 Feb 2016 08:57:33 +0000 (21:57 +1300)] 
Cleanup: convenience library renaming

I have been trying to automate graphing of the Squid internal
dependencies. One of the major issues that has encountered is that some
of our convenience libraries use the '-' hyphen character which is a
reserved character in DOT graph format.

To make the scripts much simpler and the visual output reflect exactly
what the library names are this patch cleans up the libraries to follow
our pre-existing policy, and now also to remove punctuation from library
names. Which condition has been added to the guidelines documentation.

8 years agoSourceFormat Enforcement
Source Maintenance [Mon, 8 Feb 2016 18:12:05 +0000 (18:12 +0000)] 
SourceFormat Enforcement

8 years agoFixed step3 splicing.
Christos Tsantilas [Mon, 8 Feb 2016 17:44:43 +0000 (19:44 +0200)] 
Fixed step3 splicing.

The information about PeekingPeerConnector splicing the connections
was lost in some cases, resulting in two different bugs:

 - With a certificate validator, the PeekingPeerConnector class calls
   back FwdState, which calls the ConnStateData class, which then tries
   secure the connection with the already tunneled SSL client and
   closes the connection on negotiating errors.

 - Without a certificate validator, the PeekingPeerConnector class
   never calls FwdState class, and both PeekingPeerConnector and
   FwdState objects stall until finishing tunnelState closes server
   and client connections.

Now, PeerConnector always calls FwdState back, marking spliced
connections as such. This has the following positive side-effects:

 - When FwdState learns about spliced connections, it does not call
   ConnStateData back. Instead, it terminates and gets destroyed.
   The tunnel continues uninterrupted.

 - The PeekingPeerConnector job ends and is destroyed instead of
   waiting to call FwdState.

This is a Measurement Factory project.

8 years agoSwitch SBufIterator to const_iterator
Amos Jeffries [Mon, 8 Feb 2016 11:22:48 +0000 (00:22 +1300)] 
Switch SBufIterator to const_iterator

8 years agoDocs: fix incorrect ssl_bump example
Amos Jeffries [Sun, 7 Feb 2016 01:31:05 +0000 (14:31 +1300)] 
Docs: fix incorrect ssl_bump example

8 years agoCleanup: remove several C-style casts from libcompat
Amos Jeffries [Fri, 5 Feb 2016 10:53:29 +0000 (23:53 +1300)] 
Cleanup: remove several C-style casts from libcompat

8 years agoBug 4419: SIGSEGV crash in HierarchyLogEntry::note after r14505
Amos Jeffries [Tue, 2 Feb 2016 21:35:33 +0000 (10:35 +1300)] 
Bug 4419: SIGSEGV crash in HierarchyLogEntry::note after r14505

8 years agoFix external_acl problems after trunk r14351
Christos Tsantilas [Tue, 2 Feb 2016 15:39:23 +0000 (17:39 +0200)] 
Fix external_acl problems after trunk r14351
(Support logformat %macros in external_acl_type format).

The above changes created the following problems:
 - external_acl requires AccessLogEntry but ALE is not available
   in many cases such as ssl_bump ACLs.
 - The %<cert_subject stopped working because it was supported by
   external_acl code and not by logformat code.

This patch:
  - Passes AccessLogEntry in most cases.
    For example, PeerConnector-related classes are now covered.
  - Implements the %<cert_subject formating code for logformat.

This is a Measurement Factory project.

8 years agoAdd missed file rename for ssl_crtd.cc
Amos Jeffries [Tue, 2 Feb 2016 06:58:18 +0000 (19:58 +1300)] 
Add missed file rename for ssl_crtd.cc

8 years agoFix various build issues in security helpers
Amos Jeffries [Tue, 2 Feb 2016 06:35:09 +0000 (19:35 +1300)] 
Fix various build issues in security helpers

* Fix incorrect build of security_file_certgen helper when OpenSSL disabled

* Remove unnecessary '-helper' from --enable-security-cert-validator-helpers

8 years agoSourceLayout: rename ssl_crtd helper to security_file_certgen
Amos Jeffries [Mon, 1 Feb 2016 11:52:03 +0000 (00:52 +1300)] 
SourceLayout: rename ssl_crtd helper to security_file_certgen

* Add --enable-security-cert-generators="..." option to build
  sslcrtd_program helpers

* Separate --enable-ssl-crtd from helper build and install

* Shuffle ssl_crtd to src/security/cert_generators and rename
  to reflect its helper interface and filesystem backend.

Squid binary or helper binary logic changes in this. Just
./configure build system logic changes.

8 years agoSourceFormat Enforcement
Source Maintenance [Mon, 1 Feb 2016 06:11:54 +0000 (06:11 +0000)] 
SourceFormat Enforcement

8 years agoAdd missing include after rev.14518
Amos Jeffries [Mon, 1 Feb 2016 04:09:11 +0000 (17:09 +1300)] 
Add missing include after rev.14518

8 years agoSourceLayout: rename ClientSocketContext to Http::Stream
Amos Jeffries [Sun, 31 Jan 2016 12:05:30 +0000 (01:05 +1300)] 
SourceLayout: rename ClientSocketContext to Http::Stream

 ... and provided through http/libsquid-http.la.

The name is chosen to match the RFC7540 HTTP/2 "stream" terminology.
Which defines a stream as a bi-directional transaction, including request,
reply and all related 1xx informational and/or control messages.

That same word "stream" is also used in RFC7230 briefly to describe the
same "transaction" scope and details. But not formalized until RFC7540.

Http::Stream's may be initiated by a client HTTP request, Squid internally,
or in HTTP/2 a server PUSH_PROMISE frame.

There are no logic changes in this. Just symbol renaming and move.

8 years agoSourceFormat Enforcement
Source Maintenance [Sat, 30 Jan 2016 12:11:55 +0000 (12:11 +0000)] 
SourceFormat Enforcement

8 years agoSourceLayout: merge helpers/ into src/
Amos Jeffries [Sat, 30 Jan 2016 10:41:37 +0000 (23:41 +1300)] 
SourceLayout: merge helpers/ into src/

* Move helpers/basic_auth/ into src/auth/basic/

* Move helpers/digest_auth/ into src/auth/digest/

* Move helpers/external_acl/ into src/acl/external/

* Move helpers/log_daemon/ into src/log/

* Move helpers/negotiate_auth/ into src/auth/negotiate/

* Move helpers/ntlm_auth/ into src/auth/ntlm/

* Move helpers/storeid_rewrite/ into src/store/id_rewriters/

* Move helpers/url_rewrite/ into src/http/url_rewriters/

* Rename helpers/defines.h to src/helper/protocol_defines.h

8 years agoRemove helpers reference from top Makefile.am
Amos Jeffries [Sat, 30 Jan 2016 09:09:25 +0000 (22:09 +1300)] 
Remove helpers reference from top Makefile.am

8 years agoMove helpers/defines.h to src/helper/protocol_defines.h
Amos Jeffries [Sat, 30 Jan 2016 06:24:40 +0000 (19:24 +1300)] 
Move helpers/defines.h to src/helper/protocol_defines.h

8 years agoUpdate CREDITS filenames
Amos Jeffries [Sat, 30 Jan 2016 06:19:19 +0000 (19:19 +1300)] 
Update CREDITS filenames

8 years agoSourceLayout: move URL rewriters to src/http/url_rewriters/
Amos Jeffries [Sat, 30 Jan 2016 06:06:40 +0000 (19:06 +1300)] 
SourceLayout: move URL rewriters to src/http/url_rewriters/

8 years agoSourceLayout: move Store-ID helpers to src/store/id_rewriters/
Amos Jeffries [Sat, 30 Jan 2016 05:42:22 +0000 (18:42 +1300)] 
SourceLayout: move Store-ID helpers to src/store/id_rewriters/

8 years agoSourceLayout: move external ACL helpers to src/acl/external/
Amos Jeffries [Sat, 30 Jan 2016 05:13:24 +0000 (18:13 +1300)] 
SourceLayout: move external ACL helpers to src/acl/external/

8 years agoRemove .bzrignore entry for obsolete helper files
Amos Jeffries [Sat, 30 Jan 2016 04:43:50 +0000 (17:43 +1300)] 
Remove .bzrignore entry for obsolete helper files