]> git.ipfire.org Git - thirdparty/squid.git/log
thirdparty/squid.git
12 years agoFix various issues in unit tests
Amos Jeffries [Wed, 2 Jan 2013 04:07:07 +0000 (21:07 -0700)] 
Fix various issues in unit tests

* Define MemObject stub constructor to initialize teh stub object properly
  apparently store unit tests needs one defined. Best to make it work and
  set base values than leave garbage in the object fields.

* Buffer overrun on config parser if test is ever given a too-long
  string input.

* Memory leak in HttpRequest testing. One instance of a short array.

* Range: header testing may thor exceptions which were not caught by the
  test binary. Could lead to difficulty debugging exception errors.

 Detected by Coverity Scan. Issues 740523, 740482, 740440, 740498

12 years agoBug 3728: Improve debug for cache_dir
Tianyin Xu [Wed, 2 Jan 2013 04:05:15 +0000 (21:05 -0700)] 
Bug 3728: Improve debug for cache_dir

12 years agokqueue: update status from experimental to fully available net I/O method
Amos Jeffries [Wed, 2 Jan 2013 04:01:34 +0000 (21:01 -0700)] 
kqueue: update status from experimental to fully available net I/O method

kqueue has been in use on FreeBSD and maybe others for some time now and
has less bugs than epoll. So the issues on record should not be held
against it.

The attached patch adds auto-detection for the kqueue dependencies and
enables it by default when it can build. Unfortunately due to the
dependencies we cannot add it to maximus layer for force-enable, but the
default layer will test it on FreeBSD at least. It is still less
preferred than epoll(), but more than select() and poll().

Also fixes bug 3716 "build error on FreeBSD in kqueue"

12 years agoImport fixes for some defects found by Coverity Scan from Red Hat's patchset
Thomas Hozza [Wed, 2 Jan 2013 03:44:55 +0000 (20:44 -0700)] 
Import fixes for some defects found by Coverity Scan from Red Hat's patchset

12 years agoMake sure copied strings are properly terminated in snmplib and wccp2
Thomas Hozza [Wed, 2 Jan 2013 03:34:31 +0000 (20:34 -0700)] 
Make sure copied strings are properly terminated in snmplib and wccp2

12 years agoFix wrong string length in testHttpReply.
Francesco Chemolli [Wed, 2 Jan 2013 00:20:10 +0000 (17:20 -0700)] 
Fix wrong string length in testHttpReply.

  Detected by Coverity Scan. Issue 740413

12 years agoAdditional pieces of SQUID-2012:1
Amos Jeffries [Tue, 1 Jan 2013 05:28:45 +0000 (22:28 -0700)] 
Additional pieces of SQUID-2012:1

12 years agoBug 3727: kerberos_ldap_group: explicitly assigning a variable to itself
Tianyin Xu [Sun, 30 Dec 2012 07:46:11 +0000 (00:46 -0700)] 
Bug 3727: kerberos_ldap_group: explicitly assigning a variable to itself

 Detected by LLVM compiler.

12 years agoVarious Kerberos helper updates
Markus Moeller [Sun, 30 Dec 2012 07:43:20 +0000 (00:43 -0700)] 
Various Kerberos helper updates

* Use rfc1738 escapes for negotiate_kerberos logging and kerberos_ldap_group.

* Include the option for kerberos_ldap_group to read group information from
  stdin (squid config file list) instead of a command line argument.

12 years agoFix various issues in snmplib
Tomas Hozza [Sun, 30 Dec 2012 07:31:50 +0000 (00:31 -0700)] 
Fix various issues in snmplib

* Memory leaks in OID management

* NULL pointer dereference on OID tree creation

* Ensure buffer terminations on OID data copy

* Better file handle management

  Detected by Coverity Scan. Issues 740480, 740357, 740429,
    443111, 740479, 740500

12 years agoFix various issues in smblib
Tomas Hozza [Sun, 30 Dec 2012 07:30:40 +0000 (00:30 -0700)] 
Fix various issues in smblib

* Crash on NTLM handshakes without domain.

* Memory leak on several internal DC connection failures

* Potential buffer overruns on specially crafted tokens

  Detected by Coverity Scan. Issues 740356, 740406, 740428,
   740476, 740477, 740478

12 years agoBug 3650: Negotiate auth missing challenge token
Steve Hill [Thu, 27 Dec 2012 02:35:28 +0000 (19:35 -0700)] 
Bug 3650: Negotiate auth missing challenge token

12 years agoBug 3712: Rotating logs overwrites the previous log
Markus Rietzler [Thu, 27 Dec 2012 02:33:32 +0000 (19:33 -0700)] 
Bug 3712: Rotating logs overwrites the previous log

12 years agoBug 3709: Wrong url at the end of ./configure --help
Amos Jeffries [Thu, 27 Dec 2012 02:31:36 +0000 (19:31 -0700)] 
Bug 3709: Wrong url at the end of ./configure --help

