From: Amos Jeffries Date: Mon, 11 Apr 2011 03:25:32 +0000 (-0600) Subject: SourceLayout: Shuffle InitAuthSchemes() to Auth::Init() X-Git-Tag: take06~27^2~8 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ccd8a22aff10c0a04d27428db4be009a4b94af83;p=thirdparty%2Fsquid.git SourceLayout: Shuffle InitAuthSchemes() to Auth::Init() No logic changes. --- diff --git a/src/AuthReg.cc b/src/AuthReg.cc index d47b34cb70..a08726129d 100644 --- a/src/AuthReg.cc +++ b/src/AuthReg.cc @@ -2,9 +2,6 @@ #if USE_AUTH -#include "Debug.h" -#include "protos.h" - #if HAVE_AUTH_MODULE_BASIC #include "auth/basic/Scheme.h" #endif @@ -18,31 +15,34 @@ #include "auth/ntlm/Scheme.h" #endif +#include "Debug.h" +#include "protos.h" + /** * Initialize the authentication modules (if any) * This is required once, before any configuration actions are taken. */ void -InitAuthSchemes() +Auth::Init() { - debugs(29,1,"Initializing Authentication Schemes ..."); + debugs(29,DBG_IMPORTANT,"Startup: Initializing Authentication Schemes ..."); #if HAVE_AUTH_MODULE_BASIC static const char *basic_type = Auth::Basic::Scheme::GetInstance()->type(); - debugs(29,1,"Initialized Authentication Scheme '" << basic_type << "'"); + debugs(29,DBG_IMPORTANT,"Startup: Initialized Authentication Scheme '" << basic_type << "'"); #endif #if HAVE_AUTH_MODULE_DIGEST static const char *digest_type = Auth::Digest::Scheme::GetInstance()->type(); - debugs(29,1,"Initialized Authentication Scheme '" << digest_type << "'"); + debugs(29,DBG_IMPORTANT,"Startup: Initialized Authentication Scheme '" << digest_type << "'"); #endif #if HAVE_AUTH_MODULE_NEGOTIATE static const char *negotiate_type = Auth::Negotiate::Scheme::GetInstance()->type(); - debugs(29,1,"Initialized Authentication Scheme '" << negotiate_type << "'"); + debugs(29,DBG_IMPORTANT,"Startup: Initialized Authentication Scheme '" << negotiate_type << "'"); #endif #if HAVE_AUTH_MODULE_NTLM static const char *ntlm_type = Auth::Ntlm::Scheme::GetInstance()->type(); - debugs(29,1,"Initialized Authentication Scheme '" << ntlm_type << "'"); + debugs(29,DBG_IMPORTANT,"Startup: Initialized Authentication Scheme '" << ntlm_type << "'"); #endif - debugs(29,1,"Initializing Authentication Schemes Complete."); + debugs(29,DBG_IMPORTANT,"Startup: Initialized Authentication."); } #endif /* USE_AUTH */ diff --git a/src/cache_cf.cc b/src/cache_cf.cc index 201a768afc..10368edb02 100644 --- a/src/cache_cf.cc +++ b/src/cache_cf.cc @@ -1882,7 +1882,7 @@ free_authparam(Auth::ConfigVector * cfg) /* on reconfigure initialize new auth schemes for the new config. */ if (reconfiguring) { - InitAuthSchemes(); + Auth::Init(); } } diff --git a/src/main.cc b/src/main.cc index 8966c83e5b..67e110fee9 100644 --- a/src/main.cc +++ b/src/main.cc @@ -1368,7 +1368,7 @@ SquidMain(int argc, char **argv) /* we may want the parsing process to set this up in the future */ Store::Root(new StoreController); #if USE_AUTH - InitAuthSchemes(); /* required for config parsing */ + Auth::Init(); /* required for config parsing */ #endif Ip::ProbeTransport(); // determine IPv4 or IPv6 capabilities before parsing. diff --git a/src/protos.h b/src/protos.h index bac9cfca70..8735f6cd43 100644 --- a/src/protos.h +++ b/src/protos.h @@ -804,8 +804,12 @@ class external_acl; SQUIDCEXTERN char *peer_proxy_negotiate_auth(char *principal_name, char *proxy); #endif - /* call to ensure the auth component schemes exist. */ - SQUIDCEXTERN void InitAuthSchemes(void); +namespace Auth +{ +/* call to ensure the auth component schemes exist. */ +extern void Init(void); +} // namespace Auth + #endif /* USE_AUTH */ #endif /* SQUID_PROTOS_H */