]> git.ipfire.org Git - thirdparty/squid.git/log
thirdparty/squid.git
9 years ago3.5.0.2 SQUID_3_5_0_2
Amos Jeffries [Fri, 31 Oct 2014 10:56:47 +0000 (03:56 -0700)] 
3.5.0.2

9 years agoPrep for 3.5.0.2 and 3.4.9
Amos Jeffries [Fri, 31 Oct 2014 09:15:45 +0000 (02:15 -0700)] 
Prep for 3.5.0.2 and 3.4.9

9 years agoFix man(8)/man(1) page syntax
Amos Jeffries [Fri, 31 Oct 2014 09:12:50 +0000 (02:12 -0700)] 
Fix man(8)/man(1) page syntax

It seems automated tools such as lroff are not able to parse the groff
syntax accurately for automated indexing of our man pages.

The if-conditional syntax was only used to simplify translators lives
so we can live with the tools preferred 1-liner syntax for the NAME
section.

9 years agoSource Maintenance: bump astyle version to 2.03
Amos Jeffries [Fri, 31 Oct 2014 01:44:11 +0000 (18:44 -0700)] 
Source Maintenance: bump astyle version to 2.03

9 years agoFix: Unable to open FTP socket during reconfigure
Christos Tsantilas [Fri, 31 Oct 2014 01:43:16 +0000 (18:43 -0700)] 
Fix: Unable to open FTP socket during reconfigure

Squid does not close FTP listening ports on reconfigure.

9 years agoSourceFormat Enforcement
squidadm@squid-cache.org [Fri, 31 Oct 2014 00:56:05 +0000 (00:56 +0000)] 
SourceFormat Enforcement

9 years agoSource Maintenance: Add checks for copyright blurbs
Amos Jeffries [Thu, 30 Oct 2014 14:48:30 +0000 (07:48 -0700)] 
Source Maintenance: Add checks for copyright blurbs

* Check for copyright blurbs in repository files.

* Allow skipping of third-party and binary files.

* Add copyright blurb to auto-generated files created by maintenance
  script.

9 years agoBoilerplate: add copyright blurb to misc files
Amos Jeffries [Thu, 30 Oct 2014 14:44:26 +0000 (07:44 -0700)] 
Boilerplate: add copyright blurb to misc files

9 years agoFix typo in cbdata.cc
Amos Jeffries [Thu, 30 Oct 2014 14:39:56 +0000 (07:39 -0700)] 
Fix typo in cbdata.cc

9 years agoBug 4102: sslbump cert contains only a dot character in key usage extension
Christos Tsantilas [Thu, 30 Oct 2014 14:38:03 +0000 (07:38 -0700)] 
Bug 4102: sslbump cert contains only a dot character in key usage extension

The patch for bug 3966 was slightly incorrect. As a result the Key Usage
field for SSL-bump mimic'ed certificates could end up containing only a
dot (.) character.

9 years agoFix typo in squidclient.1
Amos Jeffries [Thu, 30 Oct 2014 14:36:13 +0000 (07:36 -0700)] 
Fix typo in squidclient.1

9 years agokerberos_ldap_group/cert_tool: Remove ksh dependency
Santiago Garcia Mantinan [Thu, 30 Oct 2014 14:35:11 +0000 (07:35 -0700)] 
kerberos_ldap_group/cert_tool: Remove ksh dependency

Shell scripts published with Squid should be POSIX neutral. Replace the
ksh-specific syntax with portable POSIX shell.

9 years agoBoilerplate: update release script COPYRIGHT file action SQUID_3_5_0_1
Amos Jeffries [Fri, 17 Oct 2014 05:18:14 +0000 (22:18 -0700)] 
Boilerplate: update release script COPYRIGHT file action

9 years ago3.5.0.1
Amos Jeffries [Fri, 17 Oct 2014 01:37:34 +0000 (18:37 -0700)] 
3.5.0.1

9 years agoBug 3803: ident leaks memory on failure
Amos Jeffries [Thu, 16 Oct 2014 18:57:43 +0000 (11:57 -0700)] 
Bug 3803: ident leaks memory on failure

Begin the process of conversion for IdentStateData to an AsyncJob.

* convert the object from CBDATA struct to a class with
CBDATA_CLASS2() API.

* Bug 3803 is caused by a lack of proper cleanup and consistent exit
actions terminating the job. Take the core logic changes from the
tested bug patch and;

 1) define a swanSong() method to cleanup the memory allocated

 2) define a deleteThis() method to emulate AsyncJob::deleteThis()

* Locate all code paths leveraging conn->close() to trigger cleanup
via the connection close handler and convert to explicit deleteThis()
with excuse. Including a few which were not but need to in order to
terminate the job correctly as fixed in bug 3803 patch.

