From a6466d4045c16d39f651bcba168227e3fe0e9b82 Mon Sep 17 00:00:00 2001 From: Henrik Nordström Date: Dec 19 2008 07:19:10 +0000 Subject: upstream bugfixes for cache corruption and access.log response size errors --- diff --git a/b8920.patch b/b8920.patch new file mode 100644 index 0000000..6aaafbe --- /dev/null +++ b/b8920.patch @@ -0,0 +1,36 @@ +------------------------------------------------------------ +revno: 8920 +revision-id: squid3@treenet.co.nz-20081019111450-8u5w57an2g1vh9z7 +parent: squid3@treenet.co.nz-20081015084824-z2n6sc78b0p88pv6 +committer: Amos Jeffries +branch nick: SQUID_3_0 +timestamp: Mon 2008-10-20 00:14:50 +1300 +message: + Author: Mikio Kishi + Fix regression: access.log request size tag (%>st) +------------------------------------------------------------ +# Bazaar merge directive format 2 (Bazaar 0.90) +# revision_id: squid3@treenet.co.nz-20081019111450-8u5w57an2g1vh9z7 +# target_branch: http://www.squid-cache.org/bzr/squid3/branches\ +# /SQUID_3_0/ +# testament_sha1: 1f837decf60a52e0de94e91c3467edfcc6c13714 +# timestamp: 2008-10-19 11:16:02 +0000 +# source_branch: http://www.squid-cache.org/bzr/squid3/branches\ +# /SQUID_3_0 +# base_revision_id: squid3@treenet.co.nz-20081015084824-\ +# z2n6sc78b0p88pv6 +# +# Begin patch +=== modified file 'src/access_log.cc' +--- src/access_log.cc 2008-06-27 13:40:12 +0000 ++++ src/access_log.cc 2008-10-19 11:14:50 +0000 +@@ -783,7 +783,7 @@ + break; + + case LFT_REQUEST_SIZE_TOTAL: +- outint = al->cache.requestSize; ++ outoff = al->cache.requestSize; + dooff = 1; + break; + + diff --git a/b8930.patch b/b8930.patch new file mode 100644 index 0000000..088bb10 --- /dev/null +++ b/b8930.patch @@ -0,0 +1,74 @@ +------------------------------------------------------------ +revno: 8930 +revision-id: squid3@treenet.co.nz-20081201053029-k18urfbqvmmo1whl +parent: squid3@treenet.co.nz-20081128120843-juy12m80zdtusl5v +committer: Amos Jeffries +branch nick: SQUID_3_0 +timestamp: Mon 2008-12-01 18:30:29 +1300 +message: + Rollback rev 8909 + + This change to StoreIO overlooked the signedness of the StoreIO* length + parameter. It may have resulted in objects that should not have been + store making their way into the cache. + + Caches created by 3.0.STABLE10 release are known to contain many invalid + entries when rolled back to STABLE9 release. Whether or not these entries + are fatal to Squid is still unknown. It is currently expected that they + will be erased properly, but cause a lot of cache.log warnings while that + is happening. It is left to admin to decide if its worth purging their + cache on upgrade. +------------------------------------------------------------ +# Bazaar merge directive format 2 (Bazaar 0.90) +# revision_id: squid3@treenet.co.nz-20081201053029-k18urfbqvmmo1whl +# target_branch: http://www.squid-cache.org/bzr/squid3/branches\ +# /SQUID_3_0/ +# testament_sha1: 491d242447b01a6ec90eb9983cc9384b050fae73 +# timestamp: 2008-12-01 05:47:46 +0000 +# source_branch: http://www.squid-cache.org/bzr/squid3/branches\ +# /SQUID_3_0 +# base_revision_id: squid3@treenet.co.nz-20081128120843-\ +# juy12m80zdtusl5v +# +# Begin patch +=== modified file 'src/StoreIOBuffer.h' +--- src/StoreIOBuffer.h 2008-10-06 11:35:50 +0000 ++++ src/StoreIOBuffer.h 2008-12-01 05:30:29 +0000 +@@ -46,17 +46,9 @@ + StoreIOBuffer():length(0), offset (0), data (NULL) {flags.error = 0;} + + StoreIOBuffer(size_t aLength, int64_t anOffset, char *someData) : +- offset (anOffset), data (someData) ++ length (aLength), offset (anOffset), data (someData) + { +- /* maintain own state: detect size errors now */ +- if (aLength <0) { +- flags.error = 1; +- length = 0; +- } +- else { +- flags.error = 0; +- length = aLength; +- } ++ flags.error = 0; + } + + /* Create a StoreIOBuffer from a MemBuf and offset */ + +=== modified file 'src/store_client.cc' +--- src/store_client.cc 2008-10-06 11:35:50 +0000 ++++ src/store_client.cc 2008-12-01 05:30:29 +0000 +@@ -145,8 +145,11 @@ + { + StoreIOBuffer result(sz, 0 ,copyInto.data); + +- if (error) { ++ if (sz < 0) { + result.flags.error = 1; ++ result.length = 0; ++ } else { ++ result.flags.error = error ? 1 : 0; + } + + result.offset = cmp_offset; + diff --git a/squid.spec b/squid.spec index 335b51b..6c032f1 100644 --- a/squid.spec +++ b/squid.spec @@ -4,7 +4,7 @@ Name: squid Version: 3.0.STABLE10 -Release: 1%{?dist} +Release: 2%{?dist} Summary: The Squid proxy caching server Epoch: 7 License: GPLv2+ @@ -20,6 +20,8 @@ Source98: perl-requires-squid.sh ## Source99: filter-requires-squid.sh # Upstream patches +Patch001: http://www.squid-cache.org/Versions/v3/3.0/changesets/b8920.patch +Patch002: http://www.squid-cache.org/Versions/v3/3.0/changesets/b8930.patch # External patches @@ -337,6 +339,9 @@ fi chgrp squid /var/cache/samba/winbindd_privileged >/dev/null 2>&1 || : %changelog +* Fri Dec 19 2008 Henrik Nordstrom - 7:3.0.STABLE10-2 +- upstream bugfixes for cache corruption and access.log response size errors + * Fri Oct 24 2008 Henrik Nordstrom - 7:3.0.STABLE10-1 - upgrade to latest upstream