]> git.ipfire.org Git - thirdparty/squid.git/log
thirdparty/squid.git
11 years agoPeek and Splice: New ACL lists configuration
Christos Tsantilas [Thu, 22 May 2014 12:00:50 +0000 (15:00 +0300)] 
Peek and Splice: New ACL lists configuration

This patch:
  - removes ssl_bump_peeked access list

  - Defines three steps of the SSL bumping processing:
       step1: Get TCP-level and CONNECT info. Evaluate ssl_bump and perform
              the first matching action (splice, bump, peek, stare, terminate,
              or err)
       step2: Get SSL Client Hello info. Evaluate ssl_bump and perform the
              first matching action (splice, bump, peek, stare, terminate,
              or err). Peeking usually prevents future bumping. Staring
              usually prevents future splicing.
       step3: Get SSL Server Hello info. Evaluate ssl_bump and perform the
              first matching action (splice, bump, terminate, or err).
              In most cases, the only remaining choice at this step is
              whether to terminate the connection. The splicing or bumping
              decision is usually dictated by either peeking or staring at the
              previous step.

  - The ssl_bump ACLs list may evaluated in all SSL Bumping processing steps to
    take a decision for the next step:
       splice or none: Become a TCP tunnel without decoding the connection.
       bump:   Establish a secure connection with the server and, using a
               mimicked server certificate, with the client
       peek:   Receive client (step1) or server (step2) certificate while
               preserving the possibility of splicing the connection. Peeking
               at the server certificate usually precludes future bumping of
               the connection.
       stare:  Receive client (step1) or server (step2) certificate while
               preserving the possibility of bumping the connection. Staring at
               the server certificate usually precludes future splicing of the
               connection.
       terminate or err: Close client and server connections.
    All actions except peek and stare correspond to final decisions: Once an
    ssl_bump directive with a final action matches, no further ssl_bump
    evaluations will take place, regardless of the current processing step.

  - Add the atstep acl to match against SSL bumping step: "step1", "step2" or
    "step3"

Current Implementation details:
---------------------------------

 1) If the "peek" mode selected in step2 then the client hello message
    forwarded to server. If this mode selected in step2 the splice is always
    possible and bump maybe is not possible (in most cases where the client uses
    different SSL client library implementation)

 2) If the "stare" mode selected in step2 then the squid builds a new
    hello message, which try to mimic, if it is possible , client hello message.
    If stare selected in step2 the bump is always possible, but splice maybe is
    not possible any more.

 3) In step3 if bump decided, and bump is not possible any more then squid
    is always splicing.

 4) In step3 if splice decided but splice is not possible any more then
    squid is always bumping.

 5) Because of (3) and (4), in practice, if firefox browser used with
    peek mode, squid always splice the connection, because squid/openSSL
    does not support the firefox SSL features reported in client hello message.

 6) In step2 if ACL list evaluation result to terminate or err then we just
    close client connection. If the check result to ssl-bump then just bump.
    If check result to client-first, server-first, then bump the connection
    else do peek/stare.

 7) In step3 the ssl_bump ACL list evakuation result client-first, server-first,
    bump or peek result to bumping (if bumping is possible).

Example configurations:

acl step1 atstep  Step1
acl step2 atstep  Step2
acl step3 atstep  Step3

ssl_bump peek step1 all
ssl_bump peek step2 all
ssl_bump splice step3 all

11 years agossl_bump_peeked access list
Christos Tsantilas [Tue, 6 May 2014 09:46:07 +0000 (12:46 +0300)] 
ssl_bump_peeked access list

This access list is a temporary solution for peek-and-splice project and used to
take the final decision "bump" or "splice" in peek-and-splice bumping mode.

This is what this patch try to do:
  - Get Client Hello message
  - Start connection.
  - Inside bio, before write the SSL HELLO message, try to emulate client hello
    message:
     a) extract client hello message features
     b) Check if we are able support client features and if not, splicing is not
        able to be supported.
     c) Creates an SSL object to connect to server and try to set it with
        the extracted features.
        This step currently includes many hacks and modify undocumented SSL
        object members.

extensions)
  - in PeerConnector.cc
      a) If can not be spliced do not splice.
      b) check the ssl_bump_peeked access list to splice or not.

11 years agoSplice implementation
Christos Tsantilas [Tue, 6 May 2014 08:07:06 +0000 (11:07 +0300)] 
Splice implementation

Always splice an SSL connection in peek-and-splice SSL bumping mode.

Currently works only if the openSSL version of client and squid are the same
and compiled to support similar set of features