The actions performed are nearly identical to the original code. The
differences are that many code paths now omit an AsyncCall step going
via the Comm close handler, and that all paths terminating the IDENT
lookup now go through swanSong() cleanup.

Further cleanup converting to a full AsyncJob is not included, since
there is an explicit hash of running IdentStateData object pointers
being used in the old code.

9 years agoBug 4024: Bad host/IP ::1 when using IPv4-only environment
Amos Jeffries [Thu, 16 Oct 2014 18:55:22 +0000 (11:55 -0700)] 
Bug 4024: Bad host/IP ::1 when using IPv4-only environment

9 years agoWindows: link libgcc and libstdc statically
Amos Jeffries [Thu, 16 Oct 2014 18:53:43 +0000 (11:53 -0700)] 
Windows: link libgcc and libstdc statically

MinGW builds require static linking to libgcc and libstdc++ in order to
run natively on windows without additional DLL installation.

9 years agoBug 4093: source-maintenance.sh errors and warnings due to wrong tools/options
Alex Rousskov [Thu, 16 Oct 2014 18:45:09 +0000 (11:45 -0700)] 
Bug 4093: source-maintenance.sh errors and warnings due to wrong tools/options

9 years agoCBDATA: log memory leak situations when --enable-debug-cbdata
Amos Jeffries [Thu, 16 Oct 2014 18:37:10 +0000 (11:37 -0700)] 
CBDATA: log memory leak situations when --enable-debug-cbdata

CBDATA objects are supposed to be explicitly locked and unlocked by all
users. The nominal 'owner' of the data is also supposed to mark it as
invalid when unlocking its reference.

If a CBDATA object reaches 0 locks and is still valid, it therefore
follows that either the locking or invalidate has not been properly
implemented.

Now that we are migrating to CbcPointer usage instead of explicit
lock/unlock macro calls we have started encountering these situations.
Any object reporting a 'leak' must be investigated;
 a) perhapse RefCount is better?
 b) using CbcPointer consistently and invalidating correctly.

9 years agoFix typo in rev.13636
Amos Jeffries [Thu, 9 Oct 2014 09:00:00 +0000 (02:00 -0700)] 
Fix typo in rev.13636

9 years agoBranch 3.5.0.0
squidadm@squid-cache.org [Thu, 9 Oct 2014 06:44:02 +0000 (06:44 +0000)] 
Branch 3.5.0.0

9 years agoFix missing stub update in rev.13635
Amos Jeffries [Wed, 8 Oct 2014 17:08:57 +0000 (10:08 -0700)] 
Fix missing stub update in rev.13635

9 years agoBug 4088: memory leak in external_acl_type helper with cache=0 or ttl=0
Amos Jeffries [Wed, 8 Oct 2014 15:51:28 +0000 (08:51 -0700)] 
Bug 4088: memory leak in external_acl_type helper with cache=0 or ttl=0

ExternalACLEntry / external_acl_entry objects have been abusing the
CBDATA API for reference counting and since 3.4 this has resulted in
hidden memory leaks as object accounting shows all locks released but
the memory is not freed by any 'owner'.

* convert to using RefCount<> API.

* move ExternalACLEntry pre-define to acl/forward.h

* add ExternalACLEntryPointer in acl/forward.h

* convert LookupDone() method to using explicit typed pointer

* convert from CBDATA_CLASS to MEMPROXY_CLASS memory management.

* convert almost all raw ExternalACLEntry* to Pointer
 - remaining usage is in the cache hash pointers. Use an explicit 'cachd'
  lock/unlock until this hash is updated to std:: structure types.

9 years agoSourceFormat Enforcement
squidadm@squid-cache.org [Wed, 8 Oct 2014 15:31:21 +0000 (15:31 +0000)] 
SourceFormat Enforcement

9 years agoValidate server certificates without bumping: fix 'make distcheck' error
Christos Tsantilas [Wed, 8 Oct 2014 08:10:49 +0000 (11:10 +0300)] 
Validate server certificates without bumping: fix 'make distcheck' error

9 years agoValidate server certificates without bumping: fix compile error
Christos Tsantilas [Tue, 7 Oct 2014 17:26:33 +0000 (20:26 +0300)] 
Validate server certificates without bumping: fix compile error

Fix error: return-statement with a value, in function returning 'void'

9 years agosslproxy_cert_sign_hash configuration option
Christos Tsantilas [Tue, 7 Oct 2014 14:11:12 +0000 (17:11 +0300)] 
sslproxy_cert_sign_hash configuration option

Browser vendors will get rid of SSL certificates that use SHA-1 to generate
the hash that is then signed by the CA. For example, Google Chrome will start
to show an "insecure" sign for certificates that are valid after 1.1.2016 and
will generate a warning page for certificates that are valid after 1.1.2017 [1],
[2],[4]. Microsoft will block certificates with SHA-1 after 1.1.2017 [3].

