From: Amos Jeffries Date: Fri, 3 Jun 2011 06:20:23 +0000 (-0600) Subject: Bug 3159: delay pools --disable-auth compile problems X-Git-Tag: take08~55^2~151 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=79fc69156eab0211a0479a34be0be3951681cc17;p=thirdparty%2Fsquid.git Bug 3159: delay pools --disable-auth compile problems Also adds test-suite scan for --disable-auth issues. --- diff --git a/src/CompositePoolNode.h b/src/CompositePoolNode.h index 70c46dc59b..821e2b715e 100644 --- a/src/CompositePoolNode.h +++ b/src/CompositePoolNode.h @@ -73,7 +73,9 @@ public: CompositeSelectionDetails() {} Ip::Address src_addr; +#if USE_AUTH AuthUserRequest::Pointer user; +#endif String tag; }; diff --git a/src/DelayId.cc b/src/DelayId.cc index dcfad8930b..3f47fd327d 100644 --- a/src/DelayId.cc +++ b/src/DelayId.cc @@ -131,7 +131,9 @@ DelayId::DelayClient(ClientHttpRequest * http) DelayId result (pool + 1); CompositePoolNode::CompositeSelectionDetails details; details.src_addr = ch.src_addr; +#if USE_AUTH details.user = r->auth_user_request; +#endif details.tag = r->tag; result.compositePosition(DelayPools::delay_data[pool].theComposite()->id(details)); return result; diff --git a/src/DelayUser.cc b/src/DelayUser.cc index fbac8e5b3f..c36bbaa8f1 100644 --- a/src/DelayUser.cc +++ b/src/DelayUser.cc @@ -37,7 +37,7 @@ #include "config.h" -#if USE_DELAY_POOLS +#if USE_DELAY_POOLS && USE_AUTH #include "squid.h" #include "DelayUser.h" #include "auth/UserRequest.h" @@ -235,4 +235,4 @@ DelayUser::Id::bytesIn(int qty) theBucket->theBucket.bytesIn(qty); } -#endif +#endif /* USE_DELAY_POOLS && USE_AUTH */ diff --git a/src/DelayUser.h b/src/DelayUser.h index a0816bdbfe..0210e343fb 100644 --- a/src/DelayUser.h +++ b/src/DelayUser.h @@ -36,7 +36,7 @@ #ifndef DELAYUSER_H #define DELAYUSER_H -#if USE_DELAY_POOLS +#if USE_DELAY_POOLS && USE_AUTH #include "squid.h" #include "auth/Gadgets.h" @@ -106,5 +106,5 @@ private: Splay buckets; }; -#endif /* USE_DELAY_POOLS */ +#endif /* USE_DELAY_POOLS && USE_AUTH */ #endif /* DELAYUSER_H */ diff --git a/src/client_side_request.cc b/src/client_side_request.cc index 1115dd6ab3..d51702a1da 100644 --- a/src/client_side_request.cc +++ b/src/client_side_request.cc @@ -1630,8 +1630,12 @@ ClientHttpRequest::handleAdaptationFailure(int errDetail, bool bypassable) repContext->setReplyToError(ERR_ICAP_FAILURE, HTTP_INTERNAL_SERVER_ERROR, request->method, NULL, (c != NULL ? c->peer : noAddr), request, NULL, +#if USE_AUTH (c != NULL && c->auth_user_request != NULL ? c->auth_user_request : request->auth_user_request)); +#else + NULL); +#endif request->detailError(ERR_ICAP_FAILURE, errDetail); diff --git a/src/delay_pools.cc b/src/delay_pools.cc index 566291e816..55fee1e347 100644 --- a/src/delay_pools.cc +++ b/src/delay_pools.cc @@ -340,7 +340,9 @@ CommonPool::Factory(unsigned char _class, CompositePoolNode::Pointer& compositeC temp->push_back (new Aggregate); temp->push_back (new ClassCNetPool); temp->push_back (new ClassCHostPool); +#if USE_AUTH temp->push_back (new DelayUser); +#endif } break; diff --git a/test-suite/buildtests/layer-04-noauth-everything.opts b/test-suite/buildtests/layer-04-noauth-everything.opts new file mode 100644 index 0000000000..44f70c0b5a --- /dev/null +++ b/test-suite/buildtests/layer-04-noauth-everything.opts @@ -0,0 +1,114 @@ +# +# All configuration options that can be enabled are enabled, +# XXX: with the exception of those that depend on the environment. +# TODO: Add environment-specific tests to enable more options. +# +# TEST: Disable auth and auth helpers. Every other possible feature enabled. +# +# Complete Check - everything is supposed to work at this level +MAKETEST="distcheck" +# +# +# The options for this level can be easily generated semi-automatically from configure.ac by: +# grep -E "^AC_ARG_ENABLE" ./configure.ac | grep -o -E "[0-9a-z\-]+[,]" | grep -o -E "[^,]+" >disable.opts +# followed by insertion of ' --enable-' and '\' strings +# +# grep -E "^AC_ARG_WITH" ./configure.ac | grep -o -E "[0-9a-z\-]+[,]" | grep -o -E "[^,]+" >without.opts +# followed by insertion of ' --with-' and ' \' strings +# +# sometimes it's just too automatic.. +# Following options should be populated with local settings. +# We can't test them automatically everywhere +# +# --with-default-user=NAME \ +# --with-aufs-threads=N \ +# --with-coss-membuf-size=N \ +# --with-filedescriptors=N \ +# --with-cppunit-basedir=PATH \ +# --with-openssl=PATH \ +# --with-po2html=PATH \ +# --with-tags=TAGS \ +# +# Following features require special support from other optional packages. +# We can't test them automatically everywhere without detecting those +# optional packages first. +# +# --enable-ecap \ +# --enable-epoll \ +# --enable-kqueue \ +# --enable-win32-service \ +# --with-valgrind-debug \ +# +# --enable-cpu-profiling \ Requires CPU support. +# +# +# NP: DISTCHECK_CONFIGURE_FLAGS is a magic automake macro for the +# distcheck target recursive tests beteen scripted runs. +# we use it to perform the same duty between our nested scripts. +DISTCHECK_CONFIGURE_FLAGS=" \ + --enable-loadable-modules \ + --enable-gnuregex \ + --enable-optimizations \ + --enable-inline \ + --enable-debug-cbdata \ + --enable-xmalloc-statistics \ + --enable-async-io \ + --enable-storeio \ + --enable-disk-io \ + --enable-removal-policies \ + --enable-icmp \ + --enable-delay-pools \ + --enable-icap-client \ + --enable-useragent-log \ + --enable-referer-log \ + --enable-wccp \ + --enable-wccpv2 \ + --enable-kill-parent-hack \ + --enable-snmp \ + --enable-cachemgr-hostname \ + --enable-eui \ + --enable-htcp \ + --enable-ssl \ + --enable-forw-via-db \ + --enable-cache-digests \ + --enable-poll \ + --enable-select \ + --enable-http-violations \ + --enable-ipfw-transparent \ + --enable-leakfinder \ + --enable-follow-x-forwarded-for \ + --enable-ident-lookups \ + --enable-internal-dns \ + --enable-default-hostsfile \ + --disable-auth \ + --disable-basic-auth-helpers \ + --disable-ntlm-auth-helpers \ + --disable-negotiate-auth-helpers \ + --disable-digest-auth-helpers \ + --disable-ntlm-fail-open \ + --enable-external-acl-helpers \ + --enable-url-rewrite-helpers \ + --enable-mempools \ + --enable-unlinkd \ + --enable-stacktraces \ + --enable-vary \ + --enable-x-accelerator-vary \ + --enable-ipv6 \ + --enable-auto-locale \ + --enable-translation \ + --enable-zph-qos \ + --enable-esi \ + --with-aio \ + --with-build-environment=default \ + --with-dl \ + --with-dns-cname \ + --with-gnu-ld \ + --with-ipv6-split-stack \ + --with-large-files \ + --with-pic \ + --with-pthreads \ + --enable-build-info=squid\ test\ build \ + " + +# Fix the distclean testing. +export DISTCHECK_CONFIGURE_FLAGS