12 years agoPrep for 3.2.5
Amos Jeffries [Mon, 10 Dec 2012 07:15:49 +0000 (00:15 -0700)] 
Prep for 3.2.5

12 years ago3.3.0.2 SQUID_3_3_0_2
Amos Jeffries [Sun, 2 Dec 2012 08:29:50 +0000 (01:29 -0700)] 
3.3.0.2

12 years agoBug 3688: Lots of Orphan Comm:Connections to ICAP server
Alexander Komyagin [Sun, 2 Dec 2012 07:27:40 +0000 (00:27 -0700)] 
Bug 3688: Lots of Orphan Comm:Connections to ICAP server

12 years agoPolish: Improve the messages output by UFS swap log management.
Amos Jeffries [Sun, 2 Dec 2012 07:26:27 +0000 (00:26 -0700)] 
Polish: Improve the messages output by UFS swap log management.

It also includes a small local variable symbol change from "new_path" to
"tmp_path" to prevent future developer mistakes like the one seen in
bug 3663 mistaking "new_path" for the new destination path of xrename().

12 years agoRemove unnecessary xmemset()
Amos Jeffries [Sun, 2 Dec 2012 07:23:32 +0000 (00:23 -0700)] 
Remove unnecessary xmemset()

Was a simple wrapper around memset() to add debugs() traces. However
other profiling tools can trace memset far better.

12 years agoFix accept_filter on Linux
Amos Jeffries [Thu, 29 Nov 2012 10:38:43 +0000 (03:38 -0700)] 
Fix accept_filter on Linux

accept_filter directive on Linux requires TCP_DEFER_ACCEPT which
in turn requires netinet/tcp.h. This was removed when splitting comm
into libcomm.la.

12 years agoTreat no-cache and must-revalidate in Authentication
Amos Jeffries [Thu, 29 Nov 2012 10:38:07 +0000 (03:38 -0700)] 
Treat no-cache and must-revalidate in Authentication

Wrapped as a violation because this operation is off-spec.

CC:no-cache was omitted from the HTTP spec apparently on grounds that
changing its caching effects on authentication would come as a surprise.
The actual operation is safe enough to use when parameterless no-cache
is treated strictly as an alias for must-revalidate (as done by Squid now).

Ref: http://lists.w3.org/Archives/Public/ietf-http-wg/2012OctDec/0387.html

12 years agoMake it possible to match empty header field values using req_header and rep_header.
Alex Rousskov [Thu, 29 Nov 2012 10:37:22 +0000 (03:37 -0700)] 
Make it possible to match empty header field values using req_header and rep_header.

Warning: Some req_header and rep_header ACLs that were [accidentally] not
matching empty headers (e.g., "^$" or ".*") will now start matching them.

A new HttpHeader::getByNameIfPresent() method is added to be able to detect
presence of empty header fields while ACLHTTPHeaderData::match() is adjusted
to convert undefined String values into empty c-strings ("") for
ACLRegexData::match() to work.

Prior to these changes, when trying to match an empty header value with a
regex like "^$", ACLHTTPHeaderData::match() would return false because:

  * HttpHeader::getStrOrList() and getByName() return an undefined String.
  * String::termedBuf() returns NULL for undefined Strings; and
  * ACLRegexData::match() always fails on NULL c-strings.

12 years agoBug 3685: Squid hangs in ClassCBucket::update
Amos Jeffries [Thu, 29 Nov 2012 10:36:27 +0000 (03:36 -0700)] 
Bug 3685: Squid hangs in ClassCBucket::update

12 years agoFix several buffer termination bugs
Amos Jeffries [Thu, 29 Nov 2012 10:26:58 +0000 (03:26 -0700)] 
Fix several buffer termination bugs

* strcpy() replaced in several places with strncpy() to ensure destination
  buffers are not overflowed.

* strncpy() does not nul-terminate the destination when the string being
  copied in exactly fills the buffer. Ensure we have terminated strings
  where it may matter.

 Detected by Coverity Scan. Issues 740309, 740310, 740311, 740481, 740483

12 years agoext_time_quota_acl: BH error code is a 3.4 feature
Amos Jeffries [Sun, 25 Nov 2012 05:02:42 +0000 (22:02 -0700)] 
ext_time_quota_acl: BH error code is a 3.4 feature

12 years agolibeui: Warn and fail nicely on socket errors looking up ARP record
Amos Jeffries [Sat, 24 Nov 2012 03:57:33 +0000 (20:57 -0700)] 
libeui: Warn and fail nicely on socket errors looking up ARP record

If something nasty happened (out of FD or similar) socket() may fail.
Report these events and continue with unknown EUI value.

 Detected by Coverity Scan. Issue 740393