This patch:
  1) Add a new configuration option to select the signing hash for
     generated certificates: sslproxy_cert_sign_hash.

  2) If sslproxy_cert_sign_hash is not set, then use the sha256 hash.

[1] https://groups.google.com/a/chromium.org/forum/#!msg/blink-dev/2-R4XziFc7A/YO0ZSrX_X4wJ
[2] https://code.google.com/p/chromium/issues/detail?id=401365
[3] http://blogs.technet.com/b/pki/archive/2013/11/12/sha1-deprecation-policy.aspx
[4] http://googleonlinesecurity.blogspot.ch/2014/09/gradually-sunsetting-sha-1.html

This is a Measurement Factory project

9 years agoCleanup CBDATA debugging messages
Amos Jeffries [Mon, 6 Oct 2014 19:38:03 +0000 (12:38 -0700)] 
Cleanup CBDATA debugging messages

* Remove duplicate labels from debug messages. function names are now
  automatically added.

* Add debug messages to display method used for freeing CBDATA.
  Whether the object was deleted, or placement destructor called.

9 years agoValidate server certificates without bumping
Christos Tsantilas [Mon, 6 Oct 2014 14:53:40 +0000 (17:53 +0300)] 
Validate server certificates without bumping

This patch add support for the "Validate server certificates without bumping"
use case described on the Peek and Splice wiki page:
    http://wiki.squid-cache.org/Features/SslPeekAndSplice

This patch send to the certificate validation helper the  certificates and
errors found in SslBump3 step, even if the splicing mode selected.
In the case the validation helper found errors in certificates an error
page returned to the http client.

The SSL error forwarding is controlled by ACLs along these lines:

   sslproxy_cert_error allow sslBoringErrors
   sslproxy_cert_error allow serversWithInvalidCerts
   sslproxy_cert_error deny all

This is a Measurement Factory project

9 years agoCleanup: restoreCapabilities() takes a bool parameter
Amos Jeffries [Sun, 5 Oct 2014 15:26:50 +0000 (08:26 -0700)] 
Cleanup: restoreCapabilities() takes a bool parameter

9 years agoRemove C++11'ism in rev.13604
Amos Jeffries [Sun, 5 Oct 2014 09:59:47 +0000 (02:59 -0700)] 
Remove C++11'ism in rev.13604

We are not quite going to require C++11 yet. Revert Helper::ChildConfig
default constructor to C++03 syntax.

9 years agoFix library dependency issue in rev.13604
Amos Jeffries [Sat, 4 Oct 2014 09:27:01 +0000 (02:27 -0700)] 
Fix library dependency issue in rev.13604

TODO: build true library dependency map and re-order all LDADD
statements according to the hierarchy found.

9 years agoWindows: remove alternative main()
Amos Jeffries [Fri, 3 Oct 2014 13:34:52 +0000 (06:34 -0700)] 
Windows: remove alternative main()

As a side effect this causes Windows builds to use the wrapper function
for handling exceptions.

9 years agoFix --enable-win32-service compile errors
Amos Jeffries [Fri, 3 Oct 2014 11:45:29 +0000 (04:45 -0700)] 
Fix --enable-win32-service compile errors

9 years agoWindows: add missing file permission definitions
Amos Jeffries [Thu, 2 Oct 2014 17:50:47 +0000 (10:50 -0700)] 
Windows: add missing file permission definitions

* initgroups() shim was building, but header not included correctly.

* POSIX 5.6 / 6.5 Protection Bits for group access do not exist in
  windows MinGW. Define as 0-bits until better API is found.

9 years agoAdd missing boilerplate for rev.13621
Amos Jeffries [Thu, 2 Oct 2014 12:12:52 +0000 (05:12 -0700)] 
Add missing boilerplate for rev.13621

9 years agoPortability: provide xstatvfs() shim for system call statvfs()
Amos Jeffries [Thu, 2 Oct 2014 12:07:26 +0000 (05:07 -0700)] 
Portability: provide xstatvfs() shim for system call statvfs()

statfs() and struct statfs have been deprecated for years. Hoewver the
POSIX statvfs replacements are still not universally available.

Remove deprecated statfs() and struct statfs usage from Squid. Although
they may still be used by the xstatvfs() compatibility wrapper if they
are the only available API.

9 years agoPolish peek-and-splice related code part2
Christos Tsantilas [Wed, 1 Oct 2014 12:46:44 +0000 (15:46 +0300)] 
Polish peek-and-splice related code part2

- Record SSL bump action in Ssl::ServerBump::act at step3

