]> git.ipfire.org Git - thirdparty/squid.git/log
thirdparty/squid.git
13 years agoSourceFormat Enforcement
Automatic source maintenance [Sat, 10 Sep 2011 00:12:21 +0000 (18:12 -0600)] 
SourceFormat Enforcement

13 years ago%la for intercepted connections
Christos Tsantilas [Fri, 9 Sep 2011 20:41:40 +0000 (23:41 +0300)] 
%la for intercepted connections

This patch adjusts the %la logformat code handling for intercepted connections
based on the following rules:
 - If the corresponding http_port or https_port option has an explicit
   listening host name or IP address, then log the IP address.
 - Otherwise, log a dash character.

Also adjusts %lp logformat code handling for intercepted connections to always
log the port number from the corresponding http_port or https_port option.

Amos comments about %la formating code:
For the record these are the permutations we seek to cover...

Scenario 1: client 192.168.0.3 connects to google (74.125.237.81). Gets intercepted into Squid.

  1a) squid.conf:  http_port 3129 intercept|tproxy

   tcpClient->remote == 192.168.0.3:$random    (%>a:%>p)
   tcpClient->local == 74.125.237.81:80        (%>la:%>lp)
   al->cache.port->s.local == 0.0.0.0:3129     (%la:%lp) [log "-"]

  1b) squid.conf:  http_port 192.168.0.1:3129 intercept|tproxy

   tcpClient->remote == 192.168.0.3:$random    (%>a:%>p)
   tcpClient->local == 74.125.237.81:80        (%>la:%>lp)
   al->cache.port->s.local == 192.168.0.1:3129  (%la:%lp) [log 192...]

Scenario 2: client 192.168.0.3 connects to Squid asking for http://google.com

  2a) squid.conf:  http_port 3128 [accel]

   tcpClient->remote == 192.168.0.3:$random    (%>a:%>p)
   tcpClient->local == 192.168.0.1:3128        (%>la:%>lp)
   al->cache.port->s.local == 0.0.0.0:3128     (%la:%lp) [log 192...]

  2b) squid.conf:  http_port 192.168.0.1:3128 [accel]

   tcpClient->remote == 192.168.0.3:$random    (%>a:%>p)
   tcpClient->local == 192.168.0.1:3128        (%>la:%>lp)
   al->cache.port->s.local == 192.168.0.1:3128 (%la:%lp) [log 192...]

Senario 3: squid generates an internal request.

 tcpClient == NULL    (%>a:%>p,%>la:%>lp) [log "-"]
 al->cache.port == NULL     (%la:%lp) [log "-"]

13 years agoFixed max-stale check. Entities not exceeding max-stale were marked as stale.
Alex Rousskov [Fri, 9 Sep 2011 16:33:54 +0000 (10:33 -0600)] 
Fixed max-stale check. Entities not exceeding max-stale were marked as stale.

Since the fixed check is performed for entities already suspected of being
stale by refreshCheck(), it is difficult to describe exactly which entities
were affected by the bug. A rough description would be "entities which would
otherwise qualify for a FRESH_OVERRIDE_EXPIRES or FRESH_OVERRIDE_LASTMOD
exceptions located below the fixed check.

Other concerns about staleness checks have been discussed on squid-dev's
"max_stale broken?" email thread.

13 years agoAdded RunnersRegistry, an API to register and, later, run a group of actions.
Alex Rousskov [Fri, 9 Sep 2011 16:16:43 +0000 (10:16 -0600)] 
Added RunnersRegistry, an API to register and, later, run a group of actions.

Useful for keeping general initialization/cleanup management code (e.g.,
main.cc) independent from specific initialization/cleanup code (e.g.,
Store file systems or memory cache) during staged initialization and
cleaning.

Designed with Rock Store needs in mind. Currently unused. Should eventually be
used for most modules initialization and cleanup, removing main.cc dependency
on those modules and perfecting [de]initialization order.

13 years agoDocument STUB.h macros and usage
Amos Jeffries [Fri, 9 Sep 2011 13:46:49 +0000 (07:46 -0600)] 
Document STUB.h macros and usage