12 years agolibesi: Various fixes
Amos Jeffries [Sat, 24 Nov 2012 03:56:37 +0000 (20:56 -0700)] 
libesi: Various fixes

* Mostly uninitialized class member variables

* One missing error check in ESI parser (740408)

* One potential NULL from dynamic cast fixed (740372)

* Several useless/dead code checks

 Detected by Coverity Scan. Issues 740545, 740408, 740546, 740372, 740547,
  740548, 740549, 740550, 740551, 740345, 740346, 740552, 740553, 740554,
  740555, 740556, 740557.

12 years agolibrfcnb: memory leaks in session setup
Amos Jeffries [Sat, 24 Nov 2012 03:55:40 +0000 (20:55 -0700)] 
librfcnb: memory leaks in session setup

 Detected by Coverity Scan. Issue 740425.

12 years agoRemove MemPoolChunked::memPID
Amos Jeffries [Sat, 24 Nov 2012 03:54:01 +0000 (20:54 -0700)] 
Remove MemPoolChunked::memPID

This member variable appears to have been missed when MemPool was split
into generic framework and specific Chunked implementation.
 (rev:10513.1.1 aka trunk rev:10517)

The memPID and its maintenance code was moved into MemImplementingAllocator
but this definition left here un-initialized and shadowing the framework
member.

 Detected by Coverity Scan. Issue 740506.

12 years agonegotiate_kerberos_auth: better bounds checking
Amos Jeffries [Sat, 24 Nov 2012 03:53:21 +0000 (20:53 -0700)] 
negotiate_kerberos_auth: better bounds checking

* sysconf() may return -N values on some platforms or values larger than
  the hard-coded 1024 buffer size for hostname. Use sizeof() instead
  since the buffer is hardcoded anyway.

* also, use return instead of exit() on the test binary to reduce
  warnings from static analysis compilers.

 Detected by Coverity Scan. Issues 740392, 740484

12 years agontlm_smb_lm_auth: better bounds checking
Amos Jeffries [Sat, 24 Nov 2012 03:52:54 +0000 (20:52 -0700)] 
ntlm_smb_lm_auth: better bounds checking

Protect against overflow of domain and domain controlleler FQDN buffers
leading to missing nul-termination string errors.

 Detected by Coverity Scan. Issue 740475.

12 years agoFix OpenSUSE glibc 2.17 compile issues
Andreas Jaeger [Sat, 24 Nov 2012 03:51:51 +0000 (20:51 -0700)] 
Fix OpenSUSE glibc 2.17 compile issues

12 years agoFixed incomplete MemBlobStats constructor
Francesco Chemolli [Sat, 24 Nov 2012 03:50:14 +0000 (20:50 -0700)] 
Fixed incomplete MemBlobStats constructor

12 years agolog_file_daemon: better error reporting
Amos Jeffries [Sat, 24 Nov 2012 03:41:34 +0000 (20:41 -0700)] 
log_file_daemon: better error reporting

Report rotation errors and log file removal errors instead of silently
ignoring them.

 Detected by Coverity Scan. Issue 740316

12 years agoVarious memory leaks in configuration parsing
Amos Jeffries [Sat, 24 Nov 2012 03:40:43 +0000 (20:40 -0700)] 
Various memory leaks in configuration parsing

This lot are all small issues derived from allocating new memory and
assigning to a pointer already pointing at previous allocation, or
passing xstrdup() output to a caller which does not directly hold the
passed memory.
 Both cases will disappear once we clean up the string handling in Squid
but for now these still need fixing to avoid leaking memory.

 Detected by Coverity Scan. Issues 740430, 740432, 740439.

12 years agosquidclient: Better error checking
Amos Jeffries [Sat, 24 Nov 2012 03:39:34 +0000 (20:39 -0700)] 
squidclient: Better error checking

* detect and report fstat() errors which could lead to invalid
  Content-Length being sent.

* remove some useless checks which were causing false positives by Coverity.

 Detected by Coverity Scan. Issues 740334, 740379

12 years agoFix various assertion with side effects
Amos Jeffries [Sat, 24 Nov 2012 03:38:47 +0000 (20:38 -0700)] 
Fix various assertion with side effects

When compiled with high optimization and assert disabled these operations
would have disappeared. The side effects being:
* Disk I/O failure protection disabled. Allowing loops in diskd write.
* squidpurge error handling on command line parse gone. Causing segfault.
* squidpurge 'I am Alive' ticker feature cease working.

 Detected by Coverity Scan. Issues 740299, 740300, 740301, 740302, 740303

12 years agodigest_ldap_auth: Fix crash on empty password
Amos Jeffries [Sat, 24 Nov 2012 03:38:06 +0000 (20:38 -0700)] 
digest_ldap_auth: Fix crash on empty password

 Detected by Coverity Scan. Issue 740399

