From: Amos Jeffries Date: Wed, 24 Sep 2014 17:10:37 +0000 (-0700) Subject: SourceLayout: rename auth module files to match guidelines X-Git-Tag: SQUID_3_5_0_1~42 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=12daeef66363d20efd32faa99fff66421416f1b6;p=thirdparty%2Fsquid.git SourceLayout: rename auth module files to match guidelines * Squid-3 coding guidelines require that files are named after the class(es) contained within. Rename the files containing auth Config classes to match. * Remove the unused DefaultAuthenticateChildrenMax macros. * simplify included headers in auth modules. * alphabetize the order auth modules are detected. --- diff --git a/configure.ac b/configure.ac index f1ade7e876..0256b9286f 100644 --- a/configure.ac +++ b/configure.ac @@ -2468,16 +2468,17 @@ AC_ARG_ENABLE(auth-basic, ]) m4_include([helpers/basic_auth/modules.m4]) -AC_ARG_ENABLE(auth-ntlm, - AS_HELP_STRING([--enable-auth-ntlm="list of helpers"], - [Enable the NTLM authentication scheme, and build the specified helpers. +AC_ARG_ENABLE(auth-digest, + AS_HELP_STRING([--enable-auth-digest="list of helpers"], + [Enable the Digest authentication scheme, and build the specified helpers. Not providing an explicit list of helpers will attempt build of all possible helpers. Default is to do so. - To disable the NTLM authentication scheme, use --disable-auth-ntlm. + To disable the Digest authentication scheme, use --disable-auth-digest. To enable but build no helpers, specify "none". - To see available helpers, see the helpers/ntlm_auth directory. ]),[ + To see available helpers, see the helpers/digest_auth directory. ]),[ +#nothing to do, really ]) -m4_include([helpers/ntlm_auth/modules.m4]) +m4_include([helpers/digest_auth/modules.m4]) AC_ARG_ENABLE(auth-negotiate, AS_HELP_STRING([--enable-auth-negotiate="list of helpers"], @@ -2493,17 +2494,16 @@ AC_ARG_ENABLE(auth-negotiate, ]) m4_include([helpers/negotiate_auth/modules.m4]) -AC_ARG_ENABLE(auth-digest, - AS_HELP_STRING([--enable-auth-digest="list of helpers"], - [Enable the Digest authentication scheme, and build the specified helpers. +AC_ARG_ENABLE(auth-ntlm, + AS_HELP_STRING([--enable-auth-ntlm="list of helpers"], + [Enable the NTLM authentication scheme, and build the specified helpers. Not providing an explicit list of helpers will attempt build of all possible helpers. Default is to do so. - To disable the Digest authentication scheme, use --disable-auth-digest. + To disable the NTLM authentication scheme, use --disable-auth-ntlm. To enable but build no helpers, specify "none". - To see available helpers, see the helpers/digest_auth directory. ]),[ -#nothing to do, really + To see available helpers, see the helpers/ntlm_auth directory. ]),[ ]) -m4_include([helpers/digest_auth/modules.m4]) +m4_include([helpers/ntlm_auth/modules.m4]) dnl Authentication libraries to build dnl This list will not be needed when each auth library has its own Makefile diff --git a/src/auth/basic/auth_basic.cc b/src/auth/basic/Config.cc similarity index 99% rename from src/auth/basic/auth_basic.cc rename to src/auth/basic/Config.cc index 09dd22d2f9..1caa6f19bb 100644 --- a/src/auth/basic/auth_basic.cc +++ b/src/auth/basic/Config.cc @@ -13,7 +13,7 @@ * See acl.c for access control and client_side.c for auditing */ #include "squid.h" -#include "auth/basic/auth_basic.h" +#include "auth/basic/Config.h" #include "auth/basic/Scheme.h" #include "auth/basic/User.h" #include "auth/basic/UserRequest.h" diff --git a/src/auth/basic/auth_basic.h b/src/auth/basic/Config.h similarity index 95% rename from src/auth/basic/auth_basic.h rename to src/auth/basic/Config.h index 67aa6669d8..62920adefc 100644 --- a/src/auth/basic/auth_basic.h +++ b/src/auth/basic/Config.h @@ -14,8 +14,6 @@ #include "auth/UserRequest.h" #include "helper/forward.h" -#define DefaultAuthenticateChildrenMax 32 /* 32 processes */ - namespace Auth { namespace Basic diff --git a/src/auth/basic/Makefile.am b/src/auth/basic/Makefile.am index a13cb01f27..d3c76dfff7 100644 --- a/src/auth/basic/Makefile.am +++ b/src/auth/basic/Makefile.am @@ -11,10 +11,10 @@ include $(top_srcdir)/src/TestHeaders.am noinst_LTLIBRARIES = libbasic.la libbasic_la_SOURCES = \ + Config.cc \ + Config.h \ Scheme.cc \ Scheme.h \ - auth_basic.cc \ - auth_basic.h \ User.cc \ User.h \ UserRequest.cc \ diff --git a/src/auth/basic/Scheme.cc b/src/auth/basic/Scheme.cc index 70d7b3c5ce..75ff461e9a 100644 --- a/src/auth/basic/Scheme.cc +++ b/src/auth/basic/Scheme.cc @@ -7,13 +7,11 @@ */ #include "squid.h" +#include "auth/basic/Config.h" #include "auth/basic/Scheme.h" #include "Debug.h" #include "helper.h" -/* for Auth::Config */ -#include "auth/basic/auth_basic.h" - Auth::Scheme::Pointer Auth::Basic::Scheme::_instance = NULL; Auth::Scheme::Pointer diff --git a/src/auth/basic/Scheme.h b/src/auth/basic/Scheme.h index ddd745a587..102cc91a36 100644 --- a/src/auth/basic/Scheme.h +++ b/src/auth/basic/Scheme.h @@ -9,7 +9,6 @@ #ifndef SQUID_AUTH_BASIC_SCHEME_H #define SQUID_AUTH_BASIC_SCHEME_H -#include "auth/basic/auth_basic.h" #include "auth/Scheme.h" namespace Auth diff --git a/src/auth/basic/User.cc b/src/auth/basic/User.cc index 053d2ccc53..d80ec93f3e 100644 --- a/src/auth/basic/User.cc +++ b/src/auth/basic/User.cc @@ -7,7 +7,7 @@ */ #include "squid.h" -#include "auth/basic/auth_basic.h" +#include "auth/basic/Config.h" #include "auth/basic/User.h" #include "Debug.h" #include "SquidConfig.h" diff --git a/src/auth/basic/UserRequest.cc b/src/auth/basic/UserRequest.cc index 2b461fccc3..c447e0855c 100644 --- a/src/auth/basic/UserRequest.cc +++ b/src/auth/basic/UserRequest.cc @@ -7,7 +7,7 @@ */ #include "squid.h" -#include "auth/basic/auth_basic.h" +#include "auth/basic/Config.h" #include "auth/basic/User.h" #include "auth/basic/UserRequest.h" #include "auth/QueueNode.h" diff --git a/src/auth/digest/auth_digest.cc b/src/auth/digest/Config.cc similarity index 99% rename from src/auth/digest/auth_digest.cc rename to src/auth/digest/Config.cc index 8aee8b138d..e58a29dd1a 100644 --- a/src/auth/digest/auth_digest.cc +++ b/src/auth/digest/Config.cc @@ -13,7 +13,7 @@ * See acl.c for access control and client_side.c for auditing */ #include "squid.h" -#include "auth/digest/auth_digest.h" +#include "auth/digest/Config.h" #include "auth/digest/Scheme.h" #include "auth/digest/User.h" #include "auth/digest/UserRequest.h" diff --git a/src/auth/digest/auth_digest.h b/src/auth/digest/Config.h similarity index 100% rename from src/auth/digest/auth_digest.h rename to src/auth/digest/Config.h diff --git a/src/auth/digest/Makefile.am b/src/auth/digest/Makefile.am index 9b3cb3e18d..f4c61ec873 100644 --- a/src/auth/digest/Makefile.am +++ b/src/auth/digest/Makefile.am @@ -11,10 +11,10 @@ include $(top_srcdir)/src/TestHeaders.am noinst_LTLIBRARIES = libdigest.la libdigest_la_SOURCES = \ + Config.cc \ + Config.h \ Scheme.cc \ Scheme.h \ - auth_digest.cc \ - auth_digest.h \ User.cc \ User.h \ UserRequest.cc \ diff --git a/src/auth/digest/Scheme.cc b/src/auth/digest/Scheme.cc index 44a0f43c02..cfbc3ec46f 100644 --- a/src/auth/digest/Scheme.cc +++ b/src/auth/digest/Scheme.cc @@ -7,6 +7,7 @@ */ #include "squid.h" +#include "auth/digest/Config.h" #include "auth/digest/Scheme.h" #include "Debug.h" #include "globals.h" diff --git a/src/auth/digest/Scheme.h b/src/auth/digest/Scheme.h index b6dade9de9..2efabf6354 100644 --- a/src/auth/digest/Scheme.h +++ b/src/auth/digest/Scheme.h @@ -9,7 +9,6 @@ #ifndef SQUID_AUTH_DIGEST_SCHEME_H #define SQUID_AUTH_DIGEST_SCHEME_H -#include "auth/digest/auth_digest.h" #include "auth/Scheme.h" namespace Auth diff --git a/src/auth/digest/User.cc b/src/auth/digest/User.cc index 03b110ae7b..5ce9f12e87 100644 --- a/src/auth/digest/User.cc +++ b/src/auth/digest/User.cc @@ -7,7 +7,7 @@ */ #include "squid.h" -#include "auth/digest/auth_digest.h" +#include "auth/digest/Config.h" #include "auth/digest/User.h" #include "Debug.h" #include "dlink.h" diff --git a/src/auth/digest/UserRequest.cc b/src/auth/digest/UserRequest.cc index f04cb048f9..6f475629a0 100644 --- a/src/auth/digest/UserRequest.cc +++ b/src/auth/digest/UserRequest.cc @@ -8,7 +8,7 @@ #include "squid.h" #include "AccessLogEntry.h" -#include "auth/digest/auth_digest.h" +#include "auth/digest/Config.h" #include "auth/digest/User.h" #include "auth/digest/UserRequest.h" #include "auth/State.h" diff --git a/src/auth/digest/UserRequest.h b/src/auth/digest/UserRequest.h index 1e385cca96..e0ba9c78cf 100644 --- a/src/auth/digest/UserRequest.h +++ b/src/auth/digest/UserRequest.h @@ -9,7 +9,6 @@ #ifndef _SQUID_SRC_AUTH_DIGEST_USERREQUEST_H #define _SQUID_SRC_AUTH_DIGEST_USERREQUEST_H -#include "auth/digest/auth_digest.h" #include "auth/UserRequest.h" #include "MemPool.h" diff --git a/src/auth/negotiate/auth_negotiate.cc b/src/auth/negotiate/Config.cc similarity index 99% rename from src/auth/negotiate/auth_negotiate.cc rename to src/auth/negotiate/Config.cc index bc581ecdc1..9da649ab21 100644 --- a/src/auth/negotiate/auth_negotiate.cc +++ b/src/auth/negotiate/Config.cc @@ -14,7 +14,7 @@ #include "squid.h" #include "auth/Gadgets.h" -#include "auth/negotiate/auth_negotiate.h" +#include "auth/negotiate/Config.h" #include "auth/negotiate/Scheme.h" #include "auth/negotiate/User.h" #include "auth/negotiate/UserRequest.h" @@ -47,12 +47,6 @@ static int authnegotiate_initialised = 0; /// \ingroup AuthNegotiateInternal static hash_table *proxy_auth_cache = NULL; -/* - * - * Private Functions - * - */ - void Auth::Negotiate::Config::rotateHelpers() { diff --git a/src/auth/negotiate/auth_negotiate.h b/src/auth/negotiate/Config.h similarity index 95% rename from src/auth/negotiate/auth_negotiate.h rename to src/auth/negotiate/Config.h index bfbc1511f7..47d53ae512 100644 --- a/src/auth/negotiate/auth_negotiate.h +++ b/src/auth/negotiate/Config.h @@ -14,8 +14,6 @@ #include "auth/UserRequest.h" #include "helper/forward.h" -#define DefaultAuthenticateChildrenMax 32 /* 32 processes */ - namespace Auth { namespace Negotiate diff --git a/src/auth/negotiate/Makefile.am b/src/auth/negotiate/Makefile.am index 4af1e69be8..ffdab5669e 100644 --- a/src/auth/negotiate/Makefile.am +++ b/src/auth/negotiate/Makefile.am @@ -13,8 +13,8 @@ noinst_LTLIBRARIES = libnegotiate.la libnegotiate_la_SOURCES = \ Scheme.cc \ Scheme.h \ - auth_negotiate.cc \ - auth_negotiate.h \ + Config.cc \ + Config.h \ User.cc \ User.h \ UserRequest.cc \ diff --git a/src/auth/negotiate/Scheme.cc b/src/auth/negotiate/Scheme.cc index 6d0ec268ba..1c548a7ad6 100644 --- a/src/auth/negotiate/Scheme.cc +++ b/src/auth/negotiate/Scheme.cc @@ -7,6 +7,7 @@ */ #include "squid.h" +#include "auth/negotiate/Config.h" #include "auth/negotiate/Scheme.h" #include "Debug.h" #include "helper.h" diff --git a/src/auth/negotiate/Scheme.h b/src/auth/negotiate/Scheme.h index 1f96a9eb2b..add566557d 100644 --- a/src/auth/negotiate/Scheme.h +++ b/src/auth/negotiate/Scheme.h @@ -9,7 +9,6 @@ #ifndef SQUID_AUTH_NEGOTIATE_SCHEME_H #define SQUID_AUTH_NEGOTIATE_SCHEME_H -#include "auth/negotiate/auth_negotiate.h" #include "auth/Scheme.h" namespace Auth diff --git a/src/auth/negotiate/UserRequest.cc b/src/auth/negotiate/UserRequest.cc index ee772378f5..e4c441d66d 100644 --- a/src/auth/negotiate/UserRequest.cc +++ b/src/auth/negotiate/UserRequest.cc @@ -8,7 +8,7 @@ #include "squid.h" #include "AccessLogEntry.h" -#include "auth/negotiate/auth_negotiate.h" +#include "auth/negotiate/Config.h" #include "auth/negotiate/UserRequest.h" #include "auth/State.h" #include "auth/User.h" diff --git a/src/auth/negotiate/UserRequest.h b/src/auth/negotiate/UserRequest.h index 9bfc2febbb..59d5c7b700 100644 --- a/src/auth/negotiate/UserRequest.h +++ b/src/auth/negotiate/UserRequest.h @@ -10,12 +10,12 @@ #define _SQUID_SRC_AUTH_NEGOTIATE_USERREQUEST_H #include "auth/UserRequest.h" +#include "helper/forward.h" #include "MemPool.h" class ConnStateData; class HttpReply; class HttpRequest; -class helper_stateful_server; namespace Auth { diff --git a/src/auth/ntlm/auth_ntlm.cc b/src/auth/ntlm/Config.cc similarity index 99% rename from src/auth/ntlm/auth_ntlm.cc rename to src/auth/ntlm/Config.cc index 16bb4f070f..73ef0b7192 100644 --- a/src/auth/ntlm/auth_ntlm.cc +++ b/src/auth/ntlm/Config.cc @@ -14,7 +14,7 @@ #include "squid.h" #include "auth/Gadgets.h" -#include "auth/ntlm/auth_ntlm.h" +#include "auth/ntlm/Config.h" #include "auth/ntlm/Scheme.h" #include "auth/ntlm/User.h" #include "auth/ntlm/UserRequest.h" @@ -38,12 +38,6 @@ static int authntlm_initialised = 0; static hash_table *proxy_auth_cache = NULL; -/* - * - * Private Functions - * - */ - void Auth::Ntlm::Config::rotateHelpers() { diff --git a/src/auth/ntlm/auth_ntlm.h b/src/auth/ntlm/Config.h similarity index 95% rename from src/auth/ntlm/auth_ntlm.h rename to src/auth/ntlm/Config.h index 1403b9a657..9499384304 100644 --- a/src/auth/ntlm/auth_ntlm.h +++ b/src/auth/ntlm/Config.h @@ -14,8 +14,6 @@ #include "auth/UserRequest.h" #include "helper/forward.h" -#define DefaultAuthenticateChildrenMax 32 /* 32 processes */ - class HttpRequest; class StoreEntry; diff --git a/src/auth/ntlm/Makefile.am b/src/auth/ntlm/Makefile.am index 5f43cfc7c8..c651f00bb3 100644 --- a/src/auth/ntlm/Makefile.am +++ b/src/auth/ntlm/Makefile.am @@ -11,10 +11,10 @@ include $(top_srcdir)/src/TestHeaders.am noinst_LTLIBRARIES = libntlm.la libntlm_la_SOURCES = \ + Config.cc \ + Config.h \ Scheme.cc \ Scheme.h \ - auth_ntlm.cc \ - auth_ntlm.h \ User.cc \ User.h \ UserRequest.cc \ diff --git a/src/auth/ntlm/Scheme.cc b/src/auth/ntlm/Scheme.cc index 148bc80ef3..d3c46007e2 100644 --- a/src/auth/ntlm/Scheme.cc +++ b/src/auth/ntlm/Scheme.cc @@ -7,7 +7,7 @@ */ #include "squid.h" -#include "auth/ntlm/auth_ntlm.h" +#include "auth/ntlm/Config.h" #include "auth/ntlm/Scheme.h" #include "Debug.h" #include "helper.h" diff --git a/src/auth/ntlm/Scheme.h b/src/auth/ntlm/Scheme.h index eed068a758..d270aca707 100644 --- a/src/auth/ntlm/Scheme.h +++ b/src/auth/ntlm/Scheme.h @@ -9,7 +9,6 @@ #ifndef SQUID_AUTH_NTLM_SCHEME_H #define SQUID_AUTH_NTLM_SCHEME_H -#include "auth/ntlm/auth_ntlm.h" #include "auth/Scheme.h" namespace Auth diff --git a/src/auth/ntlm/UserRequest.cc b/src/auth/ntlm/UserRequest.cc index 68e3747376..9a91b0ed4f 100644 --- a/src/auth/ntlm/UserRequest.cc +++ b/src/auth/ntlm/UserRequest.cc @@ -8,7 +8,7 @@ #include "squid.h" #include "AccessLogEntry.h" -#include "auth/ntlm/auth_ntlm.h" +#include "auth/ntlm/Config.h" #include "auth/ntlm/UserRequest.h" #include "auth/State.h" #include "cbdata.h" diff --git a/src/auth/ntlm/UserRequest.h b/src/auth/ntlm/UserRequest.h index c4c2d02dd9..126d85db28 100644 --- a/src/auth/ntlm/UserRequest.h +++ b/src/auth/ntlm/UserRequest.h @@ -9,14 +9,13 @@ #ifndef _SQUID_SRC_AUTH_NTLM_USERREQUEST_H #define _SQUID_SRC_AUTH_NTLM_USERREQUEST_H -#include "auth/ntlm/auth_ntlm.h" #include "auth/UserRequest.h" +#include "helper/forward.h" #include "MemPool.h" class ConnStateData; class HttpReply; class HttpRequest; -class helper_stateful_server; namespace Auth { diff --git a/src/helper/forward.h b/src/helper/forward.h index 51b42443b4..8d4c43b6cc 100644 --- a/src/helper/forward.h +++ b/src/helper/forward.h @@ -12,6 +12,9 @@ class helper; class statefulhelper; +class helper_server; +class helper_stateful_server; + /// helper protocol primitives namespace Helper {