--------------------- PatchSet 855 Date: 2000/11/20 06:55:35 Author: rbcollins Branch: auth_rewrite Tag: (none) Log: mod starting Members: configure.in:1.1.1.3.10.17->1.1.1.3.10.17.2.1 auth_modules/Makefile.in:1.1.10.3->1.1.10.3.2.1 src/Makefile.in:1.1.1.3.12.8->1.1.1.3.12.8.2.1 src/acl.c:1.1.1.3.12.26.2.2->1.1.1.3.12.26.2.3 src/globals.h:1.1.1.3.12.8->1.1.1.3.12.8.2.1 src/typedefs.h:1.1.1.3.12.13->1.1.1.3.12.13.2.1 Index: squid/configure.in =================================================================== RCS file: /cvsroot/squid-sf//squid/configure.in,v retrieving revision 1.1.1.3.10.17 retrieving revision 1.1.1.3.10.17.2.1 diff -u -r1.1.1.3.10.17 -r1.1.1.3.10.17.2.1 --- squid/configure.in 12 Nov 2000 21:22:19 -0000 1.1.1.3.10.17 +++ squid/configure.in 20 Nov 2000 06:55:35 -0000 1.1.1.3.10.17.2.1 @@ -3,13 +3,13 @@ dnl dnl Duane Wessels, wessels@nlanr.net, February 1996 (autoconf v2.9) dnl -dnl $Id: configure.in,v 1.1.1.3.10.17 2000/11/12 21:22:19 rbcollins Exp $ +dnl $Id: configure.in,v 1.1.1.3.10.17.2.1 2000/11/20 06:55:35 rbcollins Exp $ dnl dnl dnl AC_INIT(src/main.c) AC_CONFIG_HEADER(include/autoconf.h) -AC_REVISION($Revision: 1.1.1.3.10.17 $)dnl +AC_REVISION($Revision: 1.1.1.3.10.17.2.1 $)dnl AC_PREFIX_DEFAULT(/usr/local/squid) AC_CONFIG_AUX_DIR(cfgaux) @@ -664,32 +664,67 @@ fi ]) -dnl Select auth modules to build -AUTH_MODULES= -AC_ARG_ENABLE(auth-modules, -[ --enable-auth-modules=\"list of modules\" - This option selects wich proxy_auth helper modules - to build and install as part of the normal build - process. For a list of available modules see - the auth_modules directory.], + +dnl Select auth schemes modules to build +AC_ARG_ENABLE(auth, +[ --enable-auth=\"list of auth scheme modules\" + Build support for the list of authentication schemes. + The default is build Basic and NTLM schemes. + See src/auth for a list of available modules, or + Programmers Guide section + for details on how to build your custom auth scheme + module], +[ case $enableval in + yes) + for module in $srcdir/src/auth/*; do + if test -f $module/Makefile.in; then + AUTH_MODULES="$AUTH_MODULES `basename $module`" + fi + done + ;; + no) + ;; + *) AUTH_MODULES="`echo $enableval| sed -e 's/,/ /g;s/ */ /g'`" + ;; + esac +], +[ if test -z "$AUTH_MODULES"; then + AUTH_MODULES="basic ntlm" + fi +]) +echo "Auth scheme modules built: $AUTH_MODULES" +AC_SUBST(AUTH_MODULES) +AUTH_OBJS="auth/`echo $AUTH_MODULES|sed -e's% %.a auth/%g'`.a" +AC_SUBST(AUTH_OBJS) +AUTH_LIBS="`echo $AUTH_OBJS|sed -e's%auth/%%g'`" +AC_SUBST(AUTH_LIBS) + +dnl Select basic auth scheme modules to build +AUTH_BASIC_MODULES= +AC_ARG_ENABLE(basic-auth-modules, +[ --enable-basic-auth-modules=\"list of modules\" + This option selects which basic scheme proxy_auth + helper modules to build and install as part of the + normal build process. For a list of available modules + see the auth_modules directory.], [ case "$enableval" in yes) for module in $srcdir/auth_modules/*; do if test -f $module/Makefile.in; then - AUTH_MODULES="$AUTH_MODULES `basename $module`" + AUTH_BASIC_MODULES="$AUTH_BASIC_MODULES `basename $module`" fi done ;; no) ;; *) - AUTH_MODULES="`echo $enableval| sed -e 's/,/ /g;s/ */ /g'`" + AUTH_BASIC_MODULES="`echo $enableval| sed -e 's/,/ /g;s/ */ /g'`" esac ]) -if test -n "$AUTH_MODULES"; then - echo "Auth modules built: $AUTH_MODULES" +if test -n "$AUTH_BASIC_MODULES"; then + echo "Auth modules built: $AUTH_BASIC_MODULES" fi -AC_SUBST(AUTH_MODULES) +AC_SUBST(AUTH_BASIC_MODULES) dnl Select ntlm auth modules to build NTLM_AUTH_MODULES= @@ -1699,6 +1734,13 @@ fi done +AUTH_SCHEME_MAKEFILES="" +for auth in $AUTH_MODULES none; do + if test $auth != none; then + AUTH_SCHEME_MAKEFILES="$AUTH_SCHEME_MAKEFILES ./src/auth/$auth/Makefile" + fi +done + AUTH_MAKEFILES="" for module in $srcdir/auth_modules/*; do if test -f $module/Makefile.in; then @@ -1735,6 +1777,8 @@ $SNMP_MAKEFILE \ ./icons/Makefile \ ./errors/Makefile \ + ./src/auth/Makefile \ + $AUTH_SCHEME_MAKEFILES \ ./auth_modules/Makefile \ $AUTH_MAKEFILES \ ./ntlm_auth_modules/Makefile \ Index: squid/auth_modules/Makefile.in =================================================================== RCS file: /cvsroot/squid-sf//squid/auth_modules/Attic/Makefile.in,v retrieving revision 1.1.10.3 retrieving revision 1.1.10.3.2.1 diff -u -r1.1.10.3 -r1.1.10.3.2.1 --- squid/auth_modules/Makefile.in 3 Jul 2000 21:44:30 -0000 1.1.10.3 +++ squid/auth_modules/Makefile.in 20 Nov 2000 06:55:36 -0000 1.1.10.3.2.1 @@ -6,7 +6,7 @@ # The 'nop' is in the SUBDIRS list because some Unixes that can't # handle empty for lists. -SUBDIRS = @AUTH_MODULES@ nop +SUBDIRS = @AUTH_BASIC_MODULES@ nop all: @for dir in $(SUBDIRS); do \ Index: squid/src/Makefile.in =================================================================== RCS file: /cvsroot/squid-sf//squid/src/Attic/Makefile.in,v retrieving revision 1.1.1.3.12.8 retrieving revision 1.1.1.3.12.8.2.1 diff -u -r1.1.1.3.12.8 -r1.1.1.3.12.8.2.1 --- squid/src/Makefile.in 21 Oct 2000 16:50:48 -0000 1.1.1.3.12.8 +++ squid/src/Makefile.in 20 Nov 2000 06:55:36 -0000 1.1.1.3.12.8.2.1 @@ -1,7 +1,7 @@ # # Makefile for the Squid Object Cache server # -# $Id: Makefile.in,v 1.1.1.3.12.8 2000/10/21 16:50:48 hno Exp $ +# $Id: Makefile.in,v 1.1.1.3.12.8.2.1 2000/11/20 06:55:36 rbcollins Exp $ # # Uncomment and customize the following to suit your needs: # @@ -47,6 +47,8 @@ DEFAULT_ERROR_DIR = $(sysconfdir)/errors DEFAULT_MIB_PATH = $(sysconfdir)/mib.txt +AUTH_OBJS = @AUTH_OBJS@ +AUTH_MODULES = @AUTH_MODULES@ CC = @CC@ MAKEDEPEND = @MAKEDEPEND@ INSTALL = @INSTALL@ @@ -207,8 +209,8 @@ $(SNMP_OBJS): ../snmplib/libsnmp.a $(top_srcdir)/include/cache_snmp.h -$(SQUID_EXE): $(OBJS) $(STORE_OBJS) $(REPL_OBJS) - $(CC) -o $@ $(LDFLAGS) $(OBJS) $(STORE_OBJS) $(REPL_OBJS) $(SQUID_LIBS) +$(SQUID_EXE): $(OBJS) $(STORE_OBJS) $(REPL_OBJS) $(AUTH_OBJS) + $(CC) -o $@ $(LDFLAGS) $(OBJS) $(STORE_OBJS) $(REPL_OBJS) $(AUTH_OBJS) $(SQUID_LIBS) globals.o: globals.c Makefile $(CC) -c globals.c $(CFLAGS) -I$(srcdir) $(DEFAULTS) @@ -297,6 +299,9 @@ repl_modules repl/stamp: @sh -c "cd repl && $(MAKE) all" +$(AUTH_OBJS): + @sh -c "cd `dirname $@` && $(MAKE) $(MFLAGS) `basename $@`" + install-mkdirs: -@if test ! -d $(prefix); then \ echo "mkdir $(prefix)"; \ Index: squid/src/acl.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/acl.c,v retrieving revision 1.1.1.3.12.26.2.2 retrieving revision 1.1.1.3.12.26.2.3 diff -u -r1.1.1.3.12.26.2.2 -r1.1.1.3.12.26.2.3 --- squid/src/acl.c 18 Nov 2000 01:39:05 -0000 1.1.1.3.12.26.2.2 +++ squid/src/acl.c 20 Nov 2000 06:55:36 -0000 1.1.1.3.12.26.2.3 @@ -1,6 +1,6 @@ /* - * $Id: acl.c,v 1.1.1.3.12.26.2.2 2000/11/18 01:39:05 rbcollins Exp $ + * $Id: acl.c,v 1.1.1.3.12.26.2.3 2000/11/20 06:55:36 rbcollins Exp $ * * DEBUG: section 28 Access Control * AUTHOR: Duane Wessels @@ -1236,7 +1236,7 @@ return -2; } /* we have a proxy auth header and as far as we know this connection has - * not had bungled NTLM authentication happen on it. */ + * not had bungled connection oriented authentication happen on it. */ debug(28,6) ("aclMatchProxyAuth: header %s.\n", proxy_auth); if (auth_user == NULL) { debug(28,5) ("aclMatchProxyAuth: This is a new request on FD:%d\n", checklist->conn->fd); Index: squid/src/globals.h =================================================================== RCS file: /cvsroot/squid-sf//squid/src/globals.h,v retrieving revision 1.1.1.3.12.8 retrieving revision 1.1.1.3.12.8.2.1 diff -u -r1.1.1.3.12.8 -r1.1.1.3.12.8.2.1 --- squid/src/globals.h 12 Nov 2000 21:22:21 -0000 1.1.1.3.12.8 +++ squid/src/globals.h 20 Nov 2000 06:55:36 -0000 1.1.1.3.12.8.2.1 @@ -1,6 +1,6 @@ /* - * $Id: globals.h,v 1.1.1.3.12.8 2000/11/12 21:22:21 rbcollins Exp $ + * $Id: globals.h,v 1.1.1.3.12.8.2.1 2000/11/20 06:55:36 rbcollins Exp $ * * * SQUID Internet Object Cache http://squid.nlanr.net/Squid/ @@ -145,6 +145,7 @@ extern request_flags null_request_flags; extern int store_open_disk_fd; /* 0 */ extern const char *SwapDirType[]; +extern authscheme_entry_t *authscheme_list; /* NULL */ extern storefs_entry_t *storefs_list; /* NULL */ extern storerepl_entry_t *storerepl_list; /* NULL */ extern int store_swap_low; /* 0 */ Index: squid/src/typedefs.h =================================================================== RCS file: /cvsroot/squid-sf//squid/src/typedefs.h,v retrieving revision 1.1.1.3.12.13 retrieving revision 1.1.1.3.12.13.2.1 diff -u -r1.1.1.3.12.13 -r1.1.1.3.12.13.2.1 --- squid/src/typedefs.h 16 Nov 2000 11:47:00 -0000 1.1.1.3.12.13 +++ squid/src/typedefs.h 20 Nov 2000 06:55:36 -0000 1.1.1.3.12.13.2.1 @@ -1,6 +1,6 @@ /* - * $Id: typedefs.h,v 1.1.1.3.12.13 2000/11/16 11:47:00 rbcollins Exp $ + * $Id: typedefs.h,v 1.1.1.3.12.13.2.1 2000/11/20 06:55:36 rbcollins Exp $ * * * SQUID Internet Object Cache http://squid.nlanr.net/Squid/ @@ -68,6 +68,7 @@ typedef struct _acl_proxy_auth_user_ntlm_data acl_proxy_auth_user_ntlm_data; typedef struct _acl_proxy_auth_hash_pointer acl_proxy_auth_hash_pointer; typedef struct _acl_proxy_auth_match_cache acl_proxy_auth_match_cache; +typedef struct _authscheme_entry authscheme_entry_t; typedef struct _acl_arp_data acl_arp_data; typedef struct _acl acl; typedef struct _acl_snmp_comm acl_snmp_comm; @@ -209,6 +210,8 @@ typedef void EVH(void *); typedef void PF(int, void *); +/* authenticate.c authenticate scheme routines typedefs */ + /* disk.c / diskd.c callback typedefs */ typedef void DRCB(int, const char *buf, int size, int errflag, void *data); /* Disk read CB */