12 years agocachemgr.cgi: Memory Leaks and DoS Vulnerability
Amos Jeffries [Sat, 24 Nov 2012 02:17:56 +0000 (19:17 -0700)] 
cachemgr.cgi: Memory Leaks and DoS Vulnerability

* Ignore invalid Content-Length headers.

* Limit received POST requests to 4KB and discard the rest.

* Authentication credentials parser also leaks badly.

 Detected by Coverity Scan.
 Issues 740380, 740443, 740444, 740442, 740487, 740446, 740445

12 years agontlm_fake_auth: Fix nesting error
Amos Jeffries [Sat, 24 Nov 2012 02:13:27 +0000 (19:13 -0700)] 
ntlm_fake_auth: Fix nesting error

Broken macro wrapping leads to the fake authenticator sending bad
responses to Squid. This can ead to users being rejected by the fake
helper whose purpose is to accept everything.

 Detected by Coverity Scan. Issue 740394

12 years agolibacl: polish and code fixes
Amos Jeffries [Sat, 24 Nov 2012 02:12:26 +0000 (19:12 -0700)] 
libacl: polish and code fixes

* removed several blocks of dead code and useless conditional checks

* Improved handling of garbage config definitions for ACL random, max_conn

* Initialized several uninitialized class members in ACL base class.

 Detected by Coverity Scan.
 Issues 740528, 740343, 740529, 740362, 434117, 740593, 740407.
 Possibly also resolves issue 740486.

12 years agoFix TextException: gracefully handle exceptions with null text messages.
Francesco Chemolli [Sat, 24 Nov 2012 02:11:52 +0000 (19:11 -0700)] 
Fix TextException: gracefully handle exceptions with null text messages.

12 years agoext_time_quota_acl: Polish and handle bad input better
Amos Jeffries [Sat, 24 Nov 2012 02:04:12 +0000 (19:04 -0700)] 
ext_time_quota_acl: Polish and handle bad input better

* Send BH response code when username field is missing or empty on the
  input line received from Squid (or manually typed)

* Display error message on broken config file lines and skip instead of
  crashing.

* Polish out some unused assignments.

 Detected by Coverity Scan. Issues 740404, 740405, 740591

12 years agoext_file_userip_acl: Polish and missing file handling
Amos Jeffries [Sat, 24 Nov 2012 02:03:43 +0000 (19:03 -0700)] 
ext_file_userip_acl: Polish and missing file handling

* Display error when dictionary file is unaccessible instead of crashing.

* Polish several useless assignments out of the code.

 Detected by Coverity Scan. Issues 740402, 740403, 740589, 740590.

12 years agoext_edirectory_userip_acl: Polish: Remove dead code
Amos Jeffries [Sat, 24 Nov 2012 02:01:49 +0000 (19:01 -0700)] 
ext_edirectory_userip_acl: Polish: Remove dead code

* filter variable being NULL results in error condition returned before
  the filter is used. No need to test and use a hard-coded backup filter.

* ber variable is freed in the master loop and is not skipped. The loop
  only exists when ent is NULL. Neither needs to be freed.

 Detected by Coverity Scan. Issues 740339, 740340, 740341

12 years agounlinkd: Compiler warning cleanups
Amos Jeffries [Sat, 24 Nov 2012 02:01:15 +0000 (19:01 -0700)] 
unlinkd: Compiler warning cleanups

Check the return value for open(/dev/null). Nothing we can do about it
since the daemon has already disconnected from cache.log but note that.

 Detected by Coverity Scan. Issue 740328

12 years agodigest_file_auth: Improved error handling
Amos Jeffries [Sat, 24 Nov 2012 01:59:49 +0000 (18:59 -0700)] 
digest_file_auth: Improved error handling

Adds missing error handling when pasword file fails to open for any
reason.

Skips records with missing username in password file.Displays an error
message instead of crashing.

 Detected by Coverity Scan. Issues 740400, 740401

12 years agodigest_edirectory_auth: improved error handling
Amos Jeffries [Sat, 24 Nov 2012 01:58:47 +0000 (18:58 -0700)] 
digest_edirectory_auth: improved error handling

Malicious response from LDAP server can cause squid helper to crash.

Missing realm value returned from LDAP without error/missing value being
indicated in the response can lead to strcmp() using a NULL pointer.
 Extremely unlikely to happen in practice, but worth fixing.

 Detected by Coverity Scan. Issue 740399

12 years agobasic_smb_auth: Buffer overrun.
Amos Jeffries [Sun, 18 Nov 2012 11:37:48 +0000 (04:37 -0700)] 
basic_smb_auth: Buffer overrun.

A reply string expanding to >8KB after shell escaping can cause the helper
memory corruption or crash as output buffer is overrun.

 Detected by Coverity Scan. Issue 740411

12 years agobasic_radius_auth: Fix several issues
Amos Jeffries [Sun, 18 Nov 2012 11:36:44 +0000 (04:36 -0700)] 
basic_radius_auth: Fix several issues

