From: hno <> Date: Sat, 20 Jul 2002 18:30:04 +0000 (+0000) Subject: Bugzilla #164: delay_access failed to process proxy_auth ACLs X-Git-Tag: SQUID_3_0_PRE1~888 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d5964d58643059a5899ec1034470e06d9757a08c;p=thirdparty%2Fsquid.git Bugzilla #164: delay_access failed to process proxy_auth ACLs giving the following error message: authenticateAuthenticate: no connection data, cannot process authentication --- diff --git a/src/client_side.cc b/src/client_side.cc index 7f6e53cfab..39e0f30b56 100644 --- a/src/client_side.cc +++ b/src/client_side.cc @@ -1,6 +1,6 @@ /* - * $Id: client_side.cc,v 1.581 2002/06/24 06:07:38 hno Exp $ + * $Id: client_side.cc,v 1.582 2002/07/20 12:30:04 hno Exp $ * * DEBUG: section 33 Client-side Routines * AUTHOR: Duane Wessels @@ -213,7 +213,7 @@ clientCreateStoreEntry(clientHttpRequest * h, method_t m, request_flags flags) e = storeCreateEntry(h->uri, h->log_uri, flags, m); h->sc = storeClientListAdd(e, h); #if DELAY_POOLS - delaySetStoreClient(h->sc, delayClient(h->request)); + delaySetStoreClient(h->sc, delayClient(h)); #endif h->reqofs = 0; h->reqsize = 0; @@ -404,7 +404,7 @@ clientProcessExpired(void *data) http->sc = storeClientListAdd(entry, http); #if DELAY_POOLS /* delay_id is already set on original store client */ - delaySetStoreClient(http->sc, delayClient(http->request)); + delaySetStoreClient(http->sc, delayClient(http)); #endif http->request->lastmod = http->old_entry->lastmod; debug(33, 5) ("clientProcessExpired: lastmod %ld\n", (long int) entry->lastmod); @@ -1924,7 +1924,6 @@ clientProcessRequest(clientHttpRequest * http) { char *url = http->uri; request_t *r = http->request; - int fd = http->conn->fd; HttpReply *rep; http_version_t version; debug(33, 4) ("clientProcessRequest: %s '%s'\n", @@ -1932,7 +1931,7 @@ clientProcessRequest(clientHttpRequest * http) url); if (r->method == METHOD_CONNECT) { http->log_type = LOG_TCP_MISS; - sslStart(fd, url, r, &http->out.size, &http->al.http.code); + sslStart(http, &http->out.size, &http->al.http.code); return; } else if (r->method == METHOD_PURGE) { clientPurgeRequest(http); @@ -1967,7 +1966,7 @@ clientProcessRequest(clientHttpRequest * http) http->entry->mem_obj->method = r->method; http->sc = storeClientListAdd(http->entry, http); #if DELAY_POOLS - delaySetStoreClient(http->sc, delayClient(r)); + delaySetStoreClient(http->sc, delayClient(http)); #endif assert(http->log_type == LOG_TCP_HIT); http->reqofs = 0; diff --git a/src/delay_pools.cc b/src/delay_pools.cc index 8832e150aa..04b5729fb2 100644 --- a/src/delay_pools.cc +++ b/src/delay_pools.cc @@ -1,6 +1,6 @@ /* - * $Id: delay_pools.cc,v 1.24 2002/04/21 21:54:40 hno Exp $ + * $Id: delay_pools.cc,v 1.25 2002/07/20 12:30:04 hno Exp $ * * DEBUG: section 77 Delay Pools * AUTHOR: David Luyer @@ -305,19 +305,23 @@ delayId(unsigned short pool, unsigned short position) } delay_id -delayClient(request_t * r) +delayClient(clientHttpRequest * http) { + request_t *r; aclCheck_t ch; int i; int j; unsigned int host; unsigned short pool, position; unsigned char class, net; + assert(http); + r = http->request; memset(&ch, '\0', sizeof(ch)); ch.src_addr = r->client_addr; ch.my_addr = r->my_addr; ch.my_port = r->my_port; + ch.conn = http->conn; ch.request = r; if (r->client_addr.s_addr == INADDR_BROADCAST) { debug(77, 2) ("delayClient: WARNING: Called with 'allones' address, ignoring\n"); diff --git a/src/protos.h b/src/protos.h index 32d1912e44..89226c8c27 100644 --- a/src/protos.h +++ b/src/protos.h @@ -1,6 +1,6 @@ /* - * $Id: protos.h,v 1.441 2002/06/23 14:50:07 hno Exp $ + * $Id: protos.h,v 1.442 2002/07/20 12:30:04 hno Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -792,7 +792,7 @@ extern void shut_down(int); extern void start_announce(void *unused); -extern void sslStart(int fd, const char *, request_t *, size_t *, int *); +extern void sslStart(clientHttpRequest *, size_t *, int *); extern void waisStart(FwdState *); /* ident.c */ @@ -1237,7 +1237,7 @@ extern void delayPoolsReconfigure(void); extern void delaySetNoDelay(int fd); extern void delayClearNoDelay(int fd); extern int delayIsNoDelay(int fd); -extern delay_id delayClient(request_t *); +extern delay_id delayClient(clientHttpRequest *); extern EVH delayPoolsUpdate; extern int delayBytesWanted(delay_id d, int min, int max); extern void delayBytesIn(delay_id, int qty); diff --git a/src/ssl.cc b/src/ssl.cc index 814ea993b1..5bd20889d9 100644 --- a/src/ssl.cc +++ b/src/ssl.cc @@ -1,6 +1,6 @@ /* - * $Id: ssl.cc,v 1.119 2002/04/13 23:07:51 hno Exp $ + * $Id: ssl.cc,v 1.120 2002/07/20 12:30:04 hno Exp $ * * DEBUG: section 26 Secure Sockets Layer Proxy * AUTHOR: Duane Wessels @@ -431,7 +431,7 @@ sslConnectDone(int fdnotused, int status, void *data) CBDATA_TYPE(SslStateData); void -sslStart(int fd, const char *url, request_t * request, size_t * size_ptr, int *status_ptr) +sslStart(clientHttpRequest * http, size_t * size_ptr, int *status_ptr) { /* Create state structure. */ SslStateData *sslState = NULL; @@ -439,6 +439,9 @@ sslStart(int fd, const char *url, request_t * request, size_t * size_ptr, int *s ErrorState *err = NULL; aclCheck_t ch; int answer; + int fd = http->conn->fd; + request_t *request = http->request; + char *url = http->uri; /* * client_addr == no_addr indicates this is an "internal" request * from peer_digest.c, asn.c, netdb.c, etc and should always @@ -487,7 +490,7 @@ sslStart(int fd, const char *url, request_t * request, size_t * size_ptr, int *s CBDATA_INIT_TYPE(SslStateData); sslState = cbdataAlloc(SslStateData); #if DELAY_POOLS - sslState->delay_id = delayClient(request); + sslState->delay_id = delayClient(http); delayRegisterDelayIdPtr(&sslState->delay_id); #endif sslState->url = xstrdup(url); diff --git a/src/tunnel.cc b/src/tunnel.cc index 0d20b717bb..5774b7ea62 100644 --- a/src/tunnel.cc +++ b/src/tunnel.cc @@ -1,6 +1,6 @@ /* - * $Id: tunnel.cc,v 1.119 2002/04/13 23:07:51 hno Exp $ + * $Id: tunnel.cc,v 1.120 2002/07/20 12:30:04 hno Exp $ * * DEBUG: section 26 Secure Sockets Layer Proxy * AUTHOR: Duane Wessels @@ -431,7 +431,7 @@ sslConnectDone(int fdnotused, int status, void *data) CBDATA_TYPE(SslStateData); void -sslStart(int fd, const char *url, request_t * request, size_t * size_ptr, int *status_ptr) +sslStart(clientHttpRequest * http, size_t * size_ptr, int *status_ptr) { /* Create state structure. */ SslStateData *sslState = NULL; @@ -439,6 +439,9 @@ sslStart(int fd, const char *url, request_t * request, size_t * size_ptr, int *s ErrorState *err = NULL; aclCheck_t ch; int answer; + int fd = http->conn->fd; + request_t *request = http->request; + char *url = http->uri; /* * client_addr == no_addr indicates this is an "internal" request * from peer_digest.c, asn.c, netdb.c, etc and should always @@ -487,7 +490,7 @@ sslStart(int fd, const char *url, request_t * request, size_t * size_ptr, int *s CBDATA_INIT_TYPE(SslStateData); sslState = cbdataAlloc(SslStateData); #if DELAY_POOLS - sslState->delay_id = delayClient(request); + sslState->delay_id = delayClient(http); delayRegisterDelayIdPtr(&sslState->delay_id); #endif sslState->url = xstrdup(url);