9 years agoPolish peek-and-splice related code
Christos Tsantilas [Wed, 1 Oct 2014 12:31:58 +0000 (15:31 +0300)] 
Polish peek-and-splice related code

 - Record SSL bump action at each bumping step in the Ssl::ServerBump.
   The new Ssl::ServerBump::act member added for this purpose.

 - Split Ssl::PeerConnector::checkForPeekAndSplice  to two methods
   (checkForPeekAndSplice and checkForPeekAndSpliceDone) add some
   documentation, and polish the code.

 - Polish  httpsSslBumpStep2AccessCheckDone function (client_side.cc file)

This is a Measurement Factory project

9 years agoWindows: getppid() is not supported.
Amos Jeffries [Tue, 30 Sep 2014 13:11:58 +0000 (06:11 -0700)] 
Windows: getppid() is not supported.

The PID and thus parent process PID concept is not available in Windows
and MinGW at least lacks the API mechanism.

This may re-open an issue with kid processes notifying the coordinator
when they are shutting down. If so we need to find an alternative
mechanism to replace this use of kill(getppid(), SIGUSR1)

9 years agoPolish: cleanup IDENT header
Amos Jeffries [Mon, 29 Sep 2014 13:41:03 +0000 (06:41 -0700)] 
Polish: cleanup IDENT header

9 years agoCleanup: convert AuthUserIP from CBDATA to MEMPROXY class
Amos Jeffries [Mon, 29 Sep 2014 09:24:20 +0000 (02:24 -0700)] 
Cleanup: convert AuthUserIP from CBDATA to MEMPROXY class

This object was not needing to be passed as callback arguments
but was using CBDATA type to gain memory pooling.

Converting to the correct pooling mechanism removes some more
uses of cbdataFree() and ensures the object and its members
destructors are called properly.

9 years agoCleanup: fix various uninitialized class members
Amos Jeffries [Mon, 29 Sep 2014 07:18:13 +0000 (00:18 -0700)] 
Cleanup: fix various uninitialized class members

Also, simplify some destructors. xfree() is faster than
safe_free() and both are ok in a destructor.

  Detected by Coverity Scan. Issue 740527, 740532, 740533,
    740534, 740563, 1241964

9 years agoCleanup: fix various uninitialized class members
Amos Jeffries [Mon, 29 Sep 2014 05:13:17 +0000 (22:13 -0700)] 
Cleanup: fix various uninitialized class members

Also, simplify some destructors. xfree() is faster than
safe_free() and both are ok in a destructor.

  Detected by Coverity Scan. Issue 971423, 11354441135445,
    123135312313541231355123135612345031241504,
    740531, 740566

9 years agoCleanup: use SBuf::npos instead of npos in SBuf::append()
Amos Jeffries [Sun, 28 Sep 2014 18:49:09 +0000 (11:49 -0700)] 
Cleanup: use SBuf::npos instead of npos in SBuf::append()

Small experiment. It is possible on some systems that std::npos / ::npos
is defined with a different integer size and value.
This may be what is confusing Coverity scan and producing buffer overrun
alerts in the append() c-string with default parameter case.

9 years agoCleanup: convert external_acl_format to ref-counted pooled object
Amos Jeffries [Sun, 28 Sep 2014 18:42:55 +0000 (11:42 -0700)] 
Cleanup: convert external_acl_format to ref-counted pooled object

CBDATA was used as a makeshift way to memory pool and ref-count these
objects. Do it properly now.

9 years agoFix various null dereferences
Amos Jeffries [Sun, 28 Sep 2014 18:35:47 +0000 (11:35 -0700)] 
Fix various null dereferences

Fairly rare occurances hard to hit but still possible. Any one of these
could crash Squid in their particular circumstances.

  Detected by Coverity Scan. Issue 1187972118797312320971241502.

9 years agoFix crash reading malformed config files
Amos Jeffries [Sun, 28 Sep 2014 16:38:44 +0000 (09:38 -0700)] 
Fix crash reading malformed config files

If ConfigParser::QuotedOrToEol() happend to return NULL. Which may happen
if there is no token before end of current file the auth module config
parser would crash.

  Detected by Coverity Scan. Issue 1222662.

9 years agoDo not crash when sending %ssl::cert_subject to external ACL w/o certificate.
Christos Tsantilas [Fri, 26 Sep 2014 10:01:19 +0000 (13:01 +0300)] 
Do not crash when sending %ssl::cert_subject to external ACL w/o certificate.

An ACL check in ConnStateData::postHttpsAccept (e.g., when dealing with an
intercepted SSL connection) uses an HttpRequest object that is not yet linked
with the ConnStateData object. Do not blindly dereference the pointer to the
latter.

This is a Measurement Factory project

9 years agoFixes a squid crash when a foreign protocol client connected to an https_port
Christos Tsantilas [Fri, 26 Sep 2014 09:54:50 +0000 (12:54 +0300)] 
Fixes a squid crash when a foreign protocol client connected to an https_port