* abort on failed fcntl() non-blocking socket setup

* retry send() on failure. Up to retry attempt count.
  Display send() errors to cache.log.

* prevent buffer overflow on long command line arguments.

* make compiler buffer overflow checks happier with RADIUS packet
  creation code.

 Detected by Coverity Scan. Issues 740314, 740315, 740410, 740474, 743276

12 years agobasic_pam_auth: Fix NULL-dereference issues
Amos Jeffries [Sun, 18 Nov 2012 11:35:38 +0000 (04:35 -0700)] 
basic_pam_auth: Fix NULL-dereference issues

PAM session handles being used after setup failure left them NULL.

Also removes several useless checks of retval after it being explicitly
set to the value tested againt.

 Detected by Coverity Scan. Issue 740354

12 years agobasic_ncsa_auth: Fix NULL-dereference crash
Amos Jeffries [Sun, 18 Nov 2012 11:34:56 +0000 (04:34 -0700)] 
basic_ncsa_auth: Fix NULL-dereference crash

When reading corrupt or broken user passwd files with missing username
data this helper can crash.

 Detected by Coverity Scan. Issue 740398

12 years agobasic_msnt_auth: memory leaks
Amos Jeffries [Sun, 18 Nov 2012 11:33:33 +0000 (04:33 -0700)] 
basic_msnt_auth: memory leaks

 Detected by Coverity scan (free). Issues: 740415, 740416

12 years agoBug 3279: Polish: reference bugzilla record to prevent duplicate reports
Amos Jeffries [Sun, 18 Nov 2012 11:32:33 +0000 (04:32 -0700)] 
Bug 3279: Polish: reference bugzilla record to prevent duplicate reports

12 years agoBug 3329: Polish: reference the bugzilla number in cache.log to prevent duplicates
Amos Jeffries [Sun, 18 Nov 2012 11:32:00 +0000 (04:32 -0700)] 
Bug 3329: Polish: reference the bugzilla number in cache.log to prevent duplicates

12 years agoModify debugs() to automatically include file, line and function name for high-detail...
Francesco Chemolli [Sun, 18 Nov 2012 11:21:41 +0000 (04:21 -0700)] 
Modify debugs() to automatically include file, line and function name for high-detail cache log lines.

12 years agoBug 3405: ssl_crtd crashes failing to remove certificate
Christos Tsantilas [Tue, 13 Nov 2012 07:03:25 +0000 (00:03 -0700)] 
Bug 3405: ssl_crtd crashes failing to remove certificate

- Try to update the index file in all cases the database modified
  rows. Currently we are using the new operator.

- The find operator in database should not modify the database. Currently
  if an entry is expired, ssl_crtd removes the cert file but does not
  update the index file.

- Fix a small memory leak when remove entries from database: A row object
  removed from TXT_DB indexes but never released.

This patch:
* Use OPENSSL_malloc and OPENSSL_free to allocate/release memory for
  TXT_DB rows. OpenSSL SDK assumes that always allocated using these
  functions.

* Add code in Ssl::CertificateDb::Row destructor to correctly release
  a TXT_DB row.

* Add the sq_TXT_DB_delete and sq_TXT_DB_delete_row functions which
  removes a row from TXT_DB indexes.

This is a Measurement Factory project

12 years agoBug 3659: read_timeout problem with HTTPS
Jean-Philippe Menil [Sat, 10 Nov 2012 04:16:59 +0000 (21:16 -0700)] 
Bug 3659: read_timeout problem with HTTPS

12 years agoPolish: replace several assert(isOpen(fd))
Amos Jeffries [Sat, 10 Nov 2012 04:13:00 +0000 (21:13 -0700)] 
Polish: replace several assert(isOpen(fd))

Reduces by over half the number of asserts which can be confused as
cache.log bug reports just says "assertion isOpen(fd)" in comm.cc

12 years agoBug 3189: AIO thread race on pipe() initialization
Amos Jeffries [Sat, 10 Nov 2012 04:02:52 +0000 (21:02 -0700)] 
Bug 3189: AIO thread race on pipe() initialization

12 years agoPorted: urllogin ACL from squid 2.7
Amos Jeffries [Sat, 10 Nov 2012 03:57:44 +0000 (20:57 -0700)] 
Ported: urllogin ACL from squid 2.7

12 years agoRelease Notes: 3.3 updates
Amos Jeffries [Sat, 10 Nov 2012 03:57:03 +0000 (20:57 -0700)] 
Release Notes: 3.3 updates

12 years agoRefactored tools/purge conffile reading to c++-streams
Francesco Chemolli [Sun, 28 Oct 2012 05:31:57 +0000 (23:31 -0600)] 
Refactored tools/purge conffile reading to c++-streams