13 years agoMaintenance: re-instate snapshot testing
Amos Jeffries [Fri, 9 Sep 2011 09:28:19 +0000 (03:28 -0600)] 
Maintenance: re-instate snapshot testing

13 years agoCleanup: make getOutgoingAddress fix local/remote protocol
Amos Jeffries [Fri, 9 Sep 2011 09:24:28 +0000 (03:24 -0600)] 
Cleanup: make getOutgoingAddress fix local/remote protocol

13 years agoMaintenance: add revno and build-info to snapshot bundles
Amos Jeffries [Fri, 9 Sep 2011 09:13:10 +0000 (03:13 -0600)] 
Maintenance: add revno and build-info to snapshot bundles

13 years agoBug 3335: ICAP service is down
Amos Jeffries [Thu, 8 Sep 2011 14:11:05 +0000 (02:11 +1200)] 
Bug 3335: ICAP service is down

13 years agobasic_db_auth: display available DSN drivers on connect error
Amos Jeffries [Wed, 7 Sep 2011 22:42:26 +0000 (10:42 +1200)] 
basic_db_auth: display available DSN drivers on connect error

13 years ago%I shows hostname on SSL error page
Christos Tsantilas [Wed, 7 Sep 2011 12:42:29 +0000 (15:42 +0300)] 
%I shows hostname on SSL error page

The %I must print the server ip address, but currently displays the host name of
the server on squid error pages. This patch fixes %I to print the server ip
address in the server or "[unknown]" otherwise.

This is a Measurement Factory project

13 years agoSourceFormat Enforcement
Automatic source maintenance [Wed, 7 Sep 2011 00:16:11 +0000 (18:16 -0600)] 
SourceFormat Enforcement

13 years agoTemporary fixed coredumps when isOpen() is called during shutdown cleanup.
Alex Rousskov [Tue, 6 Sep 2011 20:14:29 +0000 (14:14 -0600)] 
Temporary fixed coredumps when isOpen() is called during shutdown cleanup.

For a permanent fix, we need to avoid deleting fd_table while it is still
in use by others, such as DeferredReads, possibly by allowing event loop
to run during shutdown.

13 years agoAdjusted cf.data.pre to reflect cross-vectoring point adaptation plan support.
Alex Rousskov [Tue, 6 Sep 2011 20:10:26 +0000 (14:10 -0600)] 
Adjusted cf.data.pre to reflect cross-vectoring point adaptation plan support.

These documentation changes were somehow missed from the r11327 commit that
introduced support for dynamic adaptation plans that cover multiple vectoring
points.

13 years agoSupport maximum field width for string access.log fields.
Alex Rousskov [Tue, 6 Sep 2011 18:28:11 +0000 (12:28 -0600)] 
Support maximum field width for string access.log fields.

Some standard command-line and some log processing tools have trouble
handling URLs or other logged fields exceeding 8KB in length. Moreover,
Squid violates its own log line format and truncates the entire log line
if, for example, the URL is 8KB long. By supporting .precision format
argument, we allow the administrator to specify logged URL size and
avoid these problems.

Limiting logged field width has no effect on traffic on the wire, with
the exception of log records if they are sent over the network, of course.

TODO: The name comes from the printf(3) "precision" format part. It may
be a good idea to rename our "precision" into max_width or similar,
especially if we do not support floating point precision logging.

TODO: Old code used chars to store user-configured field width and
precision. That does not work for URLs, headers, and other entries
longer than 256 characters. This patch changes the storage type to int.
The code should probably be polished further to remove unsigned->signed
conversions.

13 years agoAdded a Vector::front() method, to mimic std::vector and other STL containers.
Alex Rousskov [Tue, 6 Sep 2011 18:03:10 +0000 (12:03 -0600)] 
Added a Vector::front() method, to mimic std::vector and other STL containers.

13 years agoSend RST packet when closing an ICAP connection after a transaction error.
Alex Rousskov [Tue, 6 Sep 2011 17:57:57 +0000 (11:57 -0600)] 
Send RST packet when closing an ICAP connection after a transaction error.

