]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
2.2 branch merge
authorwessels <>
Wed, 5 May 1999 03:58:18 +0000 (03:58 +0000)
committerwessels <>
Wed, 5 May 1999 03:58:18 +0000 (03:58 +0000)
23 files changed:
src/cf.data.pre
src/comm_select.cc
src/delay_pools.cc
src/ftp.cc
src/http.cc
src/main.cc
src/mime.cc
src/neighbors.cc
src/net_db.cc
src/pinger.cc
src/protos.h
src/snmp_agent.cc
src/snmp_core.cc
src/squid.h
src/ssl.cc
src/stat.cc
src/store.cc
src/store_client.cc
src/store_rebuild.cc
src/tools.cc
src/tunnel.cc
src/url.cc
src/urn.cc

index b4597a41518b1f040baefec0577eccdf343eb512..5508bba7c929eb5f9666bb8b85f11b2da6df9253 100644 (file)
@@ -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
  -----------------------------------------------------------------------------
index c3177a3f7bad043124a16ce998ca9411e65acfef..b8b1c306a1a8bc0b8e50bb110c9af22554d58100 100644 (file)
@@ -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)
index 1255661f0db1fd6128fc60675d1c1b180b3fc91f..5dfd9a3b00accfd9ac49beb68dcf77329e86411a 100644 (file)
@@ -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 <luyer@ucs.uwa.edu.au>
@@ -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
index 2fe12f98fd398ee44e059ea01a5f6ed3b0848c6b..d19077583a9d197ba31ddb24776b2025292d8ba1 100644 (file)
@@ -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);
index c0cf648592aee4f4138cb74629b34adf718bb37a..605b75a132c5da86f5f9cef747afbcf4974b3b15 100644 (file)
@@ -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);
index e7677884263f7e151d0eb970bc38c5aa8cd1b117..c019ace8eda26689665b483cc0b8694f97ccd393 100644 (file)
@@ -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
index a7080ce9282fb1f4ac2ce5b45b3bbed49aa62a7c..9dfaec567e57f088032ef64dc1fb19284cb7bbf0 100644 (file)
@@ -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
index a6b2fec4184ce0b5f8bb9ebb3df3ef0267ddb8bc..dc4ac12473eb0091984b5a7f4f48b9c15a80805c 100644 (file)
@@ -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
index 70f5d6227e3b31fbf162961b886be1086c0529cf..c4135c877fddb6b6255aea63ae8109485d454663 100644 (file)
@@ -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
index 1248b60f7d90408a0e4225497f37a8b2efb60976..05c72f101afbf96a46de88f1629b9552b2651f80 100644 (file)
@@ -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
index 51effa574351941ebfcbe64c5aa72c991757f46e..c6e9e1512af0c6864d78dd36027e526005f27c88 100644 (file)
@@ -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/
index 313c79aa8010a5fc5fa7a174d1a74a950869d72b..ce73f8518daf8c7b29798588a5e8e4641fe139d9 100644 (file)
@@ -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);
index 3b197a42e10734e69ef8dfeb52cd6014cc689463..ac63c216ab1cdfbc74b5f8cbd44dab734781682a 100644 (file)
@@ -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);
index c17673160206f0b0276b11c382ed2b4a757a737b..8b734d85fd81c74a987a81869a75729883f34aba 100644 (file)
@@ -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
  *
index 4919549325f3b45b2df48080fbe04e089604757e..a23bd8dba919b21ae7e5059b953a11548e805ddd 100644 (file)
@@ -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
index 7bfe10b89792e7409275e76bf82de1a308c2fd74..6044981c062f8cfdf39efaa98373599438d8dacb 100644 (file)
@@ -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
index bc0f2bf4670ee8b6bade73ce1aea98eb924d82b5..d3afcb9e500260cbb04a5b8aac7bcab68e69712c 100644 (file)
@@ -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
index 2bead8443eed6257fb0f45be462036792e9a8130..b6f61921b85153f275e138db48caab1feb7cfb7e 100644 (file)
@@ -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);
index 7f26c81aa60e1db0d6ae556d8a7b5162a21c736d..9ae20273fc10f5c4b63897cd66a2397caa978a5c 100644 (file)
@@ -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++;
index 5ad5a4b0f98e7c4a815b30da0eae5d55d15925ea..fb5f59a89fc079e27a8f9cd04e00888426fb7afa 100644 (file)
@@ -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)
 {
index 32867d1a9666c0bab2d3a4b09aa45d7f5e2e40b6..70a32be65bee73dbf0ab648ed08e65bdf031f16f 100644 (file)
@@ -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
index f8d0b2cafb577c8e135e3b8258370b2f1e427c80..79bc9171bc697bbd866efc32e7af84d886206ee2 100644 (file)
@@ -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
index 808ab663191f35c86a66db01a25224cd4b2a45ec..d44e65e3562d62cb22c4997cf06f70a9f84a1c75 100644 (file)
@@ -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