11 years agoFirst implementation of do splice. Works only if the openSSL version of client and...
Christos Tsantilas [Fri, 2 May 2014 15:15:18 +0000 (18:15 +0300)] 
First implementation of do splice. Works only if the openSSL version of client and squid are the same and compiled to support similar set of features

11 years agomerge from trunk
Christos Tsantilas [Fri, 2 May 2014 08:34:46 +0000 (11:34 +0300)] 
merge from trunk

11 years agoBug 1961: pt1: URL handling redesign
Amos Jeffries [Sun, 27 Apr 2014 07:59:17 +0000 (00:59 -0700)] 
Bug 1961: pt1: URL handling redesign

Replace the HttpMsg::protocol member (only used by HttpRequest) with a
class URL member HttpRequest::url. To do this we adjust the class URL
scheme_ member to be mutable via the makeScheme() setter, and add a
clear() method to reset its internal state. These are necessary for
HttpRequest init() and initHTTP() mechanisms, but fiddling with the
scheme should be avoided as much as possible.

Remove the hack of forcing internal requests to http:// for processing
and cache lookup, then to internal:// for FwdState. Instead use the
available flags.internal for requests identified to be served by this proxy.

Drop the non-standard and now meaningless "internal://" scheme.

Add debugging to display what internal indicators are detected and when
the internal*() server and CacheManager are used by FwdState.

Also document HttpMsg::http_ver which is a copy of the HTTP-Version
field in the "on-wire" message syntax. It is unrelated to the socket
transport protocol and the URL scheme protocol.

11 years agoCrypto-NG: require GnuTLS to have version 3.1.5 or later
Amos Jeffries [Fri, 25 Apr 2014 15:14:14 +0000 (09:14 -0600)] 
Crypto-NG: require GnuTLS to have version 3.1.5 or later

11 years agoauthor: Alex Rousskov <rousskov@measurement-factory.com>, Christos Tsantilas <chtsant...
Christos Tsantilas [Fri, 25 Apr 2014 13:38:22 +0000 (16:38 +0300)] 
author: Alex Rousskov <rousskov@measurement-factory.com>, Christos Tsantilas <chtsanti@users.sourceforge.net>
Ssl::PeerConnector class

This patch investigates the new Ssl::PeerConnector class. This class connects
Squid client-side to a SSL cache_peer or SSL server. It is used by
TunnelStateData and FwdState to initiate and establish the SSL connection.
This class handles peer certificate validation.

The caller receives a call back with PeerConnectorAnswer. In the SSL connection
is not established because of an error, an error object suitable for error
response generation is attached to PeerConnectorAnser

The Ssl::PeerConnector class includes the old SSL initialization code from
FwdState class.

This is a Measurement Factory project

11 years agoFix ecap build,it is broken after 13369 patch.
Christos Tsantilas [Fri, 25 Apr 2014 13:37:10 +0000 (16:37 +0300)] 
Fix ecap build,it is broken after 13369 patch.

11 years agoFix bugs in rev.13379
Amos Jeffries [Fri, 25 Apr 2014 10:47:59 +0000 (03:47 -0700)] 
Fix bugs in rev.13379

11 years agoSBuf: convert CARP key from SquidString
Amos Jeffries [Wed, 23 Apr 2014 18:39:04 +0000 (11:39 -0700)] 
SBuf: convert CARP key from SquidString

11 years agoFix cut-n-paste issue in rev.13377
Amos Jeffries [Wed, 23 Apr 2014 15:36:13 +0000 (08:36 -0700)] 
Fix cut-n-paste issue in rev.13377

11 years agoPolish: update urlCanonical to switch instead of if-else
Amos Jeffries [Wed, 23 Apr 2014 14:28:04 +0000 (07:28 -0700)] 
Polish: update urlCanonical to switch instead of if-else

This paves the way fro adding other method dependent canonical URI.
Such as the * URI for TRACE and OPTIONS

11 years agoPrep for 3.4.4.2
Amos Jeffries [Wed, 23 Apr 2014 13:52:13 +0000 (06:52 -0700)] 
Prep for 3.4.4.2

11 years agoPrep for 3.4.4.1
Amos Jeffries [Wed, 23 Apr 2014 12:02:51 +0000 (05:02 -0700)] 
Prep for 3.4.4.1

11 years agoFix typo in documentation of rev.13372
Amos Jeffries [Wed, 23 Apr 2014 05:20:03 +0000 (23:20 -0600)] 
Fix typo in documentation of rev.13372

11 years agoPolish rev.13370
Amos Jeffries [Tue, 22 Apr 2014 16:01:23 +0000 (09:01 -0700)] 
Polish rev.13370