12 years agoext_lm_group_acl: Add missing rfc1738.h include
Amos Jeffries [Sun, 28 Oct 2012 05:30:58 +0000 (23:30 -0600)] 
ext_lm_group_acl: Add missing rfc1738.h include

12 years agoRemove Bungled warning on missing component directives
Amos Jeffries [Sun, 28 Oct 2012 05:27:14 +0000 (23:27 -0600)] 
Remove Bungled warning on missing component directives

* Make Squid display a ERROR notice and ignore squid.conf directives
  which belong to components disabled at build time instead of throwing
  up 'FATAL: Bungled' message and aborting.

* Polish the 'requires X' message text for better display of cases like
  'requires MS Windows' and 'requires Linux'

* Add 'requires X' message for --enable-auth, --enable-eui, and
  --enable-ssl-crtd which were missing.

* Add debug 'filename' for if-none and postscriptum logging

12 years agoFix missing predefines in PeerDigest.h
Amos Jeffries [Sun, 28 Oct 2012 05:26:19 +0000 (23:26 -0600)] 
Fix missing predefines in PeerDigest.h

12 years agoAdd constructore/destructor for Mgr::ActionPasswordList
Amos Jeffries [Sun, 28 Oct 2012 05:25:21 +0000 (23:25 -0600)] 
Add constructore/destructor for Mgr::ActionPasswordList

Missing constructor for Mgr::ActionPasswordList resulted in invalid values
for next pointer and segmentation fault parsing multiple cachemgr_passwd
directives.

Missing destructor resulted in memory leaks on reconfigure and shutdown.

12 years agoRemove the refresh_pattern ignore-no-cache option SQUID_3_3_0_1
Amos Jeffries [Sat, 20 Oct 2012 11:29:46 +0000 (05:29 -0600)] 
Remove the refresh_pattern ignore-no-cache option

With the HTTP/1.1 Cache-Control:no-cache compliance upgrade this option became
obsolete. Its main use-case was to force caching of responses which contained this
control. Revalidation is now happening and no-cache objects are cached by default.

The one remaining effect of ignoring no-cache is to prevent no-cache from allowing
authenticated responses being cached. Which is the opposite of its usually expected
result and allowing that change of behaviour would be counter productive.

12 years ago3.3.0.1
Amos Jeffries [Sat, 20 Oct 2012 10:49:13 +0000 (04:49 -0600)] 
3.3.0.1

12 years agoPrep for 3.2.3 and 3.3.0.1
Amos Jeffries [Sat, 20 Oct 2012 10:41:31 +0000 (04:41 -0600)] 
Prep for 3.2.3 and 3.3.0.1

12 years agoHTTP/1.1: Cache-Control compliance upgrade
Amos Jeffries [Sat, 20 Oct 2012 06:29:43 +0000 (00:29 -0600)] 
HTTP/1.1: Cache-Control compliance upgrade

trunk rev 11361 converted Cache-Control header from using a single mask
bitmap (shared by request and response) to separate CC header objects in
the request response. This conversion contained several regressions like
the one bug 3670 reports.

This patch:
 * documents HttpStateData::cacheableReply() clarifying the overall
   method action and what each individual check it doing.
 * resolves several visible regressions, including bug 3670.
 * extends the caching to handle the "no-cache" controls as per HTTP/1.1
   (MAY store, but MUST revalidate before use).
 * extends the caching for several lesser known cases of "MAY store"
   exemptions handling authenticated transactions.
 * removes an old hack handling Pragme:no-cache (undefined in HTTP/1.1)

One side effect of now caching transactions utilizing "no-cache" is that
hacks around Pragma:no-cache are reduced to only having any effect when
Cache-Control is absent. Reducing their performance cost. And now require
--enable-http-violations is built in since HTTP/1.1 states that
response Pragma are not defined and thus SHOULD be ignored.

12 years agoSourceFormat Enforcement
Automatic source maintenance [Wed, 17 Oct 2012 02:59:09 +0000 (20:59 -0600)] 
SourceFormat Enforcement

12 years agoHTTP/1.1: honour Cache-Control before Pragma:no-cache
Amos Jeffries [Tue, 16 Oct 2012 23:46:45 +0000 (17:46 -0600)] 
HTTP/1.1: honour Cache-Control before Pragma:no-cache

HTTPbis WG clarifications on the interaction between Cache-Control and
Pragma specify that Cache-Control may be explicitly crafted to allow
conditional caching by HTTP/1.1 caches and Pragma:no-cache supplied to
prevent caching by older HTTP/1.0 caches unable to understand the
Cache-Control properly.

Squid does obey Cache-Control. So we can deprecate Pragma to the side
cases when Cache-Control is absent entirely.

12 years agoReverted trunk r12255 changes. Provided a portable flexible arrays replacement.
Alex Rousskov [Tue, 16 Oct 2012 23:46:07 +0000 (17:46 -0600)] 
Reverted trunk r12255 changes. Provided a portable flexible arrays replacement.

