From: Amos Jeffries Date: Sat, 30 Jan 2016 03:27:53 +0000 (+1300) Subject: SourceLayout: move Digest auth helpers to src/auth/digest/ X-Git-Tag: SQUID_4_0_5~16^2~8 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d4d7f6dd690990ac074991f351266ca55ff45575;p=thirdparty%2Fsquid.git SourceLayout: move Digest auth helpers to src/auth/digest/ --- diff --git a/configure.ac b/configure.ac index 03a846eb78..962b485ae2 100644 --- a/configure.ac +++ b/configure.ac @@ -2511,10 +2511,10 @@ AC_ARG_ENABLE(auth-digest, all possible helpers. Default is to do so. 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/digest_auth directory. ]),[ + To see available helpers, see the src/auth/digest/ directory. ]),[ #nothing to do, really ]) -m4_include([helpers/digest_auth/modules.m4]) +m4_include([src/auth/digest/helpers.m4]) AC_ARG_ENABLE(auth-negotiate, AS_HELP_STRING([--enable-auth-negotiate="list of helpers"], @@ -3811,10 +3811,6 @@ AC_CONFIG_FILES([ helpers/basic_auth/SMB/Makefile helpers/basic_auth/SMB_LM/Makefile helpers/basic_auth/SSPI/Makefile - helpers/digest_auth/Makefile - helpers/digest_auth/eDirectory/Makefile - helpers/digest_auth/file/Makefile - helpers/digest_auth/LDAP/Makefile helpers/external_acl/Makefile helpers/external_acl/AD_group/Makefile helpers/external_acl/delayer/Makefile @@ -3852,6 +3848,9 @@ AC_CONFIG_FILES([ src/auth/Makefile src/auth/basic/Makefile src/auth/digest/Makefile + src/auth/digest/eDirectory/Makefile + src/auth/digest/file/Makefile + src/auth/digest/LDAP/Makefile src/auth/negotiate/Makefile src/auth/negotiate/kerberos/Makefile src/auth/negotiate/SSPI/Makefile diff --git a/helpers/Makefile.am b/helpers/Makefile.am index f5db69a96a..8bb4b1dd29 100644 --- a/helpers/Makefile.am +++ b/helpers/Makefile.am @@ -9,14 +9,12 @@ EXTRA_DIST = defines.h DIST_SUBDIRS = \ basic_auth \ - digest_auth \ external_acl \ url_rewrite \ storeid_rewrite SUBDIRS = \ basic_auth \ - digest_auth \ external_acl \ url_rewrite \ storeid_rewrite diff --git a/helpers/digest_auth/Makefile.am b/helpers/digest_auth/Makefile.am deleted file mode 100644 index 1379e22147..0000000000 --- a/helpers/digest_auth/Makefile.am +++ /dev/null @@ -1,16 +0,0 @@ -## Copyright (C) 1996-2016 The Squid Software Foundation and contributors -## -## Squid software is distributed under GPLv2+ license and includes -## contributions from numerous individuals and organizations. -## Please see the COPYING and CONTRIBUTORS files for details. -## - -## Alphabetical list of sub-directories to distribute with Squid: -DIST_SUBDIRS= \ - eDirectory \ - file \ - LDAP - -SUBDIRS= $(DIGEST_AUTH_HELPERS) - -EXTRA_DIST = modules.m4 diff --git a/helpers/digest_auth/LDAP/Makefile.am b/src/auth/digest/LDAP/Makefile.am similarity index 69% rename from helpers/digest_auth/LDAP/Makefile.am rename to src/auth/digest/LDAP/Makefile.am index b16897efe5..4565d7c54c 100644 --- a/helpers/digest_auth/LDAP/Makefile.am +++ b/src/auth/digest/LDAP/Makefile.am @@ -7,16 +7,15 @@ include $(top_srcdir)/src/Common.am -## we need our local files too (but avoid -I. at all costs) -AM_CPPFLAGS += -I$(srcdir) +libexec_PROGRAMS= digest_ldap_auth -libexec_PROGRAMS = digest_ldap_auth -digest_ldap_auth_SOURCES = digest_pw_auth.cc \ +digest_ldap_auth_SOURCES= \ digest_common.h \ + digest_pw_auth.cc \ ldap_backend.cc \ ldap_backend.h -digest_ldap_auth_LDADD = \ +digest_ldap_auth_LDADD= \ $(top_builddir)/lib/libmiscencoding.la \ $(COMPAT_LIB) \ $(LDAPLIB) \ @@ -26,4 +25,4 @@ digest_ldap_auth_LDADD = \ $(SSLLIB) \ $(XTRA_LIBS) -EXTRA_DIST = required.m4 +EXTRA_DIST= required.m4 diff --git a/helpers/digest_auth/LDAP/digest_common.h b/src/auth/digest/LDAP/digest_common.h similarity index 100% rename from helpers/digest_auth/LDAP/digest_common.h rename to src/auth/digest/LDAP/digest_common.h index fcbe6c247a..27a21b4ecb 100644 --- a/helpers/digest_auth/LDAP/digest_common.h +++ b/src/auth/digest/LDAP/digest_common.h @@ -13,6 +13,10 @@ #ifndef SQUID_DIGEST_COMMON_H_ #define SQUID_DIGEST_COMMON_H_ +#include "hash.h" +#include "rfc2617.h" +#include "util.h" + #include #include #include @@ -29,10 +33,6 @@ #include #endif -#include "hash.h" -#include "rfc2617.h" -#include "util.h" - typedef struct _request_data { int channelId; char *user; diff --git a/helpers/digest_auth/LDAP/digest_pw_auth.cc b/src/auth/digest/LDAP/digest_pw_auth.cc similarity index 97% rename from helpers/digest_auth/LDAP/digest_pw_auth.cc rename to src/auth/digest/LDAP/digest_pw_auth.cc index 50ce8fb46e..1c2397067a 100644 --- a/helpers/digest_auth/LDAP/digest_pw_auth.cc +++ b/src/auth/digest/LDAP/digest_pw_auth.cc @@ -37,9 +37,9 @@ */ #include "squid.h" -#include "digest_common.h" +#include "auth/digest/LDAP/digest_common.h" +#include "auth/digest/LDAP/ldap_backend.h" #include "helpers/defines.h" -#include "ldap_backend.h" #define PROGRAM_NAME "digest_ldap_auth" diff --git a/helpers/digest_auth/LDAP/ldap_backend.cc b/src/auth/digest/LDAP/ldap_backend.cc similarity index 99% rename from helpers/digest_auth/LDAP/ldap_backend.cc rename to src/auth/digest/LDAP/ldap_backend.cc index 7361ee4794..52c9496d03 100644 --- a/helpers/digest_auth/LDAP/ldap_backend.cc +++ b/src/auth/digest/LDAP/ldap_backend.cc @@ -15,7 +15,7 @@ #define LDAP_DEPRECATED 1 -#include "ldap_backend.h" +#include "auth/digest/LDAP/ldap_backend.h" #if _SQUID_WINDOWS_ && !_SQUID_CYGWIN_ diff --git a/helpers/digest_auth/LDAP/ldap_backend.h b/src/auth/digest/LDAP/ldap_backend.h similarity index 90% rename from helpers/digest_auth/LDAP/ldap_backend.h rename to src/auth/digest/LDAP/ldap_backend.h index d6cd4064e0..206f55f262 100644 --- a/helpers/digest_auth/LDAP/ldap_backend.h +++ b/src/auth/digest/LDAP/ldap_backend.h @@ -10,7 +10,7 @@ * AUTHOR: Flavio Pescuma. */ -#include "digest_common.h" +#include "auth/digest/LDAP/digest_common.h" extern int LDAPArguments(int argc, char **argv); extern void LDAPHHA1(RequestData * requestData); diff --git a/helpers/digest_auth/LDAP/required.m4 b/src/auth/digest/LDAP/required.m4 similarity index 100% rename from helpers/digest_auth/LDAP/required.m4 rename to src/auth/digest/LDAP/required.m4 diff --git a/src/auth/digest/Makefile.am b/src/auth/digest/Makefile.am index abc563fa1e..5cabea1832 100644 --- a/src/auth/digest/Makefile.am +++ b/src/auth/digest/Makefile.am @@ -8,9 +8,13 @@ include $(top_srcdir)/src/Common.am include $(top_srcdir)/src/TestHeaders.am -noinst_LTLIBRARIES = libdigest.la +DIST_SUBDIRS= eDirectory file LDAP +SUBDIRS= $(DIGEST_AUTH_HELPERS) +EXTRA_DIST= helpers.m4 -libdigest_la_SOURCES = \ +noinst_LTLIBRARIES= libdigest.la + +libdigest_la_SOURCES= \ Config.cc \ Config.h \ Scheme.cc \ diff --git a/helpers/digest_auth/eDirectory/Makefile.am b/src/auth/digest/eDirectory/Makefile.am similarity index 73% rename from helpers/digest_auth/eDirectory/Makefile.am rename to src/auth/digest/eDirectory/Makefile.am index 9cc2b0e494..e37a3a352b 100644 --- a/helpers/digest_auth/eDirectory/Makefile.am +++ b/src/auth/digest/eDirectory/Makefile.am @@ -7,11 +7,10 @@ include $(top_srcdir)/src/Common.am -## we need our local files too (but avoid -I. at all costs) -AM_CPPFLAGS += -I$(srcdir) +libexec_PROGRAMS= digest_edirectory_auth -libexec_PROGRAMS = digest_edirectory_auth -digest_edirectory_auth_SOURCES = digest_pw_auth.cc \ +digest_edirectory_auth_SOURCES= \ + digest_pw_auth.cc \ digest_common.h \ ldap_backend.cc \ ldap_backend.h \ @@ -28,4 +27,4 @@ digest_edirectory_auth_LDADD = \ $(SSLLIB) \ $(XTRA_LIBS) -EXTRA_DIST = required.m4 +EXTRA_DIST= required.m4 diff --git a/helpers/digest_auth/eDirectory/digest_common.h b/src/auth/digest/eDirectory/digest_common.h similarity index 100% rename from helpers/digest_auth/eDirectory/digest_common.h rename to src/auth/digest/eDirectory/digest_common.h index 2233d9c4a9..2e3b592ae0 100644 --- a/helpers/digest_auth/eDirectory/digest_common.h +++ b/src/auth/digest/eDirectory/digest_common.h @@ -13,6 +13,10 @@ #ifndef SQUID_DIGEST_COMMON_H_ #define SQUID_DIGEST_COMMON_H_ +#include "hash.h" +#include "rfc2617.h" +#include "util.h" + #include #include #include @@ -32,10 +36,6 @@ #include #endif -#include "hash.h" -#include "rfc2617.h" -#include "util.h" - typedef struct _request_data { int channelId; char *user; diff --git a/helpers/digest_auth/eDirectory/digest_pw_auth.cc b/src/auth/digest/eDirectory/digest_pw_auth.cc similarity index 97% rename from helpers/digest_auth/eDirectory/digest_pw_auth.cc rename to src/auth/digest/eDirectory/digest_pw_auth.cc index 5db1ce4758..de44054fc8 100644 --- a/helpers/digest_auth/eDirectory/digest_pw_auth.cc +++ b/src/auth/digest/eDirectory/digest_pw_auth.cc @@ -36,9 +36,9 @@ * Copyright (c) 2003 Robert Collins */ #include "squid.h" -#include "digest_common.h" +#include "auth/digest/eDirectory/digest_common.h" +#include "auth/digest/eDirectory/ldap_backend.h" #include "helpers/defines.h" -#include "ldap_backend.h" #define PROGRAM_NAME "digest_edirectory_auth" diff --git a/helpers/digest_auth/eDirectory/edir_ldapext.cc b/src/auth/digest/eDirectory/edir_ldapext.cc similarity index 99% rename from helpers/digest_auth/eDirectory/edir_ldapext.cc rename to src/auth/digest/eDirectory/edir_ldapext.cc index 369e2bf298..535ba63160 100644 --- a/helpers/digest_auth/eDirectory/edir_ldapext.cc +++ b/src/auth/digest/eDirectory/edir_ldapext.cc @@ -31,7 +31,7 @@ */ #include "squid.h" -#include "digest_common.h" +#include "auth/digest/eDirectory/digest_common.h" #if _SQUID_WINDOWS_ && !_SQUID_CYGWIN_ diff --git a/helpers/digest_auth/eDirectory/edir_ldapext.h b/src/auth/digest/eDirectory/edir_ldapext.h similarity index 100% rename from helpers/digest_auth/eDirectory/edir_ldapext.h rename to src/auth/digest/eDirectory/edir_ldapext.h diff --git a/helpers/digest_auth/eDirectory/ldap_backend.cc b/src/auth/digest/eDirectory/ldap_backend.cc similarity index 99% rename from helpers/digest_auth/eDirectory/ldap_backend.cc rename to src/auth/digest/eDirectory/ldap_backend.cc index beb3353312..22561daaa4 100644 --- a/helpers/digest_auth/eDirectory/ldap_backend.cc +++ b/src/auth/digest/eDirectory/ldap_backend.cc @@ -13,7 +13,7 @@ #define LDAP_DEPRECATED 1 -#include "ldap_backend.h" +#include "auth/digest/eDirectory/ldap_backend.h" #if _SQUID_WINDOWS_ && !_SQUID_CYGWIN_ @@ -48,7 +48,7 @@ PFldap_start_tls_s Win32_ldap_start_tls_s; #include #endif -#include "edir_ldapext.h" +#include "auth/digest/eDirectory/edir_ldapext.h" #define PROGRAM_NAME "digest_pw_auth(LDAP_backend)" /* Globals */ diff --git a/helpers/digest_auth/eDirectory/ldap_backend.h b/src/auth/digest/eDirectory/ldap_backend.h similarity index 89% rename from helpers/digest_auth/eDirectory/ldap_backend.h rename to src/auth/digest/eDirectory/ldap_backend.h index 5df4b1cccd..edb34b12af 100644 --- a/helpers/digest_auth/eDirectory/ldap_backend.h +++ b/src/auth/digest/eDirectory/ldap_backend.h @@ -8,10 +8,9 @@ /* * AUTHOR: Flavio Pescuma. - * */ -#include "digest_common.h" +#include "auth/digest/eDirectory/digest_common.h" extern int LDAPArguments(int argc, char **argv); extern void LDAPHHA1(RequestData * requestData); diff --git a/helpers/digest_auth/eDirectory/required.m4 b/src/auth/digest/eDirectory/required.m4 similarity index 100% rename from helpers/digest_auth/eDirectory/required.m4 rename to src/auth/digest/eDirectory/required.m4 diff --git a/helpers/digest_auth/file/Makefile.am b/src/auth/digest/file/Makefile.am similarity index 67% rename from helpers/digest_auth/file/Makefile.am rename to src/auth/digest/file/Makefile.am index 4c82b6b762..6e18a12976 100644 --- a/helpers/digest_auth/file/Makefile.am +++ b/src/auth/digest/file/Makefile.am @@ -7,17 +7,16 @@ include $(top_srcdir)/src/Common.am -## we need our local files too (but avoid -I. at all costs) -AM_CPPFLAGS += -I$(srcdir) +man_MANS= digest_file_auth.8 +libexec_PROGRAMS= digest_file_auth -man_MANS = digest_file_auth.8 -libexec_PROGRAMS = digest_file_auth -digest_file_auth_SOURCES = digest_file_auth.cc \ +digest_file_auth_SOURCES= \ digest_common.h \ + digest_file_auth.cc \ text_backend.cc \ text_backend.h -LDADD = \ +digest_file_auth_LDADD = \ $(top_builddir)/lib/libmisccontainers.la \ $(top_builddir)/lib/libmiscencoding.la \ $(COMPAT_LIB) \ @@ -26,4 +25,6 @@ LDADD = \ $(SSLLIB) \ $(XTRA_LIBS) -EXTRA_DIST = digest_file_auth.8 required.m4 +EXTRA_DIST= \ + digest_file_auth.8 \ + required.m4 diff --git a/helpers/digest_auth/file/digest_common.h b/src/auth/digest/file/digest_common.h similarity index 100% rename from helpers/digest_auth/file/digest_common.h rename to src/auth/digest/file/digest_common.h diff --git a/helpers/digest_auth/file/digest_file_auth.8 b/src/auth/digest/file/digest_file_auth.8 similarity index 100% rename from helpers/digest_auth/file/digest_file_auth.8 rename to src/auth/digest/file/digest_file_auth.8 diff --git a/helpers/digest_auth/file/digest_file_auth.cc b/src/auth/digest/file/digest_file_auth.cc similarity index 97% rename from helpers/digest_auth/file/digest_file_auth.cc rename to src/auth/digest/file/digest_file_auth.cc index cd17a5426b..bb19e9da4c 100644 --- a/helpers/digest_auth/file/digest_file_auth.cc +++ b/src/auth/digest/file/digest_file_auth.cc @@ -40,9 +40,9 @@ */ #include "squid.h" -#include "digest_common.h" +#include "auth/digest/file/digest_common.h" +#include "auth/digest/file/text_backend.h" #include "helpers/defines.h" -#include "text_backend.h" static void GetHHA1(RequestData * requestData) diff --git a/helpers/digest_auth/file/required.m4 b/src/auth/digest/file/required.m4 similarity index 100% rename from helpers/digest_auth/file/required.m4 rename to src/auth/digest/file/required.m4 diff --git a/helpers/digest_auth/file/text_backend.cc b/src/auth/digest/file/text_backend.cc similarity index 99% rename from helpers/digest_auth/file/text_backend.cc rename to src/auth/digest/file/text_backend.cc index 0b58670183..b4cc931ca1 100644 --- a/helpers/digest_auth/file/text_backend.cc +++ b/src/auth/digest/file/text_backend.cc @@ -36,7 +36,7 @@ */ #include "squid.h" -#include "text_backend.h" +#include "auth/digest/file/text_backend.h" static hash_table *hash = NULL; static HASHFREE my_free; diff --git a/helpers/digest_auth/file/text_backend.h b/src/auth/digest/file/text_backend.h similarity index 89% rename from helpers/digest_auth/file/text_backend.h rename to src/auth/digest/file/text_backend.h index 9a9968acae..dd988c83f6 100644 --- a/helpers/digest_auth/file/text_backend.h +++ b/src/auth/digest/file/text_backend.h @@ -6,7 +6,7 @@ * Please see the COPYING and CONTRIBUTORS files for details. */ -#include "digest_common.h" +#include "auth/digest/file/digest_common.h" extern void TextArguments(int argc, char **argv); extern void TextHHA1(RequestData * requestData); diff --git a/helpers/digest_auth/modules.m4 b/src/auth/digest/helpers.m4 similarity index 83% rename from helpers/digest_auth/modules.m4 rename to src/auth/digest/helpers.m4 index e1b46dd13a..3a5969e59b 100644 --- a/helpers/digest_auth/modules.m4 +++ b/src/auth/digest/helpers.m4 @@ -21,7 +21,7 @@ fi #define list of modules to build auto_auth_digest_modules=no if test "x$enable_auth_digest" = "xyes" ; then - SQUID_LOOK_FOR_MODULES([$srcdir/helpers/digest_auth],[enable_auth_digest]) + SQUID_LOOK_FOR_MODULES([$srcdir/src/auth/digest],[enable_auth_digest]) auto_auth_digest_modules=yes fi #handle the "none" special case @@ -35,25 +35,25 @@ if test "x$enable_auth_digest" != "xno" ; then AUTH_MODULES="$AUTH_MODULES digest" AC_DEFINE([HAVE_AUTH_MODULE_DIGEST],1,[Digest auth module is built]) for helper in $enable_auth_digest; do - dir="$srcdir/helpers/digest_auth/$helper" + dir="$srcdir/src/auth/digest/$helper" # modules converted to autoconf macros already # NP: we only need this list because m4_include() does not accept variables - if test "x$helper" = "xLDAP" ; then - m4_include([helpers/digest_auth/LDAP/required.m4]) - - elif test "x$helper" = "xeDirectory" ; then - m4_include([helpers/digest_auth/eDirectory/required.m4]) + if test "x$helper" = "xeDirectory" ; then + m4_include([src/auth/digest/eDirectory/required.m4]) elif test "x$helper" = "xfile" ; then - m4_include([helpers/digest_auth/file/required.m4]) + m4_include([src/auth/digest/file/required.m4]) + + elif test "x$helper" = "xLDAP" ; then + m4_include([src/auth/digest/LDAP/required.m4]) # modules not yet converted to autoconf macros (or third party drop-in's) elif test -f "$dir/config.test" && sh "$dir/config.test" "$squid_host_os"; then BUILD_HELPER="$helper" fi - if test -d "$srcdir/helpers/digest_auth/$helper"; then + if test -d "$srcdir/src/auth/digest/$helper"; then if test "$BUILD_HELPER" != "$helper"; then if test "x$auto_auth_digest_modules" = "xyes"; then AC_MSG_NOTICE([Digest auth helper $helper ... found but cannot be built])