11 years agoBug 3371: CONNECT with data sent at once loses data
Amos Jeffries [Tue, 22 Apr 2014 12:51:21 +0000 (05:51 -0700)] 
Bug 3371: CONNECT with data sent at once loses data

11 years agoFix high_memory_warning parsing
Amos Jeffries [Tue, 22 Apr 2014 05:02:28 +0000 (22:02 -0700)] 
Fix high_memory_warning parsing

The squid.conf parser does not accept whitespace in the IFDEF: parameter
values. This was hiding parse issues when high_memory_warning was used
without gnumalloc.h availability.

Also, sort the cf_gen_defines array alphabetically by IFDEF: value for
easier maintenance.

11 years agoDocs: mention byte units and maximum_object_size/cache_dir relationship
Amos Jeffries [Tue, 22 Apr 2014 04:30:59 +0000 (21:30 -0700)] 
Docs: mention byte units and maximum_object_size/cache_dir relationship

* we are having users configure rounded n MB or n GB values as KB numbers
  unnecessarily from misunderstanding the unit measures. Document which
  units Squid understands to assist simplifying these configs.

* the maximum_object_size directive has been a "toggle" default for
  cache_dir max-size for some time but the dependency of having it
  placed before cache_dir it is supposed to affect has not been
  documented. Add the documentation, and re-order the default config
  directive positions.

11 years agoSBuf: convert HttpMethod internals
Amos Jeffries [Tue, 22 Apr 2014 02:47:09 +0000 (19:47 -0700)] 
SBuf: convert HttpMethod internals

Update the internal string/image representation of an HTTP
method to be an SBuf string. Including the global registered
methods index.

Also,
 * remove RequestMethodStr() wrapper functions
 * remove remainders of obsolete extension_methods feature
 * remove remainders of obsolete RequestMethodStr[] array
 * fix potential cache key error from http/MethodType.h
   enum ordering.
 * polished many debugs involving method

11 years agoSBuf: add methods for comparision directly against a C-string
Amos Jeffries [Mon, 21 Apr 2014 17:14:44 +0000 (10:14 -0700)] 
SBuf: add methods for comparision directly against a C-string

Based on GNU strncasecmp() logics.

Also,
 * improve const-correctness on all SBuf comparision methods
 * add unit tests for the new API methods.

11 years agoTypo in rev.13366
Amos Jeffries [Mon, 21 Apr 2014 15:07:31 +0000 (09:07 -0600)] 
Typo in rev.13366

11 years agoFix outgoing peer type when using ORIGINAL_DST instead of DIRECT
Amos Jeffries [Mon, 21 Apr 2014 12:40:32 +0000 (06:40 -0600)] 
Fix outgoing peer type when using ORIGINAL_DST instead of DIRECT

11 years agoAdd missing piece of Makefile in rev.13364
Amos Jeffries [Mon, 21 Apr 2014 08:27:21 +0000 (01:27 -0700)] 
Add missing piece of Makefile in rev.13364

11 years agoBug 4047: Support Android builds
Amos Jeffries [Mon, 21 Apr 2014 08:23:37 +0000 (01:23 -0700)] 
Bug 4047: Support Android builds

11 years agoTrigger finishShutdown runners event before pooled memory is released
Amos Jeffries [Mon, 21 Apr 2014 05:13:31 +0000 (22:13 -0700)] 
Trigger finishShutdown runners event before pooled memory is released

This allows runner destructors to operate their cleanup even if the
component memory they are cleaning up is pooled.

11 years agosquidclient: rename --tls to --https
Amos Jeffries [Sat, 19 Apr 2014 12:12:06 +0000 (00:12 +1200)] 
squidclient: rename --tls to --https

11 years agoAdd missing include in rev.13360 on CentOS
Amos Jeffries [Fri, 18 Apr 2014 18:15:35 +0000 (11:15 -0700)] 
Add missing include in rev.13360 on CentOS

11 years agosquidclient: Support TLS for testing https:// URLs and HTTPS servers
Amos Jeffries [Fri, 18 Apr 2014 15:47:24 +0000 (08:47 -0700)] 
squidclient: Support TLS for testing https:// URLs and HTTPS servers

Also adds detection of the GnuTLS library which is used to provide this
squidclient feature.

11 years agoFixed PortCfg.transport setting broken in r12961
Alex Rousskov [Wed, 16 Apr 2014 21:58:08 +0000 (15:58 -0600)] 
Fixed PortCfg.transport setting broken in r12961
"Update the http(s)_port directives protocol= parameter"

