From: wessels <> Date: Wed, 5 May 1999 03:58:18 +0000 (+0000) Subject: 2.2 branch merge X-Git-Tag: SQUID_3_0_PRE1~2213 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ec603b250c515ad9e894f4b26035069438ff892a;p=thirdparty%2Fsquid.git 2.2 branch merge --- diff --git a/src/cf.data.pre b/src/cf.data.pre index b4597a4151..5508bba7c9 100644 --- a/src/cf.data.pre +++ b/src/cf.data.pre @@ -1,6 +1,6 @@ # -# $Id: cf.data.pre,v 1.151 1999/05/04 20:49:37 wessels Exp $ +# $Id: cf.data.pre,v 1.152 1999/05/04 21:58:18 wessels Exp $ # # # SQUID Internet Object Cache http://squid.nlanr.net/Squid/ @@ -765,33 +765,6 @@ debug_options ALL,1 DOC_END -NAME: ident_lookup_access -TYPE: acl_access -IFDEF: USE_IDENT -DEFAULT: none -DEFAULT_IF_NONE: deny all -LOC: Config.accessList.identLookup -DOC_START - A list of ACL elements which, if matched, cause an ident - (RFC 931) lookup to be performed for this request. For - example, you might choose to always perform ident lookups - for your main multi-user Unix boxes, but not for your Macs - and PCs. By default, ident lookups are not performed for - any requests. - - To enable ident lookups for specific client addresses, you - can follow this example: - - acl ident_aware_hosts src 198.168.1.0/255.255.255.0 - ident_lookup_access allow ident_aware_hosts - ident_lookup_access deny all - - This option may be disabled by using --disable-ident with - the configure script. -ident_lookup_access deny all -DOC_END - - NAME: log_fqdn COMMENT: on|off TYPE: onoff @@ -1630,6 +1603,33 @@ proxy_auth_realm Squid proxy-caching web server DOC_END +NAME: ident_lookup_access +TYPE: acl_access +IFDEF: USE_IDENT +DEFAULT: none +DEFAULT_IF_NONE: deny all +LOC: Config.accessList.identLookup +DOC_START + A list of ACL elements which, if matched, cause an ident + (RFC 931) lookup to be performed for this request. For + example, you might choose to always perform ident lookups + for your main multi-user Unix boxes, but not for your Macs + and PCs. By default, ident lookups are not performed for + any requests. + + To enable ident lookups for specific client addresses, you + can follow this example: + + acl ident_aware_hosts src 198.168.1.0/255.255.255.0 + ident_lookup_access allow ident_aware_hosts + ident_lookup_access deny all + + This option may be disabled by using --disable-ident with + the configure script. +ident_lookup_access deny all +DOC_END + + COMMENT_START ADMINISTRATIVE PARAMETERS ----------------------------------------------------------------------------- diff --git a/src/comm_select.cc b/src/comm_select.cc index c3177a3f7b..b8b1c306a1 100644 --- a/src/comm_select.cc +++ b/src/comm_select.cc @@ -1,6 +1,6 @@ /* - * $Id: comm_select.cc,v 1.34 1999/05/04 19:26:45 wessels Exp $ + * $Id: comm_select.cc,v 1.35 1999/05/04 21:58:19 wessels Exp $ * * DEBUG: section 5 Socket Functions * @@ -797,7 +797,6 @@ comm_select_dns_incoming(void) if (nevents < 0) return; incoming_dns_interval += Config.comm_incoming.dns_average - nevents; - incoming_dns_interval += Config.comm_incoming.dns_average - nevents; if (incoming_dns_interval < Config.comm_incoming.dns_min_poll) incoming_dns_interval = Config.comm_incoming.dns_min_poll; if (incoming_dns_interval > MAX_INCOMING_INTERVAL) diff --git a/src/delay_pools.cc b/src/delay_pools.cc index 1255661f0d..5dfd9a3b00 100644 --- a/src/delay_pools.cc +++ b/src/delay_pools.cc @@ -1,6 +1,6 @@ /* - * $Id: delay_pools.cc,v 1.8 1999/04/15 06:15:52 wessels Exp $ + * $Id: delay_pools.cc,v 1.9 1999/05/04 21:58:20 wessels Exp $ * * DEBUG: section 77 Delay Pools * AUTHOR: David Luyer @@ -113,8 +113,12 @@ delayIdPtrHash(const void *key, unsigned int n) static int delayIdPtrHashCmp(const void *a, const void *b) { - /* Sort by POINTER VALUE. */ - return b - a; + /* + * Compare POINTER VALUE. + * Note, we can't subtract void pointers, but we don't need + * to anyway. All we need is a test for equality. + */ + return a != b; } void diff --git a/src/ftp.cc b/src/ftp.cc index 2fe12f98fd..d19077583a 100644 --- a/src/ftp.cc +++ b/src/ftp.cc @@ -1,6 +1,6 @@ /* - * $Id: ftp.cc,v 1.282 1999/04/23 02:57:23 wessels Exp $ + * $Id: ftp.cc,v 1.283 1999/05/04 21:58:22 wessels Exp $ * * DEBUG: section 9 File Transfer Protocol (FTP) * AUTHOR: Harvest Derived @@ -1248,7 +1248,7 @@ static void ftpHandleControlReply(FtpStateData * ftpState) { char *oldbuf; - wordlist **W, **T; + wordlist **W; int bytes_used = 0; wordlistDestroy(&ftpState->ctrl.message); ftpState->ctrl.message = ftpParseControlReply(ftpState->ctrl.buf, @@ -1275,21 +1275,11 @@ ftpHandleControlReply(FtpStateData * ftpState) xmemmove(ftpState->ctrl.buf, ftpState->ctrl.buf + bytes_used, ftpState->ctrl.offset); } - /* Extract reply message (last line) */ - for (T = NULL, W = &ftpState->ctrl.message; *W && (*W)->next; W = &(*W)->next) { - /* Skip trailing blank lines */ - if (strlen((*W)->key) == 0) { - if (T == NULL) - T = W; - } else if ((*W)->next) { - T = NULL; - } - } + /* Find the last line of the reply message */ + for (W = &ftpState->ctrl.message; (*W)->next; W = &(*W)->next); safe_free(ftpState->ctrl.last_reply); ftpState->ctrl.last_reply = (*W)->key; safe_free(*W); - if (T) - wordlistDestroy(T); debug(9, 8) ("ftpReadControlReply: state=%d, code=%d\n", ftpState->state, ftpState->ctrl.replycode); FTP_SM_FUNCS[ftpState->state] (ftpState); diff --git a/src/http.cc b/src/http.cc index c0cf648592..605b75a132 100644 --- a/src/http.cc +++ b/src/http.cc @@ -1,6 +1,6 @@ /* - * $Id: http.cc,v 1.348 1999/04/26 21:06:15 wessels Exp $ + * $Id: http.cc,v 1.349 1999/05/04 21:58:24 wessels Exp $ * * DEBUG: section 11 Hypertext Transfer Protocol (HTTP) * AUTHOR: Harvest Derived @@ -534,6 +534,9 @@ httpReadReply(int fd, void *data) commSetDefer(fd, NULL, NULL); commSetTimeout(fd, -1, NULL, NULL); commSetSelect(fd, COMM_SELECT_READ, NULL, NULL, 0); +#if DELAY_POOLS + delayClearNoDelay(fd); +#endif comm_remove_close_handler(fd, httpStateFree, httpState); fwdUnregister(fd, httpState->fwd); pconnPush(fd, request->host, request->port); diff --git a/src/main.cc b/src/main.cc index e767788426..c019ace8ed 100644 --- a/src/main.cc +++ b/src/main.cc @@ -1,7 +1,6 @@ /* - * $Id: main.cc,v 1.297 1999/04/26 21:04:45 wessels Exp $ - * $Id: main.cc,v 1.297 1999/04/26 21:04:45 wessels Exp $ + * $Id: main.cc,v 1.298 1999/05/04 21:58:25 wessels Exp $ * * DEBUG: section 1 Startup and Main Loop * AUTHOR: Harvest Derived diff --git a/src/mime.cc b/src/mime.cc index a7080ce928..9dfaec567e 100644 --- a/src/mime.cc +++ b/src/mime.cc @@ -1,7 +1,6 @@ /* - * $Id: mime.cc,v 1.86 1999/04/23 02:57:25 wessels Exp $ - * $Id: mime.cc,v 1.86 1999/04/23 02:57:25 wessels Exp $ + * $Id: mime.cc,v 1.87 1999/05/04 21:58:26 wessels Exp $ * * DEBUG: section 25 MIME Parsing * AUTHOR: Harvest Derived diff --git a/src/neighbors.cc b/src/neighbors.cc index a6b2fec418..dc4ac12473 100644 --- a/src/neighbors.cc +++ b/src/neighbors.cc @@ -1,7 +1,6 @@ /* - * $Id: neighbors.cc,v 1.272 1999/04/23 02:57:26 wessels Exp $ - * $Id: neighbors.cc,v 1.272 1999/04/23 02:57:26 wessels Exp $ + * $Id: neighbors.cc,v 1.273 1999/05/04 21:58:28 wessels Exp $ * * DEBUG: section 15 Neighbor Routines * AUTHOR: Harvest Derived diff --git a/src/net_db.cc b/src/net_db.cc index 70f5d6227e..c4135c877f 100644 --- a/src/net_db.cc +++ b/src/net_db.cc @@ -1,7 +1,6 @@ /* - * $Id: net_db.cc,v 1.138 1999/04/23 02:57:27 wessels Exp $ - * $Id: net_db.cc,v 1.138 1999/04/23 02:57:27 wessels Exp $ + * $Id: net_db.cc,v 1.139 1999/05/04 21:58:29 wessels Exp $ * * DEBUG: section 38 Network Measurement Database * AUTHOR: Duane Wessels diff --git a/src/pinger.cc b/src/pinger.cc index 1248b60f7d..05c72f101a 100644 --- a/src/pinger.cc +++ b/src/pinger.cc @@ -1,7 +1,6 @@ /* - * $Id: pinger.cc,v 1.41 1999/04/23 02:57:28 wessels Exp $ - * $Id: pinger.cc,v 1.41 1999/04/23 02:57:28 wessels Exp $ + * $Id: pinger.cc,v 1.42 1999/05/04 21:58:30 wessels Exp $ * * DEBUG: section 42 ICMP Pinger program * AUTHOR: Duane Wessels diff --git a/src/protos.h b/src/protos.h index 51effa5743..c6e9e1512a 100644 --- a/src/protos.h +++ b/src/protos.h @@ -1,7 +1,6 @@ /* - * $Id: protos.h,v 1.327 1999/05/03 22:59:56 wessels Exp $ - * $Id: protos.h,v 1.327 1999/05/03 22:59:56 wessels Exp $ + * $Id: protos.h,v 1.328 1999/05/04 21:58:31 wessels Exp $ * * * SQUID Internet Object Cache http://squid.nlanr.net/Squid/ diff --git a/src/snmp_agent.cc b/src/snmp_agent.cc index 313c79aa80..ce73f8518d 100644 --- a/src/snmp_agent.cc +++ b/src/snmp_agent.cc @@ -1,7 +1,6 @@ /* - * $Id: snmp_agent.cc,v 1.67 1999/04/23 02:57:31 wessels Exp $ - * $Id: snmp_agent.cc,v 1.67 1999/04/23 02:57:31 wessels Exp $ + * $Id: snmp_agent.cc,v 1.68 1999/05/04 21:58:33 wessels Exp $ * * DEBUG: section 49 SNMP Interface * AUTHOR: Kostas Anagnostakis @@ -413,7 +412,12 @@ snmp_prfProtoFn(variable_list * Var, snint * ErrP) return Answer; case PERF_PROTOSTAT_MEDIAN: - minutes = Var->name[LEN_SQ_PRF + 4]; + if (Var->name_length == LEN_SQ_PRF + 5) + minutes = Var->name[LEN_SQ_PRF + 4]; + else + break; + if ((minutes < 1) || (minutes > 60)) + break; f = snmpStatGet(0); l = snmpStatGet(minutes); diff --git a/src/snmp_core.cc b/src/snmp_core.cc index 3b197a42e1..ac63c216ab 100644 --- a/src/snmp_core.cc +++ b/src/snmp_core.cc @@ -1,6 +1,6 @@ /* - * $Id: snmp_core.cc,v 1.36 1999/04/26 19:47:14 wessels Exp $ + * $Id: snmp_core.cc,v 1.37 1999/05/04 21:58:35 wessels Exp $ * * DEBUG: section 49 SNMP support * AUTHOR: Glenn Chisholm @@ -449,6 +449,7 @@ snmpHandleUdp(int sock, void *not_used) commSetSelect(sock, COMM_SELECT_READ, snmpHandleUdp, NULL, 0); from_len = sizeof(struct sockaddr_in); memset(&from, '\0', from_len); + memset(buf, '\0', SNMP_REQUEST_SIZE); Counter.syscalls.sock.recvfroms++; @@ -652,7 +653,7 @@ snmpTreeGet(oid * Current, snint CurrentLen) count++; } } - if (mibTreeEntry) + if (mibTreeEntry && mibTreeEntry->parsefunction) Fn = mibTreeEntry->parsefunction; debug(49, 5) ("snmpTreeGet: return\n"); return (Fn); diff --git a/src/squid.h b/src/squid.h index c176731602..8b734d85fd 100644 --- a/src/squid.h +++ b/src/squid.h @@ -1,7 +1,6 @@ /* - * $Id: squid.h,v 1.191 1999/05/03 22:41:11 wessels Exp $ - * $Id: squid.h,v 1.191 1999/05/03 22:41:11 wessels Exp $ + * $Id: squid.h,v 1.192 1999/05/04 21:58:36 wessels Exp $ * * AUTHOR: Duane Wessels * diff --git a/src/ssl.cc b/src/ssl.cc index 4919549325..a23bd8dba9 100644 --- a/src/ssl.cc +++ b/src/ssl.cc @@ -1,7 +1,6 @@ /* - * $Id: ssl.cc,v 1.94 1999/04/23 02:57:33 wessels Exp $ - * $Id: ssl.cc,v 1.94 1999/04/23 02:57:33 wessels Exp $ + * $Id: ssl.cc,v 1.95 1999/05/04 21:58:37 wessels Exp $ * * DEBUG: section 26 Secure Sockets Layer Proxy * AUTHOR: Duane Wessels diff --git a/src/stat.cc b/src/stat.cc index 7bfe10b897..6044981c06 100644 --- a/src/stat.cc +++ b/src/stat.cc @@ -1,7 +1,6 @@ /* - * $Id: stat.cc,v 1.316 1999/05/04 19:22:26 wessels Exp $ - * $Id: stat.cc,v 1.316 1999/05/04 19:22:26 wessels Exp $ + * $Id: stat.cc,v 1.317 1999/05/04 21:58:38 wessels Exp $ * * DEBUG: section 18 Cache Manager Statistics * AUTHOR: Harvest Derived diff --git a/src/store.cc b/src/store.cc index bc0f2bf467..d3afcb9e50 100644 --- a/src/store.cc +++ b/src/store.cc @@ -1,7 +1,6 @@ /* - * $Id: store.cc,v 1.497 1999/05/04 19:39:00 wessels Exp $ - * $Id: store.cc,v 1.497 1999/05/04 19:39:00 wessels Exp $ + * $Id: store.cc,v 1.498 1999/05/04 21:58:40 wessels Exp $ * * DEBUG: section 20 Storage Manager * AUTHOR: Harvest Derived diff --git a/src/store_client.cc b/src/store_client.cc index 2bead8443e..b6f61921b8 100644 --- a/src/store_client.cc +++ b/src/store_client.cc @@ -1,7 +1,6 @@ /* - * $Id: store_client.cc,v 1.66 1999/05/04 19:22:28 wessels Exp $ - * $Id: store_client.cc,v 1.66 1999/05/04 19:22:28 wessels Exp $ + * $Id: store_client.cc,v 1.67 1999/05/04 21:58:42 wessels Exp $ * * DEBUG: section 20 Storage Manager Client-Side Interface * AUTHOR: Duane Wessels @@ -131,9 +130,6 @@ storeClientListAdd(StoreEntry * e, void *data) assert(e->swap_file_number > -1 || storeSwapOutAble(e)); for (T = &mem->clients; *T; T = &(*T)->next); *T = sc; -#if DELAY_POOLS - delayRegisterDelayIdPtr(&sc->delay_id); -#endif #if DELAY_POOLS sc->delay_id = 0; delayRegisterDelayIdPtr(&sc->delay_id); diff --git a/src/store_rebuild.cc b/src/store_rebuild.cc index 7f26c81aa6..9ae20273fc 100644 --- a/src/store_rebuild.cc +++ b/src/store_rebuild.cc @@ -1,6 +1,6 @@ /* - * $Id: store_rebuild.cc,v 1.59 1999/05/03 23:00:01 wessels Exp $ + * $Id: store_rebuild.cc,v 1.60 1999/05/04 21:58:43 wessels Exp $ * * DEBUG: section 20 Store Rebuild Routines * AUTHOR: Duane Wessels @@ -491,13 +491,13 @@ storeGetNextFile(rebuild_dir * d, int *sfileno, int *size) if (d->td == NULL) { debug(50, 1) ("storeGetNextFile: opendir: %s: %s\n", d->fullpath, xstrerror()); - break; + } else { + d->entry = readdir(d->td); /* skip . and .. */ + d->entry = readdir(d->td); + if (d->entry == NULL && errno == ENOENT) + debug(20, 1) ("storeGetNextFile: directory does not exist!.\n"); + debug(20, 3) ("storeGetNextFile: Directory %s\n", d->fullpath); } - d->entry = readdir(d->td); /* skip . and .. */ - d->entry = readdir(d->td); - if (d->entry == NULL && errno == ENOENT) - debug(20, 1) ("storeGetNextFile: directory does not exist!.\n"); - debug(20, 3) ("storeGetNextFile: Directory %s\n", d->fullpath); } if (d->td != NULL && (d->entry = readdir(d->td)) != NULL) { d->in_dir++; diff --git a/src/tools.cc b/src/tools.cc index 5ad5a4b0f9..fb5f59a89f 100644 --- a/src/tools.cc +++ b/src/tools.cc @@ -1,7 +1,6 @@ /* - * $Id: tools.cc,v 1.177 1999/05/03 21:55:15 wessels Exp $ - * $Id: tools.cc,v 1.177 1999/05/03 21:55:15 wessels Exp $ + * $Id: tools.cc,v 1.178 1999/05/04 21:58:45 wessels Exp $ * * DEBUG: section 21 Misc Functions * AUTHOR: Harvest Derived @@ -173,6 +172,11 @@ rusage_cputime(struct rusage *r) (double) r->ru_utime.tv_usec / 1000000.0; } +/* Hack for some HP-UX preprocessors */ +#ifndef HAVE_GETPAGESIZE +#define HAVE_GETPAGESIZE 0 +#endif + int rusage_maxrss(struct rusage *r) { diff --git a/src/tunnel.cc b/src/tunnel.cc index 32867d1a96..70a32be65b 100644 --- a/src/tunnel.cc +++ b/src/tunnel.cc @@ -1,7 +1,6 @@ /* - * $Id: tunnel.cc,v 1.94 1999/04/23 02:57:33 wessels Exp $ - * $Id: tunnel.cc,v 1.94 1999/04/23 02:57:33 wessels Exp $ + * $Id: tunnel.cc,v 1.95 1999/05/04 21:58:37 wessels Exp $ * * DEBUG: section 26 Secure Sockets Layer Proxy * AUTHOR: Duane Wessels diff --git a/src/url.cc b/src/url.cc index f8d0b2cafb..79bc9171bc 100644 --- a/src/url.cc +++ b/src/url.cc @@ -1,7 +1,6 @@ /* - * $Id: url.cc,v 1.115 1999/04/23 02:57:41 wessels Exp $ - * $Id: url.cc,v 1.115 1999/04/23 02:57:41 wessels Exp $ + * $Id: url.cc,v 1.116 1999/05/04 21:58:46 wessels Exp $ * * DEBUG: section 23 URL Parsing * AUTHOR: Duane Wessels diff --git a/src/urn.cc b/src/urn.cc index 808ab66319..d44e65e356 100644 --- a/src/urn.cc +++ b/src/urn.cc @@ -1,8 +1,7 @@ /* * - * $Id: urn.cc,v 1.54 1999/04/23 02:57:42 wessels Exp $ - * $Id: urn.cc,v 1.54 1999/04/23 02:57:42 wessels Exp $ + * $Id: urn.cc,v 1.55 1999/05/04 21:58:46 wessels Exp $ * * DEBUG: section 52 URN Parsing * AUTHOR: Kostas Anagnostakis