The Ssl::Bio::read will fail to recognize SSL protocol and will return "-1"
as readed SSL bytes. The Ssl::ClientBio::read must return error (-1)
in this case.

This is a Measurement Factory project

9 years agoSend selected SSL version and cipher to the certificate validation helper.
Christos Tsantilas [Fri, 26 Sep 2014 09:32:48 +0000 (12:32 +0300)] 
Send selected SSL version and cipher to the certificate validation helper.

This patch sends the selected cipher suite and the selected SSL/TLS version
to the certificate verification helper using the "proto_version=v" and
"cipher=c" key=value pairs.

This is a Measurement Factory project

9 years agoWindows: rename Ip::Address::*AddrInfo() methods
Amos Jeffries [Thu, 25 Sep 2014 13:33:18 +0000 (06:33 -0700)] 
Windows: rename Ip::Address::*AddrInfo() methods

On MinGW at least macro replacement appears to be case insensitive.
The lower-case freeaddrinfo/initaddrinfo system functions are defined
with macros, both in MinGW headers and Squid libcompat.

9 years agoPortability: do not explicitly name enum type in enumeration values
Amos Jeffries [Thu, 25 Sep 2014 10:34:22 +0000 (03:34 -0700)] 
Portability: do not explicitly name enum type in enumeration values

Some compilers (specifically MinGW at least) do not accept the name of
enum type being in the symbol where enumerated values are used.

ie. we must use Helper::Okay instead of Helper::ResultCode::Okay.

9 years agoSourceLayout: shuffle HelperChildConfig into libhelper.la
Amos Jeffries [Thu, 25 Sep 2014 06:50:32 +0000 (23:50 -0700)] 
SourceLayout: shuffle HelperChildConfig into libhelper.la

9 years agoSourceLayout: rename auth module files to match guidelines
Amos Jeffries [Wed, 24 Sep 2014 17:10:37 +0000 (10:10 -0700)] 
SourceLayout: rename auth module files to match guidelines

* Squid-3 coding guidelines require that files are named after the
  class(es) contained within. Rename the files containing auth Config
  classes to match.

* Remove the unused DefaultAuthenticateChildrenMax macros.

* simplify included headers in auth modules.

* alphabetize the order auth modules are detected.

9 years agoSourceLayout: shuffle helper protocol primitives to helper/libhelper.la
Amos Jeffries [Wed, 24 Sep 2014 14:07:55 +0000 (07:07 -0700)] 
SourceLayout: shuffle helper protocol primitives to helper/libhelper.la

* create namespace Helper in helper/libhelper.la and subdirectory

* shuffle HelperReply::Result_ to Helper::ResultCode in helper/ResultCode.h

* shuffle HelperReply to Helper::Reply in helper/Reply.*

* move helper_request to Helper::Request in helper/Request.h

* link to helper/forward.h for predefines

9 years agoCleanup: drop helper::flags.busy
Amos Jeffries [Tue, 23 Sep 2014 06:36:34 +0000 (23:36 -0700)] 
Cleanup: drop helper::flags.busy

The helper::stats.pending value can be used as a direct alternative and
is already maintained by both stateless and stateful helpers.

9 years agoFix missing flag initialization in rev.13570
Amos Jeffries [Tue, 23 Sep 2014 05:32:41 +0000 (22:32 -0700)] 
Fix missing flag initialization in rev.13570

This missing flag can cause traffic rejection on some systems if the
flag memory is left at 1 when initialized.

 Detected by Coverity Scan. Issue CID 1239292.

9 years agoCleanup: remove references to 'server-side'
Amos Jeffries [Mon, 22 Sep 2014 19:06:19 +0000 (12:06 -0700)] 
Cleanup: remove references to 'server-side'

9 years agoCleanup: rename ServerStateData to Client
Amos Jeffries [Mon, 22 Sep 2014 17:39:41 +0000 (10:39 -0700)] 
Cleanup: rename ServerStateData to Client

* rename class

* move Server.* to clients/Client.*

9 years agoCleanup: remove unnecessary class helper_stateful_request
Amos Jeffries [Fri, 19 Sep 2014 17:58:17 +0000 (10:58 -0700)] 
Cleanup: remove unnecessary class helper_stateful_request

* combine class helper_stateful_request into helper_request.

* add constructor for helper_request. replacing duplicated setup logics.

* add destructor for helper_request. replacing helperRequestFree() and
  helperStatefulFree().

9 years agoPortability: add shim for memrchr() and detect direct.h
Amos Jeffries [Fri, 19 Sep 2014 17:52:22 +0000 (10:52 -0700)] 
Portability: add shim for memrchr() and detect direct.h

Windows requires direct.h to define the chdir(), chroot(), cwd() and
related system calls.

