Gentoo Archives: gentoo-commits

From: "Alin Nastac (mrness)" <mrness@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-proxy/squid/files: squid-2.7.3-gentoo.patch squid-3.0.7-adapted-zph.patch squid-3.0.7-gentoo.patch
Date: Thu, 26 Jun 2008 19:32:22
Message-Id: E1KBxCa-0000g5-27@stork.gentoo.org
1 mrness 08/06/26 19:32:16
2
3 Added: squid-2.7.3-gentoo.patch
4 squid-3.0.7-adapted-zph.patch
5 squid-3.0.7-gentoo.patch
6 Log:
7 Version bumps (#229565).
8 (Portage version: 2.1.4.4)
9
10 Revision Changes Path
11 1.1 net-proxy/squid/files/squid-2.7.3-gentoo.patch
12
13 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-proxy/squid/files/squid-2.7.3-gentoo.patch?rev=1.1&view=markup
14 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-proxy/squid/files/squid-2.7.3-gentoo.patch?rev=1.1&content-type=text/plain
15
16 Index: squid-2.7.3-gentoo.patch
17 ===================================================================
18 diff -Nru squid-2.7.STABLE3.orig/configure.in squid-2.7.STABLE3/configure.in
19 --- squid-2.7.STABLE3.orig/configure.in 2008-06-26 00:18:55.000000000 +0200
20 +++ squid-2.7.STABLE3/configure.in 2008-06-26 20:37:08.000000000 +0200
21 @@ -18,9 +18,9 @@
22 PRESET_LDFLAGS="$LDFLAGS"
23
24 dnl Set default LDFLAGS
25 -if test -z "$LDFLAGS"; then
26 - LDFLAGS="-g"
27 -fi
28 +dnl if test -z "$LDFLAGS"; then
29 +dnl LDFLAGS="-g"
30 +dnl fi
31
32 dnl Check for GNU cc
33 AC_PROG_CC
34 diff -Nru squid-2.7.STABLE3.orig/helpers/basic_auth/MSNT/confload.c squid-2.7.STABLE3/helpers/basic_auth/MSNT/confload.c
35 --- squid-2.7.STABLE3.orig/helpers/basic_auth/MSNT/confload.c 2002-06-26 21:09:48.000000000 +0200
36 +++ squid-2.7.STABLE3/helpers/basic_auth/MSNT/confload.c 2008-06-26 20:37:08.000000000 +0200
37 @@ -24,7 +24,7 @@
38
39 /* Path to configuration file */
40 #ifndef SYSCONFDIR
41 -#define SYSCONFDIR "/usr/local/squid/etc"
42 +#define SYSCONFDIR "/etc/squid"
43 #endif
44 #define CONFIGFILE SYSCONFDIR "/msntauth.conf"
45
46 diff -Nru squid-2.7.STABLE3.orig/helpers/basic_auth/MSNT/msntauth.conf.default squid-2.7.STABLE3/helpers/basic_auth/MSNT/msntauth.conf.default
47 --- squid-2.7.STABLE3.orig/helpers/basic_auth/MSNT/msntauth.conf.default 2002-06-26 20:44:28.000000000 +0200
48 +++ squid-2.7.STABLE3/helpers/basic_auth/MSNT/msntauth.conf.default 2008-06-26 20:37:08.000000000 +0200
49 @@ -8,6 +8,6 @@
50 server other_PDC other_BDC otherdomain
51
52 # Denied and allowed users. Comment these if not needed.
53 -#denyusers /usr/local/squid/etc/msntauth.denyusers
54 -#allowusers /usr/local/squid/etc/msntauth.allowusers
55 +#denyusers /etc/squid/msntauth.denyusers
56 +#allowusers /etc/squid/msntauth.allowusers
57
58 diff -Nru squid-2.7.STABLE3.orig/helpers/basic_auth/SMB/Makefile.am squid-2.7.STABLE3/helpers/basic_auth/SMB/Makefile.am
59 --- squid-2.7.STABLE3.orig/helpers/basic_auth/SMB/Makefile.am 2005-05-17 18:56:26.000000000 +0200
60 +++ squid-2.7.STABLE3/helpers/basic_auth/SMB/Makefile.am 2008-06-26 20:37:08.000000000 +0200
61 @@ -14,7 +14,7 @@
62 ## FIXME: autoconf should test for the samba path.
63
64 SMB_AUTH_HELPER = smb_auth.sh
65 -SAMBAPREFIX=/usr/local/samba
66 +SAMBAPREFIX=/usr
67 SMB_AUTH_HELPER_PATH = $(libexecdir)/$(SMB_AUTH_HELPER)
68
69 libexec_SCRIPTS = $(SMB_AUTH_HELPER)
70 diff -Nru squid-2.7.STABLE3.orig/helpers/basic_auth/SMB/smb_auth.sh squid-2.7.STABLE3/helpers/basic_auth/SMB/smb_auth.sh
71 --- squid-2.7.STABLE3.orig/helpers/basic_auth/SMB/smb_auth.sh 2001-01-08 00:36:46.000000000 +0100
72 +++ squid-2.7.STABLE3/helpers/basic_auth/SMB/smb_auth.sh 2008-06-26 20:37:08.000000000 +0200
73 @@ -24,7 +24,7 @@
74 read AUTHSHARE
75 read AUTHFILE
76 read SMBUSER
77 -read SMBPASS
78 +read -r SMBPASS
79
80 # Find domain controller
81 echo "Domain name: $DOMAINNAME"
82 @@ -47,7 +47,7 @@
83 addropt=""
84 fi
85 echo "Query address options: $addropt"
86 -dcip=`$SAMBAPREFIX/bin/nmblookup $addropt "$PASSTHROUGH#1c" | awk '/^[0-9.]+ / { print $1 ; exit }'`
87 +dcip=`$SAMBAPREFIX/bin/nmblookup $addropt "$PASSTHROUGH#1c" | awk '/^[0-9.]+\..+ / { print $1 ; exit }'`
88 echo "Domain controller IP address: $dcip"
89 [ -n "$dcip" ] || exit 1
90
91 diff -Nru squid-2.7.STABLE3.orig/helpers/external_acl/session/squid_session.8 squid-2.7.STABLE3/helpers/external_acl/session/squid_session.8
92 --- squid-2.7.STABLE3.orig/helpers/external_acl/session/squid_session.8 2007-01-06 18:28:35.000000000 +0100
93 +++ squid-2.7.STABLE3/helpers/external_acl/session/squid_session.8 2008-06-26 20:37:08.000000000 +0200
94 @@ -35,7 +35,7 @@
95 .P
96 Configuration example using the default automatic mode
97 .IP
98 -external_acl_type session ttl=300 negative_ttl=0 children=1 concurrency=200 %LOGIN /usr/local/squid/libexec/squid_session
99 +external_acl_type session ttl=300 negative_ttl=0 children=1 concurrency=200 %LOGIN /usr/libexec/squid/squid_session
100 .IP
101 acl session external session
102 .IP
103 diff -Nru squid-2.7.STABLE3.orig/helpers/external_acl/unix_group/squid_unix_group.8 squid-2.7.STABLE3/helpers/external_acl/unix_group/squid_unix_group.8
104 --- squid-2.7.STABLE3.orig/helpers/external_acl/unix_group/squid_unix_group.8 2006-05-14 17:07:24.000000000 +0200
105 +++ squid-2.7.STABLE3/helpers/external_acl/unix_group/squid_unix_group.8 2008-06-26 20:37:08.000000000 +0200
106 @@ -27,7 +27,7 @@
107 This squid.conf example defines two Squid acls. usergroup1 matches users in group1, and usergroup2
108 matches users in group2 or group3
109 .IP
110 -external_acl_type unix_group %LOGIN /usr/local/squid/libexec/squid_unix_group -p
111 +external_acl_type unix_group %LOGIN /usr/libexec/squid/squid_unix_group -p
112 .IP
113 acl usergroup1 external unix_group group1
114 .IP
115 diff -Nru squid-2.7.STABLE3.orig/src/access_log.c squid-2.7.STABLE3/src/access_log.c
116 --- squid-2.7.STABLE3.orig/src/access_log.c 2008-03-18 03:48:43.000000000 +0100
117 +++ squid-2.7.STABLE3/src/access_log.c 2008-06-26 20:37:08.000000000 +0200
118 @@ -1261,7 +1261,7 @@
119 LogfileStatus = LOG_ENABLE;
120 }
121 #if HEADERS_LOG
122 - headerslog = logfileOpen("/usr/local/squid/logs/headers.log", MAX_URL << 1, 0);
123 + headerslog = logfileOpen("/var/log/squid/headers.log", MAX_URL << 1, 0);
124 assert(NULL != headerslog);
125 #endif
126 #if FORW_VIA_DB
127 diff -Nru squid-2.7.STABLE3.orig/src/cf.data.pre squid-2.7.STABLE3/src/cf.data.pre
128 --- squid-2.7.STABLE3.orig/src/cf.data.pre 2008-06-25 00:54:18.000000000 +0200
129 +++ squid-2.7.STABLE3/src/cf.data.pre 2008-06-26 20:37:08.000000000 +0200
130 @@ -676,6 +676,8 @@
131 acl Safe_ports port 488 # gss-http
132 acl Safe_ports port 591 # filemaker
133 acl Safe_ports port 777 # multiling http
134 +acl Safe_ports port 901 # SWAT
135 +acl purge method PURGE
136 acl CONNECT method CONNECT
137 NOCOMMENT_END
138 DOC_END
139 @@ -709,6 +711,9 @@
140 # Only allow cachemgr access from localhost
141 http_access allow manager localhost
142 http_access deny manager
143 +# Only allow purge requests from localhost
144 +http_access allow purge localhost
145 +http_access deny purge
146 # Deny requests to unknown ports
147 http_access deny !Safe_ports
148 # Deny CONNECT to other than SSL ports
149 @@ -726,6 +731,9 @@
150 # from where browsing should be allowed
151 http_access allow localnet
152
153 +# Allow the localhost to have access by default
154 +http_access allow localhost
155 +
156 # And finally deny all other access to this proxy
157 http_access deny all
158 NOCOMMENT_END
159 @@ -3720,11 +3728,11 @@
160
161 NAME: cache_mgr
162 TYPE: string
163 -DEFAULT: webmaster
164 +DEFAULT: root
165 LOC: Config.adminEmail
166 DOC_START
167 Email-address of local cache manager who will receive
168 - mail if the cache dies. The default is "webmaster".
169 + mail if the cache dies. The default is "root".
170 DOC_END
171
172 NAME: mail_from
173 @@ -3753,12 +3761,12 @@
174
175 NAME: cache_effective_user
176 TYPE: string
177 -DEFAULT: nobody
178 +DEFAULT: squid
179 LOC: Config.effectiveUser
180 DOC_START
181 If you start Squid as root, it will change its effective/real
182 UID/GID to the user specified below. The default is to change
183 - to UID to nobody. If you define cache_effective_user, but not
184 + to UID to squid. If you define cache_effective_user, but not
185 cache_effective_group, Squid sets the GID to the effective
186 user's default group ID (taken from the password file) and
187 supplementary group list from the from groups membership of
188 @@ -4395,12 +4403,12 @@
189 NAME: snmp_port
190 TYPE: ushort
191 LOC: Config.Port.snmp
192 -DEFAULT: 3401
193 +DEFAULT: 0
194 IFDEF: SQUID_SNMP
195 DOC_START
196 Squid can now serve statistics and status information via SNMP.
197 - By default it listens to port 3401 on the machine. If you don't
198 - wish to use SNMP, set this to "0".
199 + By default snmp_port is disabled. If you wish to use SNMP,
200 + set this to "3401" (or any other number you like).
201 DOC_END
202
203 NAME: snmp_access
204 @@ -4471,12 +4479,12 @@
205 NAME: htcp_port
206 IFDEF: USE_HTCP
207 TYPE: ushort
208 -DEFAULT: 4827
209 +DEFAULT: 0
210 LOC: Config.Port.htcp
211 DOC_START
212 The port number where Squid sends and receives HTCP queries to
213 - and from neighbor caches. Default is 4827. To disable use
214 - "0".
215 + and from neighbor caches. To turn it on you want to set it to
216 + 4827. By default it is set to "0" (disabled).
217 DOC_END
218
219 NAME: log_icp_queries
220 @@ -5373,6 +5381,9 @@
221 If you disable this, it will appear as
222
223 X-Forwarded-For: unknown
224 +NOCOMMENT_START
225 +forwarded_for off
226 +NOCOMMENT_END
227 DOC_END
228
229 NAME: cachemgr_passwd
230 diff -Nru squid-2.7.STABLE3.orig/src/client_side.c squid-2.7.STABLE3/src/client_side.c
231 --- squid-2.7.STABLE3.orig/src/client_side.c 2008-06-25 00:54:47.000000000 +0200
232 +++ squid-2.7.STABLE3/src/client_side.c 2008-06-26 20:37:08.000000000 +0200
233 @@ -4678,14 +4678,7 @@
234 debug(83, 2) ("clientNegotiateSSL: Session %p reused on FD %d (%s:%d)\n", SSL_get_session(ssl), fd, fd_table[fd].ipaddr, (int) fd_table[fd].remote_port);
235 } else {
236 if (do_debug(83, 4)) {
237 - /* Write out the SSL session details.. actually the call below, but
238 - * OpenSSL headers do strange typecasts confusing GCC.. */
239 - /* PEM_write_SSL_SESSION(debug_log, SSL_get_session(ssl)); */
240 -#if defined(OPENSSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER >= 0x00908000L
241 - PEM_ASN1_write((i2d_of_void *) i2d_SSL_SESSION, PEM_STRING_SSL_SESSION, debug_log, (char *) SSL_get_session(ssl), NULL, NULL, 0, NULL, NULL);
242 -#else
243 PEM_ASN1_write(i2d_SSL_SESSION, PEM_STRING_SSL_SESSION, debug_log, (char *) SSL_get_session(ssl), NULL, NULL, 0, NULL, NULL);
244 -#endif
245 /* Note: This does not automatically fflush the log file.. */
246 }
247 debug(83, 2) ("clientNegotiateSSL: New session %p on FD %d (%s:%d)\n", SSL_get_session(ssl), fd, fd_table[fd].ipaddr, (int) fd_table[fd].remote_port);
248 diff -Nru squid-2.7.STABLE3.orig/src/defines.h squid-2.7.STABLE3/src/defines.h
249 --- squid-2.7.STABLE3.orig/src/defines.h 2007-09-24 15:31:19.000000000 +0200
250 +++ squid-2.7.STABLE3/src/defines.h 2008-06-26 20:37:08.000000000 +0200
251 @@ -259,7 +259,7 @@
252
253 /* were to look for errors if config path fails */
254 #ifndef DEFAULT_SQUID_ERROR_DIR
255 -#define DEFAULT_SQUID_ERROR_DIR "/usr/local/squid/etc/errors"
256 +#define DEFAULT_SQUID_ERROR_DIR "/usr/share/squid/errors/English"
257 #endif
258
259 /* gb_type operations */
260 diff -Nru squid-2.7.STABLE3.orig/src/main.c squid-2.7.STABLE3/src/main.c
261 --- squid-2.7.STABLE3.orig/src/main.c 2008-05-27 01:14:30.000000000 +0200
262 +++ squid-2.7.STABLE3/src/main.c 2008-06-26 20:37:08.000000000 +0200
263 @@ -376,6 +376,22 @@
264 asnFreeMemory();
265 }
266
267 +#if USE_UNLINKD
268 +static int
269 +needUnlinkd(void)
270 +{
271 + int i;
272 + int r = 0;
273 + for (i = 0; i < Config.cacheSwap.n_configured; i++) {
274 + if (strcmp(Config.cacheSwap.swapDirs[i].type, "ufs") == 0 ||
275 + strcmp(Config.cacheSwap.swapDirs[i].type, "aufs") == 0 ||
276 + strcmp(Config.cacheSwap.swapDirs[i].type, "diskd") == 0)
277 + r++;
278 + }
279 + return r;
280 +}
281 +#endif
282 +
283 static void
284 mainReconfigure(void)
285 {
286 @@ -613,7 +629,7 @@
287
288 if (!configured_once) {
289 #if USE_UNLINKD
290 - unlinkdInit();
291 + if (needUnlinkd()) unlinkdInit();
292 #endif
293 urlInitialize();
294 cachemgrInit();
295 @@ -636,6 +652,9 @@
296 #if USE_WCCPv2
297 wccp2Init();
298 #endif
299 +#if USE_UNLINKD
300 + if (needUnlinkd()) unlinkdInit();
301 +#endif
302 serverConnectionsOpen();
303 neighbors_init();
304 if (Config.chroot_dir)
305 diff -Nru squid-2.7.STABLE3.orig/src/Makefile.am squid-2.7.STABLE3/src/Makefile.am
306 --- squid-2.7.STABLE3.orig/src/Makefile.am 2008-01-02 16:50:39.000000000 +0100
307 +++ squid-2.7.STABLE3/src/Makefile.am 2008-06-26 20:37:08.000000000 +0200
308 @@ -340,13 +340,13 @@
309 DEFAULT_CONFIG_FILE = $(sysconfdir)/squid.conf
310 DEFAULT_MIME_TABLE = $(sysconfdir)/mime.conf
311 DEFAULT_DNSSERVER = $(libexecdir)/`echo dnsserver | sed '$(transform);s/$$/$(EXEEXT)/'`
312 -DEFAULT_LOG_PREFIX = $(localstatedir)/logs
313 +DEFAULT_LOG_PREFIX = $(localstatedir)/log/squid
314 DEFAULT_CACHE_LOG = $(DEFAULT_LOG_PREFIX)/cache.log
315 DEFAULT_ACCESS_LOG = $(DEFAULT_LOG_PREFIX)/access.log
316 DEFAULT_STORE_LOG = $(DEFAULT_LOG_PREFIX)/store.log
317 -DEFAULT_PID_FILE = $(DEFAULT_LOG_PREFIX)/squid.pid
318 +DEFAULT_PID_FILE = $(localstatedir)/run/squid.pid
319 DEFAULT_NETDB_FILE = $(DEFAULT_LOG_PREFIX)/netdb.state
320 -DEFAULT_SWAP_DIR = $(localstatedir)/cache
321 +DEFAULT_SWAP_DIR = $(localstatedir)/cache/squid
322 DEFAULT_PINGER = $(libexecdir)/`echo pinger | sed '$(transform);s/$$/$(EXEEXT)/'`
323 DEFAULT_UNLINKD = $(libexecdir)/`echo unlinkd | sed '$(transform);s/$$/$(EXEEXT)/'`
324 DEFAULT_DISKD = $(libexecdir)/`echo diskd-daemon | sed '$(transform);s/$$/$(EXEEXT)/'`
325
326
327
328 1.1 net-proxy/squid/files/squid-3.0.7-adapted-zph.patch
329
330 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-proxy/squid/files/squid-3.0.7-adapted-zph.patch?rev=1.1&view=markup
331 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-proxy/squid/files/squid-3.0.7-adapted-zph.patch?rev=1.1&content-type=text/plain
332
333 Index: squid-3.0.7-adapted-zph.patch
334 ===================================================================
335 diff -Nru squid-3.0.STABLE7.orig/src/cf.data.pre squid-3.0.STABLE7/src/cf.data.pre
336 --- squid-3.0.STABLE7.orig/src/cf.data.pre 2008-06-26 20:52:15.000000000 +0200
337 +++ squid-3.0.STABLE7/src/cf.data.pre 2008-06-26 20:53:03.000000000 +0200
338 @@ -1125,6 +1125,60 @@
339 making the request.
340 DOC_END
341
342 +NAME: zph_tos_local
343 +TYPE: int
344 +DEFAULT: 0
345 +LOC: Config.zph_tos_local
346 +DOC_START
347 + Allows you to select a TOS/Diffserv value to mark local hits. Read above
348 + (tcp_outgoing_tos) for details/requirements about TOS.
349 + Default: 0 (disabled).
350 +DOC_END
351 +
352 +NAME: zph_tos_peer
353 +TYPE: int
354 +DEFAULT: 0
355 +LOC: Config.zph_tos_peer
356 +DOC_START
357 + Allows you to select a TOS/Diffserv value to mark peer hits. Read above
358 + (tcp_outgoing_tos) for details/requirements about TOS.
359 + Default: 0 (disabled).
360 +DOC_END
361 +
362 +NAME: zph_tos_parent
363 +COMMENT: on|off
364 +TYPE: onoff
365 +LOC: Config.onoff.zph_tos_parent
366 +DEFAULT: on
367 +DOC_START
368 + Set this to off if you want only sibling hits to be marked.
369 + If set to on (default), parent hits are being marked too.
370 +DOC_END
371 +
372 +NAME: zph_preserve_miss_tos
373 +COMMENT: on|off
374 +TYPE: onoff
375 +LOC: Config.onoff.zph_preserve_miss_tos
376 +DEFAULT: on
377 +DOC_START
378 + If set to on (default), any HTTP response towards clients will
379 + have the TOS value of the response comming from the remote
380 + server masked with the value of zph_preserve_miss_tos_mask.
381 + For this to work correctly, you will need to patch your linux
382 + kernel with the TOS preserving ZPH patch.
383 +DOC_END
384 +
385 +NAME: zph_preserve_miss_tos_mask
386 +TYPE: int
387 +DEFAULT: 255
388 +LOC: Config.zph_preserve_miss_tos_mask
389 +DOC_START
390 + Allows you to mask certain bits in the TOS received from the
391 + remote server, before copying the value to the TOS send towards
392 + clients.
393 + Default: 255 (TOS from server is not changed).
394 +DOC_END
395 +
396 NAME: tcp_outgoing_address
397 TYPE: acl_address
398 DEFAULT: none
399 diff -Nru squid-3.0.STABLE7.orig/src/client_side_reply.cc squid-3.0.STABLE7/src/client_side_reply.cc
400 --- squid-3.0.STABLE7.orig/src/client_side_reply.cc 2008-06-22 05:35:53.000000000 +0200
401 +++ squid-3.0.STABLE7/src/client_side_reply.cc 2008-06-26 20:53:03.000000000 +0200
402 @@ -48,6 +48,7 @@
403 #include "ESI.h"
404 #endif
405 #include "MemObject.h"
406 +#include "fde.h"
407 #include "ACLChecklist.h"
408 #include "ACL.h"
409 #if DELAY_POOLS
410 @@ -1548,6 +1549,58 @@
411 /* guarantee nothing has been sent yet! */
412 assert(http->out.size == 0);
413 assert(http->out.offset == 0);
414 +
415 + if (Config.zph_tos_local ||
416 + Config.zph_tos_peer ||
417 + Config.onoff.zph_preserve_miss_tos && Config.zph_preserve_miss_tos_mask)
418 + {
419 + int need_change = 0;
420 + int hit = 0;
421 + int tos = 0;
422 + int tos_old = 0;
423 + int tos_len = sizeof(tos_old);
424 + int res;
425 +
426 + if (Config.zph_tos_local)
427 + {
428 + /* local hit */
429 + hit = 1;
430 + tos = Config.zph_tos_local;
431 + }
432 + else if (Config.zph_tos_peer &&
433 + (http->request->hier.code==SIBLING_HIT ||
434 + Config.onoff.zph_tos_parent&&http->request->hier.code==PARENT_HIT))
435 + {
436 + /* sibling or parent hit */
437 + hit = 1;
438 + tos = Config.zph_tos_peer;
439 + }
440 +
441 + if (http->request->flags.proxy_keepalive)
442 + {
443 + res = getsockopt(http->getConn()->fd, IPPROTO_IP, IP_TOS, &tos_old, (socklen_t*)&tos_len);
444 + if (res < 0)
445 + {
446 + debugs(33, 1, "ZPH: error in getsockopt(IP_TOS) on keepalived FD "<< http->getConn()->fd << " " << xstrerror());
447 + }
448 + else if (hit && tos_old != tos)
449 + {
450 + /* HIT: 1-st request, or previous was MISS,
451 + * or local/parent hit change.
452 + */
453 + need_change = 1;
454 + }
455 + }
456 + else if (hit)
457 + {
458 + /* no keepalive */
459 + need_change = 1;
460 + }
461 + if (need_change) {
462 + comm_set_tos(http->getConn()->fd,tos);
463 + }
464 + }
465 +
466 tempBuffer.offset = reqofs;
467 tempBuffer.length = getNextNode()->readBuffer.length;
468 tempBuffer.data = getNextNode()->readBuffer.data;
469 @@ -1828,6 +1881,14 @@
470
471 char *body_buf = buf;
472
473 + if (reqofs==0 && !logTypeIsATcpHit(http->logType) &&
474 + Config.onoff.zph_preserve_miss_tos &&
475 + Config.zph_preserve_miss_tos_mask)
476 + {
477 + int tos = fd_table[fd].upstreamTOS & Config.zph_preserve_miss_tos_mask;
478 + comm_set_tos(fd,tos);
479 + }
480 +
481 if (buf != result.data) {
482 /* we've got to copy some data */
483 assert(result.length <= next()->readBuffer.length);
484 diff -Nru squid-3.0.STABLE7.orig/src/fde.h squid-3.0.STABLE7/src/fde.h
485 --- squid-3.0.STABLE7.orig/src/fde.h 2008-06-22 05:35:53.000000000 +0200
486 +++ squid-3.0.STABLE7/src/fde.h 2008-06-26 20:53:03.000000000 +0200
487 @@ -106,7 +106,7 @@
488 long handle;
489 } win32;
490 #endif
491 -
492 + unsigned char upstreamTOS; /* see FwdState::dispatch() */
493 };
494
495 #endif /* SQUID_FDE_H */
496 diff -Nru squid-3.0.STABLE7.orig/src/forward.cc squid-3.0.STABLE7/src/forward.cc
497 --- squid-3.0.STABLE7.orig/src/forward.cc 2008-06-22 05:35:53.000000000 +0200
498 +++ squid-3.0.STABLE7/src/forward.cc 2008-06-26 20:53:03.000000000 +0200
499 @@ -964,6 +964,52 @@
500
501 netdbPingSite(request->host);
502
503 + /* Retrieves remote server TOS value, and stores it as part of the
504 + * original client request FD object. It is later used to forward
505 + * remote server's TOS in the response to the client in case of a MISS.
506 + */
507 + fde * clientFde = &fd_table[client_fd];
508 + if (clientFde)
509 + {
510 + int tos = 1;
511 + int tos_len = sizeof(tos);
512 + clientFde->upstreamTOS = 0;
513 + if (setsockopt(server_fd,SOL_IP,IP_RECVTOS,&tos,tos_len)==0)
514 + {
515 + unsigned char buf[512];
516 + int len = 512;
517 + if (getsockopt(server_fd,SOL_IP,IP_PKTOPTIONS,buf,(socklen_t*)&len) == 0)
518 + {
519 + /* Parse the PKTOPTIONS structure to locate the TOS data message
520 + * prepared in the kernel by the ZPH incoming TCP TOS preserving
521 + * patch.
522 + */
523 + unsigned char * p = buf;
524 + while (p-buf < len)
525 + {
526 + struct cmsghdr *o = (struct cmsghdr*)p;
527 + if (o->cmsg_len<=0)
528 + break;
529 +
530 + if (o->cmsg_level == SOL_IP && o->cmsg_type == IP_TOS)
531 + {
532 + clientFde->upstreamTOS = (unsigned char)(*(int*)CMSG_DATA(o));
533 + break;
534 + }
535 + p += CMSG_LEN(o->cmsg_len);
536 + }
537 + }
538 + else
539 + {
540 + debugs(33, 1, "ZPH: error in getsockopt(IP_PKTOPTIONS) on FD "<<server_fd<<" "<<xstrerror());
541 + }
542 + }
543 + else
544 + {
545 + debugs(33, 1, "ZPH: error in setsockopt(IP_RECVTOS) on FD "<<server_fd<<" "<<xstrerror());
546 + }
547 + }
548 +
549 if (servers && (p = servers->_peer)) {
550 p->stats.fetches++;
551 request->peer_login = p->login;
552 diff -Nru squid-3.0.STABLE7.orig/src/structs.h squid-3.0.STABLE7/src/structs.h
553 --- squid-3.0.STABLE7.orig/src/structs.h 2008-06-22 05:35:54.000000000 +0200
554 +++ squid-3.0.STABLE7/src/structs.h 2008-06-26 20:53:03.000000000 +0200
555 @@ -553,6 +553,8 @@
556 int emailErrData;
557 int httpd_suppress_version_string;
558 int global_internal_static;
559 + int zph_tos_parent;
560 + int zph_preserve_miss_tos;
561 int debug_override_X;
562 }
563
564 @@ -720,6 +722,9 @@
565 int sleep_after_fork; /* microseconds */
566 time_t minimum_expiry_time; /* seconds */
567 external_acl *externalAclHelperList;
568 + int zph_tos_local;
569 + int zph_tos_peer;
570 + int zph_preserve_miss_tos_mask;
571 #if USE_SSL
572
573 struct
574
575
576
577 1.1 net-proxy/squid/files/squid-3.0.7-gentoo.patch
578
579 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-proxy/squid/files/squid-3.0.7-gentoo.patch?rev=1.1&view=markup
580 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-proxy/squid/files/squid-3.0.7-gentoo.patch?rev=1.1&content-type=text/plain
581
582 Index: squid-3.0.7-gentoo.patch
583 ===================================================================
584 diff -Nru squid-3.0.STABLE7.orig/configure.in squid-3.0.STABLE7/configure.in
585 --- squid-3.0.STABLE7.orig/configure.in 2008-06-22 05:35:54.000000000 +0200
586 +++ squid-3.0.STABLE7/configure.in 2008-06-26 20:51:22.000000000 +0200
587 @@ -19,9 +19,9 @@
588 PRESET_LDFLAGS="$LDFLAGS"
589
590 dnl Set default LDFLAGS
591 -if test -z "$LDFLAGS"; then
592 - LDFLAGS="-g"
593 -fi
594 +dnl if test -z "$LDFLAGS"; then
595 +dnl LDFLAGS="-g"
596 +dnl fi
597
598 dnl Check for GNU cc
599 AC_PROG_CC
600 diff -Nru squid-3.0.STABLE7.orig/helpers/basic_auth/MSNT/confload.c squid-3.0.STABLE7/helpers/basic_auth/MSNT/confload.c
601 --- squid-3.0.STABLE7.orig/helpers/basic_auth/MSNT/confload.c 2008-06-22 05:35:48.000000000 +0200
602 +++ squid-3.0.STABLE7/helpers/basic_auth/MSNT/confload.c 2008-06-26 20:51:22.000000000 +0200
603 @@ -24,7 +24,7 @@
604
605 /* Path to configuration file */
606 #ifndef SYSCONFDIR
607 -#define SYSCONFDIR "/usr/local/squid/etc"
608 +#define SYSCONFDIR "/etc/squid"
609 #endif
610 #define CONFIGFILE SYSCONFDIR "/msntauth.conf"
611
612 diff -Nru squid-3.0.STABLE7.orig/helpers/basic_auth/MSNT/msntauth.conf.default squid-3.0.STABLE7/helpers/basic_auth/MSNT/msntauth.conf.default
613 --- squid-3.0.STABLE7.orig/helpers/basic_auth/MSNT/msntauth.conf.default 2008-06-22 05:35:48.000000000 +0200
614 +++ squid-3.0.STABLE7/helpers/basic_auth/MSNT/msntauth.conf.default 2008-06-26 20:51:22.000000000 +0200
615 @@ -8,6 +8,6 @@
616 server other_PDC other_BDC otherdomain
617
618 # Denied and allowed users. Comment these if not needed.
619 -#denyusers /usr/local/squid/etc/msntauth.denyusers
620 -#allowusers /usr/local/squid/etc/msntauth.allowusers
621 +#denyusers /etc/squid/msntauth.denyusers
622 +#allowusers /etc/squid/msntauth.allowusers
623
624 diff -Nru squid-3.0.STABLE7.orig/helpers/basic_auth/SMB/Makefile.am squid-3.0.STABLE7/helpers/basic_auth/SMB/Makefile.am
625 --- squid-3.0.STABLE7.orig/helpers/basic_auth/SMB/Makefile.am 2008-06-22 05:35:49.000000000 +0200
626 +++ squid-3.0.STABLE7/helpers/basic_auth/SMB/Makefile.am 2008-06-26 20:51:22.000000000 +0200
627 @@ -14,7 +14,7 @@
628 ## FIXME: autoconf should test for the samba path.
629
630 SMB_AUTH_HELPER = smb_auth.sh
631 -SAMBAPREFIX=/usr/local/samba
632 +SAMBAPREFIX=/usr
633 SMB_AUTH_HELPER_PATH = $(libexecdir)/$(SMB_AUTH_HELPER)
634
635 libexec_SCRIPTS = $(SMB_AUTH_HELPER)
636 diff -Nru squid-3.0.STABLE7.orig/helpers/basic_auth/SMB/smb_auth.sh squid-3.0.STABLE7/helpers/basic_auth/SMB/smb_auth.sh
637 --- squid-3.0.STABLE7.orig/helpers/basic_auth/SMB/smb_auth.sh 2008-06-22 05:35:49.000000000 +0200
638 +++ squid-3.0.STABLE7/helpers/basic_auth/SMB/smb_auth.sh 2008-06-26 20:51:22.000000000 +0200
639 @@ -24,7 +24,7 @@
640 read AUTHSHARE
641 read AUTHFILE
642 read SMBUSER
643 -read SMBPASS
644 +read -r SMBPASS
645
646 # Find domain controller
647 echo "Domain name: $DOMAINNAME"
648 @@ -47,7 +47,7 @@
649 addropt=""
650 fi
651 echo "Query address options: $addropt"
652 -dcip=`$SAMBAPREFIX/bin/nmblookup $addropt "$PASSTHROUGH#1c" | awk '/^[0-9.]+ / { print $1 ; exit }'`
653 +dcip=`$SAMBAPREFIX/bin/nmblookup $addropt "$PASSTHROUGH#1c" | awk '/^[0-9.]+\..+ / { print $1 ; exit }'`
654 echo "Domain controller IP address: $dcip"
655 [ -n "$dcip" ] || exit 1
656
657 diff -Nru squid-3.0.STABLE7.orig/helpers/external_acl/session/squid_session.8 squid-3.0.STABLE7/helpers/external_acl/session/squid_session.8
658 --- squid-3.0.STABLE7.orig/helpers/external_acl/session/squid_session.8 2008-06-22 05:35:49.000000000 +0200
659 +++ squid-3.0.STABLE7/helpers/external_acl/session/squid_session.8 2008-06-26 20:51:22.000000000 +0200
660 @@ -35,7 +35,7 @@
661 .P
662 Configuration example using the default automatic mode
663 .IP
664 -external_acl_type session ttl=300 negative_ttl=0 children=1 concurrency=200 %LOGIN /usr/local/squid/libexec/squid_session
665 +external_acl_type session ttl=300 negative_ttl=0 children=1 concurrency=200 %LOGIN /usr/libexec/squid/squid_session
666 .IP
667 acl session external session
668 .IP
669 diff -Nru squid-3.0.STABLE7.orig/helpers/external_acl/unix_group/squid_unix_group.8 squid-3.0.STABLE7/helpers/external_acl/unix_group/squid_unix_group.8
670 --- squid-3.0.STABLE7.orig/helpers/external_acl/unix_group/squid_unix_group.8 2008-06-22 05:35:49.000000000 +0200
671 +++ squid-3.0.STABLE7/helpers/external_acl/unix_group/squid_unix_group.8 2008-06-26 20:51:22.000000000 +0200
672 @@ -27,7 +27,7 @@
673 This squid.conf example defines two Squid acls. usergroup1 matches users in group1, and usergroup2
674 matches users in group2 or group3
675 .IP
676 -external_acl_type unix_group %LOGIN /usr/local/squid/libexec/squid_unix_group -p
677 +external_acl_type unix_group %LOGIN /usr/libexec/squid/squid_unix_group -p
678 .IP
679 acl usergroup1 external unix_group group1
680 .IP
681 diff -Nru squid-3.0.STABLE7.orig/src/cf.data.pre squid-3.0.STABLE7/src/cf.data.pre
682 --- squid-3.0.STABLE7.orig/src/cf.data.pre 2008-06-22 05:35:53.000000000 +0200
683 +++ squid-3.0.STABLE7/src/cf.data.pre 2008-06-26 20:51:22.000000000 +0200
684 @@ -650,6 +650,8 @@
685 acl Safe_ports port 488 # gss-http
686 acl Safe_ports port 591 # filemaker
687 acl Safe_ports port 777 # multiling http
688 +acl Safe_ports port 901 # SWAT
689 +acl purge method PURGE
690 acl CONNECT method CONNECT
691 NOCOMMENT_END
692 DOC_END
693 @@ -683,6 +685,9 @@
694 # Only allow cachemgr access from localhost
695 http_access allow manager localhost
696 http_access deny manager
697 +# Only allow purge requests from localhost
698 +http_access allow purge localhost
699 +http_access deny purge
700 # Deny requests to unknown ports
701 http_access deny !Safe_ports
702 # Deny CONNECT to other than SSL ports
703 @@ -700,6 +705,9 @@
704 # from where browsing should be allowed
705 http_access allow localnet
706
707 +# Allow the localhost to have access by default
708 +http_access allow localhost
709 +
710 # And finally deny all other access to this proxy
711 http_access deny all
712 NOCOMMENT_END
713 @@ -3237,11 +3245,11 @@
714
715 NAME: cache_mgr
716 TYPE: string
717 -DEFAULT: webmaster
718 +DEFAULT: root
719 LOC: Config.adminEmail
720 DOC_START
721 Email-address of local cache manager who will receive
722 - mail if the cache dies. The default is "webmaster."
723 + mail if the cache dies. The default is "root".
724 DOC_END
725
726 NAME: mail_from
727 @@ -5189,6 +5197,9 @@
728 If you disable this, it will appear as
729
730 X-Forwarded-For: unknown
731 +NOCOMMENT_START
732 +forwarded_for off
733 +NOCOMMENT_END
734 DOC_END
735
736 NAME: cachemgr_passwd
737 diff -Nru squid-3.0.STABLE7.orig/src/debug.cc squid-3.0.STABLE7/src/debug.cc
738 --- squid-3.0.STABLE7.orig/src/debug.cc 2008-06-22 05:35:53.000000000 +0200
739 +++ squid-3.0.STABLE7/src/debug.cc 2008-06-26 20:51:22.000000000 +0200
740 @@ -465,7 +465,7 @@
741 #if HAVE_SYSLOG && defined(LOG_LOCAL4)
742
743 if (opt_syslog_enable)
744 - openlog(appname, LOG_PID | LOG_NDELAY | LOG_CONS, syslog_facility);
745 + openlog(appname, LOG_PID | LOG_NDELAY, syslog_facility);
746
747 #endif /* HAVE_SYSLOG */
748
749 diff -Nru squid-3.0.STABLE7.orig/src/defines.h squid-3.0.STABLE7/src/defines.h
750 --- squid-3.0.STABLE7.orig/src/defines.h 2008-06-22 05:35:53.000000000 +0200
751 +++ squid-3.0.STABLE7/src/defines.h 2008-06-26 20:51:22.000000000 +0200
752 @@ -219,7 +219,7 @@
753
754 /* were to look for errors if config path fails */
755 #ifndef DEFAULT_SQUID_ERROR_DIR
756 -#define DEFAULT_SQUID_ERROR_DIR "/usr/local/squid/etc/errors"
757 +#define DEFAULT_SQUID_ERROR_DIR "/usr/share/squid/errors/English"
758 #endif
759
760 /* handy to determine the #elements in a static array */
761 diff -Nru squid-3.0.STABLE7.orig/src/main.cc squid-3.0.STABLE7/src/main.cc
762 --- squid-3.0.STABLE7.orig/src/main.cc 2008-06-22 05:35:53.000000000 +0200
763 +++ squid-3.0.STABLE7/src/main.cc 2008-06-26 20:51:22.000000000 +0200
764 @@ -1482,7 +1482,7 @@
765 if (*(argv[0]) == '(')
766 return;
767
768 - openlog(appname, LOG_PID | LOG_NDELAY | LOG_CONS, LOG_LOCAL4);
769 + openlog(appname, LOG_PID | LOG_NDELAY, LOG_DAEMON);
770
771 if ((pid = fork()) < 0)
772 syslog(LOG_ALERT, "fork failed: %s", xstrerror());
773 @@ -1526,7 +1526,7 @@
774
775 if ((pid = fork()) == 0) {
776 /* child */
777 - openlog(appname, LOG_PID | LOG_NDELAY | LOG_CONS, LOG_LOCAL4);
778 + openlog(appname, LOG_PID | LOG_NDELAY, LOG_DAEMON);
779 prog = xstrdup(argv[0]);
780 argv[0] = xstrdup("(squid)");
781 execvp(prog, argv);
782 @@ -1534,7 +1534,7 @@
783 }
784
785 /* parent */
786 - openlog(appname, LOG_PID | LOG_NDELAY | LOG_CONS, LOG_LOCAL4);
787 + openlog(appname, LOG_PID | LOG_NDELAY, LOG_DAEMON);
788
789 syslog(LOG_NOTICE, "Squid Parent: child process %d started", pid);
790
791 diff -Nru squid-3.0.STABLE7.orig/src/Makefile.am squid-3.0.STABLE7/src/Makefile.am
792 --- squid-3.0.STABLE7.orig/src/Makefile.am 2008-06-22 05:35:52.000000000 +0200
793 +++ squid-3.0.STABLE7/src/Makefile.am 2008-06-26 20:51:22.000000000 +0200
794 @@ -988,12 +988,12 @@
795 DEFAULT_CONFIG_FILE = $(sysconfdir)/squid.conf
796 DEFAULT_MIME_TABLE = $(sysconfdir)/mime.conf
797 DEFAULT_DNSSERVER = $(libexecdir)/`echo dnsserver | sed '$(transform);s/$$/$(EXEEXT)/'`
798 -DEFAULT_LOG_PREFIX = $(localstatedir)/logs
799 +DEFAULT_LOG_PREFIX = $(localstatedir)/log/squid
800 DEFAULT_CACHE_LOG = $(DEFAULT_LOG_PREFIX)/cache.log
801 DEFAULT_ACCESS_LOG = $(DEFAULT_LOG_PREFIX)/access.log
802 DEFAULT_STORE_LOG = $(DEFAULT_LOG_PREFIX)/store.log
803 -DEFAULT_PID_FILE = $(DEFAULT_LOG_PREFIX)/squid.pid
804 -DEFAULT_SWAP_DIR = $(localstatedir)/cache
805 +DEFAULT_PID_FILE = $(localstatedir)/run/squid.pid
806 +DEFAULT_SWAP_DIR = $(localstatedir)/cache/squid
807 DEFAULT_PINGER = $(libexecdir)/`echo pinger | sed '$(transform);s/$$/$(EXEEXT)/'`
808 DEFAULT_UNLINKD = $(libexecdir)/`echo unlinkd | sed '$(transform);s/$$/$(EXEEXT)/'`
809 DEFAULT_DISKD = $(libexecdir)/`echo diskd | sed '$(transform);s/$$/$(EXEEXT)/'`
810
811
812
813 --
814 gentoo-commits@l.g.o mailing list