The port protocol became PROTO_HTTP regardless of the protocol name passed
by the caller. The other allowed value (PROTO_HTTPS) could not be set.

11 years agoFixed syntax error in r13155 "Support libecap v1.0".
Alex Rousskov [Wed, 16 Apr 2014 21:22:12 +0000 (15:22 -0600)] 
Fixed syntax error in r13155 "Support libecap v1.0".

No idea why only some compilers detect this error.

11 years agoEncapsulated commonly reused ToS and NfMark code into GetMarkingsToServer(), par
Christos Tsantilas [Wed, 16 Apr 2014 17:40:17 +0000 (20:40 +0300)] 
Encapsulated commonly reused ToS and NfMark code into GetMarkingsToServer(), par
t2

Use the FwdState.h include file instead of redefining  GetTosToServer and GetNfmarkToServer to each .cc file they are used.

11 years agoauthor: Alex Rousskov <rousskov@measurement-factory.com>
Christos Tsantilas [Mon, 14 Apr 2014 17:01:18 +0000 (20:01 +0300)] 
author: Alex Rousskov <rousskov@measurement-factory.com>
Encapsulated commonly reused ToS and NfMark code into GetMarkingsToServer()

11 years agoMade storeid_file_rewrite support concurrency protocol
Francesco Chemolli [Mon, 14 Apr 2014 13:50:27 +0000 (15:50 +0200)] 
Made storeid_file_rewrite support concurrency protocol

11 years agoBug 3955: Solaris EUI-48 lookup leaks FDs
Paul Z [Mon, 14 Apr 2014 06:57:22 +0000 (18:57 +1200)] 
Bug 3955: Solaris EUI-48 lookup leaks FDs

11 years agoBug 3982: EUI logging and helpers show blank MAC address
Amos Jeffries [Mon, 14 Apr 2014 06:50:31 +0000 (18:50 +1200)] 
Bug 3982: EUI logging and helpers show blank MAC address

Also,
 * improved debugging of EUI processing.
 * fixed code correctness in EUI class definitions

11 years agoFix IPv6 site-local autoconfigured Address detection
Amos Jeffries [Mon, 14 Apr 2014 05:13:28 +0000 (17:13 +1200)] 
Fix IPv6 site-local autoconfigured Address detection

11 years agoFix c++11-ism in list splicing
Francesco Chemolli [Sat, 12 Apr 2014 19:17:13 +0000 (21:17 +0200)] 
Fix c++11-ism in list splicing

11 years agoFix c++11-ism in list splicing
Francesco Chemolli [Sat, 12 Apr 2014 19:16:46 +0000 (21:16 +0200)] 
Fix c++11-ism in list splicing

11 years agoMerged from trunk
Francesco Chemolli [Sat, 12 Apr 2014 17:44:36 +0000 (19:44 +0200)] 
Merged from trunk

11 years agoUse SBufList instead of wordlist to collect data for mgr:config
Francesco Chemolli [Sat, 12 Apr 2014 17:43:37 +0000 (19:43 +0200)] 
Use SBufList instead of wordlist to collect data for mgr:config

11 years agoReport MemBlob capacity and not size in destruct-time histogram
Francesco Chemolli [Sat, 12 Apr 2014 17:43:07 +0000 (19:43 +0200)] 
Report MemBlob capacity and not size in destruct-time histogram

11 years agoConvert to SBufList some missing acl dump methods
Francesco Chemolli [Sat, 12 Apr 2014 17:32:34 +0000 (19:32 +0200)] 
Convert to SBufList some missing acl dump methods

11 years agoFix broken acl_access dumper
Francesco Chemolli [Sat, 12 Apr 2014 14:50:51 +0000 (16:50 +0200)] 
Fix broken acl_access dumper

11 years agomarked several dump functions as const
Francesco Chemolli [Sat, 12 Apr 2014 13:29:42 +0000 (15:29 +0200)] 
marked several dump functions as const

11 years agoMore conversions; now builds
Francesco Chemolli [Sat, 12 Apr 2014 09:11:20 +0000 (11:11 +0200)] 
More conversions; now builds

11 years agoFormatting fixes, const-ified a SBuf
Francesco Chemolli [Sat, 12 Apr 2014 07:17:08 +0000 (09:17 +0200)] 
Formatting fixes, const-ified a SBuf

11 years agoInterim. Remove useless wordlist.h and SBufList.h includes, more SBufList conversions
Francesco Chemolli [Sat, 12 Apr 2014 07:10:39 +0000 (09:10 +0200)] 
Interim. Remove useless wordlist.h and SBufList.h includes, more SBufList conversions

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.