This helps identify abnormal transaction termination at the ICAP server. The
code is from a production-running branch and was proven useful in some
environments (especially if the ICAP service needs help correctly dealing with
prematurely terminated transfers), but it is not yet clear whether the
advantages of doing this on a regular basis outweigh the overheads. If not,
we will need a squid.conf parameter to control connection closing behavior.

13 years agoMarked comm_reset_close() parameter as const because it is.
Alex Rousskov [Tue, 6 Sep 2011 17:56:10 +0000 (11:56 -0600)] 
Marked comm_reset_close() parameter as const because it is.

This allows const methods to call this Comm function with their conn member.

13 years agoLog ICAP_ERR_GONE ICAP transaction outcome when ICAP initiator disappears early.
Alex Rousskov [Tue, 6 Sep 2011 17:37:29 +0000 (11:37 -0600)] 
Log ICAP_ERR_GONE ICAP transaction outcome when ICAP initiator disappears early.

In this case, "early" means "before the end of the ICAP transaction".
Previously, "catch all" ICAP_ERR_UNKNOWN outcome was logged into the
adaptation log in such cases, raising red flags that there is something wrong
with the ICAP service or Squid.

13 years agoBump assert Connection.cc:29 down to a debug notice about Orphan FD (leaked)
Amos Jeffries [Tue, 6 Sep 2011 08:38:27 +0000 (20:38 +1200)] 
Bump assert Connection.cc:29 down to a debug notice about Orphan FD (leaked)

13 years agoBug 3281: pconn in-use while closing assertion
Amos Jeffries [Tue, 6 Sep 2011 08:24:09 +0000 (20:24 +1200)] 
Bug 3281: pconn in-use while closing assertion

13 years agoUpdated OpenSSL 1.0.0 version checks.
Amos Jeffries [Tue, 6 Sep 2011 07:07:52 +0000 (19:07 +1200)] 
Updated OpenSSL 1.0.0 version checks.

LHASH_LHASH and PSTRING are only screwed up in 1.0.0d and later.

13 years agoFix rejection of 200-status in deny_info
Amos Jeffries [Mon, 5 Sep 2011 10:57:01 +0000 (22:57 +1200)] 
Fix rejection of 200-status in deny_info

13 years agoBug 3319: Inconsistencies in error messages pt2
Amos Jeffries [Fri, 2 Sep 2011 12:35:57 +0000 (00:35 +1200)] 
Bug 3319: Inconsistencies in error messages pt2

13 years agoFix crash on missing port
Amos Jeffries [Fri, 2 Sep 2011 09:29:20 +0000 (21:29 +1200)] 
Fix crash on missing port

13 years agoBug 3259: assertion failed: Connection.cc:29: 'fd<0' after REVIVED PARENT
Amos Jeffries [Thu, 1 Sep 2011 14:12:28 +0000 (02:12 +1200)] 
Bug 3259: assertion failed: Connection.cc:29: 'fd<0' after REVIVED PARENT

13 years agoBug 3303: Support for non-English usernames in log files
Amos Jeffries [Thu, 1 Sep 2011 13:52:18 +0000 (01:52 +1200)] 
Bug 3303: Support for non-English usernames in log files