Trunk r12255 made Clang compiler happy by removing flexible nonPod[] arrays.
Unfortunately, it also moved shared memory items into local memory (in some
cases uninitialized).

This change provides a Clang-friendly flexible array replacement while keeping
items in the shared memory (and using placement-new initialization). The code
may have become even less readable, but hopefully more portable.

N.B. Flexible arrays were introdiced in C99 standard, after C++ was
standardized in 1998. They are not yet in any revised C++ standard, but most
C++ compilers support them, at least for PODs.

12 years agoAllow a ufs cache_dir entry to coexist with a shared memory cache entry
Alex Rousskov [Tue, 16 Oct 2012 23:43:54 +0000 (17:43 -0600)] 
Allow a ufs cache_dir entry to coexist with a shared memory cache entry

... instead of being released when it becomes idle.

The original boolean version of the StoreController::dereference() code
(r11730) was written to make sure that idle unlocked local store_table entries
are released if nobody needs them (to avoid creating inconsistencies with
shared caches that could be modified in a different process).

Then, in r11786, we realized that the original code was destroying non-shared
memory cache entries if there were no cache_dirs to vote for keeping them in
store_table. I fixed that by changing the StoreController::dereference() logic
from "remove if nobody needs it" to "remove if somebody objects to keeping
it". That solved the problem at hand, but prohibited an entry to exist in
a non-shared cache_dir and in a shared memory cache at the same time.

We now go back to the original "remove if nobody needs it" design but also
give non-shared memory cache a vote so that it can protect idle but suitable
for memory cache entries from being released if there are no cache_dirs to
vote for them.

This is a second revision of the fix. The first one (r12231) was reverted
because it did not pass tests/testRock unit tests on some platforms. The unit
tests assume that the entry slot is not locked after the entry is stored, but
the first revision of the fix allowed idle entries to remain in store_table
and, hence, their slots were locked and could not be replaced, causing
assertions.  This revision allows the idle entry to be destroyed (and its slot
unlocked) if [non-shared] memory caching is disabled.

It is not clear why only some of the platforms were affected by this. Should
not memory caching be disabled everywhere during testRock (because testRock
does not set memory cache capacity and memory cache entry size limits)?

12 years agoFix linking issues in testDiskIO and testStatHist
Francesco Chemolli [Tue, 16 Oct 2012 23:41:32 +0000 (17:41 -0600)] 
Fix linking issues in testDiskIO and testStatHist

12 years agoStatic Code Analysis: varargs cleanup, improvements to readability
Francesco Chemolli [Tue, 16 Oct 2012 23:40:01 +0000 (17:40 -0600)] 
Static Code Analysis: varargs cleanup, improvements to readability

12 years agoPortability: pass OS name to helper config.test scripts
Amos Jeffries [Sat, 13 Oct 2012 06:07:11 +0000 (00:07 -0600)] 
Portability: pass OS name to helper config.test scripts

This will help us perform OS-specific enable/disable rather than having
to identify some software or file that SHOULD exist only in those OS, but
which might exist elsewhere for weird reasons (ie windows.h).

NP: the $@ which was being passed was unused by any current config.test
  Removed it and converted to fixed-position parameters for easier
  script development.

12 years agoBug 3655: pinning failure breaks NTLM and Negotiate authentication
Wolfgang Breyha [Sat, 13 Oct 2012 06:06:27 +0000 (00:06 -0600)] 
Bug 3655: pinning failure breaks NTLM and Negotiate authentication

12 years agoCorrect --enable-build-info on out-of-tree builds
Henrik Nordstrom [Sat, 13 Oct 2012 06:05:14 +0000 (00:05 -0600)] 
Correct --enable-build-info on out-of-tree builds

bzr expects to be run from the source tree, not the build directory

12 years agossl_crtd: set new certificate serial number to zero
Amos Jeffries [Sat, 13 Oct 2012 06:03:00 +0000 (00:03 -0600)] 
ssl_crtd: set new certificate serial number to zero

Initialize new BN value to zero instead of simply testing and ignoring
the result.

Detected by Jenkins running clang on FreeBSD 9.

12 years agoFix using assignment as a condition without parentheses
Amos Jeffries [Sat, 13 Oct 2012 06:02:36 +0000 (00:02 -0600)] 
Fix using assignment as a condition without parentheses

12 years agoPortability: permit eCAP build without pkg-config
Amos Jeffries [Sat, 13 Oct 2012 06:01:01 +0000 (00:01 -0600)] 
Portability: permit eCAP build without pkg-config

Windows does not have a port of pkg-config, other OS may be in the same
situation. That only impacts on Squids ability to confirm the library
version not on its ability to link and use it.

This reduces some configure errors to warnings when pkg-config is not
located on the local system.