memrchr() is not always defined but required by SBuf. Provide a local
implementation for systems that need it.

9 years agoFix various Kerberos issues
Markus Moeller [Wed, 17 Sep 2014 13:21:07 +0000 (06:21 -0700)] 
Fix various Kerberos issues

* Fix error_message detection and use.

* Fix library detection

* Fix spelling typo

* Change handling of principals in keytab for kerberos_ldap_group.

9 years agoAdd missing include after rev.13586
Amos Jeffries [Mon, 15 Sep 2014 13:29:34 +0000 (06:29 -0700)] 
Add missing include after rev.13586

9 years agoWindows: MinGW does not define system function death()
Amos Jeffries [Mon, 15 Sep 2014 12:46:55 +0000 (05:46 -0700)] 
Windows: MinGW does not define system function death()

... try using raise() instead as used by other exception cases.

Also, fix include file order and wrapping to match squid-3 coding
guidelines and available HAVE_ macro wrappers.

9 years agoPrep for 3.4.8
Amos Jeffries [Mon, 15 Sep 2014 08:06:58 +0000 (01:06 -0700)] 
Prep for 3.4.8

9 years agoWindows: fix various compile issues
Amos Jeffries [Mon, 15 Sep 2014 04:46:04 +0000 (21:46 -0700)] 
Windows: fix various compile issues

* syntax error typo from SBuf conversion of service_name

* add several missing includes

* fix macro wrapper around mswsock.h

* in ipc_win2.cc fix parameter error for memset() and several potential
  buffer overruns by removing magic number parameters on buffer size.

* fdd_table entry is not a HANDLE but a function pointer

9 years agoWindows: Fix error displaying helper name on pipe close errors
Amos Jeffries [Mon, 15 Sep 2014 02:54:33 +0000 (19:54 -0700)] 
Windows: Fix error displaying helper name on pipe close errors

The helper name string is not directly available to the HelperServerBase
methods for closing pipes. Pass it from the method callers as needed and
drop logging of the command line details.

9 years agoCygwin: re-enable /etc/resolv.conf parsing
Amos Jeffries [Mon, 15 Sep 2014 01:21:36 +0000 (18:21 -0700)] 
Cygwin: re-enable /etc/resolv.conf parsing

idnsParseResolvConf() had been disabled for all windows builds. Cygwin
does provide this system config file.

Also, instead of seeding #if/#endif wrappers around always call the
function and just wrap its internals away from Windows builds that do
not supply the necessary config file.

9 years agoPortability: rename BodyPipe member to avoid clash with pipe() macro
Amos Jeffries [Mon, 15 Sep 2014 00:57:29 +0000 (17:57 -0700)] 
Portability: rename BodyPipe member to avoid clash with pipe() macro

Our Windows compatibility layer defines pipe() as a macro. On MinGW at
least the precompiler makes no distinction between parameterless macro
pipe() and pipe variables.
Use thePipe for member naming and aPipe for function local variables.

9 years agoWindows: fix mapping between POSIX and Windows socket types
Amos Jeffries [Mon, 15 Sep 2014 00:53:05 +0000 (17:53 -0700)] 
Windows: fix mapping between POSIX and Windows socket types

MinGW at least still defines several socket structure fields with size_t
instead of socklen_t. In order to maintain the POSIX API definition in
appearance we need to cast these types to their POSIX variant regardless
of whether size_t or socklen_t is used.

9 years agoWindows: Various fixes for CMSG API emulation
Amos Jeffries [Sun, 14 Sep 2014 14:15:01 +0000 (07:15 -0700)] 
Windows: Various fixes for CMSG API emulation

* Windows defines CMSG_DATA macro name for uses unrelated to the BSD
  socket CMSG mechanism. Define SQUID_CMSG_DATA as a generic replacement.

* MinGW provides a wrapper layer emulating the BSD socket CMSG mechanism
  in the form of WSA_CMG_* macros for the BSD struct types.
  Detect and use those wrapper macros when available.

9 years agoCleanup: wrap some C-includes with protective macros
Amos Jeffries [Sun, 14 Sep 2014 14:04:27 +0000 (07:04 -0700)] 
Cleanup: wrap some C-includes with protective macros

Squid-3 guidelines require that C-header includes should be wrapped
and the absence of wrapping causes build errors on Windows at least for
these ones.

9 years agoBoilerplate: update CONTRIBUTORS contacts
Amos Jeffries [Sun, 14 Sep 2014 12:10:55 +0000 (05:10 -0700)] 
Boilerplate: update CONTRIBUTORS contacts

9 years agoFix various ICMP handling issues in Squid pinger
Amos Jeffries [Sun, 14 Sep 2014 04:36:57 +0000 (16:36 +1200)] 
Fix various ICMP handling issues in Squid pinger

