eval AUTH_MODULE_${module}=yes
done
AC_MSG_NOTICE([Auth scheme modules built: $AUTH_MODULES])
- AUTH_OBJS="auth/lib`echo $AUTH_MODULES|sed -e 's% %.a auth/lib%g'`.a"
- AUTH_LIBS="`echo $AUTH_OBJS|sed -e 's%auth/%%g'`"
else
AC_MSG_WARN([Auth scheme modules built: None])
fi
-AUTH_LINKOBJS=
+dnl Authentication libraries to build
+dnl This list will not be needed when each auth library has its own Makefile
+AUTH_LIBS_TO_BUILD=
+dnl Authentication libraries to link authenticating executables with.
+dnl These are the same as AUTH_LIBS_TO_BUILD, but with a path
+AUTH_LIBS_TO_ADD=
for module in $AUTH_MODULES; do
- AUTH_LINKOBJS="$AUTH_LINKOBJS auth/${module}/${module}Scheme.o"
+ AUTH_LIBS_TO_BUILD="$AUTH_LIBS_TO_BUILD lib${module}.a"
+ AUTH_LIBS_TO_ADD="$AUTH_LIBS_TO_ADD auth/lib${module}.a"
done
AC_SUBST(AUTH_MODULES)
-AC_SUBST(AUTH_LIBS)
-AC_SUBST(AUTH_LINKOBJS)
-AC_SUBST(AUTH_OBJS)
+AC_SUBST(AUTH_LIBS_TO_ADD)
+AC_SUBST(AUTH_LIBS_TO_BUILD)
dnl bundled auth modules, in order to have handy defines for the cppunit testsuite
test -n "$AUTH_MODULE_basic" && AC_DEFINE([HAVE_AUTH_MODULE_BASIC],1,[Basic auth module is built])
#include "authenticate.h"
#include "ACLProxyAuth.h"
#include "client_side.h"
-#include "AuthUserRequest.h"
+#include "auth/UserRequest.h"
int
ACLChecklist::authenticated()
#include "squid.h"
#include "ACLMaxUserIP.h"
-#include "AuthUserRequest.h"
+#include "auth/UserRequest.h"
#include "authenticate.h"
#include "wordlist.h"
#include "ConfigParser.h"
#include "ACLRegexData.h"
#include "client_side.h"
#include "HttpRequest.h"
-#include "AuthUser.h"
-#include "AuthUserRequest.h"
+#include "auth/User.h"
+#include "auth/UserRequest.h"
ACLProxyAuth::~ACLProxyAuth()
{
#if DELAY_POOLS
#include "squid.h"
#include "DelayUser.h"
-#include "AuthUserRequest.h"
-#include "AuthUser.h"
+#include "auth/UserRequest.h"
+#include "auth/User.h"
#include "NullDelayId.h"
#include "Store.h"
#include "squid.h"
#include "HttpRequest.h"
-#include "AuthUserRequest.h"
+#include "auth/UserRequest.h"
#include "HttpHeaderRange.h"
#include "MemBuf.h"
#include "Store.h"
#include "ICAPClient.h"
#include "ChunkedCodingParser.h"
#include "TextException.h"
-#include "AuthUserRequest.h"
+#include "auth/UserRequest.h"
#include "ICAPConfig.h"
#include "SquidTime.h"
EXTRA_LIBRARIES = libAIO.a libBlocking.a libDiskDaemon.a libDiskThreads.a
noinst_LIBRARIES = @DISK_LIBS@
-noinst_LTLIBRARIES = libsquid.la libauth.la
+noinst_LTLIBRARIES = libsquid.la
# libraries used by many targets
COMMON_LIBS = \
libsquid.la \
- libauth.la \
+ auth/libauth.a \
base/libbase.la \
ip/libip.la
$(SHELL) $(srcdir)/DiskIO/modules.sh $(DISK_MODULES) > DiskIO/DiskIOModules_gen.cc
-all_AUTHMODULES = \
- auth/basic/basicScheme.cc \
- auth/basic/basicScheme.h \
- auth/digest/digestScheme.cc \
- auth/digest/digestScheme.h \
- auth/ntlm/ntlmScheme.cc \
- auth/ntlm/ntlmScheme.h \
- auth/negotiate/negotiateScheme.cc \
- auth/negotiate/negotiateScheme.h
-
EXTRA_squid_SOURCES = \
$(all_FSMODULES) \
$(AIO_WIN32_ALL_SOURCES) \
TextException.cc \
TextException.h
-# authentication framework
-libauth_la_SOURCES = \
- AuthConfig.cc \
- AuthConfig.h \
- AuthScheme.cc \
- AuthScheme.h \
- AuthUser.cc \
- AuthUserRequest.cc
-
squid_SOURCES = \
access_log.cc \
AccessLogEntry.h \
$(WINSVC_SOURCE)
noinst_HEADERS = ACLChecklist.cci \
- AuthUser.cci \
- AuthUser.h \
- AuthUserRequest.h \
client_side_request.cci \
MemBuf.cci \
MemBuf.h \
@STORE_LINKOBJS@ \
@STORE_OBJS@ \
@DISK_LIBS@ \
- @AUTH_LINKOBJS@ \
- @AUTH_OBJS@ \
+ @AUTH_LIBS_TO_ADD@ \
@CRYPTLIB@ \
@REGEXLIB@ \
@SNMPLIB@ \
@DISK_LIBS@ \
@DISK_LINKOBJS@ \
@REPL_OBJS@ \
- @AUTH_LINKOBJS@ \
- @AUTH_OBJS@
+ @AUTH_LIBS_TO_ADD@
if USE_LOADABLE_MODULES
squid_SOURCES += $(LOADABLE_MODULES_SOURCES)
@XTRA_OBJS@ \
@REPL_OBJS@ \
@STORE_OBJS@ \
- @AUTH_OBJS@ \
+ @AUTH_LIBS_TO_ADD@ \
@CRYPTLIB@ \
@REGEXLIB@ \
@SNMPLIB@ \
@DISK_LIBS@ \
@DISK_LINKOBJS@ \
@REPL_OBJS@ \
- @AUTH_LINKOBJS@ \
- @AUTH_OBJS@
+ @AUTH_LIBS_TO_ADD@
nodist_ufsdump_SOURCES = \
repl_modules.cc \
tests_testAuth_LDADD= \
$(COMMON_LIBS) \
- @AUTH_LINKOBJS@ @AUTH_OBJS@ \
+ @AUTH_LIBS_TO_ADD@ \
-L../lib -lmiscutil \
@REGEXLIB@ \
@SQUID_CPPUNIT_LIBS@ \
@SSLLIB@
tests_testAuth_LDFLAGS = $(LIBADD_DL)
tests_testAuth_DEPENDENCIES = $(top_builddir)/lib/libmiscutil.a \
- @AUTH_LINKOBJS@ \
- @AUTH_OBJS@ \
+ @AUTH_LIBS_TO_ADD@ \
@SQUID_CPPUNIT_LA@
## Tests for the ACLMaxUserIP class
*/
#include "squid.h"
-#include "AuthConfig.h"
-#include "AuthUserRequest.h"
+#include "auth/Config.h"
+#include "auth/UserRequest.h"
/* Get Auth User: Return a filled out auth_user structure for the given
* Proxy Auth (or Auth) header. It may be a cached Auth User or a new
-# Makefile for authentication modules in the Squid Object Cache server
-#
-# $Id$
-#
-AUTOMAKE_OPTIONS = subdir-objects
-AM_CFLAGS = @SQUID_CFLAGS@
-AM_CXXFLAGS = @SQUID_CXXFLAGS@
-CLEANFILES =
+include $(top_srcdir)/src/Common.am
EXTRA_LIBRARIES = libbasic.a libdigest.a libntlm.a libnegotiate.a
-noinst_LIBRARIES = @AUTH_LIBS@
+noinst_LIBRARIES = libauth.a @AUTH_LIBS_TO_BUILD@
-libbasic_a_SOURCES = basic/auth_basic.cc basic/auth_basic.h
-libdigest_a_SOURCES = digest/auth_digest.cc digest/auth_digest.h
-libntlm_a_SOURCES = ntlm/auth_ntlm.cc ntlm/auth_ntlm.h
-libnegotiate_a_SOURCES = negotiate/auth_negotiate.cc negotiate/auth_negotiate.h negotiate/negotiateScheme.cc negotiate/negotiateScheme.h
+## authentication framework; this library is always built
+## TODO: use libtool and add @AUTH_LIBS_TO_BUILD@ to libauth.la
+libauth_a_SOURCES = \
+ Config.cc \
+ Config.h \
+ Scheme.cc \
+ Scheme.h \
+ User.h \
+ User.cci \
+ User.cc \
+ UserRequest.h \
+ UserRequest.cc
-INCLUDES = \
- -I$(top_srcdir) \
- -I. \
- -I$(top_builddir)/include \
- -I$(top_srcdir)/include \
- -I$(top_srcdir)/src
+libbasic_a_SOURCES = \
+ basic/basicScheme.cc \
+ basic/basicScheme.h \
+ basic/auth_basic.cc \
+ basic/auth_basic.h
-check_PROGRAMS= testHeaders
+libdigest_a_SOURCES = \
+ digest/digestScheme.cc \
+ digest/digestScheme.h \
+ digest/auth_digest.cc \
+ digest/auth_digest.h
+
+libntlm_a_SOURCES = \
+ ntlm/ntlmScheme.cc \
+ ntlm/ntlmScheme.h \
+ ntlm/auth_ntlm.cc \
+ ntlm/auth_ntlm.h
+
+libnegotiate_a_SOURCES = \
+ negotiate/negotiateScheme.cc \
+ negotiate/negotiateScheme.h \
+ negotiate/auth_negotiate.cc \
+ negotiate/auth_negotiate.h
+
+# TODO: fix #include statements so that this is not needed
+INCLUDES += -I.
+
+
+check_PROGRAMS += testHeaders
## Special Universal .h dependency test script
## aborts if error encountered
-testHeaders: $(top_srcdir)/src/auth/basic/*.h $(top_srcdir)/src/auth/digest/*.h $(top_srcdir)/src/auth/ntlm/*.h $(top_srcdir)/src/auth/negotiate/*.h
+testHeaders: $(top_srcdir)/src/auth/*.h $(top_srcdir)/src/auth/basic/*.h $(top_srcdir)/src/auth/digest/*.h $(top_srcdir)/src/auth/ntlm/*.h $(top_srcdir)/src/auth/negotiate/*.h
+ $(SHELL) $(top_srcdir)/test-suite/testheaders.sh "$(CXXCOMPILE)" "." || exit 1
$(SHELL) $(top_srcdir)/test-suite/testheaders.sh "$(CXXCOMPILE)" "basic" || exit 1
$(SHELL) $(top_srcdir)/test-suite/testheaders.sh "$(CXXCOMPILE)" "digest" || exit 1
$(SHELL) $(top_srcdir)/test-suite/testheaders.sh "$(CXXCOMPILE)" "ntlm" || exit 1
$(SHELL) $(top_srcdir)/test-suite/testheaders.sh "$(CXXCOMPILE)" "negotiate" || exit 1
-## ./ has no .h files
## No such file...
testHeaders.c:
*/
#include "squid.h"
-#include "AuthScheme.h"
+#include "auth/Scheme.h"
#include "authenticate.h"
-#include "AuthConfig.h"
+#include "auth/Config.h"
Vector<AuthScheme*> *AuthScheme::_Schemes = NULL;
*/
#include "squid.h"
-#include "AuthUser.h"
-#include "AuthUserRequest.h"
-#include "AuthConfig.h"
+#include "auth/User.h"
+#include "auth/UserRequest.h"
+#include "auth/Config.h"
#include "authenticate.h"
#include "ACL.h"
#include "event.h"
#include "SquidTime.h"
#ifndef _USE_INLINE_
-#include "AuthUser.cci"
+#include "auth/User.cci"
#endif
// This should be converted into a pooled type. Does not need to be cbdata
};
#ifdef _USE_INLINE_
-#include "AuthUser.cci"
+#include "auth/User.cci"
#endif
#endif /* SQUID_AUTHUSER_H */
* See acl.c for access control and client_side.c for auditing */
#include "squid.h"
-#include "AuthUserRequest.h"
-#include "AuthUser.h"
+#include "auth/UserRequest.h"
+#include "auth/User.h"
/*#include "authenticate.h"
#include "ACL.h"
#include "client_side.h"
*/
-#include "AuthConfig.h"
-#include "AuthScheme.h"
+#include "auth/Config.h"
+#include "auth/Scheme.h"
#include "HttpReply.h"
#include "HttpRequest.h"
#ifndef __AUTH_BASIC_H__
#define __AUTH_BASIC_H__
#include "authenticate.h"
-#include "AuthUser.h"
-#include "AuthUserRequest.h"
-#include "AuthConfig.h"
+#include "auth/User.h"
+#include "auth/UserRequest.h"
+#include "auth/Config.h"
#include "helper.h"
#define DefaultAuthenticateChildrenMax 32 /* 32 processes */
#ifndef SQUID_BASICSCHEME_H
#define SQUID_BASICSCHEME_H
-#include "AuthScheme.h"
+#include "auth/Scheme.h"
/// \ingroup AuthAPI
/// \ingroup AuthSchemeAPI
#define __AUTH_DIGEST_H__
#include "rfc2617.h"
#include "authenticate.h"
-#include "AuthUser.h"
-#include "AuthUserRequest.h"
-#include "AuthConfig.h"
+#include "auth/User.h"
+#include "auth/UserRequest.h"
+#include "auth/Config.h"
#include "helper.h"
/* Generic */
#ifndef SQUID_DIGESTSCHEME_H
#define SQUID_DIGESTSCHEME_H
-#include "AuthScheme.h"
+#include "auth/Scheme.h"
/// \ingroup AuthSchemeAPI
/// \ingroup AuthAPI
#ifndef __AUTH_NEGOTIATE_H__
#define __AUTH_NEGOTIATE_H__
#include "authenticate.h"
-#include "AuthUser.h"
-#include "AuthUserRequest.h"
-#include "AuthConfig.h"
+#include "auth/User.h"
+#include "auth/UserRequest.h"
+#include "auth/Config.h"
#include "helper.h"
/**
#ifndef SQUID_NEGOTIATESCHEME_H
#define SQUID_NEGOTIATESCHEME_H
-#include "AuthScheme.h"
+#include "auth/Scheme.h"
/// \ingroup AuthSchemeAPI
/// \ingroup AuthAPI
#ifndef __AUTH_NTLM_H__
#define __AUTH_NTLM_H__
#include "authenticate.h"
-#include "AuthUser.h"
-#include "AuthUserRequest.h"
-#include "AuthConfig.h"
+#include "auth/User.h"
+#include "auth/UserRequest.h"
+#include "auth/Config.h"
#include "helper.h"
#define DefaultAuthenticateChildrenMax 32 /* 32 processes */
#ifndef SQUID_NTLMSCHEME_H
#define SQUID_NTLMSCHEME_H
-#include "AuthScheme.h"
+#include "auth/Scheme.h"
/// \ingroup AuthSchemeAPI
/// \ingroup AuthAPI
#include "authenticate.h"
#include "ACL.h"
#include "client_side.h"
-#include "AuthConfig.h"
-#include "AuthScheme.h"
-#include "AuthUser.h"
+#include "auth/Config.h"
+#include "auth/Scheme.h"
+#include "auth/User.h"
#include "HttpReply.h"
#include "HttpRequest.h"
#include "authenticate.h"
#include "ProtoPort.h"
#include "HttpRequestMethod.h"
-#include "AuthConfig.h"
-#include "AuthScheme.h"
+#include "auth/Config.h"
+#include "auth/Scheme.h"
#include "CacheManager.h"
#include "Store.h"
#include "SwapDir.h"
#include "client_side.h"
#include "clientStream.h"
#include "ProtoPort.h"
-#include "AuthUserRequest.h"
+#include "auth/UserRequest.h"
#include "Store.h"
#include "comm.h"
#include "HttpHdrContRange.h"
#include "HttpRequest.h"
#include "forward.h"
#include "clientStream.h"
-#include "AuthUserRequest.h"
+#include "auth/UserRequest.h"
#if USE_SQUID_ESI
#include "ESI.h"
#endif
#include "squid.h"
#include "clientStream.h"
#include "client_side_request.h"
-#include "AuthUserRequest.h"
+#include "auth/UserRequest.h"
#include "HttpRequest.h"
#include "ProtoPort.h"
#include "ACLChecklist.h"
#include "config.h"
#include "errorpage.h"
-#include "AuthUserRequest.h"
+#include "auth/UserRequest.h"
#include "SquidTime.h"
#include "Store.h"
#include "HttpReply.h"
#include "CacheManager.h"
#include "ExternalACL.h"
#include "ExternalACLEntry.h"
-#include "AuthUserRequest.h"
+#include "auth/UserRequest.h"
#include "SquidTime.h"
#include "Store.h"
#include "fde.h"
#include "errorpage.h"
#include "MemBuf.h"
#include "http.h"
-#include "AuthUserRequest.h"
+#include "auth/UserRequest.h"
#include "Store.h"
#include "HttpReply.h"
#include "HttpRequest.h"
#include "CacheManager.h"
#include "Store.h"
#include "HttpRequest.h"
-#include "AuthUserRequest.h"
+#include "auth/UserRequest.h"
#define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32-(n))))
*/
#include "squid.h"
-#include "AuthUserRequest.h"
+#include "auth/UserRequest.h"
#include "CacheManager.h"
#include "Store.h"
#include "fde.h"
#include "squid.h"
#include "event.h"
#include "StoreClient.h"
-#include "AuthUserRequest.h"
+#include "auth/UserRequest.h"
#include "CacheManager.h"
#include "Store.h"
#include "HttpRequest.h"
#include "squid.h"
#include "testAuth.h"
#include "authenticate.h"
-#include "AuthUserRequest.h"
-#include "AuthScheme.h"
-#include "AuthConfig.h"
+#include "auth/UserRequest.h"
+#include "auth/Scheme.h"
+#include "auth/Config.h"
#include "Mem.h"
CPPUNIT_TEST_SUITE_REGISTRATION( testAuth );