]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
SourceLayout: rename auth module files to match guidelines
authorAmos Jeffries <squid3@treenet.co.nz>
Wed, 24 Sep 2014 17:10:37 +0000 (10:10 -0700)
committerAmos Jeffries <squid3@treenet.co.nz>
Wed, 24 Sep 2014 17:10:37 +0000 (10:10 -0700)
* 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.

31 files changed:
configure.ac
src/auth/basic/Config.cc [moved from src/auth/basic/auth_basic.cc with 99% similarity]
src/auth/basic/Config.h [moved from src/auth/basic/auth_basic.h with 95% similarity]
src/auth/basic/Makefile.am
src/auth/basic/Scheme.cc
src/auth/basic/Scheme.h
src/auth/basic/User.cc
src/auth/basic/UserRequest.cc
src/auth/digest/Config.cc [moved from src/auth/digest/auth_digest.cc with 99% similarity]
src/auth/digest/Config.h [moved from src/auth/digest/auth_digest.h with 100% similarity]
src/auth/digest/Makefile.am
src/auth/digest/Scheme.cc
src/auth/digest/Scheme.h
src/auth/digest/User.cc
src/auth/digest/UserRequest.cc
src/auth/digest/UserRequest.h
src/auth/negotiate/Config.cc [moved from src/auth/negotiate/auth_negotiate.cc with 99% similarity]
src/auth/negotiate/Config.h [moved from src/auth/negotiate/auth_negotiate.h with 95% similarity]
src/auth/negotiate/Makefile.am
src/auth/negotiate/Scheme.cc
src/auth/negotiate/Scheme.h
src/auth/negotiate/UserRequest.cc
src/auth/negotiate/UserRequest.h
src/auth/ntlm/Config.cc [moved from src/auth/ntlm/auth_ntlm.cc with 99% similarity]
src/auth/ntlm/Config.h [moved from src/auth/ntlm/auth_ntlm.h with 95% similarity]
src/auth/ntlm/Makefile.am
src/auth/ntlm/Scheme.cc
src/auth/ntlm/Scheme.h
src/auth/ntlm/UserRequest.cc
src/auth/ntlm/UserRequest.h
src/helper/forward.h

index f1ade7e87674e3a5213d48f2385ed9800c692854..0256b9286fcd4235b2f9cd651e5fdfac2e6612fd 100644 (file)
@@ -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
similarity index 99%
rename from src/auth/basic/auth_basic.cc
rename to src/auth/basic/Config.cc
index 09dd22d2f93faeb46fb0ea7b4231166e445a9791..1caa6f19bb982dc5b8a98d2a2090686b3b73c4f7 100644 (file)
@@ -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"
similarity index 95%
rename from src/auth/basic/auth_basic.h
rename to src/auth/basic/Config.h
index 67aa6669d8148fbc1bb491140f09a328f6008f00..62920adefc5497fbfc477a89bc87e5a50430bca0 100644 (file)
@@ -14,8 +14,6 @@
 #include "auth/UserRequest.h"
 #include "helper/forward.h"
 