Also, correct documentation for the default formats. Looks realy weird
but according to the code AND the documented option bytes [ is default.

13 years agoLanguage: af updates
F Wolff [Thu, 1 Sep 2011 12:02:43 +0000 (00:02 +1200)] 
Language: af updates

13 years agoBug 3243: Fix cases: raw-IPv6, case variant FQDN, internal request
Amos Jeffries [Thu, 1 Sep 2011 05:52:59 +0000 (17:52 +1200)] 
Bug 3243: Fix cases: raw-IPv6, case variant FQDN, internal request

* do not unwrap the Host header IPv6. URL is not unwrapped for the test.
  They should be identical regardless of wrapping choice.
  Also ipcache happily unwraps for the intercept resolution cases

* use matchDomainName() algorithm instead of strcmp(). It is tuned for
  fast case-less domain comparisons. But does support wildcard matches
  so add a check of domain string length first.

* bypass for requests about to be serviced internally. We have some nasty
  code of our own re-writing the URL without updating the Host: header.

Thanks to Sergey Merzlikin and Jenny Lee for detecting these.

13 years agoRemove duplicated code in gopher fix
Henrik Nordstrom [Wed, 31 Aug 2011 11:50:14 +0000 (13:50 +0200)] 
Remove duplicated code in gopher fix
harmless copy-paste error when patch was forward-ported from squid-2

13 years agoBug 3321: IPv4 Transport endpoint is not connected
Amos Jeffries [Wed, 31 Aug 2011 10:58:00 +0000 (22:58 +1200)] 
Bug 3321: IPv4 Transport endpoint is not connected

Match outgoing wildcard IP family to destination

In SMP mode the socket opening only considers local IP. Ensure this will
match the destination IP even when outgoing IP is unset.

13 years agoCleanup: make IP address show AnyAddr() as v4 or v6
Amos Jeffries [Tue, 30 Aug 2011 15:51:49 +0000 (03:51 +1200)] 
Cleanup: make IP address show AnyAddr() as v4 or v6

13 years agoBug 3320: miss_access description confusing
Amos Jeffries [Tue, 30 Aug 2011 09:10:14 +0000 (03:10 -0600)] 
Bug 3320: miss_access description confusing

13 years agoDocs: limit internal DNS options properly
Amos Jeffries [Tue, 30 Aug 2011 08:45:01 +0000 (02:45 -0600)] 
Docs: limit internal DNS options properly

13 years agoBug 3322: adapt:: and icap:: format codes do not parse
Sergey Merzlikin [Mon, 29 Aug 2011 11:46:04 +0000 (05:46 -0600)] 
Bug 3322: adapt:: and icap:: format codes do not parse

13 years agoBug 3319: Inconsistencies in error messages
Amos Jeffries [Mon, 29 Aug 2011 03:47:54 +0000 (15:47 +1200)] 
Bug 3319: Inconsistencies in error messages

13 years agoUseful error message from NCSA when DES blocked.
Amos Jeffries [Sun, 28 Aug 2011 16:40:37 +0000 (10:40 -0600)] 
Useful error message from NCSA when DES blocked.

13 years agoPrep for 3.1.15 and 3.2.0.11
Amos Jeffries [Sun, 28 Aug 2011 07:39:52 +0000 (01:39 -0600)] 
Prep for 3.1.15 and 3.2.0.11

13 years agoBug 3295: broken escaping in rfc1738_do_escape
Amos Jeffries [Sun, 28 Aug 2011 04:38:11 +0000 (16:38 +1200)] 
Bug 3295: broken escaping in rfc1738_do_escape

13 years agoBug 3311: segmentation fault in getMyPort() with only intercept port set
Amos Jeffries [Sat, 27 Aug 2011 18:53:09 +0000 (06:53 +1200)] 
Bug 3311: segmentation fault in getMyPort() with only intercept port set

13 years agoBug 3316: Failed to connect to nameserver using TCP
Amos Jeffries [Sat, 27 Aug 2011 18:32:18 +0000 (06:32 +1200)] 
Bug 3316: Failed to connect to nameserver using TCP

13 years agoPrep for 3.1.15 and 3.0.STABLE26
Amos Jeffries [Sat, 27 Aug 2011 14:40:52 +0000 (08:40 -0600)] 
Prep for 3.1.15 and 3.0.STABLE26

13 years agoBug 3301: ERR_DNS_FAIL never shown
Christos Tsantilas [Sat, 27 Aug 2011 08:54:25 +0000 (11:54 +0300)] 
Bug 3301: ERR_DNS_FAIL never shown

Latest squid never shows DNS errors for user. When the user tries to retrieve
web page from non-existent domain, ERR_CANNOT_FORWARD error appears,
which misleads both user and administrator.

13 years agoCorrect parsing or large Gopher indexes
Henrik Nordstrom [Fri, 26 Aug 2011 22:55:34 +0000 (00:55 +0200)] 
Correct parsing or large Gopher indexes

13 years agoPolished unused code.
Alex Rousskov [Fri, 26 Aug 2011 20:48:08 +0000 (14:48 -0600)] 
Polished unused code.

The unused dlopen() call is actually useful to enable when lt_dlopen() reports
"file not found" errors for loadable modules that do exist but that Libtool
cannot load successfully due to undefined symbols or other errors.

This inability to correctly report a library loading error is a long-standing
Libtool bug, stemming from Libtool's desire to try and load several
differently named library files until one succeeds, losing true error
information in the process.

13 years agoDrop excess bytes from gopher input.
Amos Jeffries [Fri, 26 Aug 2011 17:47:07 +0000 (05:47 +1200)] 
Drop excess bytes from gopher input.

13 years agoPortability: Drop u_short type
Amos Jeffries [Fri, 26 Aug 2011 16:50:49 +0000 (10:50 -0600)] 
Portability: Drop u_short type

Use uint16_t for precise binary size or unsigned short instead.

13 years agoRemove: Convert tunnel to use MemBuf buffers
Amos Jeffries [Fri, 26 Aug 2011 15:33:32 +0000 (03:33 +1200)] 
Remove: Convert tunnel to use MemBuf buffers

Turns out read/write do not maintain MemBuf size field as needed.
This needs to be fixed first.

13 years agoPortability: avoid htons() on 8-bit values. Little Endians complain.
Amos Jeffries [Fri, 26 Aug 2011 05:09:04 +0000 (17:09 +1200)] 
Portability: avoid htons() on 8-bit values. Little Endians complain.

13 years agoSourceFormat Enforcement
Automatic source maintenance [Fri, 26 Aug 2011 00:12:19 +0000 (18:12 -0600)] 
SourceFormat Enforcement

13 years agoBug 3310: regression: %<pt translates as %<p
Amos Jeffries [Thu, 25 Aug 2011 12:32:02 +0000 (00:32 +1200)] 
Bug 3310: regression: %<pt translates as %<p

Separate the format tags into sub-groups for size-oriented checks.

Taking the opportunity, separate the section along the namespace borders.

13 years agoStop Squid-2 automatic daily bundles
Amos Jeffries [Wed, 24 Aug 2011 14:05:19 +0000 (08:05 -0600)] 
Stop Squid-2 automatic daily bundles

13 years agoQuiet trace output on snapshot generation.
Amos Jeffries [Wed, 24 Aug 2011 12:54:45 +0000 (06:54 -0600)] 
Quiet trace output on snapshot generation.

13 years agoPortability: work through top_builddir. builddir can be undefined
Amos Jeffries [Tue, 23 Aug 2011 13:27:51 +0000 (01:27 +1200)] 
Portability: work through top_builddir. builddir can be undefined

13 years agoOptimize: miss_access absent from config is allow
Amos Jeffries [Tue, 23 Aug 2011 12:23:33 +0000 (00:23 +1200)] 
Optimize: miss_access absent from config is allow

13 years agonegotiate_wrapper_auth: fix warnings on MacOSX by simplification
Amos Jeffries [Tue, 23 Aug 2011 11:13:10 +0000 (23:13 +1200)] 
negotiate_wrapper_auth: fix warnings on MacOSX by simplification

 * fold several if statements down to avoid compiler warnings
   about potential use-before-set of 'length'.

 * remove static err variable as unused once its cases are
   folded down to one if statement.

13 years agoBug 2662: cf_gen failure when cross compiling
Bertrand Jacquin [Mon, 22 Aug 2011 14:45:52 +0000 (08:45 -0600)] 
Bug 2662: cf_gen failure when cross compiling

Adds support for "./configure HOSTCXX=foo" to specify a host compiler
to build cf_gen with. If none is specified the normal build compiler will
be used.

13 years agontlm_fake_auth: helper protocol fix on Windows
Francesco Chemolli [Mon, 22 Aug 2011 11:47:16 +0000 (23:47 +1200)] 
ntlm_fake_auth: helper protocol fix on Windows

strncasecmp is not available on MinGW. Use strncmp instead
and rely on squid to send properly-capitalized commands.

13 years agocf_gen requires cstdlib for exit() definition
Amos Jeffries [Mon, 22 Aug 2011 06:36:16 +0000 (00:36 -0600)] 
cf_gen requires cstdlib for exit() definition

13 years agoSourceFormat Enforcement
Automatic source maintenance [Mon, 22 Aug 2011 00:13:08 +0000 (18:13 -0600)] 
SourceFormat Enforcement

13 years agoUpdate cf_gen objects to use STL containers and extend syntax for DEFAULT*
Amos Jeffries [Sun, 21 Aug 2011 06:34:26 +0000 (18:34 +1200)] 
Update cf_gen objects to use STL containers and extend syntax for DEFAULT*

Removes all need for explicit memory management of the parsed tree.

Alters DEFAULT: tag to allow multiple line values to be pre-defined.

Adds DEFAULT_DOC: tag to allow text description of a default in the documented
versions of config file instead of explicit code-level values.

Also updates the output slightly so cf_parser.cci conforms to the current
coding style gidelines.

13 years agoTypo in rev.11661
Sergey Merzlikin [Sun, 21 Aug 2011 01:28:59 +0000 (19:28 -0600)] 
Typo in rev.11661

13 years agoBug 3213: https sites (CONNECT) not open when using NTLM
Amos Jeffries [Sun, 21 Aug 2011 00:50:02 +0000 (12:50 +1200)] 
Bug 3213: https sites (CONNECT) not open when using NTLM

13 years agoSourceFormat Enforcement
Automatic source maintenance [Sun, 21 Aug 2011 00:12:49 +0000 (18:12 -0600)] 
SourceFormat Enforcement

13 years agoBug 2279: Log Format options to log server source IP and port
Amos Jeffries [Sat, 20 Aug 2011 15:57:06 +0000 (03:57 +1200)] 
Bug 2279: Log Format options to log server source IP and port

 * Add %<a and %<p log format tokens

 * Remove log_ip_on_direct configuration directive

 * Rename %la to %>la and %lp to %>lp

 * polish log format tokens and documentation

 * de-duplicate tunnel.cc and forward.cc updateHierarchyInfo() code.

This last is the only logic change. It involved creating hier.note()
and shuffling bits of code around inside forward.cc to ensure
connection setup had a single function, startConnectionOrFai(), which
began the server connect process for all destination changes.

13 years agoBug 3288: regression in %<la and %<lp
Amos Jeffries [Sat, 20 Aug 2011 08:21:11 +0000 (20:21 +1200)] 
Bug 3288: regression in %<la and %<lp

13 years agoFix logformat token initialization
Amos Jeffries [Sat, 20 Aug 2011 07:57:17 +0000 (01:57 -0600)] 
Fix logformat token initialization

13 years agoDoxygen style updates
Amos Jeffries [Sat, 20 Aug 2011 01:55:49 +0000 (13:55 +1200)] 
Doxygen style updates

It appears that doxygen 1.7.4 takes the header HTML we give it and 'fixes'
missing tags before appending the footer we give it.

13 years agoConverts the bulk of cf_gen to C++ OOP code.
Amos Jeffries [Fri, 19 Aug 2011 03:35:19 +0000 (21:35 -0600)] 
Converts the bulk of cf_gen to C++ OOP code.

* char* tree members to std::string. Which eliminates xstrdup() and
  xis*() calls.

* structs to classes and replaces calloc/free with new/delete.

* link cf_gen_depends.cci directly to autoconf.h defines.

The result of these is that we can erase the dependencies on util.h,
time.cc, config.h, libcompat.la, libmisc.la and other libraries.
Directly fixing seevral build and cross-compile issues that keep appearing
on various OS.

TODO:
 There is a bit further cleanup we can do. Replacing several classes with
 std::list<std::string>.

13 years agoSourceFormat Enforcement
Automatic source maintenance [Wed, 17 Aug 2011 00:14:46 +0000 (18:14 -0600)] 
SourceFormat Enforcement

13 years agoCompile fix: use code instead of static initialization
Francesco Chemolli [Tue, 16 Aug 2011 21:42:05 +0000 (23:42 +0200)] 
Compile fix: use code instead of static initialization

g++ 4.4.5 on ARM mis-detects an inizializer's variable size. Give it a hint.

13 years agoAdd special case for CONNECT request Host: verify
Amos Jeffries [Tue, 16 Aug 2011 08:13:38 +0000 (20:13 +1200)] 
Add special case for CONNECT request Host: verify

13 years agoPolish: warn on every ssl-bump disable, with port details
Amos Jeffries [Tue, 16 Aug 2011 00:01:21 +0000 (18:01 -0600)] 
Polish: warn on every ssl-bump disable, with port details

13 years agoAudit updates on rev.11634
Alex Rousskov [Mon, 15 Aug 2011 22:21:03 +0000 (16:21 -0600)] 
Audit updates on rev.11634

13 years agoRework CVE-2009-0801 case set
Amos Jeffries [Mon, 15 Aug 2011 12:47:58 +0000 (00:47 +1200)] 
Rework CVE-2009-0801 case set

 * Correct results when Host: and URL both contain an unusual port.
 * Catch additional cases where implicit default port is made explicit

13 years agoSourceFormat Enforcement
Automatic source maintenance [Mon, 15 Aug 2011 00:12:18 +0000 (18:12 -0600)] 
SourceFormat Enforcement

13 years agoImprove CVE-2009-0801 detection warning
Amos Jeffries [Sun, 14 Aug 2011 23:34:26 +0000 (11:34 +1200)] 
Improve CVE-2009-0801 detection warning

13 years agoFix NIS helper build on FreeBSD
Pawel Worach [Sun, 14 Aug 2011 12:42:59 +0000 (00:42 +1200)] 
Fix NIS helper build on FreeBSD

Fails on clang++ and other strict compilers due to missing __cplusplus
checks in FreeBSD system headers and yp_prot.h typedefs bool unless
BOOL_DEFINED is defined.

13 years agoConvert AuthenticateAcl() to use new ACL states
Amos Jeffries [Sun, 14 Aug 2011 12:18:57 +0000 (06:18 -0600)] 
Convert AuthenticateAcl() to use new ACL states

13 years agoConvert external ACL to use ACL states
Amos Jeffries [Sun, 14 Aug 2011 11:40:33 +0000 (05:40 -0600)] 
Convert external ACL to use ACL states

13 years agoUpdate response generationg to handle auth ACL reply cases
Amos Jeffries [Sun, 14 Aug 2011 10:47:37 +0000 (04:47 -0600)] 
Update response generationg to handle auth ACL reply cases

Known + expired + OK credentials do not need a re-challenge. They are in
grace period where helper revalidation is all that is needed.

Any other result requires an error or challenge response of some sort.

13 years agoBug 1791: timestampsSet does not validate Date: if server sends very old date
Barry Dobyns [Sun, 14 Aug 2011 03:48:26 +0000 (21:48 -0600)] 
Bug 1791: timestampsSet does not validate Date: if server sends very old date

13 years agoBug 3211: ssl_crtd start even if no ssl-bump port is configured
Christos Tsantilas [Sun, 14 Aug 2011 03:28:48 +0000 (21:28 -0600)] 
Bug 3211: ssl_crtd start even if no ssl-bump port is configured

13 years agoBug 3289: cache manager parameters not parsed without password
Amos Jeffries [Sun, 14 Aug 2011 03:20:59 +0000 (15:20 +1200)] 
Bug 3289: cache manager parameters not parsed without password

13 years agoSupport extended authentication states to ACL results
Amos Jeffries [Sat, 13 Aug 2011 15:53:38 +0000 (09:53 -0600)] 
Support extended authentication states to ACL results

Support sub-states of authentication to be sent as results from ACLs.
This allows future work to resolve issues around cases such as expired
but known credentials being used in fast category access controls.

The new authentication states are:
  ACCESS_AUTH_OK
    - equivalent to ACCESS_ALLOWED

  ACCESS_AUTH_REQUIRED
    - Missing Credentials. Used to be ACCESS_REQ_PROXY_AUTH

  ACCESS_AUTH_EXPIRED_OK
    - Expired now. Were Okay.

  ACCESS_AUTH_EXPIRED_BAD
    - Expired now. Were Failed.

Also converts cases of ACCESS_REQ_PROXY_AUTH to the new name.

As yet no attempt is made to alter auth or access control logics to use
the new states.

13 years agoFix signed/unsigend conversion error
Amos Jeffries [Sat, 13 Aug 2011 14:55:47 +0000 (02:55 +1200)] 
Fix signed/unsigend conversion error

13 years agoFix GCC 4.6 unused variable in regex
Amos Jeffries [Sat, 13 Aug 2011 14:49:59 +0000 (02:49 +1200)] 
Fix GCC 4.6 unused variable in regex

13 years agoTypo in cf_gen
Pawel Worach [Sat, 13 Aug 2011 07:00:23 +0000 (19:00 +1200)] 
Typo in cf_gen

13 years agoBug 3217: "!fd_table[fd].closing()" from ServerStateData::noteMoreBodySpaceAvailable
Alex Rousskov [Sat, 13 Aug 2011 04:15:06 +0000 (22:15 -0600)] 
Bug 3217: "!fd_table[fd].closing()" from ServerStateData::noteMoreBodySpaceAvailable

It is possible that the next hop connection is going through the closing steps
when we receive a "noteMoreBodySpaceAvailable" notification from the response
body consumer. Do not try to read in this case.

13 years agoFix compile errors detected by clang++
Pawel Worach [Fri, 12 Aug 2011 04:32:14 +0000 (22:32 -0600)] 
Fix compile errors detected by clang++

13 years agoPortability: cf_gen stream errors on FreeBSD
Amos Jeffries [Wed, 10 Aug 2011 14:39:48 +0000 (08:39 -0600)] 
Portability: cf_gen stream errors on FreeBSD

13 years agoBug 3107: nsca_auth DES silently truncates passwords to 8 bytes
Amos Jeffries [Wed, 10 Aug 2011 00:23:14 +0000 (18:23 -0600)] 
Bug 3107: nsca_auth DES silently truncates passwords to 8 bytes

13 years agoSourceFormat Enforcement
Automatic source maintenance [Wed, 10 Aug 2011 00:12:19 +0000 (18:12 -0600)] 
SourceFormat Enforcement

13 years agoregex optimization: const-correctness
Amos Jeffries [Tue, 9 Aug 2011 14:01:18 +0000 (02:01 +1200)] 
regex optimization: const-correctness

13 years agocf_gen.cc: work around brokenness in Intel's compiler wrt 64-bit fstreams
Francesco Chemolli [Tue, 9 Aug 2011 10:04:54 +0000 (12:04 +0200)] 
cf_gen.cc: work around brokenness in Intel's compiler wrt 64-bit fstreams

13 years agoOptimize regular expression ACLs
Mrcus Kool [Tue, 9 Aug 2011 07:09:03 +0000 (01:09 -0600)] 
Optimize regular expression ACLs

This patch is inspired by the work that I did for ufdbGuard and a few emails with Amos.

The new code optimises lists of regular expressions.

The optimisations are:
* initial .* is stripped
* RE-1 RE-2 ... RE-n are joined into one large RE: (RE-1)|(RE-2)|...|(RE-n)
* -i ... -i options are optimised: the second one is ignored, same for +i

If compounding optimization fails it falls back to using unoptimized
expressions.

13 years agoSourceFormat Enforcement
Automatic source maintenance [Tue, 9 Aug 2011 00:12:17 +0000 (18:12 -0600)] 
SourceFormat Enforcement

13 years agocf_gen.cc fix: include errno.h
Francesco Chemolli [Mon, 8 Aug 2011 21:43:52 +0000 (23:43 +0200)] 
cf_gen.cc fix: include errno.h

13 years agoImprove error reporting in cf_gen.cc
Francesco Chemolli [Mon, 8 Aug 2011 19:12:16 +0000 (21:12 +0200)] 
Improve error reporting in cf_gen.cc

13 years agoMigrate cf_gen.cc from C-style stdio to C++ iostreams.
Francesco Chemolli [Mon, 8 Aug 2011 16:05:17 +0000 (18:05 +0200)] 
Migrate cf_gen.cc from C-style stdio to C++ iostreams.