* ICMP code type logging display could over-read the registered type
  string arrays.

* Malformed ICMP packets were accepted into processing with undefined
  and potentially nasty results.

Both sets of flaws can result in pinger segmentation fault and halting
the Squid functionality relying on pinger for correct operation.

 Thanks to the OpenSUSE project for analysis and resolution of these.

9 years agoFix typo in rev.13574
Amos Jeffries [Sun, 14 Sep 2014 03:51:50 +0000 (15:51 +1200)] 
Fix typo in rev.13574

9 years agoBoilerplate: update copyright reference for kerberos_ldap_group/support_ldap.cc
Amos Jeffries [Sun, 14 Sep 2014 03:11:33 +0000 (20:11 -0700)] 
Boilerplate: update copyright reference for kerberos_ldap_group/support_ldap.cc

9 years agoSource Maintenance: fix various maintenance script issues
Amos Jeffries [Sat, 13 Sep 2014 16:46:45 +0000 (04:46 +1200)] 
Source Maintenance: fix various maintenance script issues

* ensure auto-generated .list are sorted, instead of ad-hoc system
  dependent ordering which can cause needless updates.

* grep only paths with *.* (usually files) instead of all items in each
  directory. This avoids scanning sub-directory indexes with grep, which
  produces fatal errors on some systems.

* add check for Squid Software Foundation copyright blurb and highlight
  files needing attention.

9 years agoBoilerplate: update copyright blurbs on packaging and utility scripts
Amos Jeffries [Sat, 13 Sep 2014 15:04:00 +0000 (03:04 +1200)] 
Boilerplate: update copyright blurbs on packaging and utility scripts

Includes boilerplates on debug analysis and proxy maintenance scripts.

* Updates CONTRIBUTORS with missing authorship details.

* Updates CREDITS with missing copyright details from associated helpers
  and other third-party code embeded in Squid.

9 years agoBoilerplate: update copyright blurbs on src/
Amos Jeffries [Sat, 13 Sep 2014 13:59:43 +0000 (01:59 +1200)] 
Boilerplate: update copyright blurbs on src/

9 years agoBoilerplate: update copyright blurbs on Squid helpers
Amos Jeffries [Sat, 13 Sep 2014 13:31:49 +0000 (01:31 +1200)] 
Boilerplate: update copyright blurbs on Squid helpers

9 years agoBoilerplate: update copyright blurbs for Squid tools
Amos Jeffries [Sat, 13 Sep 2014 13:20:21 +0000 (01:20 +1200)] 
Boilerplate: update copyright blurbs for Squid tools

9 years agoBoilerplate: copyright blurb updates for test-suite
Amos Jeffries [Fri, 12 Sep 2014 23:00:48 +0000 (11:00 +1200)] 
Boilerplate: copyright blurb updates for test-suite

9 years agoFix off by one in snmp subsystem
Sebastian Krahmer [Fri, 12 Sep 2014 22:39:05 +0000 (16:39 -0600)] 
Fix off by one in snmp subsystem

9 years agoSourceFormat Enforcement
Automatic source maintenance [Wed, 3 Sep 2014 00:15:15 +0000 (18:15 -0600)] 
SourceFormat Enforcement

9 years ago%<tt (total server time) is not computed in some cases
Christos Tsantilas [Tue, 2 Sep 2014 14:54:01 +0000 (17:54 +0300)] 
%<tt (total server time) is not computed in some cases

The total server time is not computed for CONNECT requests.
An other example case is when server-first bumping mode is used and squid
connects to SSL peer, but connection terminated before the SSL handshake
completes.

This is a Measurement Factory project

9 years agoBoilerplate: move 'AUTHOR: Guido Serassio' texts
Amos Jeffries [Tue, 2 Sep 2014 14:44:28 +0000 (07:44 -0700)] 
Boilerplate: move 'AUTHOR: Guido Serassio' texts

with permission.

Also, remove some joint authorship claims where all authors have given
permission for the move.

9 years agoSupport receiving PROXY protocol version 1 and 2.
Amos Jeffries [Tue, 2 Sep 2014 13:35:46 +0000 (06:35 -0700)] 
Support receiving PROXY protocol version 1 and 2.

PROXY protocol has been developed by Willy Tarreau of HAProxy for
communicating original src and dst IP:port details between proxies and
load balancers in a protocol-agnostic way.

stunnel, HAProxy and some other HTTP proxying software are already
enabled and by adding support to Squid we can effectively chain these
proxies without having to rely on X-Forwarded-For headers.

This patch adds http_port mode flag (require-proxy-header) to signal the
protocol is in use, parsing and processing logics for the PROXY protocol
headers on new connections, and the proxy_protocol_access control to
manage inbound connections.
 The indirect client security/trust model remains unchanged. As do all