-#define DefaultAuthenticateChildrenMax  32     /* 32 processes */
-
 namespace Auth
 {
 namespace Basic
index a13cb01f2751966c4025a0b63069233d92985e23..d3c76dfff769cc817e49059f885c8e9c8d1c47ef 100644 (file)
@@ -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 \
index 70d7b3c5ce8b32b40e8ea162903aff61eb426afb..75ff461e9acaa15eeca8d76bb59fe742ebb00ce9 100644 (file)
@@ -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
index ddd745a587b201e06e691595e2074e19c7f2ea13..102cc91a3644b92e6f905cecae613de523b4a303 100644 (file)
@@ -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
index 053d2ccc538450c0acba8c0e32ef26b8690505b0..d80ec93f3e7556b154f60c07370aea17c0cfa94b 100644 (file)
@@ -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"
index 2b461fccc34f3e64bb1ddd9a158bd8744255440c..c447e0855c8ac1146818334b794d58aa8e42ff6e 100644 (file)
@@ -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"
similarity index 99%
rename from src/auth/digest/auth_digest.cc
rename to src/auth/digest/Config.cc
index 8aee8b138d4537f9947ecd2350507517d10936d2..e58a29dd1a1eed77e7aafaf5ddfdd838237e0ff8 100644 (file)
@@ -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"
index 9b3cb3e18d4b0aecf0c6e34ef91b5998576f5359..f4c61ec873c8b107522ea15107cdfdd00c4943a6 100644 (file)
@@ -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 \
index 44a0f43c023b64211a8071715f2f147e2bfc7809..cfbc3ec46fb4a52c986fbaa8d9bef55c380fb01e 100644 (file)
@@ -7,6 +7,7 @@
  */
 
 #include "squid.h"
+#include "auth/digest/Config.h"
 #include "auth/digest/Scheme.h"
 #include "Debug.h"
 #include "globals.h"
index b6dade9de938152e030fd38829fad9c560fcdcae..2efabf6354587832229734de1a4beac6bde33ce5 100644 (file)
@@ -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
index 03b110ae7b5d26b2ac1373e21c93c35d8fc91710..5ce9f12e87b46545fa01778fb6813c37e0fac1fd 100644 (file)
@@ -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"
index f04cb048f94517785e53d2394a18e5f4d8972220..6f475629a0c99a4342dce3d0600a244cfde901fd 100644 (file)
@@ -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"
index 1e385cca9664609cd3fc7f4ecd4566d775af431d..e0ba9c78cfab118f900539445d2e2d22c099cfd9 100644 (file)
@@ -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"
 
similarity index 99%
rename from src/auth/negotiate/auth_negotiate.cc
rename to src/auth/negotiate/Config.cc
index bc581ecdc19eec0705e157ecbb55aadae56efbbe..9da649ab217a1b28ac4e62cb35edf112d96dd1db 100644 (file)
@@ -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()
 {
similarity index 95%
rename from src/auth/negotiate/auth_negotiate.h
rename to src/auth/negotiate/Config.h
index bfbc1511f798d899c9dc61ad4abd10c0212d4216..47d53ae512d9d94dc5d8c7e72976a9af06d057af 100644 (file)
@@ -14,8 +14,6 @@
 #include "auth/UserRequest.h"
 #include "helper/forward.h"
 
-#define DefaultAuthenticateChildrenMax  32     /* 32 processes */
-
 namespace Auth
 {
 namespace Negotiate
index 4af1e69be885394621454867905a5a989d178e53..ffdab5669eafaf63402fa53dea9e9fd301badc61 100644 (file)
@@ -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 \
index 6d0ec268ba87014e56e2e28de20c996578eea045..1c548a7ad65eff7be3e628fb3c3ba80d3eb59d59 100644 (file)
@@ -7,6 +7,7 @@
  */
 
 #include "squid.h"
+#include "auth/negotiate/Config.h"
 #include "auth/negotiate/Scheme.h"
 #include "Debug.h"
 #include "helper.h"
index 1f96a9eb2b8544e843049afd2626c868c8e1e61b..add566557d4a24af933a51b873e72f4c3ac5d377 100644 (file)
@@ -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
index ee772378f50ded64a9d46491cbd675ff86fa22e0..e4c441d66d5cdce4bb8d2253be28017dc73c00fe 100644 (file)
@@ -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"
index 9bfc2febbb1c48ce9fba63eea056fe5bf1dd994b..59d5c7b700f002ba4a95c38672b980a7d03214dc 100644 (file)
 #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
 {
similarity index 99%
rename from src/auth/ntlm/auth_ntlm.cc
rename to src/auth/ntlm/Config.cc
index 16bb4f070f24d28deb12b2c8910707d575bc6fde..73ef0b71925facd4e01c39742da05199d55e60cd 100644 (file)
@@ -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()
 {
similarity index 95%
rename from src/auth/ntlm/auth_ntlm.h
rename to src/auth/ntlm/Config.h
index 1403b9a657e92c947973c9440e6daba9d0feef05..94993843049b7dd5b30d88392cf7d4338cb9c1a3 100644 (file)
@@ -14,8 +14,6 @@
 #include "auth/UserRequest.h"
 #include "helper/forward.h"
 
-#define DefaultAuthenticateChildrenMax  32     /* 32 processes */
-
 class HttpRequest;
 class StoreEntry;
 
index 5f43cfc7c89510f270341f72f69373fc84e2b499..c651f00bb32dcff16366b25c343b7fee11d6a4ce 100644 (file)
@@ -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 \
index 148bc80ef3e8719d17ae53a92ae0517a4ee5b110..d3c46007e28393d7a6e018d2366b404177268be0 100644 (file)
@@ -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"
index eed068a758db19a39f85aeb9d294f4ecf5dde7cc..d270aca7078dcc224d509c8040276b050722a714 100644 (file)
@@ -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
index 68e3747376fd4d4fb5c477dda3590a10631d6d3c..9a91b0ed4f68b90edd9f25388f9070a5c6311eb6 100644 (file)
@@ -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"
index c4c2d02dd9c4f48d1ba3c663c37008a3f5a09a48..126d85db28febf97d113b52a8eee1c47e70c51c6 100644 (file)
@@ -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
 {
index 51b42443b42b41a3c927eba5705b5b48007b11ce..8d4c43b6cc49d3e76ba093de8f27f57432f29dea 100644 (file)
@@ -12,6 +12,9 @@
 class helper;
 class statefulhelper;
 
+class helper_server;
+class helper_stateful_server;
+
 /// helper protocol primitives
 namespace Helper
 {