12 years agoPortability: fix several class/struct type mismatches
Amos Jeffries [Wed, 10 Oct 2012 01:52:03 +0000 (19:52 -0600)] 
Portability: fix several class/struct type mismatches

Leftover problem from trunk r12339 changes.

Detected by clang on FreeBSD 9.

12 years agoFix ipv6 enabled squidclient.
Henrik Nordstrom [Wed, 10 Oct 2012 01:51:09 +0000 (19:51 -0600)] 
Fix ipv6 enabled squidclient.

Was failing with assertion failure due to ipv6 support not being probed
automatically.

12 years agoFreeBSD: net/if_dl.h seems to require param.h
Amos Jeffries [Wed, 10 Oct 2012 01:50:28 +0000 (19:50 -0600)] 
FreeBSD: net/if_dl.h seems to require param.h

12 years agoPortability: change Ipc::Port::listen to doListen()
Amos Jeffries [Wed, 10 Oct 2012 01:48:17 +0000 (19:48 -0600)] 
Portability: change Ipc::Port::listen to doListen()

listen() clashes with POSIX function of the same name.
Some systems (ie MinGW) define it as a macro wrapper.

12 years agoWindows: disable purge tool
Amos Jeffries [Wed, 10 Oct 2012 01:37:55 +0000 (19:37 -0600)] 
Windows: disable purge tool

The purge tool requires quite a few updates before it will build on Windows.
It is easier at this point to simply not build it.

12 years agoPortability: support customization of --prefix= via compat/autoconf.h
Amos Jeffries [Wed, 10 Oct 2012 01:36:31 +0000 (19:36 -0600)] 
Portability: support customization of --prefix= via compat/autoconf.h

Rather than defining DEFAULT_PREFIX on the compiler command line this
builds its value into autoconf.h for use whenever needed. Avoiding
potential issues with buggy Makefile.am coding.

Also allows the --prefix value to be sourced from the autoconf internal
default settings instead of requiring a manual --prefix parameter for
SNMP module to build and link properly.

12 years agoWindows: disable Mmapped DiskIO support
Francesco Chemolli [Wed, 10 Oct 2012 01:35:03 +0000 (19:35 -0600)] 
Windows: disable Mmapped DiskIO support

MinGW does not always supply mmap.

TODO:
 Add proper feature detection to decide when this IS available on Windows.
 Use the Windows native mmap functionality.

12 years agoPolish: use DBG_PARSE_NOTE to warn about deprecated logformat tokens
Amos Jeffries [Wed, 10 Oct 2012 01:32:16 +0000 (19:32 -0600)] 
Polish: use DBG_PARSE_NOTE to warn about deprecated logformat tokens

12 years agoBranch 3.3.0.0
Automatic source maintenance [Sat, 6 Oct 2012 04:21:58 +0000 (22:21 -0600)] 
Branch 3.3.0.0

12 years agoPrep for 3.2.2
Amos Jeffries [Sat, 6 Oct 2012 02:54:53 +0000 (20:54 -0600)] 
Prep for 3.2.2

12 years agoSourceFormat Enforcement
Automatic source maintenance [Sat, 6 Oct 2012 00:13:17 +0000 (18:13 -0600)] 
SourceFormat Enforcement

12 years agoDo not check 'reply content_length is too big' condition twice.
Alex Rousskov [Fri, 5 Oct 2012 23:36:22 +0000 (17:36 -0600)] 
Do not check 'reply content_length is too big' condition twice.

The check got duplicated was

4410
committer: hno
branch nick: HEAD
timestamp: Wed 2000-05-03 00:49:26 +0000
message:
  hno squid-2.2.STABLE2.to_large_objects-2.patch
  Squid-2.2.STABLE2: Don't swap out objects > maximum_object_size

12 years agoAdded missing source files in recipe for testStatHist
Francesco Chemolli [Fri, 5 Oct 2012 15:56:08 +0000 (17:56 +0200)] 
Added missing source files in recipe for testStatHist

12 years agoMove fatal family of functions to own implementation and stub files.
Francesco Chemolli [Fri, 5 Oct 2012 13:38:19 +0000 (15:38 +0200)] 
Move fatal family of functions to own implementation and stub files.

12 years agoMerged from trunk
Francesco Chemolli [Fri, 5 Oct 2012 13:27:37 +0000 (15:27 +0200)] 
Merged from trunk

12 years agoShuffled fatal family of functions into own implementation.
Francesco Chemolli [Fri, 5 Oct 2012 13:10:15 +0000 (15:10 +0200)] 
Shuffled fatal family of functions into own implementation.
Created stub for fatal.cc.
Move all files to src/ due to their dependencies.

12 years agoPolish: convert several opt_parse_cfg_only to DBG_PARSE_NOTE
Amos Jeffries [Fri, 5 Oct 2012 10:26:39 +0000 (22:26 +1200)] 
Polish: convert several opt_parse_cfg_only to DBG_PARSE_NOTE