HTTP related logics on the connection once PROXY protocol header has
been received.

Furture Work:
 * support sending PROXY protocol to cache_peers
 * support receiving PROXY protocol on https_port
 * rework the PROXY parse logics as a Parser-NG child parser.

9 years agoFix libsquid-parser.la duplications after trunk merge
Amos Jeffries [Tue, 2 Sep 2014 12:12:07 +0000 (05:12 -0700)] 
Fix libsquid-parser.la duplications after trunk merge

9 years agoRevert AsyncJob::Start() from clientNegotiateSSL()
Amos Jeffries [Tue, 2 Sep 2014 01:49:58 +0000 (18:49 -0700)] 
Revert AsyncJob::Start() from clientNegotiateSSL()

Peek-n-splice code updates made it wrong. The original code should work
now even with PROXY protocol, which is not supported on HTTPS ports
anyway.

9 years agoMerge from trunk
Amos Jeffries [Tue, 2 Sep 2014 01:08:58 +0000 (18:08 -0700)] 
Merge from trunk

9 years agoDocs: Add proxy-protocol.txt latest version
Amos Jeffries [Tue, 2 Sep 2014 00:57:38 +0000 (17:57 -0700)] 
Docs: Add proxy-protocol.txt latest version

9 years agoFixed build by removing the COPYING entry made stale by r13568.
Alex Rousskov [Fri, 29 Aug 2014 19:32:50 +0000 (13:32 -0600)] 
Fixed build by removing the COPYING entry made stale by r13568.

9 years agoBoilerplate: update authorship contributions by Markus Moeller
Amos Jeffries [Fri, 29 Aug 2014 15:12:04 +0000 (08:12 -0700)] 
Boilerplate: update authorship contributions by Markus Moeller

 With permission.

./helpers/negotiate_auth/kerberos/COPYRIGHT
- remove, since it duplicates the Squid top level COPYRIGHT file.

./lib/base64.c
- removing the inaccurate line "AUTHOR: Markus Moeller", since other
  authors (myself at least) have adjusted that code as well.

./src/peer_proxy_negotiate_auth.h
- removing the line: "AUTHOR: Markus Moeller (markus_moeller at
  compuserve.com)"

./src/peer_proxy_negotiate_auth.cc
- removing the "Hosted at" line as inaccurate, the file is hosted in
  Squid repository, launchpad and elsewhere.

- replacing the license blurb with Squid Software Foundation blurb
  (remains GPLv2+).

9 years agoBoilerplate: update copyright blurbs for Basic authentication helpers
Amos Jeffries [Fri, 29 Aug 2014 14:04:29 +0000 (07:04 -0700)] 
Boilerplate: update copyright blurbs for Basic authentication helpers

* added Squid Software Foundation blurbs

* updated CONTRIBUTORS with missing authors

* updated CREDITS with missing licenses

* removed duplicate GPL license in helpers/basic_auth/SMB/COPYING-2.0

* removed obsolete file helpers/basic_auth/MSNT/byteorder.h

9 years agoClose active pconns after their *_port goes away on reconfigure.
Christos Tsantilas [Fri, 29 Aug 2014 06:59:17 +0000 (09:59 +0300)] 
Close active pconns after their *_port goes away on reconfigure.

This change reduces what may be perceived as reconfigure memory leaks
related to *_port options. Before this change, a single persistent
connection could continue to receive new requests (and tie no longer
globally accessible PortCfg-related structures) for hours.

TODO: Close already idle pconns as well.

9 years agoSourceFormat Enforcement
Automatic source maintenance [Fri, 29 Aug 2014 00:14:34 +0000 (18:14 -0600)] 
SourceFormat Enforcement

9 years agoBoilerplate: update copyright blurbs on libmisc* libraries
Amos Jeffries [Thu, 28 Aug 2014 16:10:38 +0000 (09:10 -0700)] 
Boilerplate: update copyright blurbs on libmisc* libraries

* add Squid Software Foundation blurbs

* update CONTRIBUTORS with missing authors

* update CREDITS to match current reality

9 years agoBoilerplate: update copyright blurbs on lib/snmplib
Amos Jeffries [Thu, 28 Aug 2014 15:10:54 +0000 (08:10 -0700)] 
Boilerplate: update copyright blurbs on lib/snmplib

* Add Squid Software Foundation blurbs

* update CREDITS to meet Carnegie Mellon license requirements

9 years agoBoilerplate: update copyright blurb for lib/smblib
Amos Jeffries [Thu, 28 Aug 2014 14:44:55 +0000 (07:44 -0700)] 
Boilerplate: update copyright blurb for lib/smblib

* Add Squid Software Foundation blurbs

* update CONTRIBUTORS with missing authors (third-party)

* update CREDITS with missing lib/smblib details
 - also some missing lib/rfcnb details