]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug 3159: delay pools --disable-auth compile problems
authorAmos Jeffries <squid3@treenet.co.nz>
Fri, 3 Jun 2011 06:20:23 +0000 (00:20 -0600)
committerAmos Jeffries <squid3@treenet.co.nz>
Fri, 3 Jun 2011 06:20:23 +0000 (00:20 -0600)
Also adds test-suite scan for --disable-auth issues.

src/CompositePoolNode.h
src/DelayId.cc
src/DelayUser.cc
src/DelayUser.h
src/client_side_request.cc
src/delay_pools.cc
test-suite/buildtests/layer-04-noauth-everything.opts [new file with mode: 0644]

index 70c46dc59bf4a9425d3b33426340f044ceacc6cf..821e2b715e1861da2ce9f325b4d4a4e652b50dc0 100644 (file)
@@ -73,7 +73,9 @@ public:
         CompositeSelectionDetails() {}
 
         Ip::Address src_addr;
+#if USE_AUTH
         AuthUserRequest::Pointer user;
+#endif
         String tag;
     };
 
index dcfad8930bb81aff024ef0537adfaa2fde5ed9c4..3f47fd327df9ae63494b1794aa93d80d27847bba 100644 (file)
@@ -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;
index fbac8e5b3f1a751a3b0929141f3d1a95bcdb0a65..c36bbaa8f1bb33abc486662bc2bf642dc702f972 100644 (file)
@@ -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 */
index a0816bdbfe9a616bd6ba086c35bd78f902bd5d80..0210e343fb1e9a3d93ecb91917e01923b74795fc 100644 (file)
@@ -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<DelayUserBucket::Pointer> buckets;
 };
 
-#endif /* USE_DELAY_POOLS */
+#endif /* USE_DELAY_POOLS && USE_AUTH */
 #endif /* DELAYUSER_H */
index 1115dd6ab3649d7b1dbcdf87805d81fefab4b935..d51702a1da55cac1779ebb4d2b7394019f3e92ca 100644 (file)
@@ -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);
 
index 566291e8168b2c4ec5e7203544bccc2eeae54965..55fee1e3471fb9d6528538c50cadd7cead1bc165 100644 (file)
@@ -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 (file)
index 0000000..44f70c0
--- /dev/null
@@ -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