This patch is generated from the nt-2_5 branch of s2_5 in squid
Thu Jun 22 00:17:29 2006 GMT
See http://devel.squid-cache.org/
Index: squid/Makefile.am
diff -u squid/Makefile.am:1.4.22.14 squid/Makefile.am:1.4.22.1.4.13
--- squid/Makefile.am:1.4.22.14 Sat Sep 25 19:14:22 2004
+++ squid/Makefile.am Sun Sep 26 02:49:24 2004
@@ -3,8 +3,8 @@
# $Id$
#
-AUTOMAKE_OPTIONS = dist-bzip2 subdir-objects 1.5
-DIST_SUBDIRS = lib snmplib scripts src icons errors contrib doc helpers
+AUTOMAKE_OPTIONS = dist-bzip2 dist-zip subdir-objects 1.5
+DIST_SUBDIRS = lib snmplib scripts src icons errors contrib doc helpers port
SUBDIRS = lib @makesnmplib@ scripts src icons errors doc helpers
DISTCLEANFILES = include/stamp-h include/stamp-h[0-9]*
Index: squid/acconfig.h
diff -u squid/acconfig.h:1.13.2.4 squid/acconfig.h:1.13.6.8
--- squid/acconfig.h:1.13.2.4 Wed Jun 9 07:05:51 2004
+++ squid/acconfig.h Sat Jun 12 02:33:00 2004
@@ -151,6 +151,11 @@
/* Define if NTLM is allowed to fail gracefully when a helper has problems */
#undef NTLM_FAIL_OPEN
+/*
+ * Define Windows NT & Windows 2000 run service mode
+ */
+#undef USE_WIN32_SERVICE
+
/********************************
* END OF CONFIGURABLE OPTIONS *
********************************/
@@ -213,6 +218,9 @@
/* Define if you have struct rusage */
#undef HAVE_STRUCT_RUSAGE
+/* Define if you have PSAPI.DLL on Windows systems */
+#undef HAVE_WIN32_PSAPI
+
/*
* This makes warnings go away. If you have socklen_t defined in your
* /usr/include files, then this should remain undef'd. Otherwise it
Index: squid/acinclude.m4
diff -u squid/acinclude.m4:1.2.2.3 squid/acinclude.m4:1.1.64.8
--- squid/acinclude.m4:1.2.2.3 Fri Jun 21 07:50:49 2002
+++ squid/acinclude.m4 Tue Sep 13 06:25:29 2005
@@ -7,7 +7,7 @@
dnl (it at least makes use of , and )
dnl AC_CHECK_SIZEOF_SYSTYPE(TYPE [, CROSS-SIZE])
-AC_DEFUN(AC_CHECK_SIZEOF_SYSTYPE,
+AC_DEFUN([AC_CHECK_SIZEOF_SYSTYPE],
[changequote(<<, >>)dnl
dnl The name to #define.
define(<>, translit(sizeof_$1, [a-z *], [A-Z_P]))dnl
@@ -46,8 +46,8 @@
])
dnl AC_CHECK_SYSTYPE(TYPE, DEFAULT)
-AC_DEFUN(AC_CHECK_SYSTYPE,
-[AC_REQUIRE([AC_HEADER_STDC])dnl
+AC_DEFUN([AC_CHECK_SYSTYPE],
+[
AC_MSG_CHECKING(for $1)
AC_CACHE_VAL(ac_cv_type_$1,
[AC_EGREP_CPP(dnl
Index: squid/configure.in
diff -u squid/configure.in:1.42.2.84 squid/configure.in:1.42.2.5.4.89
--- squid/configure.in:1.42.2.84 Sat May 20 06:41:47 2006
+++ squid/configure.in Sat May 20 23:13:54 2006
@@ -9,7 +9,7 @@
dnl
AC_INIT(src/main.c)
AC_CONFIG_AUX_DIR(cfgaux)
-AM_INIT_AUTOMAKE(squid, 2.5.STABLE14-CVS)
+AM_INIT_AUTOMAKE(squid, 2.5.STABLE14-NT-CVS)
AM_CONFIG_HEADER(include/autoconf.h)
AC_REVISION($Revision$)dnl
AC_PREFIX_DEFAULT(/usr/local/squid)
@@ -51,7 +51,7 @@
dnl this should be expanded to a list of platform sensible support requirements.
dnl (adding an option like --enable-cygwin-support doesn't make sense :]) - R Collins 2001
case "$host_os" in
-cygwin|cygwin32)
+mingw|mingw32|cygwin|cygwin32)
AM_CONDITIONAL(ENABLE_WIN32SPECIFIC, true)
;;
*)
@@ -59,6 +59,24 @@
;;
esac
+case "$host_os" in
+mingw|mingw32)
+ AM_CONDITIONAL(ENABLE_MINGW32SPECIFIC, true)
+ AC_PATH_PROG(WIN32_PSAPI, psapi.dll, none)
+ CFLAGS="$CFLAGS -mthreads"
+ if test "$ac_cv_path_WIN32_PSAPI" = "none"; then
+ echo "PSAPI.DLL is recommended to run Squid on Windows NT Platform"
+ echo "Please see PSAPI.DLL section on doc/win32-relnotes.html."
+ else
+ AC_DEFINE(HAVE_WIN32_PSAPI)
+ LIBS="$LIBS -lpsapi"
+ fi
+ ;;
+*)
+ AM_CONDITIONAL(ENABLE_MINGW32SPECIFIC, false)
+ ;;
+esac
+
if test -z "$CACHE_HTTP_PORT"; then
CACHE_HTTP_PORT="3128"
fi
@@ -546,6 +564,12 @@
;;
*-freebsd*)
;;
+ *-cygwin*)
+ LIBS="$LIBS -liphlpapi"
+ ;;
+ *-mingw*)
+ LIBS="$LIBS -liphlpapi"
+ ;;
*)
echo "WARNING: ARP ACL support probably won't work on $host."
sleep 10
@@ -576,7 +600,14 @@
echo "SSL gatewaying using OpenSSL enabled"
AC_DEFINE(USE_SSL)
AM_CONDITIONAL(ENABLE_SSL, true)
- SSLLIB='-lssl -lcrypto'
+ case "$host_os" in
+ mingw|mingw32)
+ SSLLIB='-lssl -lcrypto -lgdi32'
+ ;;
+ *)
+ SSLLIB='-lssl -lcrypto'
+ ;;
+ esac
USE_OPENSSL=1
fi
])
@@ -932,6 +963,35 @@
fi
])
+dnl Select Default hosts file location
+AC_ARG_ENABLE(default-hostsfile,
+[ --enable-default-hostsfile=path
+ Select default location for hosts file.
+ See hosts_file directive in squid.conf for details],
+[
+ if test "$enableval" != "none" ; then
+ if test -f $enableval; then
+ OPT_DEFAULT_HOSTS=$enableval
+ else
+ echo "Warning Unable to find $enableval"
+ sleep 5
+ fi
+ else
+ OPT_DEFAULT_HOSTS="none"
+ fi
+ echo "Default hosts file set to: $enableval"
+],[OPT_DEFAULT_HOSTS="/etc/hosts"])
+AC_SUBST(OPT_DEFAULT_HOSTS)
+
+dnl Enable WIN32 Service compile mode
+AC_ARG_ENABLE(win32-service,
+[ --enable-win32-service Compile Squid as a WIN32 Service
+ Works only on Windows NT and Windows 2000 Platforms.],
+[ if test "$enableval" = "yes" ; then
+ echo "Enabling WIN32 run service mode"
+ AC_DEFINE(USE_WIN32_SERVICE)
+ fi
+])
dnl Select auth schemes modules to build
AC_ARG_ENABLE(auth,
@@ -1279,10 +1339,23 @@
esac
AC_SUBST(AR_R)
+case "$host_os" in
+cygwin|cygwin32)
+ ac_cv_header_stdc='yes'
+ ;;
+esac
+
dnl Check for headers
AC_HEADER_DIRENT
AC_HEADER_STDC
+case "$host_os" in
+mingw|mingw32)
+ ac_cv_header_crypt_h='yes'
+ ac_cv_header_getopt_h='yes'
+ ;;
+esac
+
AC_CHECK_HEADERS( \
arpa/inet.h \
arpa/nameser.h \
@@ -1426,21 +1499,30 @@
AC_DEFINE(HAVE_EXT_MALLINFO)
fi
-AC_CACHE_CHECK(for struct rusage,ac_cv_have_struct_rusage, [
- AC_TRY_COMPILE([
+case "$host_os" in
+ mingw|mingw32)
+ AC_DEFINE(HAVE_STRUCT_RUSAGE)
+ ac_cv_func_getrusage='yes'
+ echo "Using own rusage."
+ ;;
+ *)
+ AC_CACHE_CHECK(for struct rusage,ac_cv_have_struct_rusage, [
+ AC_TRY_COMPILE([
#if HAVE_SYS_TIME_H
#include
#endif
#if HAVE_SYS_RESOURCE_H
#include
#endif],
- [struct rusage R;],
- ac_cv_have_struct_rusage="yes",
+ [struct rusage R;],
+ ac_cv_have_struct_rusage="yes",
ac_cv_have_struct_rusage="no")
])
-if test $ac_cv_have_struct_rusage = "yes" ; then
- AC_DEFINE(HAVE_STRUCT_RUSAGE)
-fi
+ if test $ac_cv_have_struct_rusage = "yes" ; then
+ AC_DEFINE(HAVE_STRUCT_RUSAGE)
+ fi
+ ;;
+esac
AC_CACHE_CHECK(for ip->ip_hl, ac_cv_have_ip_hl, [
AC_TRY_COMPILE([#include
@@ -1481,6 +1563,17 @@
AC_CHECK_SIZEOF_SYSTYPE(uint64_t)
AC_CHECK_SIZEOF_SYSTYPE(u_int64_t)
+case "$host_os" in
+cygwin|cygwin32)
+ ac_cv_type_int16_t='yes'
+ ac_cv_type_int32_t='yes'
+ ac_cv_type_int64_t='yes'
+ ac_cv_type_u_int16_t='yes'
+ ac_cv_type_u_int32_t='yes'
+ ac_cv_type_u_int64_t='yes'
+ ;;
+esac
+
dnl int16_t
if test "x$ac_cv_sizeof_short" = "x2"; then
AC_CHECK_SYSTYPE(int16_t,short)
@@ -1572,6 +1665,42 @@
dnl Check for needed libraries
AC_CHECK_LIB(nsl, main)
AC_CHECK_LIB(socket, main)
+AC_MSG_CHECKING(for winsock)
+save_LIBS="$LIBS"
+for curlib in ws2_32 wsock32; do
+ LIBS="$LIBS -l$curlib"
+ AC_TRY_LINK([
+ char __attribute__((stdcall)) socket(int,int,int);
+ char __attribute__((stdcall)) select(int,int,int,int,int);
+ char __attribute__((stdcall)) closesocket(int);
+ char __attribute__((stdcall)) gethostname(int,int);
+ ],
+ [
+ socket(1,2,3);
+ select(1,2,3,4,5);
+ closesocket(1);
+ gethostname(1,2);
+ ],
+ have_winsock=yes, have_winsock=no)
+
+ if test $have_winsock = yes; then
+ ac_cv_func_select='yes'
+ if test $curlib = ws2_32; then
+ have_winsock=winsock2
+ fi
+ break
+ fi
+ LIBS="$save_LIBS"
+done
+AC_MSG_RESULT($have_winsock)
+case "$host_os" in
+ mingw|mingw32)
+ echo "Using own getopt."
+ AC_LIBOBJ(getopt)
+ ;;
+ *)
+ ;;
+esac
dnl Ripped from the Samba sources
AC_CACHE_CHECK([for unix domain sockets],squid_cv_unixsocket, [
@@ -1630,7 +1759,14 @@
;;
esac
fi
-AC_CHECK_LIB(m, main)
+case "$host_os" in
+mingw|mingw32)
+ echo "Use MSVCRT for math functions."
+ ;;
+ *)
+ AC_CHECK_LIB(m, main)
+ ;;
+esac
dnl Check for libcrypt
dnl Some of our helpers use crypt(3) which may be in libc, or in
@@ -1798,6 +1934,14 @@
esac
fi
+dnl Override some functions detect on MinGW becasue are emulated in source code
+case "$host_os" in
+mingw|mingw32)
+ ac_cv_func_crypt='yes'
+ ac_cv_func_statfs='yes'
+ ;;
+esac
+
dnl Check for library functions
AC_CHECK_FUNCS(\
bcopy \
@@ -2164,6 +2308,12 @@
SQUID_MAXFD=`cat conftestval`,
SQUID_MAXFD=256,
SQUID_MAXFD=256)
+dnl Microsoft MSVCRT.DLL supports 2048 maximum FDs
+case "$host_os" in
+mingw|mingw32)
+ SQUID_MAXFD="2048"
+ ;;
+esac
AC_MSG_RESULT($SQUID_MAXFD)
fi # --with-maxfd SQUID_MAXFD
AC_DEFINE_UNQUOTED(SQUID_MAXFD, $SQUID_MAXFD)
@@ -2327,12 +2477,19 @@
AC_MSG_RESULT("yes")
else
AC_MSG_RESULT("no")
- echo "Will use our own inet_ntoa()."
- LIBOBJS="$LIBOBJS inet_ntoa.o"
+ case "$host_os" in
+ mingw|mingw32)
+ echo "Using Win32 resolver instead."
+ ;;
+ *)
+ echo "Will use our own inet_ntoa()."
+ AC_LIBOBJ(inet_ntoa)
# echo "WARNING: This looks bad, and probably prevents Squid from working."
# echo " If you're on IRIX and using GCC 2.8, you probably need"
# echo " to use the IRIX C compiler instead."
# sleep 10
+ ;;
+ esac
fi
if test "$ac_cv_header_sys_statvfs_h" = "yes" ; then
@@ -2482,6 +2639,7 @@
icons/Makefile \
errors/Makefile \
src/fs/aufs/Makefile \
+ src/fs/awin32/Makefile \
src/fs/coss/Makefile \
src/fs/diskd/Makefile \
src/fs/null/Makefile \
@@ -2496,6 +2654,7 @@
helpers/basic_auth/NCSA/Makefile \
helpers/basic_auth/PAM/Makefile \
helpers/basic_auth/SMB/Makefile \
+ helpers/basic_auth/win32_locallogon/Makefile \
helpers/basic_auth/YP/Makefile \
helpers/basic_auth/getpwnam/Makefile \
helpers/basic_auth/multi-domain-NTLM/Makefile \
@@ -2508,6 +2667,7 @@
helpers/ntlm_auth/no_check/Makefile \
helpers/ntlm_auth/SMB/Makefile \
helpers/ntlm_auth/SMB/smbval/Makefile \
+ helpers/ntlm_auth/NTLMSSP-WIN32/Makefile \
helpers/ntlm_auth/winbind/Makefile \
helpers/external_acl/Makefile \
helpers/external_acl/ip_user/Makefile \
@@ -2515,4 +2675,7 @@
helpers/external_acl/unix_group/Makefile \
helpers/external_acl/wbinfo_group/Makefile \
helpers/external_acl/winbind_group/Makefile \
+ helpers/external_acl/win32_group/Makefile \
+ port/Makefile \
+ port/win32/Makefile \
])
Index: squid/doc/Makefile.am
diff -u squid/doc/Makefile.am:1.1.2.7 squid/doc/Makefile.am:1.1.2.1.4.7
--- squid/doc/Makefile.am:1.1.2.7 Sun May 8 19:16:07 2005
+++ squid/doc/Makefile.am Sat May 21 02:45:36 2005
@@ -31,7 +31,8 @@
EXTRA_DIST = \
squid.8.in \
cachemgr.cgi.8.in \
- debug-sections.txt
+ debug-sections.txt \
+ win32-relnotes.html
CLEANFILES = \
squid.8 \
Index: squid/doc/win32-relnotes.html
diff -u /dev/null squid/doc/win32-relnotes.html:1.1.2.9
--- /dev/null Thu Jan 1 01:00:00 1970
+++ squid/doc/win32-relnotes.html Thu Mar 25 11:40:56 2004
@@ -0,0 +1,156 @@
+
+
+
+WIN32 Squid Release Notes
+
+
+
+
+WIN32 Squid Release Notes
+
+Windows Service run mode
+
+When Squid is compiled as a Windows service, the -N command line switch is disabled, and default run mode of
+Squid is no daemon (=no service) mode, so is possible to run Squid from command line
+for debug purpose with all command line options available.
+On Windows 2000/XP/2003 the service is configured to use the Windows Service Recovery option restarting
+automatically after 60 seconds.
+
+Usage
+
+The squid -? command gives the following output:
+
+
Usage: squid [-dhirsvzCDFRVYX] [-f config-file] [-[au] port] [-k signal] [-n nam
+e] [-O CommandLine]
+ -a port Specify HTTP port number (default: 3128).
+ -d level Write debugging to stderr also.
+ -f file Use given config-file instead of
+ c:/squid/etc/squid.conf
+ -h Print help message.
+ -i Installs as a Windows Service (see -n option).
+ -k reconfigure|rotate|shutdown|interrupt|kill|debug|check|parse
+ Parse configuration file, then send signal to
+ running copy (except -k parse) and exit.
+ -n name Specify Windows Service name to use for service operations
+ default is: SquidNT.
+ -r Removes a Windows Service (see -n option).
+ -s Enable logging to syslog.
+ -u port Specify ICP port number (default: 3130), disable with 0.
+ -v Print version.
+ -z Create swap directories
+ -C Do not catch fatal signals.
+ -D Disable initial DNS tests.
+ -F Don't serve any requests until store is rebuilt.
+ -O options
+ Set Windows Service Command line options in Registry.
+ -R Do not set REUSEADDR on port.
+ -S Double-check swap during rebuild.
+ -V Virtual host httpd-accelerator.
+ -X Force full debugging.
+ -Y Only return UDP_HIT or UDP_MISS_NOFETCH during fast reload.
+
+
+The service installation is made with -i command line switch, it's possible to use
+-f switch at the same time for specify a different config-file settings for the Squid
+Service that is stored on Registry.
+A new -n switch specify the Windows Service Name, so multiple Squid instance are allowed.
+"SquidNT" is the default when the switch is not used.
+
+So the install service syntax is:
+
squid -i [-f file] [-n name]
+
+To start as service is used a "hidden" --ntservice:service-name command line switch,
+where service-name is the name specified with -n options at service install time.
+
+Service uninstallation is made with -r command line switch plus the appropriate
+-n switch.
+
+The -k switch family must be used with the appropriate -f and -n switches, so the syntax is:
+
+
squid -k command [-f file] -n service-name
+where service-name is the name specified with -n options at service install time.
+
+To use Squid original command line, the new -O switch must be used ONCE, the sintax is:
+
+
squid -O cmdline [-n service-name]
+
+If multiple service command line options must be specified, use quote. The -n switch is
+needed only when non default service name is in use.
+Don't use the "Start parameters" in the Windows 2000/XP/2003 Service applet: they are specific to
+Windows services functionality and Squid is not designed for understand they
+
+Example:
+
+
squid -O "-D -a 8080" -n squidsvc
+
+
+PSAPI.DLL (Process Status Helper) Considerations
+
+The process status helper functions make it easier for you to obtain information about
+processes and device drivers running on Microsoft® Windows NT®/Windows® 2000. These
+functions are available in PSAPI.DLL, which is distributed in the Microsoft® Platform
+Software Development Kit (SDK). The same information is generally available through the
+performance data in the registry, but it is more difficult to get to it. PSAPI.DLL is
+freely redistributable.
+
+PSAPI.DLL is available only on Windows NT, 2000, XP and .NET. The implementation in Squid is
+aware of this, and try to use it only on the rigth platform.
+
+On Windows NT PSAPI.DLL can be found as component of many applications, if you need it,
+you can find it on Windows NT Resource KIT. If you have problem, it can be
+downloaded from here:
+http://download.microsoft.com/download/platformsdk/Redist/4.0.1371.1/NT4/EN-US/psinst.EXE
+
+On Windows 2000 and later it is available installing the Windows Support Tools, located on the
+Support\Tools folder of the installation Windows CD-ROM.
+
+
+Registry DNS lookup
+
+On Windows platforms, if no value is specified in the dns_nameservers option on
+squid.conf or in the /etc/resolv.conf file, the list of DNS name servers are
+taken from the Windows registry, both static and dynamic DHCP configurations
+are supported.
+
+
+Awin32 fs module
+
+awin32 is a native WIN32 Async I/O Squid fs module derived from aufs. Configuration
+in squid.conf is identical to aufs, but You nedd to specify 'awin32' instead 'aufs' as
+cache type.
+
+Compatibility Notes
+
+
+Known Limitations:
+
+ - Squid features not operational:
+DISKD: needs to be ported - Volunteers are welcome
+WCCP: cannot work because GRE support on Windows is missing - Volunteers are welcome
+Transparent Proxy: missing Windows non commercial interception driver
+ - Some code sections can make blocking calls.
+ - Some external helpers may not work.
+ - File Descriptors number hard-limited to 2048
+
+
+To report a BUG, e-mail on squidnt@acmeconsulting.it.
+The latest version and documentation can be found on http://www.acmeconsulting.it/SquidNT.htm.
+
+
+
Index: squid/helpers/basic_auth/Makefile.am
diff -u squid/helpers/basic_auth/Makefile.am:1.1.2.1 squid/helpers/basic_auth/Makefile.am:1.2.8.1
--- squid/helpers/basic_auth/Makefile.am:1.1.2.1 Fri Jun 28 07:46:19 2002
+++ squid/helpers/basic_auth/Makefile.am Sat Jun 29 04:05:59 2002
@@ -3,5 +3,5 @@
# $Id$
#
-DIST_SUBDIRS = getpwnam LDAP MSNT multi-domain-NTLM NCSA PAM SMB YP SASL winbind
+DIST_SUBDIRS = getpwnam LDAP MSNT multi-domain-NTLM NCSA PAM SMB YP SASL winbind win32_locallogon
SUBDIRS = @BASIC_AUTH_HELPERS@
Index: squid/helpers/basic_auth/LDAP/Makefile.am
diff -u squid/helpers/basic_auth/LDAP/Makefile.am:1.1.2.3 squid/helpers/basic_auth/LDAP/Makefile.am:1.2.8.4
--- squid/helpers/basic_auth/LDAP/Makefile.am:1.1.2.3 Fri Mar 18 17:42:54 2005
+++ squid/helpers/basic_auth/LDAP/Makefile.am Sat Mar 19 00:41:06 2005
@@ -11,5 +11,11 @@
EXTRA_DIST = squid_ldap_auth.8
squid_ldap_auth_SOURCES = squid_ldap_auth.c
+if ENABLE_MINGW32SPECIFIC
+LDADD = -L$(top_builddir)/lib -lmiscutil -lwldap32 $(XTRA_LIBS)
+INCLUDES = -I$(top_srcdir)/port/win32/include -I$(top_builddir)/include \
+ -I$(top_srcdir)/include
+else
LDADD = -L$(top_builddir)/lib -lmiscutil -lldap $(LIB_LBER) $(XTRA_LIBS)
INCLUDES = -I$(top_srcdir)/include
+endif
Index: squid/helpers/basic_auth/LDAP/squid_ldap_auth.c
diff -u squid/helpers/basic_auth/LDAP/squid_ldap_auth.c:1.1.2.24 squid/helpers/basic_auth/LDAP/squid_ldap_auth.c:1.2.8.29
--- squid/helpers/basic_auth/LDAP/squid_ldap_auth.c:1.1.2.24 Sat Feb 25 19:13:56 2006
+++ squid/helpers/basic_auth/LDAP/squid_ldap_auth.c Sun Feb 26 01:14:42 2006
@@ -84,13 +84,44 @@
#define LDAP_DEPRECATED 1
+#include "util.h"
+
#include
#include
#include
+
+#ifdef _SQUID_MSWIN_ /* Native Windows port and MinGW */
+
+#define snprintf _snprintf
+#include
+#include
+#ifndef LDAPAPI
+#define LDAPAPI __cdecl
+#endif
+#ifdef LDAP_VERSION3
+#define LDAP_OPT_SUCCESS LDAP_SUCCESS
+/* Some tricks to allow dynamic bind with ldap_start_tls_s entry point at
+ run time.
+ */
+#undef ldap_start_tls_s
+#if LDAP_UNICODE
+#define LDAP_START_TLS_S "ldap_start_tls_sW"
+typedef WINLDAPAPI ULONG (LDAPAPI * PFldap_start_tls_s) (IN PLDAP, OUT PULONG, OUT LDAPMessage **, IN PLDAPControlW *, IN PLDAPControlW *);
+#else
+#define LDAP_START_TLS_S "ldap_start_tls_sA"
+typedef WINLDAPAPI ULONG (LDAPAPI * PFldap_start_tls_s) (IN PLDAP, OUT PULONG, OUT LDAPMessage **, IN PLDAPControlA *, IN PLDAPControlA *);
+#endif /* LDAP_UNICODE */
+PFldap_start_tls_s Win32_ldap_start_tls_s;
+#define ldap_start_tls_s(l,s,c) Win32_ldap_start_tls_s(l,NULL,NULL,s,c)
+#endif /* LDAP_VERSION3 */
+
+#else
+
#include
#include
#include
-#include "util.h"
+
+#endif
#define PROGRAM_NAME "squid_ldap_auth"
@@ -516,6 +547,23 @@
fprintf(stderr, "\tIf you need to bind as a user to perform searches then use the\n\t-D binddn -w bindpasswd or -D binddn -W secretfile options\n\n");
exit(1);
}
+
+/* On windows ldap_start_tls_s is available starting from Windows XP,
+ so we need to bind at run-time with the function entry point
+ */
+#ifdef _SQUID_MSWIN_
+ if (use_tls) {
+
+ HMODULE WLDAP32Handle;
+
+ WLDAP32Handle = GetModuleHandle("wldap32");
+ if ((Win32_ldap_start_tls_s = (PFldap_start_tls_s) GetProcAddress(WLDAP32Handle, LDAP_START_TLS_S)) == NULL) {
+ fprintf( stderr, PROGRAM_NAME ": ERROR: TLS (-Z) not supported on this platform.\n");
+ exit(1);
+ }
+ }
+#endif
+
while (fgets(buf, 256, stdin) != NULL) {
user = strtok(buf, " \r\n");
passwd = strtok(NULL, "\r\n");
Index: squid/helpers/basic_auth/NCSA/Makefile.am
diff -u squid/helpers/basic_auth/NCSA/Makefile.am:1.1.2.2 squid/helpers/basic_auth/NCSA/Makefile.am:1.2.8.3
--- squid/helpers/basic_auth/NCSA/Makefile.am:1.1.2.2 Sun Aug 11 18:51:02 2002
+++ squid/helpers/basic_auth/NCSA/Makefile.am Sun Apr 13 08:12:25 2003
@@ -6,7 +6,14 @@
# Uncomment and customize the following to suit your needs:
#
-libexec_PROGRAMS = ncsa_auth
-ncsa_auth_SOURCES = ncsa_auth.c
-LDADD = -L$(top_builddir)/lib -lmiscutil $(CRYPTLIB) $(XTRA_LIBS)
-INCLUDES = -I$(top_srcdir)/include
+libexec_PROGRAMS = ncsa_auth
+if ENABLE_MINGW32SPECIFIC
+INCLUDES = -I$(top_srcdir)/port/win32/include -I$(top_builddir)/include \
+ -I$(top_srcdir)/include
+ENCRYPTSRC = $(top_srcdir)/port/win32/src/encrypt.c
+else
+INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include
+ENCRYPTSRC =
+endif
+ncsa_auth_SOURCES = ncsa_auth.c $(ENCRYPTSRC)
+LDADD = -L$(top_builddir)/lib -lmiscutil $(CRYPTLIB) $(XTRA_LIBS)
Index: squid/helpers/basic_auth/win32_locallogon/.cvsignore
diff -u /dev/null squid/helpers/basic_auth/win32_locallogon/.cvsignore:1.1.4.1
--- /dev/null Thu Jan 1 01:00:00 1970
+++ squid/helpers/basic_auth/win32_locallogon/.cvsignore Sat Jun 29 04:05:59 2002
@@ -0,0 +1,2 @@
+.cvsignore
+Makefile.in
Index: squid/helpers/basic_auth/win32_locallogon/Makefile.am
diff -u /dev/null squid/helpers/basic_auth/win32_locallogon/Makefile.am:1.1.4.7
--- /dev/null Thu Jan 1 01:00:00 1970
+++ squid/helpers/basic_auth/win32_locallogon/Makefile.am Tue Sep 13 09:18:25 2005
@@ -0,0 +1,23 @@
+#
+# Makefile for the Squid Object Cache server
+#
+# $Id$
+#
+# Uncomment and customize the following to suit your needs:
+#
+
+
+libexec_PROGRAMS = win32_auth
+
+win32_auth_SOURCES = NT_auth.c valid.c valid.h
+
+LDADD = -L$(top_builddir)/lib -lnetapi32 -ladvapi32 -lsspwin32 \
+ -lmiscutil $(XTRA_LIBS)
+
+if ENABLE_MINGW32SPECIFIC
+INCLUDES = -I$(top_srcdir)/port/win32/include -I$(top_srcdir)/include -I$(top_srcdir)/src
+else
+INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/src
+endif
+
+EXTRA_DIST = README.txt
Index: squid/helpers/basic_auth/win32_locallogon/NT_auth.c
diff -u /dev/null squid/helpers/basic_auth/win32_locallogon/NT_auth.c:1.1.4.7
--- /dev/null Thu Jan 1 01:00:00 1970
+++ squid/helpers/basic_auth/win32_locallogon/NT_auth.c Wed Sep 14 05:12:21 2005
@@ -0,0 +1,188 @@
+/*
+ NT_auth - Version 2.0
+
+ Returns OK for a successful authentication, or ERR upon error.
+
+ Guido Serassio, Torino - Italy
+
+ Uses code from -
+ Antonino Iannella 2000
+ Andrew Tridgell 1997
+ Richard Sharpe 1996
+ Bill Welliver 1999
+
+ * Distributed freely under the terms of the GNU General Public License,
+ * version 2. See the file COPYING for licensing details
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
+*/
+
+#include "config.h"
+#include
+#include
+#include "util.h"
+
+/* Check if we try to compile on a Windows Platform */
+#if defined(_SQUID_CYGWIN_) || defined(_SQUID_MSWIN_)
+
+#include "valid.h"
+
+static char NTGroup[256];
+char * NTAllowedGroup;
+char * NTDisAllowedGroup;
+int UseDisallowedGroup = 0;
+int UseAllowedGroup = 0;
+int debug_enabled = 0;
+
+/*
+ * options:
+ * -A can specify a Windows Local Group name allowed to authenticate.
+ * -D can specify a Windows Local Group name not allowed to authenticate.
+ * -O can specify the default Domain against to authenticate.
+ */
+char *my_program_name = NULL;
+
+void
+usage()
+{
+ fprintf(stderr,
+ "%s usage:\n%s [-A|D UserGroup][-O DefaultDomain][-d]\n"
+ "-A can specify a Windows Local Group name allowed to authenticate\n"
+ "-D can specify a Windows Local Group name not allowed to authenticate\n"
+ "-O can specify the default Domain against to authenticate\n"
+ "-d enable debugging.\n"
+ "-h this message\n\n",
+ my_program_name, my_program_name);
+}
+
+void
+process_options(int argc, char *argv[])
+{
+ int opt, had_error = 0;
+ while (-1 != (opt = getopt(argc, argv, "dhA:D:O:"))) {
+ switch (opt) {
+ case 'A':
+ safe_free(NTAllowedGroup);
+ NTAllowedGroup=xstrdup(optarg);
+ UseAllowedGroup = 1;
+ break;
+ case 'D':
+ safe_free(NTDisAllowedGroup);
+ NTDisAllowedGroup=xstrdup(optarg);
+ UseDisallowedGroup = 1;
+ break;
+ case 'O':
+ strncpy(Default_NTDomain, optarg, DNLEN);
+ break;
+ case 'd':
+ debug_enabled = 1;
+ break;
+ case 'h':
+ usage(argv[0]);
+ exit(0);
+ case '?':
+ opt = optopt;
+ /* fall thru to default */
+ default:
+ fprintf(stderr, "Unknown option: -%c. Exiting\n", opt);
+ had_error = 1;
+ }
+ }
+ if (had_error) {
+ usage();
+ exit(1);
+ }
+}
+
+/* Main program for simple authentication.
+ Scans and checks for Squid input, and attempts to validate the user.
+*/
+
+int
+main(int argc, char **argv)
+
+{
+ char wstr[256];
+ char username[256];
+ char password[256];
+ char *p;
+ int err = 0;
+
+ my_program_name = argv[0];
+ process_options(argc, argv);
+
+ debug("%s build " __DATE__ ", " __TIME__ " starting up...\n", my_program_name);
+
+ if (LoadSecurityDll(SSP_BASIC) == NULL) {
+ fprintf(stderr, "FATAL, can't initialize SSPI, exiting.\n");
+ exit(1);
+ }
+ debug("SSPI initialized OK\n");
+
+ atexit(UnloadSecurityDll);
+
+ /* initialize FDescs */
+ setbuf(stdout, NULL);
+ setbuf(stderr, NULL);
+
+ while (1) {
+ /* Read whole line from standard input. Terminate on break. */
+ if (fgets(wstr, 255, stdin) == NULL)
+ break;
+
+ if (NULL == strchr(wstr, '\n')) {
+ err = 1;
+ continue;
+ }
+ if (err) {
+ fprintf(stderr, "Oversized message\n");
+ puts("ERR");
+ goto error;
+ }
+
+ if ((p = strchr(wstr, '\n')) != NULL)
+ *p = '\0'; /* strip \n */
+ if ((p = strchr(wstr, '\r')) != NULL)
+ *p = '\0'; /* strip \r */
+ /* Clear any current settings */
+ username[0] = '\0';
+ password[0] = '\0';
+ sscanf(wstr, "%s %s", username, password); /* Extract parameters */
+
+ debug("Got %s from Squid\n", wstr);
+
+ /* Check for invalid or blank entries */
+ if ((username[0] == '\0') || (password[0] == '\0')) {
+ fprintf(stderr, "Invalid Request\n");
+ puts("ERR");
+ fflush(stdout);
+ continue;
+ }
+ rfc1738_unescape(username);
+ rfc1738_unescape(password);
+
+ debug("Trying to validate; %s %s\n", username, password);
+
+ if (Valid_User(username, password, NTGroup) == NTV_NO_ERROR)
+ puts("OK");
+ else
+ printf("ERR %s\n", errormsg);
+error:
+ err = 0;
+ fflush(stdout);
+ }
+ return 0;
+}
+
+#else /* NON Windows Platform !!! */
+
+#error NON WINDOWS PLATFORM
+
+#endif
Index: squid/helpers/basic_auth/win32_locallogon/README.txt
diff -u /dev/null squid/helpers/basic_auth/win32_locallogon/README.txt:1.1.4.7
--- /dev/null Thu Jan 1 01:00:00 1970
+++ squid/helpers/basic_auth/win32_locallogon/README.txt Tue Sep 13 08:44:27 2005
@@ -0,0 +1,101 @@
+This is a simple authentication module for the Squid proxy server running on Windows NT
+to authenticate users on an NT domain in native WIN32 mode.
+
+Usage is simple. It accepts a username and password on standard input
+and will return OK if the username/password is valid for the domain/machine,
+or ERR if there was some problem.
+It's possible to authenticate against NT trusted domains specifyng the username
+in the domain\\username Microsoft notation.
+
+
+==============
+Program Syntax
+==============
+
+win32_auth [-A UserGroup][-D UserGroup][-O DefaultDomain][-d]
+
+-A can specify a Windows Local Group name allowed to authenticate.
+-D can specify a Windows Local Group name not allowed to authenticate.
+-O can specify the default Domain against to authenticate.
+-d enable debugging.
+
+This is released under the GNU General Public License.
+
+
+==============
+Allowing Users
+==============
+
+Users that are allowed to access the web proxy must have the Windows NT
+User Rights "logon from the network" and must be included in the NT LOCAL User Groups
+specified in the Authenticator's command line.
+This can be accomplished creating a local user group on the NT machine, grant the privilege,
+and adding users to it.
+
+Refer to Squid documentation for the required changes to squid.conf.
+
+
+============
+Installation
+============
+
+Type 'make', then 'make install', then 'make clean'.
+
+On Cygwin the default is to install 'win32_auth' into /usr/local/squid/libexec,
+with other Windows environments into c:/squid/libexec.
+
+Refer to Squid documentation for the required changes to squid.conf.
+You will need to set the following line to enable the authenticator:
+
+auth_param basic program /usr/local/squid/libexec/win32_auth [options]
+
+or
+
+auth_param basic program c:/squid/libexec/win32_auth [options]
+
+You will need to set the following lines to enable authentication for
+your access list -
+
+ acl proxy_auth REQUIRED
+ http_access allow
+
+You will need to specify the absolute path to win32_auth in the
+'auth_param basic program' directive, and check the 'auth_param basic children'
+and 'auth_param basic credentialsttl'.
+
+
+==================
+Compilation issues
+==================
+
+The Makefile assumes that GCC is in the current PATH.
+win32_auth compile ONLY on Cygwin Environment, MinGW + MSYS Environment
+or MS VC++.
+
+
+=======
+Testing
+=======
+
+I strongly urge that win32_auth is tested prior to being used in a
+production environment. It may behave differently on different platforms.
+To test it, run it from the command line. Enter username and password
+pairs separated by a space. Press ENTER to get an OK or ERR message.
+Make sure pressing behaves the same as a carriage return.
+Make sure pressing aborts the program.
+
+Test that entering no details does not result in an OK or ERR message.
+Test that entering an invalid username and password results in an ERR message.
+Note that if NT guest user access is allowed on the PDC, an OK message
+may be returned instead of ERR.
+Test that entering an valid username and password results in an OK message.
+Test that entering a guest username and password returns the correct
+response for the site's access policy.
+
+
+===============
+Contact details
+===============
+
+To contact the maintainer of this package, e-mail on squidnt@acmeconsulting.it.
+
Index: squid/helpers/basic_auth/win32_locallogon/valid.c
diff -u /dev/null squid/helpers/basic_auth/win32_locallogon/valid.c:1.1.4.7
--- /dev/null Thu Jan 1 01:00:00 1970
+++ squid/helpers/basic_auth/win32_locallogon/valid.c Wed Sep 14 05:12:21 2005
@@ -0,0 +1,181 @@
+/*
+ NT_auth - Version 2.0
+
+ Modified to act as a Squid authenticator module.
+ Removed all Pike stuff.
+ Returns OK for a successful authentication, or ERR upon error.
+
+ Guido Serassio, Torino - Italy
+
+ Uses code from -
+ Antonino Iannella 2000
+ Andrew Tridgell 1997
+ Richard Sharpe 1996
+ Bill Welliver 1999
+
+ * Distributed freely under the terms of the GNU General Public License,
+ * version 2. See the file COPYING for licensing details
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
+*/
+
+#include "util.h"
+
+/* Check if we try to compile on a Windows Platform */
+#if defined(_SQUID_CYGWIN_) || defined(_SQUID_MSWIN_)
+
+#if defined(_SQUID_CYGWIN_)
+#include
+#endif
+#include "valid.h"
+
+char Default_NTDomain[DNLEN+1] = NTV_DEFAULT_DOMAIN;
+const char * errormsg;
+
+const char NTV_SERVER_ERROR_MSG[] = "Internal server errror";
+const char NTV_GROUP_ERROR_MSG[] = "User not allowed to use this cache";
+const char NTV_LOGON_ERROR_MSG[] = "No such user or wrong password";
+const char NTV_VALID_DOMAIN_SEPARATOR[] = "\\/";
+
+/* returns 1 on success, 0 on failure */
+int
+Valid_Group(char *UserName, char *Group)
+{
+ int result = FALSE;
+ WCHAR wszUserName[256]; // Unicode user name
+ WCHAR wszGroup[256]; // Unicode Group
+
+ LPLOCALGROUP_USERS_INFO_0 pBuf = NULL;
+ LPLOCALGROUP_USERS_INFO_0 pTmpBuf;
+ DWORD dwLevel = 0;
+ DWORD dwFlags = LG_INCLUDE_INDIRECT;
+ DWORD dwPrefMaxLen = -1;
+ DWORD dwEntriesRead = 0;
+ DWORD dwTotalEntries = 0;
+ NET_API_STATUS nStatus;
+ DWORD i;
+ DWORD dwTotalCount = 0;
+
+/* Convert ANSI User Name and Group to Unicode */
+
+ MultiByteToWideChar(CP_ACP, 0, UserName,
+ strlen(UserName) + 1, wszUserName,
+ sizeof(wszUserName) / sizeof(wszUserName[0]));
+ MultiByteToWideChar(CP_ACP, 0, Group,
+ strlen(Group) + 1, wszGroup, sizeof(wszGroup) / sizeof(wszGroup[0]));
+
+ /*
+ * Call the NetUserGetLocalGroups function
+ * specifying information level 0.
+ *
+ * The LG_INCLUDE_INDIRECT flag specifies that the
+ * function should also return the names of the local
+ * groups in which the user is indirectly a member.
+ */
+ nStatus = NetUserGetLocalGroups(NULL,
+ wszUserName,
+ dwLevel,
+ dwFlags,
+ (LPBYTE *) & pBuf, dwPrefMaxLen, &dwEntriesRead, &dwTotalEntries);
+ /*
+ * If the call succeeds,
+ */
+ if (nStatus == NERR_Success) {
+ if ((pTmpBuf = pBuf) != NULL) {
+ for (i = 0; i < dwEntriesRead; i++) {
+ if (pTmpBuf == NULL) {
+ result = FALSE;
+ break;
+ }
+ if (wcscmp(pTmpBuf->lgrui0_name, wszGroup) == 0) {
+ result = TRUE;
+ break;
+ }
+ pTmpBuf++;
+ dwTotalCount++;
+ }
+ }
+ } else
+ result = FALSE;
+/*
+ * Free the allocated memory.
+ */
+ if (pBuf != NULL)
+ NetApiBufferFree(pBuf);
+ return result;
+}
+
+/* Valid_User return codes -
+ 0 - User authenticated successfully.
+ 1 - Server error.
+ 2 - Group membership error.
+ 3 - Logon error; Incorrect password or username given.
+*/
+
+int
+Valid_User(char *UserName, char *Password, char *Group)
+{
+ int result = NTV_SERVER_ERROR;
+ size_t i;
+ char NTDomain[256];
+ char *domain_qualify;
+ char DomainUser[256];
+ char User[256];
+
+ errormsg = NTV_SERVER_ERROR_MSG;
+ strncpy(NTDomain, UserName, sizeof(NTDomain));
+
+ for (i=0; i < strlen(NTV_VALID_DOMAIN_SEPARATOR); i++) {
+ if ((domain_qualify = strchr(NTDomain, NTV_VALID_DOMAIN_SEPARATOR[i])) != NULL)
+ break;
+ }
+ if (domain_qualify == NULL) {
+ strcpy(User, NTDomain);
+ strcpy(NTDomain, Default_NTDomain);
+ } else {
+ strcpy(User, domain_qualify + 1);
+ domain_qualify[0] = '\0';
+ }
+ /* Log the client on to the local computer. */
+ if (!SSP_LogonUser(User, Password, NTDomain)) {
+ result = NTV_LOGON_ERROR;
+ errormsg = NTV_LOGON_ERROR_MSG;
+ debug("%s\n", errormsg);
+ } else {
+ result = NTV_NO_ERROR;
+ if (strcmp(NTDomain, NTV_DEFAULT_DOMAIN) == 0)
+ strcpy(DomainUser, User);
+ else {
+ strcpy(DomainUser, NTDomain);
+ strcat(DomainUser, "\\");
+ strcat(DomainUser, User);
+ }
+ if (UseAllowedGroup) {
+ if (!Valid_Group(DomainUser, NTAllowedGroup)) {
+ result = NTV_GROUP_ERROR;
+ errormsg = NTV_GROUP_ERROR_MSG;
+ debug("%s\n", errormsg);
+ }
+ }
+ if (UseDisallowedGroup) {
+ if (Valid_Group(DomainUser, NTDisAllowedGroup)) {
+ result = NTV_GROUP_ERROR;
+ errormsg = NTV_GROUP_ERROR_MSG;
+ debug("%s\n", errormsg);
+ }
+ }
+ }
+ return result;
+}
+#else /* NON Windows Platform !!! */
+
+#error NON WINDOWS PLATFORM
+
+#endif
Index: squid/helpers/basic_auth/win32_locallogon/valid.h
diff -u /dev/null squid/helpers/basic_auth/win32_locallogon/valid.h:1.1.4.6
--- /dev/null Thu Jan 1 01:00:00 1970
+++ squid/helpers/basic_auth/win32_locallogon/valid.h Wed Sep 14 05:12:21 2005
@@ -0,0 +1,107 @@
+/*
+ NT_auth - Version 2.0
+
+ Modified to act as a Squid authenticator module.
+ Returns OK for a successful authentication, or ERR upon error.
+
+ Guido Serassio, Torino - Italy
+
+ Uses code from -
+ Antonino Iannella 2000
+ Andrew Tridgell 1997
+ Richard Sharpe 1996
+ Bill Welliver 1999
+
+ * Distributed freely under the terms of the GNU General Public License,
+ * version 2. See the file COPYING for licensing details
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
+*/
+
+#ifndef _VALID_H_
+#define _VALID_H_
+
+#ifdef _SQUID_CYGWIN_
+#include
+#endif
+#include
+#include "sspwin32.h"
+#undef debug
+
+/************* CONFIGURATION ***************/
+/*
+ * define this if you want debugging
+ */
+#ifndef DEBUG
+#define DEBUG
+#endif
+
+#define safe_free(x) if (x) { free(x); x = NULL; }
+
+/* SMB User verification function */
+
+#define NTV_NO_ERROR 0
+#define NTV_SERVER_ERROR 1
+#define NTV_GROUP_ERROR 2
+#define NTV_LOGON_ERROR 3
+
+#ifndef LOGON32_LOGON_NETWORK
+#define LOGON32_LOGON_NETWORK 3
+#endif
+
+#define NTV_DEFAULT_DOMAIN "."
+
+extern char * NTAllowedGroup;
+extern char * NTDisAllowedGroup;
+extern int UseDisallowedGroup;
+extern int UseAllowedGroup;
+extern int debug_enabled;
+extern char Default_NTDomain[DNLEN+1];
+extern const char * errormsg;
+
+#include
+
+/* Debugging stuff */
+
+#ifdef __GNUC__ /* this is really a gcc-ism */
+#ifdef DEBUG
+#include
+#include
+static char *__foo;
+#define debug(X...) if (debug_enabled) { \
+ fprintf(stderr,"nt_auth[%d](%s:%d): ", getpid(), \
+ ((__foo=strrchr(__FILE__,'/'))==NULL?__FILE__:__foo+1),\
+ __LINE__);\
+ fprintf(stderr,X); }
+#else /* DEBUG */
+#define debug(X...) /* */
+#endif /* DEBUG */
+#else /* __GNUC__ */
+static void
+debug(char *format,...)
+{
+#ifdef DEBUG
+#ifdef _SQUID_MSWIN_
+ if (debug_enabled) {
+ va_list args;
+
+ va_start(args,format);
+ fprintf(stderr, "nt_auth[%d]: ",getpid());
+ vfprintf(stderr, format, args);
+ va_end(args);
+ }
+#endif /* _SQUID_MSWIN_ */
+#endif /* DEBUG */
+}
+#endif /* __GNUC__ */
+
+int Valid_User(char *,char *, char *);
+
+#endif
Index: squid/helpers/external_acl/Makefile.am
diff -u squid/helpers/external_acl/Makefile.am:1.2.2.2 squid/helpers/external_acl/Makefile.am:1.2.8.2
--- squid/helpers/external_acl/Makefile.am:1.2.2.2 Wed Jul 17 08:30:22 2002
+++ squid/helpers/external_acl/Makefile.am Fri Jul 12 23:29:15 2002
@@ -3,5 +3,5 @@
# $Id$
#
-DIST_SUBDIRS = ip_user ldap_group unix_group wbinfo_group winbind_group
+DIST_SUBDIRS = ip_user ldap_group unix_group wbinfo_group winbind_group win32_group
SUBDIRS = @EXTERNAL_ACL_HELPERS@
Index: squid/helpers/external_acl/ip_user/Makefile.am
diff -u squid/helpers/external_acl/ip_user/Makefile.am:1.1.6.3 squid/helpers/external_acl/ip_user/Makefile.am:1.1.12.3
--- squid/helpers/external_acl/ip_user/Makefile.am:1.1.6.3 Sun Jul 21 19:09:41 2002
+++ squid/helpers/external_acl/ip_user/Makefile.am Sun Dec 1 01:28:10 2002
@@ -24,7 +24,15 @@
# sysconf_DATA =
+if ENABLE_MINGW32SPECIFIC
+LDADD = -L$(top_builddir)/lib -lmiscutil \
+ @XTRA_LIBS@
+
+INCLUDES = -I. -I$(top_srcdir)/port/win32/include -I$(top_builddir)/include \
+ -I$(top_srcdir)/include -I$(top_srcdir)/src/
+else
LDADD = @XTRA_LIBS@
INCLUDES = -I. -I$(top_builddir)/include -I$(top_srcdir)/include \
-I$(top_srcdir)/src/
+endif
Index: squid/helpers/external_acl/ip_user/dict.c
diff -u squid/helpers/external_acl/ip_user/dict.c:1.1.12.2 squid/helpers/external_acl/ip_user/dict.c:1.1.16.2
--- squid/helpers/external_acl/ip_user/dict.c:1.1.12.2 Wed Jul 17 08:30:22 2002
+++ squid/helpers/external_acl/ip_user/dict.c Sun Dec 1 01:28:10 2002
@@ -23,9 +23,13 @@
#include
#include
#include
+#ifdef _WIN32
+#include
+#else
#include
#include
#include
+#endif
#include "ip_user.h"
@@ -129,9 +133,11 @@
if ((strchr (current_entry->username, '@')) == NULL) {
if ((match_user (current_entry->username, username)) == 1)
return 1;
+#ifndef _WIN32
} else {
if ((match_group (current_entry->username, username)) == 1)
return 1;
+#endif
}
}
current_entry = current_entry->next_entry;
Index: squid/helpers/external_acl/ip_user/main.c
diff -u squid/helpers/external_acl/ip_user/main.c:1.2.2.2 squid/helpers/external_acl/ip_user/main.c:1.2.6.2
--- squid/helpers/external_acl/ip_user/main.c:1.2.2.2 Wed Jul 17 08:30:22 2002
+++ squid/helpers/external_acl/ip_user/main.c Sun Dec 1 01:28:10 2002
@@ -20,7 +20,11 @@
*/
#include
#include
+#ifdef _WIN32
+#include
+#else
#include
+#endif
#include
Index: squid/helpers/external_acl/ip_user/match.c
diff -u squid/helpers/external_acl/ip_user/match.c:1.1.12.2 squid/helpers/external_acl/ip_user/match.c:1.1.16.2
--- squid/helpers/external_acl/ip_user/match.c:1.1.12.2 Wed Jul 17 08:30:22 2002
+++ squid/helpers/external_acl/ip_user/match.c Sun Dec 1 01:28:10 2002
@@ -21,7 +21,9 @@
#include
#include
#include
+#ifndef _WIN32
#include
+#endif
int
@@ -37,6 +39,7 @@
return 0;
} /* match_user */
+#ifndef _WIN32
int
match_group (char *dict_group, char *username)
{
@@ -59,3 +62,4 @@
return 0;
} /* match_group */
+#endif
Index: squid/helpers/external_acl/ldap_group/Makefile.am
diff -u squid/helpers/external_acl/ldap_group/Makefile.am:1.1.6.5 squid/helpers/external_acl/ldap_group/Makefile.am:1.1.12.5
--- squid/helpers/external_acl/ldap_group/Makefile.am:1.1.6.5 Fri Mar 18 17:42:54 2005
+++ squid/helpers/external_acl/ldap_group/Makefile.am Sat Mar 19 00:41:06 2005
@@ -11,4 +11,11 @@
EXTRA_DIST = squid_ldap_group.8
squid_ldap_group_SOURCES = squid_ldap_group.c
+if ENABLE_MINGW32SPECIFIC
+LDADD = -L$(top_builddir)/lib -lwldap32 $(XTRA_LIBS)
+INCLUDES = -I$(top_srcdir)/port/win32/include -I$(top_builddir)/include \
+ -I$(top_srcdir)/include
+else
LDADD = -lldap $(LIB_LBER) $(XTRA_LIBS)
+INCLUDES = -I$(top_srcdir)/include
+endif
Index: squid/helpers/external_acl/ldap_group/squid_ldap_group.c
diff -u squid/helpers/external_acl/ldap_group/squid_ldap_group.c:1.1.2.19 squid/helpers/external_acl/ldap_group/squid_ldap_group.c:1.1.6.23
--- squid/helpers/external_acl/ldap_group/squid_ldap_group.c:1.1.2.19 Sat Feb 25 19:13:56 2006
+++ squid/helpers/external_acl/ldap_group/squid_ldap_group.c Sun Feb 26 01:14:42 2006
@@ -39,8 +39,39 @@
#include
#include
#include
+
+#ifdef _WIN32 /* Native Windows port and MinGW */
+
+#define snprintf _snprintf
+#include
+#include
+#ifndef LDAPAPI
+#define LDAPAPI __cdecl
+#endif
+#ifdef LDAP_VERSION3
+#define LDAP_OPT_SUCCESS LDAP_SUCCESS
+/* Some tricks to allow dynamic bind with ldap_start_tls_s entry point at
+ run time.
+ */
+#undef ldap_start_tls_s
+#if LDAP_UNICODE
+#define LDAP_START_TLS_S "ldap_start_tls_sW"
+typedef WINLDAPAPI ULONG (LDAPAPI * PFldap_start_tls_s) (IN PLDAP, OUT PULONG, OUT LDAPMessage **, IN PLDAPControlW *, IN PLDAPControlW *);
+#else
+#define LDAP_START_TLS_S "ldap_start_tls_sA"
+typedef WINLDAPAPI ULONG (LDAPAPI * PFldap_start_tls_s) (IN PLDAP, OUT PULONG, OUT LDAPMessage **, IN PLDAPControlA *, IN PLDAPControlA *);
+#endif /* LDAP_UNICODE */
+PFldap_start_tls_s Win32_ldap_start_tls_s;
+#define ldap_start_tls_s(l,s,c) Win32_ldap_start_tls_s(l,NULL,NULL,s,c)
+#endif /* LDAP_VERSION3 */
+
+#else
+
#include
#include
+
+#endif
+
#if defined(LDAP_OPT_NETWORK_TIMEOUT)
#include
#endif
@@ -437,6 +468,23 @@
fprintf(stderr, "\tIf you need to bind as a user to perform searches then use the\n\t-D binddn -w bindpasswd or -D binddn -W secretfile options\n\n");
exit(1);
}
+
+/* On windows ldap_start_tls_s is available starting from Windows XP,
+ so we need to bind at run-time with the function entry point
+ */
+#ifdef _WIN32
+ if (use_tls) {
+
+ HMODULE WLDAP32Handle;
+
+ WLDAP32Handle = GetModuleHandle("wldap32");
+ if ((Win32_ldap_start_tls_s = (PFldap_start_tls_s) GetProcAddress(WLDAP32Handle, LDAP_START_TLS_S)) == NULL) {
+ fprintf( stderr, PROGRAM_NAME ": ERROR: TLS (-Z) not supported on this platform.\n");
+ exit(1);
+ }
+ }
+#endif
+
while (fgets(buf, 256, stdin) != NULL) {
char *tptr;
int found = 0;
Index: squid/helpers/external_acl/win32_group/.cvsignore
diff -u /dev/null squid/helpers/external_acl/win32_group/.cvsignore:1.1.2.1
--- /dev/null Thu Jan 1 01:00:00 1970
+++ squid/helpers/external_acl/win32_group/.cvsignore Sat Jun 29 06:21:45 2002
@@ -0,0 +1,2 @@
+.cvsignore
+Makefile.in
Index: squid/helpers/external_acl/win32_group/Makefile.am
diff -u /dev/null squid/helpers/external_acl/win32_group/Makefile.am:1.1.8.8
--- /dev/null Thu Jan 1 01:00:00 1970
+++ squid/helpers/external_acl/win32_group/Makefile.am Thu Sep 15 02:55:04 2005
@@ -0,0 +1,23 @@
+#
+# Makefile for the Squid Object Cache server
+#
+# $Id$
+#
+# Uncomment and customize the following to suit your needs:
+#
+
+
+libexec_PROGRAMS = win32_check_group
+
+win32_check_group_SOURCES = win32_check_group.c win32_check_group.h
+
+if ENABLE_MINGW32SPECIFIC
+INCLUDES = -I$(top_srcdir)/port/win32/include -I$(top_srcdir)/include -I$(top_srcdir)/src
+else
+INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/src
+endif
+
+LDADD = -L$(top_builddir)/lib -lmiscutil -lnetapi32 -ladvapi32 \
+ -lntdll $(XTRA_LIBS)
+
+EXTRA_DIST = readme.txt
Index: squid/helpers/external_acl/win32_group/readme.txt
diff -u /dev/null squid/helpers/external_acl/win32_group/readme.txt:1.1.8.12
--- /dev/null Thu Jan 1 01:00:00 1970
+++ squid/helpers/external_acl/win32_group/readme.txt Thu Sep 15 02:55:04 2005
@@ -0,0 +1,86 @@
+
+This is the readme.txt file for win32_check_group, an external
+helper fo the External ACL Scheme for Squid.
+
+
+This helper must be used in with an authentication scheme, tipically
+basic or NTLM, based on Windows NT/2000 domain users.
+It reads from the standard input the domain username and a list of groups
+and tries to match it against the groups membership of the specified
+username.
+
+
+==============
+Program Syntax
+==============
+
+win32_check_group [-D domain][-G][-P][-c][-d][-h]
+
+-D domain specify the default user's domain
+-G start helper in Domain Global Group mode
+-P use ONLY PDCs for group validation
+-c use case insensitive compare
+-d enable debugging
+-h this message
+
+
+================
+squid.conf usage
+================
+
+external_acl_type NT_global_group %LOGIN c:/squid/libexec/win32_check_group.exe -G
+external_acl_type NT_local_group %LOGIN c:/squid/libexec/win32_check_group.exe
+
+acl GProxyUsers external NT_global_group GProxyUsers
+acl LProxyUsers external NT_local_group LProxyUsers
+acl password proxy_auth REQUIRED
+
+http_access allow password GProxyUsers
+http_access allow password LProxyUsers
+http_access deny all
+
+In the previous example all validated NT users member of GProxyUsers Global
+domain group or member of LProxyUsers machine local group are allowed to
+use the cache.
+
+Groups with spaces in name, for example "Domain Users", must be quoted and
+the acl data ("Domain Users") must be placed into a separate file included
+by specifying "/path/to/file". The previous example will be:
+
+acl ProxyUsers external NT_global_group "c:/squid/etc/DomainUsers"
+
+and the DomainUsers files will contain only the following line:
+
+"Domain Users"
+
+NOTES:
+- The standard group name comparation is case sensitive, so group name
+ must be specified with same case as in the NT/2000 Domain.
+ It's possible to enable not case sensitive group name comparation (-c),
+ but on on some non - English locales, the results can be unexpected.
+- Native WIN32 NTLM and Basic Helpers must be used without the
+ -A & -D switches.
+
+Refer to Squid documentation for the more details on squid.conf.
+
+
+=======
+Testing
+=======
+
+I strongly urge that win32_check_group is tested prior to being used in a
+production environment. It may behave differently on different platforms.
+To test it, run it from the command line. Enter username and group
+pairs separated by a space (username must entered with domain\\username
+syntax). Press ENTER to get an OK or ERR message.
+Make sure pressing behaves the same as a carriage return.
+Make sure pressing aborts the program.
+
+Test that entering no details does not result in an OK or ERR message.
+Test that entering an invalid username and group results in an ERR message.
+Test that entering an valid username and group results in an OK message.
+
+--
+Serassio Guido
+squidnt at acmeconsulting dot it
+
Index: squid/helpers/external_acl/win32_group/win32_check_group.c
diff -u /dev/null squid/helpers/external_acl/win32_group/win32_check_group.c:1.1.8.21
--- /dev/null Thu Jan 1 01:00:00 1970
+++ squid/helpers/external_acl/win32_group/win32_check_group.c Thu Sep 15 02:55:04 2005
@@ -0,0 +1,644 @@
+/*
+ * win32_group: lookup group membership in a Windows NT/2000 domain
+ *
+ * (C)2002,2005 Guido Serassio - Acme Consulting S.r.l.
+ *
+ * Authors:
+ * Guido Serassio
+ * Acme Consulting S.r.l., Italy
+ *
+ * With contributions from others mentioned in the change history section
+ * below.
+ *
+ * In part based on check_group by Rodrigo Albani de Campos.
+ *
+ * Dependencies: Windows NT4 SP4 and later.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
+ *
+ * History:
+ *
+ * Version 1.22
+ * 08-07-2005 Guido Serassio
+ * Added -P option for force usage of PDCs for group validation.
+ * Added support for '/' char as domain separator.
+ * Fixed Bugzilla #1336.
+ * Version 1.21
+ * 23-04-2005 Guido Serassio
+ * Added -D option for specify default user's domain.
+ * Version 1.20
+ * 13-06-2004 Guido Serassio
+ * Added support for running on a Domain Controller.
+ * Version 1.10
+ * 01-05-2003 Guido Serassio
+ * Added option for case insensitive group name comparation.
+ * More debug info.
+ * Updated documentation.
+ * Segfault bug fix (Bugzilla #574)
+ * Version 1.0
+ * 24-06-2002 Guido Serassio
+ * Using the main function from check_group and sections
+ * from wbinfo wrote win32_group
+ *
+ * This is a helper for the external ACL interface for Squid Cache
+ *
+ * It reads from the standard input the domain username and a list of
+ * groups and tries to match it against the groups membership of the
+ * specified username.
+ *
+ * Returns `OK' if the user belongs to a group or `ERR' otherwise, as
+ * described on http://devel.squid-cache.org/external_acl/config.html
+ *
+ */
+
+#include "config.h"
+#ifdef _SQUID_CYGWIN_
+#include
+int _wcsicmp(const wchar_t*, const wchar_t*);
+#endif
+#if HAVE_STDIO_H
+#include
+#endif
+#if HAVE_CTYPE_H
+#include
+#endif
+#ifdef HAVE_STRING_H
+#include
+#endif
+#if HAVE_GETOPT_H
+#include
+#endif
+#undef assert
+#include
+#include
+#include
+#include
+
+#include "util.h"
+
+#define BUFSIZE 8192 /* the stdin buffer size */
+int use_global = 0;
+int use_PDC_only = 0;
+char debug_enabled = 0;
+char *myname;
+pid_t mypid;
+char * machinedomain;
+int use_case_insensitive_compare = 0;
+char * DefaultDomain = NULL;
+const char NTV_VALID_DOMAIN_SEPARATOR[] = "\\/";
+
+#include "win32_check_group.h"
+
+char *
+strwordtok(char *buf, char **t)
+{
+ unsigned char *word = NULL;
+ unsigned char *p = (unsigned char *) buf;
+ unsigned char *d;
+ unsigned char ch;
+ int quoted = 0;
+ if (!p)
+ p = (unsigned char *) *t;
+ if (!p)
+ goto error;
+ while (*p && isspace(*p))
+ p++;
+ if (!*p)
+ goto error;
+ word = d = p;
+ while ((ch = *p)) {
+ switch (ch) {
+ case '\\':
+ p++;
+ *d++ = ch = *p;
+ if (ch)
+ p++;
+ break;
+ case '"':
+ quoted = !quoted;
+ p++;
+ break;
+ default:
+ if (!quoted && isspace(*p)) {
+ p++;
+ goto done;
+ }
+ *d++ = *p++;
+ break;
+ }
+ }
+ done:
+ *d++ = '\0';
+ error:
+ *t = (char *) p;
+ return (char *) word;
+}
+
+
+char * AllocStrFromLSAStr(LSA_UNICODE_STRING LsaStr)
+{
+ size_t len;
+ static char * target;
+
+ len = LsaStr.Length/sizeof(WCHAR) + 1;
+
+ /* allocate buffer for str + null termination */
+ safe_free(target);
+ target = (char *)xmalloc(len);
+ if (target == NULL)
+ return NULL;
+
+ /* copy unicode buffer */
+ WideCharToMultiByte(CP_ACP, 0, LsaStr.Buffer, LsaStr.Length, target, len, NULL, NULL );
+
+ /* add null termination */
+ target[len-1] = '\0';
+ return target;
+}
+
+
+char * GetDomainName(void)
+
+{
+ LSA_HANDLE PolicyHandle;
+ LSA_OBJECT_ATTRIBUTES ObjectAttributes;
+ NTSTATUS status;
+ PPOLICY_PRIMARY_DOMAIN_INFO ppdiDomainInfo;
+ PWKSTA_INFO_100 pwkiWorkstationInfo;
+ DWORD netret;
+ char * DomainName = NULL;
+
+ /*
+ * Always initialize the object attributes to all zeroes.
+ */
+ memset(&ObjectAttributes, '\0', sizeof(ObjectAttributes));
+
+ /*
+ * You need the local workstation name. Use NetWkstaGetInfo at level
+ * 100 to retrieve a WKSTA_INFO_100 structure.
+ *
+ * The wki100_computername field contains a pointer to a UNICODE
+ * string containing the local computer name.
+ */
+ netret = NetWkstaGetInfo(NULL, 100, (LPBYTE *)&pwkiWorkstationInfo);
+ if (netret == NERR_Success) {
+ /*
+ * We have the workstation name in:
+ * pwkiWorkstationInfo->wki100_computername
+ *
+ * Next, open the policy object for the local system using
+ * the LsaOpenPolicy function.
+ */
+ status = LsaOpenPolicy(
+ NULL,
+ &ObjectAttributes,
+ GENERIC_READ | POLICY_VIEW_LOCAL_INFORMATION,
+ &PolicyHandle
+ );
+
+ /*
+ * Error checking.
+ */
+ if (status) {
+ debug("OpenPolicy Error: %ld\n", status);
+ } else {
+
+ /*
+ * You have a handle to the policy object. Now, get the
+ * domain information using LsaQueryInformationPolicy.
+ */
+ status = LsaQueryInformationPolicy(PolicyHandle,
+ PolicyPrimaryDomainInformation,
+ (PVOID *)&ppdiDomainInfo);
+ if (status) {
+ debug("LsaQueryInformationPolicy Error: %ld\n", status);
+ } else {
+
+ /* Get name in useable format */
+ DomainName = AllocStrFromLSAStr(ppdiDomainInfo->Name);
+
+ /*
+ * Check the Sid pointer, if it is null, the
+ * workstation is either a stand-alone computer
+ * or a member of a workgroup.
+ */
+ if (ppdiDomainInfo->Sid) {
+
+ /*
+ * Member of a domain. Display it in debug mode.
+ */
+ debug("Member of Domain %s\n",DomainName);
+ } else {
+ DomainName = NULL;
+ }
+ }
+ }
+
+ /*
+ * Clean up all the memory buffers created by the LSA and
+ * Net* APIs.
+ */
+ NetApiBufferFree(pwkiWorkstationInfo);
+ LsaFreeMemory((LPVOID)ppdiDomainInfo);
+ } else
+ debug("NetWkstaGetInfo Error: %ld\n", netret);
+ return DomainName;
+}
+
+/* returns 0 on match, -1 if no match */
+static int wcstrcmparray(const wchar_t *str, const char **array)
+{
+ WCHAR wszGroup[GNLEN+1]; // Unicode Group
+
+ while (*array) {
+ MultiByteToWideChar(CP_ACP, 0, *array,
+ strlen(*array) + 1, wszGroup, sizeof(wszGroup) / sizeof(wszGroup[0]));
+ debug("Windows group: %S, Squid group: %S\n", str, wszGroup);
+ if ((use_case_insensitive_compare ? _wcsicmp(str, wszGroup) : wcscmp(str, wszGroup)) == 0)
+ return 0;
+ array++;
+ }
+ return -1;
+}
+
+/* returns 1 on success, 0 on failure */
+int
+Valid_Local_Groups(char *UserName, const char **Groups)
+{
+ int result = 0;
+ char * Domain_Separator;
+ WCHAR wszUserName[UNLEN+1]; // Unicode user name
+
+ LPLOCALGROUP_USERS_INFO_0 pBuf = NULL;
+ LPLOCALGROUP_USERS_INFO_0 pTmpBuf;
+ DWORD dwLevel = 0;
+ DWORD dwFlags = LG_INCLUDE_INDIRECT;
+ DWORD dwPrefMaxLen = -1;
+ DWORD dwEntriesRead = 0;
+ DWORD dwTotalEntries = 0;
+ NET_API_STATUS nStatus;
+ DWORD i;
+ DWORD dwTotalCount = 0;
+
+ if ((Domain_Separator = strchr(UserName, '/')) != NULL)
+ *Domain_Separator = '\\';
+
+ debug("Valid_Local_Groups: checking group membership of '%s'.\n", UserName);
+
+/* Convert ANSI User Name and Group to Unicode */
+
+ MultiByteToWideChar(CP_ACP, 0, UserName,
+ strlen(UserName) + 1, wszUserName, sizeof(wszUserName) / sizeof(wszUserName[0]));
+
+ /*
+ * Call the NetUserGetLocalGroups function
+ * specifying information level 0.
+ *
+ * The LG_INCLUDE_INDIRECT flag specifies that the
+ * function should also return the names of the local
+ * groups in which the user is indirectly a member.
+ */
+ nStatus = NetUserGetLocalGroups(
+ NULL,
+ wszUserName,
+ dwLevel,
+ dwFlags,
+ (LPBYTE *) &pBuf,
+ dwPrefMaxLen,
+ &dwEntriesRead,
+ &dwTotalEntries);
+ /*
+ * If the call succeeds,
+ */
+ if (nStatus == NERR_Success) {
+ if ((pTmpBuf = pBuf) != NULL) {
+ for (i = 0; i < dwEntriesRead; i++) {
+ assert(pTmpBuf != NULL);
+ if (pTmpBuf == NULL) {
+ result = 0;
+ break;
+ }
+ if (wcstrcmparray(pTmpBuf->lgrui0_name, Groups) == 0) {
+ result = 1;
+ break;
+ }
+ pTmpBuf++;
+ dwTotalCount++;
+ }
+ }
+ } else
+ result = 0;
+/*
+ * Free the allocated memory.
+ */
+ if (pBuf != NULL)
+ NetApiBufferFree(pBuf);
+ return result;
+}
+
+
+/* returns 1 on success, 0 on failure */
+int
+Valid_Global_Groups(char *UserName, const char **Groups)
+{
+ int result = 0;
+ WCHAR wszUserName[UNLEN+1]; // Unicode user name
+ WCHAR wszLocalDomain[DNLEN+1]; // Unicode Local Domain
+ WCHAR wszUserDomain[DNLEN+1]; // Unicode User Domain
+
+ char NTDomain[DNLEN+UNLEN+2];
+ char *domain_qualify;
+ char User[UNLEN+1];
+ size_t j;
+
+ LPWSTR LclDCptr = NULL;
+ LPWSTR UsrDCptr = NULL;
+ LPGROUP_USERS_INFO_0 pUsrBuf = NULL;
+ LPGROUP_USERS_INFO_0 pTmpBuf;
+ LPSERVER_INFO_101 pSrvBuf = NULL;
+ DWORD dwLevel = 0;
+ DWORD dwPrefMaxLen = -1;
+ DWORD dwEntriesRead = 0;
+ DWORD dwTotalEntries = 0;
+ NET_API_STATUS nStatus;
+ DWORD i;
+ DWORD dwTotalCount = 0;
+
+ strncpy(NTDomain, UserName, sizeof(NTDomain));
+
+ for (j=0; j < strlen(NTV_VALID_DOMAIN_SEPARATOR); j++) {
+ if ((domain_qualify = strchr(NTDomain, NTV_VALID_DOMAIN_SEPARATOR[j])) != NULL)
+ break;
+ }
+ if (domain_qualify == NULL) {
+ strcpy(User, NTDomain);
+ strcpy(NTDomain, DefaultDomain);
+ } else {
+ strcpy(User, domain_qualify + 1);
+ domain_qualify[0] = '\0';
+ strlwr(NTDomain);
+ }
+
+ debug("Valid_Global_Groups: checking group membership of '%s\\%s'.\n", NTDomain, User);
+
+ /* Convert ANSI User Name and Group to Unicode */
+
+ MultiByteToWideChar(CP_ACP, 0, User,
+ strlen(User) + 1, wszUserName,
+ sizeof(wszUserName) / sizeof(wszUserName[0]));
+ MultiByteToWideChar(CP_ACP, 0, machinedomain,
+ strlen(machinedomain) + 1, wszLocalDomain, sizeof(wszLocalDomain) / sizeof(wszLocalDomain[0]));
+
+
+/* Call the NetServerGetInfo function for local computer, specifying level 101. */
+ dwLevel = 101;
+ nStatus = NetServerGetInfo(NULL, dwLevel, (LPBYTE *)&pSrvBuf);
+
+ if (nStatus == NERR_Success)
+ {
+ /* Check if we are running on a Domain Controller */
+ if ((pSrvBuf->sv101_type & SV_TYPE_DOMAIN_CTRL) ||
+ (pSrvBuf->sv101_type & SV_TYPE_DOMAIN_BAKCTRL))
+ {
+ LclDCptr = NULL;
+ debug("Running on a DC.\n");
+ }
+ else
+ nStatus = (use_PDC_only ? NetGetDCName(NULL, wszLocalDomain, (LPBYTE *) & LclDCptr) : NetGetAnyDCName(NULL, wszLocalDomain, (LPBYTE *) & LclDCptr));
+ } else {
+ fprintf(stderr, "%s NetServerGetInfo() failed.'\n", myname);
+ if (pSrvBuf != NULL)
+ NetApiBufferFree(pSrvBuf);
+ return result;
+ }
+
+ if (nStatus == NERR_Success) {
+ debug("Using '%S' as DC for '%S' local domain.\n", LclDCptr, wszLocalDomain);
+
+ if (strcmp(NTDomain, machinedomain) != 0) {
+ MultiByteToWideChar(CP_ACP, 0, NTDomain,
+ strlen(NTDomain) + 1, wszUserDomain, sizeof(wszUserDomain) / sizeof(wszUserDomain[0]));
+ nStatus = (use_PDC_only ? NetGetDCName(LclDCptr, wszUserDomain, (LPBYTE *) & UsrDCptr) : NetGetAnyDCName(LclDCptr, wszUserDomain, (LPBYTE *) & UsrDCptr));
+ if (nStatus != NERR_Success) {
+ fprintf(stderr, "%s Can't find DC for user's domain '%s'\n", myname, NTDomain);
+ if (pSrvBuf != NULL)
+ NetApiBufferFree(pSrvBuf);
+ if (LclDCptr != NULL)
+ NetApiBufferFree((LPVOID) LclDCptr);
+ if (UsrDCptr != NULL)
+ NetApiBufferFree((LPVOID) UsrDCptr);
+ return result;
+ }
+ } else
+ UsrDCptr = LclDCptr;
+
+ debug("Using '%S' as DC for '%s' user's domain.\n", UsrDCptr, NTDomain);
+ /*
+ * Call the NetUserGetGroups function
+ * specifying information level 0.
+ */
+ dwLevel = 0;
+ nStatus = NetUserGetGroups(UsrDCptr,
+ wszUserName,
+ dwLevel,
+ (LPBYTE *) & pUsrBuf,
+ dwPrefMaxLen,
+ &dwEntriesRead,
+ &dwTotalEntries);
+ /*
+ * If the call succeeds,
+ */
+ if (nStatus == NERR_Success) {
+ if ((pTmpBuf = pUsrBuf) != NULL) {
+ for (i = 0; i < dwEntriesRead; i++) {
+ assert(pTmpBuf != NULL);
+ if (pTmpBuf == NULL) {
+ result = 0;
+ break;
+ }
+ if (wcstrcmparray(pTmpBuf->grui0_name, Groups) == 0) {
+ result = 1;
+ break;
+ }
+ pTmpBuf++;
+ dwTotalCount++;
+ }
+ }
+ } else {
+ result = 0;
+ fprintf(stderr, "%s NetUserGetGroups() failed.'\n", myname);
+ }
+ } else {
+ fprintf(stderr, "%s Can't find DC for local domain '%s'\n", myname, machinedomain);
+ }
+ /*
+ * Free the allocated memory.
+ */
+ if (pSrvBuf != NULL)
+ NetApiBufferFree(pSrvBuf);
+ if (pUsrBuf != NULL)
+ NetApiBufferFree(pUsrBuf);
+ if ((UsrDCptr != NULL) && (UsrDCptr != LclDCptr))
+ NetApiBufferFree((LPVOID) UsrDCptr);
+ if (LclDCptr != NULL)
+ NetApiBufferFree((LPVOID) LclDCptr);
+ return result;
+}
+
+static void
+usage(char *program)
+{
+ fprintf(stderr,"Usage: %s [-D domain][-G][-P][-c][-d][-h]\n"
+ " -D default user Domain\n"
+ " -G enable Domain Global group mode\n"
+ " -P use ONLY PDCs for group validation\n"
+ " -c use case insensitive compare\n"
+ " -d enable debugging\n"
+ " -h this message\n",
+ program);
+}
+
+void
+process_options(int argc, char *argv[])
+{
+ int opt;
+
+ opterr = 0;
+ while (-1 != (opt = getopt(argc, argv, "D:GPcdh"))) {
+ switch (opt) {
+ case 'D':
+ DefaultDomain = xstrndup(optarg, DNLEN + 1);
+ strlwr(DefaultDomain);
+ break;
+ case 'G':
+ use_global = 1;
+ break;
+ case 'P':
+ use_PDC_only = 1;
+ break;
+ case 'c':
+ use_case_insensitive_compare = 1;
+ break;
+ case 'd':
+ debug_enabled = 1;
+ break;
+ case 'h':
+ usage(argv[0]);
+ exit(0);
+ case '?':
+ opt = optopt;
+ /* fall thru to default */
+ default:
+ fprintf(stderr, "%s Unknown option: -%c. Exiting\n", myname, opt);
+ usage(argv[0]);
+ exit(1);
+ break; /* not reached */
+ }
+ }
+ return;
+}
+
+
+int
+main (int argc, char *argv[])
+{
+ char *p, *t;
+ char buf[BUFSIZE];
+ char *username;
+ char *group;
+ int err = 0;
+ const char *groups[512];
+ int n;
+
+ if (argc > 0) { /* should always be true */
+ myname=strrchr(argv[0],'/');
+ if (myname==NULL)
+ myname=argv[0];
+ } else {
+ myname="(unknown)";
+ }
+ mypid=getpid();
+
+ setbuf(stdout, NULL);
+ setbuf(stderr, NULL);
+
+ /* Check Command Line */
+ process_options(argc, argv);
+
+ if (use_global) {
+ if ((machinedomain = GetDomainName()) == NULL) {
+ fprintf(stderr, "%s Can't read machine domain\n", myname);
+ exit(1);
+ }
+ strlwr(machinedomain);
+ if (!DefaultDomain)
+ DefaultDomain = xstrdup(machinedomain);
+ }
+
+ debug("External ACL win32 group helper build " __DATE__ ", " __TIME__
+ " starting up...\n");
+ if (use_global)
+ debug("Domain Global group mode enabled using '%s' as default domain.\n", DefaultDomain);
+ if (use_case_insensitive_compare)
+ debug("Warning: running in case insensitive mode !!!\n");
+ if (use_PDC_only)
+ debug("Warning: using only PDCs for group validation !!!\n");
+
+ /* Main Loop */
+ while (fgets (buf, sizeof(buf), stdin))
+ {
+ if (NULL == strchr(buf, '\n')) {
+ /* too large message received.. skip and deny */
+ fprintf(stderr, "%s: ERROR: Too large: %s\n", argv[0], buf);
+ while (fgets(buf, sizeof(buf), stdin)) {
+ fprintf(stderr, "%s: ERROR: Too large..: %s\n", argv[0], buf);
+ if (strchr(buf, '\n') != NULL)
+ break;
+ }
+ goto error;
+ }
+
+ if ((p = strchr(buf, '\n')) != NULL)
+ *p = '\0'; /* strip \n */
+ if ((p = strchr(buf, '\r')) != NULL)
+ *p = '\0'; /* strip \r */
+
+ debug("Got '%s' from Squid (length: %d).\n",buf,strlen(buf));
+
+ if (buf[0] == '\0') {
+ fprintf(stderr, "Invalid Request\n");
+ goto error;
+ }
+
+ username = strwordtok(buf, &t);
+ for (n = 0; (group = strwordtok(NULL, &t)) != NULL; n++)
+ groups[n] = group;
+ groups[n] = NULL;
+
+ if (NULL == username) {
+ fprintf(stderr, "Invalid Request\n");
+ goto error;
+ }
+
+ if ((use_global ? Valid_Global_Groups(username, groups) : Valid_Local_Groups(username, groups))) {
+ printf ("OK\n");
+ } else {
+error:
+ printf ("ERR\n");
+ }
+ err = 0;
+ }
+ return 0;
+}
Index: squid/helpers/external_acl/win32_group/win32_check_group.h
diff -u /dev/null squid/helpers/external_acl/win32_group/win32_check_group.h:1.1.6.4
--- /dev/null Thu Jan 1 01:00:00 1970
+++ squid/helpers/external_acl/win32_group/win32_check_group.h Mon Apr 25 06:28:30 2005
@@ -0,0 +1,79 @@
+/*
+ * (C) 2002, 2005 Guido Serassio
+ * Based on previous work of Francesco Chemolli, Robert Collins and Andrew Doran
+ *
+ * Distributed freely under the terms of the GNU General Public License,
+ * version 2. See the file COPYING for licensing details
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
+ */
+
+#undef debug
+
+/************* CONFIGURATION ***************/
+/*
+ * define this if you want debugging
+ */
+#ifndef DEBUG
+#define DEBUG
+#endif
+
+/************* END CONFIGURATION ***************/
+
+#include
+
+#define safe_free(x) if (x) { free(x); x = NULL; }
+
+/* Debugging stuff */
+
+#ifdef __GNUC__ /* this is really a gcc-ism */
+#ifdef DEBUG
+#include
+#include
+static char *__foo;
+extern char debug_enabled;
+#define debug(X...) if (debug_enabled) { \
+ fprintf(stderr,"%s[%d](%s:%d): ", myname, mypid, \
+ ((__foo=strrchr(__FILE__,'/'))==NULL?__FILE__:__foo+1),\
+ __LINE__);\
+ fprintf(stderr,X); }
+#else /* DEBUG */
+#define debug(X...) /* */
+#endif /* DEBUG */
+#else /* __GNUC__ */
+extern char debug_enabled;
+static void
+debug(char *format,...)
+{
+#ifdef DEBUG
+#ifdef _SQUID_MSWIN_
+ if (debug_enabled) {
+ va_list args;
+
+ va_start(args,format);
+ fprintf(stderr, "%s[%d]: ", myname, mypid);
+ vfprintf(stderr, format, args);
+ fprintf(stderr, "\n");
+ va_end(args);
+ }
+#endif /* _SQUID_MSWIN_ */
+#endif /* DEBUG */
+}
+#endif /* __GNUC__ */
+
+
+/* A couple of harmless helper macros */
+#define SEND(X) debug("sending '%s' to squid\n",X); printf(X "\n");
+#ifdef __GNUC__
+#define SEND2(X,Y...) debug("sending '" X "' to squid\n",Y); printf(X "\n",Y);
+#else
+/* no gcc, no debugging. varargs macros are a gcc extension */
+#define SEND2(X,Y) debug("sending '" X "' to squid\n",Y); printf(X "\n",Y);
+#endif
Index: squid/helpers/ntlm_auth/Makefile.am
diff -u squid/helpers/ntlm_auth/Makefile.am:1.1.2.1 squid/helpers/ntlm_auth/Makefile.am:1.2.8.1
--- squid/helpers/ntlm_auth/Makefile.am:1.1.2.1 Fri Jun 28 07:46:21 2002
+++ squid/helpers/ntlm_auth/Makefile.am Sat Jun 29 04:05:59 2002
@@ -3,5 +3,5 @@
# $Id$
#
-DIST_SUBDIRS = fakeauth no_check SMB winbind
+DIST_SUBDIRS = fakeauth no_check SMB winbind NTLMSSP-WIN32
SUBDIRS = @NTLM_AUTH_HELPERS@
Index: squid/helpers/ntlm_auth/NTLMSSP-WIN32/.cvsignore
diff -u /dev/null squid/helpers/ntlm_auth/NTLMSSP-WIN32/.cvsignore:1.1.4.1
--- /dev/null Thu Jan 1 01:00:00 1970
+++ squid/helpers/ntlm_auth/NTLMSSP-WIN32/.cvsignore Sat Jun 29 04:05:59 2002
@@ -0,0 +1,2 @@
+.cvsignore
+Makefile.in
Index: squid/helpers/ntlm_auth/NTLMSSP-WIN32/Makefile.am
diff -u /dev/null squid/helpers/ntlm_auth/NTLMSSP-WIN32/Makefile.am:1.1.4.5
--- /dev/null Thu Jan 1 01:00:00 1970
+++ squid/helpers/ntlm_auth/NTLMSSP-WIN32/Makefile.am Sun Oct 10 12:25:34 2004
@@ -0,0 +1,20 @@
+#
+# Makefile for the Squid Object Cache server
+#
+# $Id$
+#
+
+libexec_PROGRAMS = win32_ntlm_auth
+
+win32_ntlm_auth_SOURCES = libntlmssp.c ntlm_auth.c ntlm.h
+
+if ENABLE_MINGW32SPECIFIC
+INCLUDES = -I. -I$(top_srcdir)/port/win32/include -I$(top_srcdir)/include -I$(top_srcdir)/src
+else
+INCLUDES = -I. -I$(top_srcdir)/include -I$(top_srcdir)/src
+endif
+
+LDADD = -L$(top_builddir)/lib -lntlmauth -lsspwin32 -lnetapi32 \
+ -ladvapi32 -lmiscutil $(CRYPTLIB) $(XTRA_LIBS)
+
+EXTRA_DIST = readme.txt
Index: squid/helpers/ntlm_auth/NTLMSSP-WIN32/libntlmssp.c
diff -u /dev/null squid/helpers/ntlm_auth/NTLMSSP-WIN32/libntlmssp.c:1.1.4.11
--- /dev/null Thu Jan 1 01:00:00 1970
+++ squid/helpers/ntlm_auth/NTLMSSP-WIN32/libntlmssp.c Fri Sep 16 00:57:13 2005
@@ -0,0 +1,379 @@
+/*
+ * (C) 2002 Guido Serassio
+ * Based on previous work of Francesco Chemolli and Robert Collins
+ * Distributed freely under the terms of the GNU General Public License,
+ * version 2. See the file COPYING for licensing details
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
+ */
+
+typedef unsigned char uchar;
+
+#include "util.h"
+#include "ntlm.h"
+#if HAVE_CTYPE_H
+#include
+#endif
+#include
+#include
+
+/* returns 1 on success, 0 on failure */
+int
+Valid_Group(char *UserName, char *Group)
+{
+ int result = FALSE;
+ WCHAR wszUserName[UNLEN+1]; // Unicode user name
+ WCHAR wszGroup[GNLEN+1]; // Unicode Group
+
+ LPLOCALGROUP_USERS_INFO_0 pBuf = NULL;
+ LPLOCALGROUP_USERS_INFO_0 pTmpBuf;
+ DWORD dwLevel = 0;
+ DWORD dwFlags = LG_INCLUDE_INDIRECT;
+ DWORD dwPrefMaxLen = -1;
+ DWORD dwEntriesRead = 0;
+ DWORD dwTotalEntries = 0;
+ NET_API_STATUS nStatus;
+ DWORD i;
+ DWORD dwTotalCount = 0;
+
+/* Convert ANSI User Name and Group to Unicode */
+
+ MultiByteToWideChar(CP_ACP, 0, UserName,
+ strlen(UserName) + 1, wszUserName,
+ sizeof(wszUserName) / sizeof(wszUserName[0]));
+ MultiByteToWideChar(CP_ACP, 0, Group,
+ strlen(Group) + 1, wszGroup, sizeof(wszGroup) / sizeof(wszGroup[0]));
+
+ /*
+ * Call the NetUserGetLocalGroups function
+ * specifying information level 0.
+ *
+ * The LG_INCLUDE_INDIRECT flag specifies that the
+ * function should also return the names of the local
+ * groups in which the user is indirectly a member.
+ */
+ nStatus = NetUserGetLocalGroups(NULL,
+ wszUserName,
+ dwLevel,
+ dwFlags,
+ (LPBYTE *) & pBuf, dwPrefMaxLen, &dwEntriesRead, &dwTotalEntries);
+ /*
+ * If the call succeeds,
+ */
+ if (nStatus == NERR_Success) {
+ if ((pTmpBuf = pBuf) != NULL) {
+ for (i = 0; i < dwEntriesRead; i++) {
+ if (pTmpBuf == NULL) {
+ result = FALSE;
+ break;
+ }
+ if (wcscmp(pTmpBuf->lgrui0_name, wszGroup) == 0) {
+ result = TRUE;
+ break;
+ }
+ pTmpBuf++;
+ dwTotalCount++;
+ }
+ }
+ } else
+ result = FALSE;
+/*
+ * Free the allocated memory.
+ */
+ if (pBuf != NULL)
+ NetApiBufferFree(pBuf);
+ return result;
+}
+
+
+char * AllocStrFromLSAStr(LSA_UNICODE_STRING LsaStr)
+{
+ size_t len;
+ static char * target;
+
+ len = LsaStr.Length/sizeof(WCHAR) + 1;
+
+ /* allocate buffer for str + null termination */
+ safe_free(target);
+ target = (char *)xmalloc(len);
+ if (target == NULL)
+ return NULL;
+
+ /* copy unicode buffer */
+ WideCharToMultiByte(CP_ACP, 0, LsaStr.Buffer, LsaStr.Length, target, len, NULL, NULL );
+
+ /* add null termination */
+ target[len-1] = '\0';
+ return target;
+}
+
+
+char * GetDomainName(void)
+
+{
+ LSA_HANDLE PolicyHandle;
+ LSA_OBJECT_ATTRIBUTES ObjectAttributes;
+ NTSTATUS status;
+ PPOLICY_PRIMARY_DOMAIN_INFO ppdiDomainInfo;
+ PWKSTA_INFO_100 pwkiWorkstationInfo;
+ DWORD netret;
+ char * DomainName = NULL;
+
+ /*
+ * Always initialize the object attributes to all zeroes.
+ */
+ memset(&ObjectAttributes, '\0', sizeof(ObjectAttributes));
+
+ /*
+ * You need the local workstation name. Use NetWkstaGetInfo at level
+ * 100 to retrieve a WKSTA_INFO_100 structure.
+ *
+ * The wki100_computername field contains a pointer to a UNICODE
+ * string containing the local computer name.
+ */
+ netret = NetWkstaGetInfo(NULL, 100, (LPBYTE *)&pwkiWorkstationInfo);
+ if (netret == NERR_Success) {
+ /*
+ * We have the workstation name in:
+ * pwkiWorkstationInfo->wki100_computername
+ *
+ * Next, open the policy object for the local system using
+ * the LsaOpenPolicy function.
+ */
+ status = LsaOpenPolicy(
+ NULL,
+ &ObjectAttributes,
+ GENERIC_READ | POLICY_VIEW_LOCAL_INFORMATION,
+ &PolicyHandle
+ );
+
+ /*
+ * Error checking.
+ */
+ if (status) {
+ debug("OpenPolicy Error: %ld\n", status);
+ } else {
+
+ /*
+ * You have a handle to the policy object. Now, get the
+ * domain information using LsaQueryInformationPolicy.
+ */
+ status = LsaQueryInformationPolicy(PolicyHandle,
+ PolicyPrimaryDomainInformation,
+ (void **)&ppdiDomainInfo);
+ if (status) {
+ debug("LsaQueryInformationPolicy Error: %ld\n", status);
+ } else {
+
+ /* Get name in useable format */
+ DomainName = AllocStrFromLSAStr(ppdiDomainInfo->Name);
+
+ /*
+ * Check the Sid pointer, if it is null, the
+ * workstation is either a stand-alone computer
+ * or a member of a workgroup.
+ */
+ if (ppdiDomainInfo->Sid) {
+
+ /*
+ * Member of a domain. Display it in debug mode.
+ */
+ debug("Member of Domain %s\n",DomainName);
+ } else {
+ DomainName = NULL;
+ }
+ }
+ }
+
+ /*
+ * Clean up all the memory buffers created by the LSA and
+ * Net* APIs.
+ */
+ NetApiBufferFree(pwkiWorkstationInfo);
+ LsaFreeMemory((LPVOID)ppdiDomainInfo);
+ } else
+ debug("NetWkstaGetInfo Error: %ld\n", netret);
+ return DomainName;
+}
+
+
+int ntlm_errno;
+
+
+/* returns NULL on failure, or a pointer to
+ * the user's credentials (domain\\username)
+ * upon success. WARNING. It's pointing to static storage.
+ * In case of problem sets as side-effect ntlm_errno to one of the
+ * codes defined in ntlm.h
+ */
+char *
+ntlm_check_auth(ntlm_authenticate * auth, int auth_length)
+{
+ int rv;
+ char domain[DNLEN+1];
+ char user[UNLEN+1];
+ static char credentials[DNLEN+UNLEN+2]; /* we can afford to waste */
+
+ lstring tmp;
+
+ if (!NTLM_LocalCall) {
+
+ tmp = ntlm_fetch_string((char *) auth, auth_length, &auth->domain);
+
+ if (tmp.str == NULL || tmp.l == 0) {
+ debug("No domain supplied. Returning no-auth\n");
+ ntlm_errno = NTLM_BAD_REQUEST;
+ return NULL;
+ }
+ if (Use_Unicode) {
+ /* copy unicode buffer */
+ WideCharToMultiByte(CP_ACP, 0, (LPCWSTR) tmp.str, tmp.l, domain, DNLEN, NULL, NULL );
+ /* add null termination */
+ domain[tmp.l / sizeof(WCHAR)] = '\0';
+ } else {
+ if (tmp.l > DNLEN) {
+ debug("Domain string exceeds %d bytes, rejecting\n", DNLEN);
+ ntlm_errno = NTLM_BAD_REQUEST;
+ return NULL;
+ }
+ memcpy(domain, tmp.str, tmp.l);
+ domain[tmp.l] = '\0';
+ }
+ tmp = ntlm_fetch_string((char *) auth, auth_length, &auth->user);
+ if (tmp.str == NULL || tmp.l == 0) {
+ debug("No username supplied. Returning no-auth\n");
+ ntlm_errno = NTLM_BAD_REQUEST;
+ return NULL;
+ }
+ if (Use_Unicode) {
+ /* copy unicode buffer */
+ WideCharToMultiByte(CP_ACP, 0, (LPCWSTR) tmp.str, tmp.l, user, UNLEN, NULL, NULL );
+ /* add null termination */
+ user[tmp.l / sizeof(WCHAR)] = '\0';
+ } else {
+ if (tmp.l > UNLEN) {
+ debug("Username string exceeds %d bytes, rejecting\n", UNLEN);
+ ntlm_errno = NTLM_BAD_REQUEST;
+ return NULL;
+ }
+ memcpy(user, tmp.str, tmp.l);
+ user[tmp.l] = '\0';
+ }
+ debug("checking domain: '%s', user: '%s'\n", domain, user);
+
+ } else
+ debug("checking local user\n");
+
+ rv = SSP_ValidateCredentials(auth, auth_length, credentials);
+
+ debug("Login attempt had result %d\n", rv);
+
+ if (!rv) { /* failed */
+ ntlm_errno = NTLM_SSPI_ERROR;
+ return NULL;
+ }
+
+ if (UseAllowedGroup) {
+ if (!Valid_Group(credentials, NTAllowedGroup)) {
+ ntlm_errno = NTLM_BAD_NTGROUP;
+ debug("User %s not in allowed Group %s\n", credentials, NTAllowedGroup);
+ return NULL;
+ }
+ }
+ if (UseDisallowedGroup) {
+ if (Valid_Group(credentials, NTDisAllowedGroup)) {
+ ntlm_errno = NTLM_BAD_NTGROUP;
+ debug("User %s is in denied Group %s\n", credentials, NTDisAllowedGroup);
+ return NULL;
+ }
+ }
+
+ debug("credentials: %s\n", credentials);
+ return credentials;
+}
+
+
+const char *
+ntlm_make_negotiate(void)
+{
+ ntlm_negotiate ne;
+ const char *encoded;
+ memset(&ne, 0, sizeof(ntlm_negotiate)); /* reset */
+ memcpy(ne.signature, "NTLMSSP", 8); /* set the signature */
+ ne.type = WSWAP(NTLM_NEGOTIATE); /* this is a challenge */
+ ne.flags = WSWAP(
+ NEGOTIATE_ALWAYS_SIGN |
+ NEGOTIATE_USE_NTLM |
+ NEGOTIATE_USE_LM |
+ NEGOTIATE_ASCII |
+ 0
+ );
+ encoded = base64_encode_bin((char *) &ne, NEGOTIATE_LENGTH);
+ debug("Negotiate packet not supplied - self generated\n");
+ return encoded;
+}
+
+
+void hex_dump(void *data, int size)
+{
+ /* dumps size bytes of *data to stdout. Looks like:
+ * [0000] 75 6E 6B 6E 6F 77 6E 20
+ * 30 FF 00 00 00 00 39 00 unknown 0.....9.
+ * (in a single line of course)
+ */
+
+ if (debug_enabled) {
+ unsigned char *p = data;
+ unsigned char c;
+ int n;
+ char bytestr[4] = {0};
+ char addrstr[10] = {0};
+ char hexstr[ 16*3 + 5] = {0};
+ char charstr[16*1 + 5] = {0};
+ for(n=1;n<=size;n++) {
+ if (n%16 == 1) {
+ /* store address for this line */
+ snprintf(addrstr, sizeof(addrstr), "%.4x",
+ ((unsigned int)p-(unsigned int)data) );
+ }
+
+ c = *p;
+ if (isalnum(c) == 0) {
+ c = '.';
+ }
+
+ /* store hex str (for left side) */
+ snprintf(bytestr, sizeof(bytestr), "%02X ", *p);
+ strncat(hexstr, bytestr, sizeof(hexstr)-strlen(hexstr)-1);
+
+ /* store char str (for right side) */
+ snprintf(bytestr, sizeof(bytestr), "%c", c);
+ strncat(charstr, bytestr, sizeof(charstr)-strlen(charstr)-1);
+
+ if(n%16 == 0) {
+ /* line completed */
+ fprintf(stderr, "[%4.4s] %-50.50s %s\n", addrstr, hexstr, charstr);
+ hexstr[0] = 0;
+ charstr[0] = 0;
+ } else if(n%8 == 0) {
+ /* half line: add whitespaces */
+ strncat(hexstr, " ", sizeof(hexstr)-strlen(hexstr)-1);
+ strncat(charstr, " ", sizeof(charstr)-strlen(charstr)-1);
+ }
+ p++; /* next byte */
+ }
+
+ if (strlen(hexstr) > 0) {
+ /* print rest of buffer if not empty */
+ fprintf(stderr, "[%4.4s] %-50.50s %s\n", addrstr, hexstr, charstr);
+ }
+ }
+}
+
Index: squid/helpers/ntlm_auth/NTLMSSP-WIN32/ntlm.h
diff -u /dev/null squid/helpers/ntlm_auth/NTLMSSP-WIN32/ntlm.h:1.1.4.9
--- /dev/null Thu Jan 1 01:00:00 1970
+++ squid/helpers/ntlm_auth/NTLMSSP-WIN32/ntlm.h Fri Sep 16 00:57:13 2005
@@ -0,0 +1,115 @@
+/*
+ * (C) 2002 Guido Serassio
+ * Based on previous work of Francesco Chemolli, Robert Collins and Andrew Doran
+ *
+ * Distributed freely under the terms of the GNU General Public License,
+ * version 2. See the file COPYING for licensing details
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
+ */
+
+#ifndef _NTLM_H_
+#define _NTLM_H_
+
+#include "sspwin32.h"
+#include
+#include
+#include
+#include "ntlmauth.h"
+#undef debug
+
+/************* CONFIGURATION ***************/
+/*
+ * define this if you want debugging
+ */
+#ifndef DEBUG
+#define DEBUG
+#endif
+
+#define FAIL_DEBUG 0
+
+/************* END CONFIGURATION ***************/
+
+#include
+
+extern int debug_enabled;
+#ifdef FAIL_DEBUG
+extern int fail_debug_enabled;
+#endif
+
+/* Debugging stuff */
+
+#ifdef __GNUC__ /* this is really a gcc-ism */
+#ifdef DEBUG
+#include
+#include
+static char *__foo;
+#define debug(X...) if (debug_enabled) { \
+ fprintf(stderr,"ntlm-auth[%d](%s:%d): ", getpid(), \
+ ((__foo=strrchr(__FILE__,'/'))==NULL?__FILE__:__foo+1),\
+ __LINE__);\
+ fprintf(stderr,X); }
+#else /* DEBUG */
+#define debug(X...) /* */
+#endif /* DEBUG */
+#else /* __GNUC__ */
+static void
+debug(char *format,...)
+{
+#ifdef DEBUG
+#ifdef _SQUID_MSWIN_
+ if (debug_enabled || fail_debug_enabled) {
+ va_list args;
+
+ va_start(args,format);
+ fprintf(stderr, "ntlm-auth[%d]: ",getpid());
+ vfprintf(stderr, format, args);
+ va_end(args);
+#ifdef FAIL_DEBUG
+ fail_debug_enabled = 0;
+#endif
+ }
+#endif /* _SQUID_MSWIN_ */
+#endif /* DEBUG */
+}
+#endif /* __GNUC__ */
+
+
+/* A couple of harmless helper macros */
+#define SEND(X) debug("sending '%s' to squid\n",X); printf(X "\n");
+#ifdef __GNUC__
+#define SEND2(X,Y...) debug("sending '" X "' to squid\n",Y); printf(X "\n",Y);
+#else
+/* no gcc, no debugging. varargs macros are a gcc extension */
+#define SEND2(X,Y) debug("sending '" X "' to squid\n",Y); printf(X "\n",Y);
+#endif
+
+extern char * NTAllowedGroup;
+extern char * NTDisAllowedGroup;
+extern int UseDisallowedGroup;
+extern int UseAllowedGroup;
+extern int ntlm_errno;
+
+#define NTLM_NO_ERROR 0
+#define NTLM_SSPI_ERROR 1
+#define NTLM_BAD_NTGROUP 2
+#define NTLM_BAD_REQUEST 3
+
+#define NEGOTIATE_LENGTH 16
+
+extern void uc(char *);
+
+extern const char * ntlm_make_negotiate(void);
+extern char *ntlm_check_auth(ntlm_authenticate * auth, int auth_length);
+extern void hex_dump(void *, int);
+
+#define safe_free(x) if (x) { free(x); x = NULL; }
+
+#endif /* _NTLM_H_ */
Index: squid/helpers/ntlm_auth/NTLMSSP-WIN32/ntlm_auth.c
diff -u /dev/null squid/helpers/ntlm_auth/NTLMSSP-WIN32/ntlm_auth.c:1.1.4.20
--- /dev/null Thu Jan 1 01:00:00 1970
+++ squid/helpers/ntlm_auth/NTLMSSP-WIN32/ntlm_auth.c Fri Sep 16 00:57:13 2005
@@ -0,0 +1,421 @@
+/*
+ * win32_ntlm_auth: helper for NTLM Authentication for Squid Cache
+ *
+ * (C)2002,2003 Guido Serassio - Acme Consulting S.r.l.
+ *
+ * Authors:
+ * Guido Serassio
+ * Acme Consulting S.r.l., Italy
+ *
+ * With contributions from others mentioned in the change history section
+ * below.
+ *
+ * Based on previous work of Francesco Chemolli and Robert Collins.
+ *
+ * Dependencies: Windows NT4 SP4 and later.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
+ *
+ * History:
+ *
+ * Version 1.21
+ * 21-02-2004 Guido Serassio
+ * Removed control of use of NTLM NEGOTIATE packet from
+ * command line, now the support is automatic.
+ * Version 1.20
+ * 30-11-2003 Guido Serassio
+ * Added support for NTLM local calls.
+ * Added control of use of NTLM NEGOTIATE packet from
+ * command line.
+ * Updated documentation.
+ * Version 1.10
+ * 07-09-2003 Guido Serassio
+ * Now is true NTLM authenticator.
+ * More debug info.
+ * Updated documentation.
+ * Version 1.0
+ * 29-06-2002 Guido Serassio
+ * First release.
+ *
+ *
+ */
+
+#include "util.h"
+#if HAVE_GETOPT_H
+#include
+#endif
+#include "ntlm.h"
+#if HAVE_CTYPE_H
+#include
+#endif
+
+#define BUFFER_SIZE 10240
+
+#ifdef NTLM_FAIL_OPEN
+int last_ditch_enabled = 0;
+#endif
+
+int debug_enabled = 0;
+int NTLM_packet_debug_enabled = 0;
+
+static int have_challenge;
+
+char * NTAllowedGroup;
+char * NTDisAllowedGroup;
+int UseDisallowedGroup = 0;
+int UseAllowedGroup = 0;
+#ifdef FAIL_DEBUG
+int fail_debug_enabled = 0;
+#endif
+
+/* makes a null-terminated string upper-case. Changes CONTENTS! */
+void
+uc(char *string)
+{
+ char *p = string, c;
+ while ((c = *p)) {
+ *p = toupper(c);
+ p++;
+ }
+}
+
+/* makes a null-terminated string lower-case. Changes CONTENTS! */
+static void
+lc(char *string)
+{
+ char *p = string, c;
+ while ((c = *p)) {
+ *p = tolower(c);
+ p++;
+ }
+}
+
+void
+helperfail(const char *reason)
+{
+#ifdef FAIL_DEBUG
+ fail_debug_enabled =1;
+#endif
+ SEND2("BH %s", reason);
+}
+
+/*
+ options:
+ -d enable debugging.
+ -v enable verbose NTLM packet debugging.
+ -l if specified, changes behavior on failures to last-ditch.
+ -A can specify a Windows Local Group name allowed to authenticate.
+ -D can specify a Windows Local Group name not allowed to authenticate.
+ */
+char *my_program_name = NULL;
+
+void
+usage()
+{
+ fprintf(stderr,
+#ifdef NTLM_FAIL_OPEN
+ "Usage: %s [-d] [-v] [-A|D LocalUserGroup] [-l] [-h]\n"
+#else
+ "Usage: %s [-d] [-v] [-A|D LocalUserGroup] [-h]\n"
+#endif
+ " -d enable debugging.\n"
+ " -v enable verbose NTLM packet debugging.\n"
+#ifdef NTLM_FAIL_OPEN
+ " -l if specified, changes behavior on failures to last-ditch\n"
+#endif
+ " -A specify a Windows Local Group name allowed to authenticate\n"
+ " -D specify a Windows Local Group name not allowed to authenticate\n"
+ " -h this message\n\n",
+ my_program_name);
+}
+
+
+void
+process_options(int argc, char *argv[])
+{
+ int opt, had_error = 0;
+
+ opterr =0;
+#ifdef NTLM_FAIL_OPEN
+ while (-1 != (opt = getopt(argc, argv, "hdvlA:D:"))) {
+#else
+ while (-1 != (opt = getopt(argc, argv, "hdvA:D:"))) {
+#endif
+ switch (opt) {
+ case 'A':
+ safe_free(NTAllowedGroup);
+ NTAllowedGroup=xstrdup(optarg);
+ UseAllowedGroup = 1;
+ break;
+ case 'D':
+ safe_free(NTDisAllowedGroup);
+ NTDisAllowedGroup=xstrdup(optarg);
+ UseDisallowedGroup = 1;
+ break;
+#ifdef NTLM_FAIL_OPEN
+ case 'l':
+ last_ditch_enabled = 1;
+ break;
+#endif
+ case 'd':
+ debug_enabled = 1;
+ break;
+ case 'v':
+ debug_enabled = 1;
+ NTLM_packet_debug_enabled = 1;
+ break;
+ case 'h':
+ usage();
+ exit(0);
+ case '?':
+ opt = optopt;
+ /* fall thru to default */
+ default:
+ fprintf(stderr, "unknown option: -%c. Exiting\n", opt);
+ usage();
+ had_error = 1;
+ }
+ }
+ if (had_error)
+ exit(1);
+}
+
+
+const char *
+obtain_challenge(ntlm_negotiate * nego, int nego_length)
+{
+ const char *ch = NULL;
+
+ debug("attempting SSPI challenge retrieval\n");
+ ch = SSP_MakeChallenge(nego, nego_length);
+ if (ch) {
+ debug("Got it\n");
+ return ch; /* All went OK, returning */
+ }
+ return NULL;
+}
+
+
+int
+manage_request()
+{
+ ntlmhdr *fast_header;
+ char buf[BUFFER_SIZE];
+ char helper_command[3];
+ char *c, *decoded, *cred;
+ int plen;
+ int oversized = 0;
+ char * ErrorMessage;
+
+try_again:
+ if (fgets(buf, BUFFER_SIZE, stdin) == NULL)
+ return 0;
+
+ c = memchr(buf, '\n', BUFFER_SIZE); /* safer against overrun than strchr */
+ if (c) {
+ if (oversized) {
+ helperfail("illegal request received");
+ fprintf(stderr, "Illegal request received: '%s'\n", buf);
+ return 1;
+ }
+ *c = '\0';
+ } else {
+ fprintf(stderr, "No newline in '%s'\n", buf);
+ oversized = 1;
+ goto try_again;
+ }
+ if ((strlen(buf) > 3) && NTLM_packet_debug_enabled) {
+ decoded = base64_decode(buf + 3);
+ strncpy(helper_command, buf, 2);
+ debug("Got '%s' from Squid with data:\n", helper_command);
+ hex_dump(decoded, ((strlen(buf) - 3) * 3) / 4);
+ } else
+ debug("Got '%s' from Squid\n", buf);
+ if (memcmp(buf, "YR", 2) == 0) { /* refresh-request */
+ /* figure out what we got */
+ if (strlen(buf) > 3)
+ decoded = base64_decode(buf + 3);
+ else
+ decoded = base64_decode(ntlm_make_negotiate());
+ /* Note: we don't need to manage memory at this point, since
+ * base64_decode returns a pointer to static storage.
+ */
+ if (!decoded) { /* decoding failure, return error */
+ SEND("NA Packet format error, couldn't base64-decode");
+ return 1;
+ }
+ /* fast-track-decode request type. */
+ fast_header = (struct _ntlmhdr *) decoded;
+
+ /* sanity-check: it IS a NTLMSSP packet, isn't it? */
+ if (memcmp(fast_header->signature, "NTLMSSP", 8) != 0) {
+ SEND("NA Broken authentication packet");
+ return 1;
+ }
+ switch (fast_header->type) {
+ case NTLM_NEGOTIATE:
+ /* Obtain challenge against SSPI */
+ if (strlen(buf) > 3)
+ plen = (strlen(buf) - 3) * 3 / 4; /* we only need it here. Optimization */
+ else
+ plen = NEGOTIATE_LENGTH;
+ if ((c = (char *) obtain_challenge((ntlm_negotiate *) decoded, plen)) != NULL )
+ {
+ if (NTLM_packet_debug_enabled) {
+ printf("TT %s\n",c);
+ decoded = base64_decode(c);
+ debug("sending 'TT' to squid with data:\n");
+ hex_dump(decoded, (strlen(c) * 3) / 4);
+ if (NTLM_LocalCall)
+ debug("NTLM Local Call detected\n");
+ } else {
+ SEND2("TT %s", c);
+ }
+ have_challenge = 1;
+ } else
+ helperfail("can't obtain challenge");
+ return 1;
+ /* notreached */
+ case NTLM_CHALLENGE:
+ SEND
+ ("NA Got a challenge. We refuse to have our authority disputed");
+ return 1;
+ /* notreached */
+ case NTLM_AUTHENTICATE:
+ SEND("NA Got authentication request instead of negotiate request");
+ return 1;
+ /* notreached */
+ default:
+ helperfail("unknown refresh-request packet type");
+ return 1;
+ }
+ return 1;
+ }
+ if (memcmp(buf, "KK ", 3) == 0) { /* authenticate-request */
+ if (!have_challenge) {
+ helperfail("invalid challenge");
+ return 1;
+ }
+ /* figure out what we got */
+ decoded = base64_decode(buf + 3);
+ /* Note: we don't need to manage memory at this point, since
+ * base64_decode returns a pointer to static storage.
+ */
+
+ if (!decoded) { /* decoding failure, return error */
+ SEND("NA Packet format error, couldn't base64-decode");
+ return 1;
+ }
+ /* fast-track-decode request type. */
+ fast_header = (struct _ntlmhdr *) decoded;
+
+ /* sanity-check: it IS a NTLMSSP packet, isn't it? */
+ if (memcmp(fast_header->signature, "NTLMSSP", 8) != 0) {
+ SEND("NA Broken authentication packet");
+ return 1;
+ }
+ switch (fast_header->type) {
+ case NTLM_NEGOTIATE:
+ SEND("NA Invalid negotiation request received");
+ return 1;
+ /* notreached */
+ case NTLM_CHALLENGE:
+ SEND
+ ("NA Got a challenge. We refuse to have our authority disputed");
+ return 1;
+ /* notreached */
+ case NTLM_AUTHENTICATE:
+ /* check against SSPI */
+ plen = (strlen(buf) - 3) * 3 / 4; /* we only need it here. Optimization */
+ cred = ntlm_check_auth((ntlm_authenticate *) decoded, plen);
+ have_challenge = 0;
+ if (cred == NULL) {
+#ifdef FAIL_DEBUG
+ fail_debug_enabled =1;
+#endif
+ switch (ntlm_errno) {
+ case NTLM_BAD_NTGROUP:
+ SEND("NA Incorrect Group Membership");
+ return 1;
+ case NTLM_BAD_REQUEST:
+ SEND("NA Incorrect Request Format");
+ return 1;
+ case NTLM_SSPI_ERROR:
+ FormatMessage(
+ FORMAT_MESSAGE_ALLOCATE_BUFFER |
+ FORMAT_MESSAGE_FROM_SYSTEM |
+ FORMAT_MESSAGE_IGNORE_INSERTS,
+ NULL,
+ GetLastError(),
+ MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language
+ (LPTSTR) &ErrorMessage,
+ 0,
+ NULL);
+ if (ErrorMessage[strlen(ErrorMessage) - 1] == '\n')
+ ErrorMessage[strlen(ErrorMessage) - 1] = '\0';
+ if (ErrorMessage[strlen(ErrorMessage) - 1] == '\r')
+ ErrorMessage[strlen(ErrorMessage) - 1] = '\0';
+ SEND2("NA %s", ErrorMessage);
+ LocalFree(ErrorMessage);
+ return 1;
+ default:
+ SEND("NA Unknown Error");
+ return 1;
+ }
+ }
+ lc(cred); /* let's lowercase them for our convenience */
+ SEND2("AF %s", cred);
+ return 1;
+ default:
+ helperfail("unknown authentication packet type");
+ return 1;
+ }
+ return 1;
+ } else { /* not an auth-request */
+ helperfail("illegal request received");
+ fprintf(stderr, "Illegal request received: '%s'\n", buf);
+ return 1;
+ }
+ helperfail("detected protocol error");
+ return 1;
+/********* END ********/
+}
+
+int
+main(int argc, char *argv[])
+{
+ my_program_name = argv[0];
+
+ process_options(argc, argv);
+
+ debug("%s build " __DATE__ ", " __TIME__ " starting up...\n", my_program_name);
+
+ if (LoadSecurityDll(SSP_NTLM) == NULL) {
+ fprintf(stderr, "FATAL, can't initialize SSPI, exiting.\n");
+ exit(1);
+ }
+ debug("SSPI initialized OK\n");
+
+ atexit(UnloadSecurityDll);
+
+ /* initialize FDescs */
+ setbuf(stdout, NULL);
+ setbuf(stderr, NULL);
+
+ while (manage_request()) {
+ /* everything is done within manage_request */
+ }
+ exit(0);
+}
Index: squid/helpers/ntlm_auth/NTLMSSP-WIN32/readme.txt
diff -u /dev/null squid/helpers/ntlm_auth/NTLMSSP-WIN32/readme.txt:1.1.4.9
--- /dev/null Thu Jan 1 01:00:00 1970
+++ squid/helpers/ntlm_auth/NTLMSSP-WIN32/readme.txt Sat Feb 28 00:35:14 2004
@@ -0,0 +1,70 @@
+win32_ntlm_auth.exe
+
+Native Windows NTLM/NTLMv2 authenticator for Squid 2.5 with
+automatic support for NTLM NEGOTIATE packets.
+
+=====
+Usage
+=====
+
+win32_ntlm_auth [-d] [-v] [-A|D LocalUserGroup] [-h]
+
+-d enables debugging.
+-v enables verbose NTLM packet debugging.
+-A specify a Windows Local Group name allowed to authenticate.
+-D specify a Windows Local Group name not allowed to authenticate.
+-h print program usage
+
+This is released under the GNU General Public License
+
+==============
+Allowing Users
+==============
+
+Users that are allowed to access the web proxy must have the Windows NT
+User Rights "logon from the network".
+Optionally the authenticator can verify the NT LOCAL group membership of
+the user against the User Group specified in the Authenticator's command
+line.
+This can be accomplished creating a local user group on the NT machine,
+grant the privilege, and adding users to it, it works only with MACHINE
+Local Groups, not Domain Local Groups.
+Better group checking is available with External Acl, see win32_check_group
+documentation.
+
+The use of NTLM NEGOTIATE packet allow full NTLM/NTLMv2 support, but
+Squid too must be configured to use NTLM NEGOTIATE, see squid.conf.
+
+Squid.conf typical minimal required changes:
+
+auth_param ntlm program c:/squid/libexec/win32_ntlm_auth.exe
+auth_param ntlm children 5
+auth_param ntlm max_challenge_reuses 0
+auth_param ntlm max_challenge_lifetime 2 minutes
+auth_param ntlm use_ntlm_negotiate on
+
+acl password proxy_auth REQUIRED
+
+http_access allow password
+http_access deny all
+
+When using "use_ntlm_negotiate on"
+max_challenge_reuses and max_challenge_lifetime parameters must be specified
+but they are are ignored.
+
+Refer to Squid documentation for more details.
+
+Currently Internet Explorer has some problems with ftp:// URLs when handling
+internal Squid FTP icons. The following squid.conf ACL works around this:
+
+acl internal_icons urlpath_regex -i /squid-internal-static/icons/
+
+http_access allow our_networks internal_icons <== BEFORE authentication ACL !!!
+
+
+===============
+Contact details
+===============
+
+To contact the maintainer of this package, e-mail on squidnt@acmeconsulting.it.
+The latest version may be found on http://www.acmeconsulting.it/SquidNT.htm.
Index: squid/helpers/ntlm_auth/fakeauth/Makefile.am
diff -u squid/helpers/ntlm_auth/fakeauth/Makefile.am:1.1.2.1 squid/helpers/ntlm_auth/fakeauth/Makefile.am:1.2.8.2
--- squid/helpers/ntlm_auth/fakeauth/Makefile.am:1.1.2.1 Fri Jun 28 07:46:21 2002
+++ squid/helpers/ntlm_auth/fakeauth/Makefile.am Sun Apr 13 08:12:25 2003
@@ -8,6 +8,11 @@
libexec_PROGRAMS = fakeauth_auth
fakeauth_auth_SOURCES = fakeauth_auth.c ntlm.h
+if ENABLE_MINGW32SPECIFIC
+INCLUDES = -I. -I$(top_srcdir)/port/win32/include -I$(top_builddir)/include \
+ -I$(top_srcdir)/include -I$(top_srcdir)/src
+else
INCLUDES = -I. -I$(top_builddir)/include -I$(top_srcdir)/include \
-I$(top_srcdir)/src/
+endif
LDADD = -L$(top_builddir)/lib -lmiscutil $(CRYPTLIB) $(XTRA_LIBS)
Index: squid/include/config.h
diff -u squid/include/config.h:1.5.10.5 squid/include/config.h:1.5.18.8
--- squid/include/config.h:1.5.10.5 Fri Apr 22 19:15:35 2005
+++ squid/include/config.h Sat May 21 08:42:14 2005
@@ -106,6 +106,7 @@
#elif defined(WIN32) || defined(WINNT) || defined(__WIN32__) || defined(__WIN32)
#define _SQUID_MSWIN_
+#include "squid-mswin.h"
#elif defined(__APPLE__)
#define _SQUID_APPLE_
@@ -180,7 +181,7 @@
#define squid_srandom srand
#endif
-#if __GNUC__
+#if __GNUC__ && !defined(_SQUID_MSWIN_)
#define PRINTF_FORMAT_ARG1 __attribute__ ((format (printf, 1, 2)))
#define PRINTF_FORMAT_ARG2 __attribute__ ((format (printf, 2, 3)))
#define PRINTF_FORMAT_ARG3 __attribute__ ((format (printf, 3, 4)))
Index: squid/include/radix.h
diff -u squid/include/radix.h:1.7 squid/include/radix.h:1.7.14.2
--- squid/include/radix.h:1.7 Tue Nov 13 14:19:33 2001
+++ squid/include/radix.h Sat Mar 23 02:35:24 2002
@@ -153,6 +153,8 @@
extern struct squid_radix_node *squid_rn_search(void *, struct squid_radix_node *);
extern struct squid_radix_node *squid_rn_search_m(void *, struct squid_radix_node *, void *);
extern struct squid_radix_node *squid_rn_lookup(void *, void *, struct squid_radix_node_head *);
+#ifndef min
#define min(x,y) ((x)<(y)? (x) : (y))
+#endif
#endif /* SQUID_RADIX_H */
Index: squid/include/sspwin32.h
diff -u /dev/null squid/include/sspwin32.h:1.1.4.4
--- /dev/null Thu Jan 1 01:00:00 1970
+++ squid/include/sspwin32.h Sun Nov 30 03:44:38 2003
@@ -0,0 +1,47 @@
+/*
+ * (C) 2002 Guido Serassio
+ * Based on previous work of Francesco Chemolli, Robert Collins and Andrew Doran
+ *
+ * Distributed freely under the terms of the GNU General Public License,
+ * version 2. See the file COPYING for licensing details
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
+ */
+
+#ifndef _LIBSSPWIN32_H_
+#define _LIBSSPWIN32_H_
+#define SECURITY_WIN32
+#define NTLM_PACKAGE_NAME "NTLM"
+
+#ifdef _SQUID_CYGWIN_
+#include
+#define _T(x) TEXT(x)
+#else
+#include
+#endif
+#include
+#include
+#include
+
+#define WINNT_SECURITY_DLL "security.dll"
+#define WIN2K_SECURITY_DLL "secur32.dll"
+
+#define SSP_BASIC 1
+#define SSP_NTLM 2
+
+HMODULE LoadSecurityDll(int);
+void UnloadSecurityDll(void);
+BOOL WINAPI SSP_LogonUser(PTSTR, PTSTR, PTSTR);
+BOOL WINAPI SSP_ValidateCredentials(PVOID, int, char *);
+const char * WINAPI SSP_MakeChallenge(PVOID, int);
+
+extern BOOL Use_Unicode;
+extern BOOL NTLM_LocalCall;
+#endif /* LIBSSPWIN32_H_ */
Index: squid/include/util.h
diff -u squid/include/util.h:1.10.6.1 squid/include/util.h:1.10.14.12
--- squid/include/util.h:1.10.6.1 Fri May 12 09:51:32 2006
+++ squid/include/util.h Sat May 13 05:26:30 2006
@@ -59,7 +59,6 @@
extern char *xstrdup(const char *);
extern char *xstrndup(const char *, size_t);
extern const char *xstrerror(void);
-extern const char *xbstrerror(int);
extern int tvSubMsec(struct timeval, struct timeval);
extern int tvSubUsec(struct timeval, struct timeval);
extern double tvSubDsec(struct timeval, struct timeval);
@@ -123,4 +122,32 @@
*/
int statMemoryAccounted(void);
+/* CygWin & Windows NT Port */
+/* win32lib.c */
+#ifdef _SQUID_MSWIN_
+#if defined(_MSC_VER) /* Microsoft C Compiler ONLY */
+extern int64_t WIN32_strtoll(const char *nptr, char **endptr, int base);
+#endif
+extern int chroot (const char *);
+extern int ftruncate(int, off_t);
+extern int gettimeofday(struct timeval * ,struct timezone *);
+extern int kill(pid_t, int);
+extern int statfs(const char *, struct statfs *);
+extern int truncate(const char *, off_t);
+extern const char * wsastrerror(int);
+extern struct passwd *getpwnam(char *);
+extern struct group *getgrnam(char *);
+extern uid_t geteuid(void);
+extern uid_t getuid(void);
+extern int setuid(uid_t);
+extern int seteuid(uid_t);
+extern gid_t getgid(void);
+extern gid_t getegid(void);
+extern int setgid(gid_t);
+extern int setegid(gid_t);
+extern const char *WIN32_strerror(int);
+extern void WIN32_maperror(unsigned long);
+extern int WIN32_Close_FD_Socket (int);
+#endif
+
#endif /* SQUID_UTIL_H */
Index: squid/lib/Makefile.am
diff -u squid/lib/Makefile.am:1.4 squid/lib/Makefile.am:1.4.10.7
--- squid/lib/Makefile.am:1.4 Wed Nov 21 15:48:57 2001
+++ squid/lib/Makefile.am Sun Apr 13 08:22:09 2003
@@ -13,18 +13,34 @@
else
MD5SOURCE=
endif
+if ENABLE_WIN32SPECIFIC
+LIBSSPWIN32=libsspwin32.a
+else
+LIBSSPWIN32=
+endif
+
+if ENABLE_MINGW32SPECIFIC
+WIN32SRC = win32lib.c
+INCLUDES = -I$(top_srcdir)/port/win32/include -I$(top_srcdir)/include -I$(top_srcdir)/src
+else
+WIN32SRC=
+INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/src
+endif
EXTRA_LIBRARIES = \
libdlmalloc.a \
- libregex.a
+ libregex.a \
+ libsspwin32.a
noinst_LIBRARIES = \
@LIBDLMALLOC@ \
libmiscutil.a \
libntlmauth.a \
+ $(LIBSSPWIN32) \
@LIBREGEX@
EXTRA_libmiscutil_a_SOURCES = \
md5.c \
- snprintf.c
+ snprintf.c \
+ win32lib.c
libmiscutil_a_SOURCES = \
Array.c \
base64.c \
@@ -45,7 +61,8 @@
Stack.c \
stub_memaccount.c \
util.c \
- uudecode.c
+ uudecode.c \
+ $(WIN32SRC)
libmiscutil_a_LIBADD = \
@LIBOBJS@
# $(top_srcdir)/include/version.h should be a dependency
@@ -57,5 +74,6 @@
ntlmauth.c
libntlmauth_a_LIBADD = \
@LIBOBJS@
+libsspwin32_a_SOURCES = \
+ sspwin32.c
-INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include
Index: squid/lib/getopt.c
diff -u /dev/null squid/lib/getopt.c:1.1.108.1
--- /dev/null Thu Jan 1 01:00:00 1970
+++ squid/lib/getopt.c Sun Oct 27 02:42:20 2002
@@ -0,0 +1,501 @@
+/* $NetBSD: getopt_long.c,v 1.12 2001/04/24 09:07:43 joda Exp $ */
+
+/*-
+ * Copyright (c) 2000 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Dieter Baron and Thomas Klausner.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the NetBSD
+ * Foundation, Inc. and its contributors.
+ * 4. Neither the name of The NetBSD Foundation nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "cdefs.h"
+
+/*#include "namespace.h"*/
+
+#include
+#include
+/*#include */
+#include
+#include
+#include "getopt.h"
+#include
+#include
+
+#define REPLACE_GETOPT
+
+#define _DIAGASSERT(x) do {} while (0)
+
+#ifdef REPLACE_GETOPT
+#ifdef __weak_alias
+__weak_alias(getopt,_getopt)
+#endif
+int opterr = 1; /* if error message should be printed */
+int optind = 1; /* index into parent argv vector */
+int optopt = '?'; /* character checked for validity */
+int optreset; /* reset getopt */
+char *optarg; /* argument associated with option */
+#endif
+
+#ifdef __weak_alias
+__weak_alias(getopt_long,_getopt_long)
+#endif
+
+#ifndef __CYGWIN__
+#define __progname __argv[0]
+#else
+extern char __declspec(dllimport) *__progname;
+#endif
+
+#define IGNORE_FIRST (*options == '-' || *options == '+')
+#define PRINT_ERROR ((opterr) && ((*options != ':') \
+ || (IGNORE_FIRST && options[1] != ':')))
+#if defined(__CYGWIN__) || defined(__MINGW32__)
+# define IS_POSIXLY_CORRECT (1)
+#else
+# define IS_POSIXLY_CORRECT (getenv("POSIXLY_CORRECT") != NULL)
+#endif
+
+#define PERMUTE (!IS_POSIXLY_CORRECT && !IGNORE_FIRST)
+/* XXX: GNU ignores PC if *options == '-' */
+#define IN_ORDER (!IS_POSIXLY_CORRECT && *options == '-')
+
+/* return values */
+#define BADCH (int)'?'
+#define BADARG ((IGNORE_FIRST && options[1] == ':') \
+ || (*options == ':') ? (int)':' : (int)'?')
+#define INORDER (int)1
+
+#define EMSG ""
+
+static int getopt_internal __P((int, char * const *, const char *));
+static int gcd __P((int, int));
+static void permute_args __P((int, int, int, char * const *));
+
+static const char *place = EMSG; /* option letter processing */
+
+/* XXX: set optreset to 1 rather than these two */
+static int nonopt_start = -1; /* first non option argument (for permute) */
+static int nonopt_end = -1; /* first option after non options (for permute) */
+
+/* Error messages */
+static const char recargchar[] = "option requires an argument -- %c";
+static const char recargstring[] = "option requires an argument -- %s";
+static const char ambig[] = "ambiguous option -- %.*s";
+static const char noarg[] = "option doesn't take an argument -- %.*s";
+static const char illoptchar[] = "unknown option -- %c";
+static const char illoptstring[] = "unknown option -- %s";
+
+static void
+_vwarnx(const char *fmt, va_list ap)
+{
+ (void)fprintf(stderr, "%s: ", __progname);
+ if (fmt != NULL)
+ (void)vfprintf(stderr, fmt, ap);
+ (void)fprintf(stderr, "\n");
+}
+
+static void
+warnx(const char *fmt, ...)
+{
+ va_list ap;
+ va_start(ap, fmt);
+ _vwarnx(fmt, ap);
+ va_end(ap);
+}
+
+/*
+ * Compute the greatest common divisor of a and b.
+ */
+static int
+gcd(a, b)
+ int a;
+ int b;
+{
+ int c;
+
+ c = a % b;
+ while (c != 0) {
+ a = b;
+ b = c;
+ c = a % b;
+ }
+
+ return b;
+}
+
+/*
+ * Exchange the block from nonopt_start to nonopt_end with the block
+ * from nonopt_end to opt_end (keeping the same order of arguments
+ * in each block).
+ */
+static void
+permute_args(nonopt_start, nonopt_end, opt_end, nargv)
+ int nonopt_start;
+ int nonopt_end;
+ int opt_end;
+ char * const *nargv;
+{
+ int cstart, cyclelen, i, j, ncycle, nnonopts, nopts, pos;
+ char *swap;
+
+ _DIAGASSERT(nargv != NULL);
+
+ /*
+ * compute lengths of blocks and number and size of cycles
+ */
+ nnonopts = nonopt_end - nonopt_start;
+ nopts = opt_end - nonopt_end;
+ ncycle = gcd(nnonopts, nopts);
+ cyclelen = (opt_end - nonopt_start) / ncycle;
+
+ for (i = 0; i < ncycle; i++) {
+ cstart = nonopt_end+i;
+ pos = cstart;
+ for (j = 0; j < cyclelen; j++) {
+ if (pos >= nonopt_end)
+ pos -= nnonopts;
+ else
+ pos += nopts;
+ swap = nargv[pos];
+ /* LINTED const cast */
+ ((char **) nargv)[pos] = nargv[cstart];
+ /* LINTED const cast */
+ ((char **)nargv)[cstart] = swap;
+ }
+ }
+}
+
+/*
+ * getopt_internal --
+ * Parse argc/argv argument vector. Called by user level routines.
+ * Returns -2 if -- is found (can be long option or end of options marker).
+ */
+static int
+getopt_internal(int nargc, char *const * nargv, const char *options)
+{
+ char *oli; /* option letter list index */
+ int optchar;
+
+ _DIAGASSERT(nargv != NULL);
+ _DIAGASSERT(options != NULL);
+
+ optarg = NULL;
+
+ /*
+ * XXX Some programs (like rsyncd) expect to be able to
+ * XXX re-initialize optind to 0 and have getopt_long(3)
+ * XXX properly function again. Work around this braindamage.
+ */
+ if (optind == 0 && optreset == 0)
+ optind = 1;
+
+ if (optreset)
+ nonopt_start = nonopt_end = -1;
+start:
+ if (optreset || !*place) { /* update scanning pointer */
+ optreset = 0;
+ if (optind >= nargc) { /* end of argument vector */
+ place = EMSG;
+ if (nonopt_end != -1) {
+ /* do permutation, if we have to */
+ permute_args(nonopt_start, nonopt_end,
+ optind, nargv);
+ optind -= nonopt_end - nonopt_start;
+ }
+ else if (nonopt_start != -1) {
+ /*
+ * If we skipped non-options, set optind
+ * to the first of them.
+ */
+ optind = nonopt_start;
+ }
+ nonopt_start = nonopt_end = -1;
+ return -1;
+ }
+ if ((*(place = nargv[optind]) != '-')
+ || (place[1] == '\0')) { /* found non-option */
+ place = EMSG;
+ if (IN_ORDER) {
+ /*
+ * GNU extension:
+ * return non-option as argument to option 1
+ */
+ optarg = nargv[optind++];
+ return INORDER;
+ }
+ if (!PERMUTE) {
+ /*
+ * if no permutation wanted, stop parsing
+ * at first non-option
+ */
+ return -1;
+ }
+ /* do permutation */
+ if (nonopt_start == -1)
+ nonopt_start = optind;
+ else if (nonopt_end != -1) {
+ permute_args(nonopt_start, nonopt_end,
+ optind, nargv);
+ nonopt_start = optind -
+ (nonopt_end - nonopt_start);
+ nonopt_end = -1;
+ }
+ optind++;
+ /* process next argument */
+ goto start;
+ }
+ if (nonopt_start != -1 && nonopt_end == -1)
+ nonopt_end = optind;
+ if (place[1] && *++place == '-') { /* found "--" */
+ place++;
+ return -2;
+ }
+ }
+ if ((optchar = (int)*place++) == (int)':' ||
+ (oli = strchr(options + (IGNORE_FIRST ? 1 : 0), optchar)) == NULL) {
+ /* option letter unknown or ':' */
+ if (!*place)
+ ++optind;
+ if (PRINT_ERROR)
+ warnx(illoptchar, optchar);
+ optopt = optchar;
+ return BADCH;
+ }
+ if (optchar == 'W' && oli[1] == ';') { /* -W long-option */
+ /* XXX: what if no long options provided (called by getopt)? */
+ if (*place)
+ return -2;
+
+ if (++optind >= nargc) { /* no arg */
+ place = EMSG;
+ if (PRINT_ERROR)
+ warnx(recargchar, optchar);
+ optopt = optchar;
+ return BADARG;
+ } else /* white space */
+ place = nargv[optind];
+ /*
+ * Handle -W arg the same as --arg (which causes getopt to
+ * stop parsing).
+ */
+ return -2;
+ }
+ if (*++oli != ':') { /* doesn't take argument */
+ if (!*place)
+ ++optind;
+ } else { /* takes (optional) argument */
+ optarg = NULL;
+ if (*place) /* no white space */
+ optarg = (char *) place;
+ /* XXX: disable test for :: if PC? (GNU doesn't) */
+ else if (oli[1] != ':') { /* arg not optional */
+ if (++optind >= nargc) { /* no arg */
+ place = EMSG;
+ if (PRINT_ERROR)
+ warnx(recargchar, optchar);
+ optopt = optchar;
+ return BADARG;
+ } else
+ optarg = nargv[optind];
+ }
+ place = EMSG;
+ ++optind;
+ }
+ /* dump back option letter */
+ return optchar;
+}
+
+#ifdef REPLACE_GETOPT
+/*
+ * getopt --
+ * Parse argc/argv argument vector.
+ *
+ * [eventually this will replace the real getopt]
+ */
+int
+getopt(int nargc, char * const *nargv, const char *options)
+{
+ int retval;
+
+ _DIAGASSERT(nargv != NULL);
+ _DIAGASSERT(options != NULL);
+
+ if ((retval = getopt_internal(nargc, nargv, options)) == -2) {
+ ++optind;
+ /*
+ * We found an option (--), so if we skipped non-options,
+ * we have to permute.
+ */
+ if (nonopt_end != -1) {
+ permute_args(nonopt_start, nonopt_end, optind,
+ nargv);
+ optind -= nonopt_end - nonopt_start;
+ }
+ nonopt_start = nonopt_end = -1;
+ retval = -1;
+ }
+ return retval;
+}
+#endif
+
+/*
+ * getopt_long --
+ * Parse argc/argv argument vector.
+ */
+int
+getopt_long(int nargc, char * const *nargv, const char *options,
+ const struct option *long_options, int *idx)
+{
+ int retval;
+
+ _DIAGASSERT(nargv != NULL);
+ _DIAGASSERT(options != NULL);
+ _DIAGASSERT(long_options != NULL);
+ /* idx may be NULL */
+
+ if ((retval = getopt_internal(nargc, nargv, options)) == -2) {
+ char *current_argv, *has_equal;
+ size_t current_argv_len;
+ int i, match;
+
+ current_argv = (char *) place;
+ match = -1;
+
+ optind++;
+ place = EMSG;
+
+ if (*current_argv == '\0') { /* found "--" */
+ /*
+ * We found an option (--), so if we skipped
+ * non-options, we have to permute.
+ */
+ if (nonopt_end != -1) {
+ permute_args(nonopt_start, nonopt_end,
+ optind, nargv);
+ optind -= nonopt_end - nonopt_start;
+ }
+ nonopt_start = nonopt_end = -1;
+ return -1;
+ }
+ if ((has_equal = strchr(current_argv, '=')) != NULL) {
+ /* argument found (--option=arg) */
+ current_argv_len = has_equal - current_argv;
+ has_equal++;
+ } else
+ current_argv_len = strlen(current_argv);
+
+ for (i = 0; long_options[i].name; i++) {
+ /* find matching long option */
+ if (strncmp(current_argv, long_options[i].name,
+ current_argv_len))
+ continue;
+
+ if (strlen(long_options[i].name) ==
+ (unsigned)current_argv_len) {
+ /* exact match */
+ match = i;
+ break;
+ }
+ if (match == -1) /* partial match */
+ match = i;
+ else {
+ /* ambiguous abbreviation */
+ if (PRINT_ERROR)
+ warnx(ambig, (int)current_argv_len,
+ current_argv);
+ optopt = 0;
+ return BADCH;
+ }
+ }
+ if (match != -1) { /* option found */
+ if (long_options[match].has_arg == no_argument
+ && has_equal) {
+ if (PRINT_ERROR)
+ warnx(noarg, (int)current_argv_len,
+ current_argv);
+ /*
+ * XXX: GNU sets optopt to val regardless of
+ * flag
+ */
+ if (long_options[match].flag == NULL)
+ optopt = long_options[match].val;
+ else
+ optopt = 0;
+ return BADARG;
+ }
+ if (long_options[match].has_arg == required_argument ||
+ long_options[match].has_arg == optional_argument) {
+ if (has_equal)
+ optarg = has_equal;
+ else if (long_options[match].has_arg ==
+ required_argument) {
+ /*
+ * optional argument doesn't use
+ * next nargv
+ */
+ optarg = nargv[optind++];
+ }
+ }
+ if ((long_options[match].has_arg == required_argument)
+ && (optarg == NULL)) {
+ /*
+ * Missing argument; leading ':'
+ * indicates no error should be generated
+ */
+ if (PRINT_ERROR)
+ warnx(recargstring, current_argv);
+ /*
+ * XXX: GNU sets optopt to val regardless
+ * of flag
+ */
+ if (long_options[match].flag == NULL)
+ optopt = long_options[match].val;
+ else
+ optopt = 0;
+ --optind;
+ return BADARG;
+ }
+ } else { /* unknown option */
+ if (PRINT_ERROR)
+ warnx(illoptstring, current_argv);
+ optopt = 0;
+ return BADCH;
+ }
+ if (long_options[match].flag) {
+ *long_options[match].flag = long_options[match].val;
+ retval = 0;
+ } else
+ retval = long_options[match].val;
+ if (idx)
+ *idx = match;
+ }
+ return retval;
+}
Index: squid/lib/md5.c
diff -u squid/lib/md5.c:1.7 squid/lib/md5.c:1.7.10.2
--- squid/lib/md5.c:1.7 Wed Nov 21 15:48:57 2001
+++ squid/lib/md5.c Sat Jan 3 06:47:25 2004
@@ -32,6 +32,7 @@
#include "config.h"
+#if !USE_SSL
#if HAVE_STRING_H
#include
#endif
@@ -356,3 +357,4 @@
}
#endif
+#endif
Index: squid/lib/rfc1123.c
diff -u squid/lib/rfc1123.c:1.6.6.3 squid/lib/rfc1123.c:1.6.14.4
--- squid/lib/rfc1123.c:1.6.6.3 Sun Jan 22 19:16:18 2006
+++ squid/lib/rfc1123.c Sun Jan 29 11:42:00 2006
@@ -230,6 +230,7 @@
#elif defined(_SQUID_AIX_)
#elif defined(_SQUID_CYGWIN_)
#elif defined(_SQUID_SGI_)
+#elif defined(_SQUID_MSWIN_)
#else
extern long timezone;
#endif
@@ -239,7 +240,7 @@
*/
if (tm->tm_isdst > 0)
dst = -3600;
-#if defined ( _timezone) || defined(_SQUID_CYGWIN_)
+#if defined ( _timezone) || defined(_SQUID_CYGWIN_) || defined(_SQUID_MSWIN_)
t -= (_timezone + dst);
#else
t -= (timezone + dst);
Index: squid/lib/sspwin32.c
diff -u /dev/null squid/lib/sspwin32.c:1.1.4.7
--- /dev/null Thu Jan 1 01:00:00 1970
+++ squid/lib/sspwin32.c Sun Nov 30 03:44:38 2003
@@ -0,0 +1,500 @@
+/*
+ * (C) 2002 Guido Serassio
+ * Based on previous work of Francesco Chemolli, Robert Collins
+ *
+ * Distributed freely under the terms of the GNU General Public License,
+ * version 2. See the file COPYING for licensing details
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
+ */
+
+#include "squid.h"
+#include "ntlmauth.h"
+#include "sspwin32.h"
+
+typedef struct _AUTH_SEQ {
+ BOOL fInitialized;
+ BOOL fHaveCredHandle;
+ BOOL fHaveCtxtHandle;
+ CredHandle hcred;
+ TimeStamp hcredLifeTime;
+ struct _SecHandle hctxt;
+ TimeStamp hctxtLifeTime;
+} AUTH_SEQ, *PAUTH_SEQ;
+
+static HMODULE hModule;
+static int NTLM_mode = SSP_BASIC;
+SECURITY_STATUS SecurityStatus = SEC_E_OK;
+
+static DWORD cbMaxToken = 0;
+static PVOID pClientBuf = NULL;
+static PVOID pServerBuf = NULL;
+
+static AUTH_SEQ NTLM_asServer = {0};
+
+BOOL Use_Unicode = FALSE;
+BOOL NTLM_LocalCall = FALSE;
+
+/* Function pointers */
+ACCEPT_SECURITY_CONTEXT_FN _AcceptSecurityContext = NULL;
+ACQUIRE_CREDENTIALS_HANDLE_FN _AcquireCredentialsHandle = NULL;
+COMPLETE_AUTH_TOKEN_FN _CompleteAuthToken = NULL;
+DELETE_SECURITY_CONTEXT_FN _DeleteSecurityContext = NULL;
+FREE_CONTEXT_BUFFER_FN _FreeContextBuffer = NULL;
+FREE_CREDENTIALS_HANDLE_FN _FreeCredentialsHandle = NULL;
+INITIALIZE_SECURITY_CONTEXT_FN _InitializeSecurityContext = NULL;
+QUERY_SECURITY_PACKAGE_INFO_FN _QuerySecurityPackageInfo = NULL;
+#ifdef UNICODE
+QUERY_CONTEXT_ATTRIBUTES_FN_W _QueryContextAttributes = NULL;
+#else
+QUERY_CONTEXT_ATTRIBUTES_FN_A _QueryContextAttributes = NULL;
+#endif
+
+void UnloadSecurityDll(void)
+{
+ if (NTLM_asServer.fHaveCtxtHandle)
+ _DeleteSecurityContext(&NTLM_asServer.hctxt);
+ if (NTLM_asServer.fHaveCredHandle)
+ _FreeCredentialsHandle(&NTLM_asServer.hcred);
+
+ if (hModule)
+ FreeLibrary(hModule);
+
+ xfree(pClientBuf);
+ xfree(pServerBuf);
+
+ _AcceptSecurityContext = NULL;
+ _AcquireCredentialsHandle = NULL;
+ _CompleteAuthToken = NULL;
+ _DeleteSecurityContext = NULL;
+ _FreeContextBuffer = NULL;
+ _FreeCredentialsHandle = NULL;
+ _InitializeSecurityContext = NULL;
+ _QuerySecurityPackageInfo = NULL;
+ _QueryContextAttributes = NULL;
+
+ hModule = NULL;
+}
+
+
+HMODULE LoadSecurityDll(int mode)
+{
+ TCHAR lpszDLL[MAX_PATH];
+ OSVERSIONINFO VerInfo;
+ PSecPkgInfo pSPI = NULL;
+
+ /*
+ * Find out which security DLL to use, depending on
+ * whether we are on NT or 2000 or XP or 2003 Server
+ * We have to use security.dll on Windows NT 4.0.
+ * All other operating systems, we have to use Secur32.dll
+ */
+ hModule = NULL;
+ if ((mode != SSP_BASIC) && (mode != SSP_NTLM))
+ return hModule;
+ NTLM_mode = mode;
+ VerInfo.dwOSVersionInfoSize = sizeof (OSVERSIONINFO);
+ if (!GetVersionEx (&VerInfo)) { /* If this fails, something has gone wrong */
+ return hModule;
+ }
+ if (VerInfo.dwPlatformId == VER_PLATFORM_WIN32_NT &&
+ VerInfo.dwMajorVersion == 4 &&
+ VerInfo.dwMinorVersion == 0)
+ {
+ lstrcpy (lpszDLL, _T(WINNT_SECURITY_DLL));
+ } else {
+ lstrcpy (lpszDLL, _T(WIN2K_SECURITY_DLL));
+ }
+ hModule = LoadLibrary(lpszDLL);
+ if (!hModule)
+ return hModule;
+ _AcceptSecurityContext = (ACCEPT_SECURITY_CONTEXT_FN)
+ GetProcAddress(hModule, "AcceptSecurityContext");
+ if (!_AcceptSecurityContext) {
+ UnloadSecurityDll();
+ hModule = NULL;
+ return hModule;
+ }
+#ifdef UNICODE
+ _AcquireCredentialsHandle = (ACQUIRE_CREDENTIALS_HANDLE_FN)
+ GetProcAddress(hModule, "AcquireCredentialsHandleW");
+#else
+ _AcquireCredentialsHandle = (ACQUIRE_CREDENTIALS_HANDLE_FN)
+ GetProcAddress(hModule, "AcquireCredentialsHandleA");
+#endif
+ if (!_AcquireCredentialsHandle) {
+ UnloadSecurityDll();
+ hModule = NULL;
+ return hModule;
+ }
+ _CompleteAuthToken = (COMPLETE_AUTH_TOKEN_FN)
+ GetProcAddress(hModule, "CompleteAuthToken");
+ if (!_CompleteAuthToken) {
+ UnloadSecurityDll();
+ hModule = NULL;
+ return hModule;
+ }
+ _DeleteSecurityContext = (DELETE_SECURITY_CONTEXT_FN)
+ GetProcAddress(hModule, "DeleteSecurityContext");
+ if (!_DeleteSecurityContext) {
+ UnloadSecurityDll();
+ hModule = NULL;
+ return hModule;
+ }
+ _FreeContextBuffer = (FREE_CONTEXT_BUFFER_FN)
+ GetProcAddress(hModule, "FreeContextBuffer");
+ if (!_FreeContextBuffer) {
+ UnloadSecurityDll();
+ hModule = NULL;
+ return hModule;
+ }
+ _FreeCredentialsHandle = (FREE_CREDENTIALS_HANDLE_FN)
+ GetProcAddress(hModule, "FreeCredentialsHandle");
+ if (!_FreeCredentialsHandle) {
+ UnloadSecurityDll();
+ hModule = NULL;
+ return hModule;
+ }
+#ifdef UNICODE
+ _InitializeSecurityContext = (INITIALIZE_SECURITY_CONTEXT_FN)
+ GetProcAddress(hModule, "InitializeSecurityContextW");
+#else
+ _InitializeSecurityContext = (INITIALIZE_SECURITY_CONTEXT_FN)
+ GetProcAddress(hModule, "InitializeSecurityContextA");
+#endif
+ if (!_InitializeSecurityContext) {
+ UnloadSecurityDll();
+ hModule = NULL;
+ return hModule;
+ }
+#ifdef UNICODE
+ _QuerySecurityPackageInfo = (QUERY_SECURITY_PACKAGE_INFO_FN)
+ GetProcAddress(hModule, "QuerySecurityPackageInfoW");
+#else
+ _QuerySecurityPackageInfo = (QUERY_SECURITY_PACKAGE_INFO_FN)
+ GetProcAddress(hModule, "QuerySecurityPackageInfoA");
+#endif
+ if (!_QuerySecurityPackageInfo) {
+ UnloadSecurityDll();
+ hModule = NULL;
+ }
+
+#ifdef UNICODE
+ _QueryContextAttributes = (QUERY_CONTEXT_ATTRIBUTES_FN_W)
+ GetProcAddress(hModule, "QueryContextAttributesW");
+#else
+ _QueryContextAttributes = (QUERY_CONTEXT_ATTRIBUTES_FN_A)
+ GetProcAddress(hModule, "QueryContextAttributesA");
+#endif
+ if (!_QueryContextAttributes) {
+ UnloadSecurityDll();
+ hModule = NULL;
+ }
+
+ /* Get max token size */
+ _QuerySecurityPackageInfo(_T("NTLM"), &pSPI);
+ cbMaxToken = pSPI->cbMaxToken;
+ _FreeContextBuffer(pSPI);
+
+ /* Allocate buffers for client and server messages */
+ pClientBuf = xcalloc(cbMaxToken, sizeof(char));
+ pServerBuf = xcalloc(cbMaxToken, sizeof(char));
+
+ return hModule;
+}
+
+
+BOOL GenClientContext(PAUTH_SEQ pAS, PSEC_WINNT_AUTH_IDENTITY pAuthIdentity,
+ PVOID pIn, DWORD cbIn, PVOID pOut, PDWORD pcbOut, PBOOL pfDone)
+{
+/*
+ * Routine Description:
+ *
+ * Optionally takes an input buffer coming from the server and returns
+ * a buffer of information to send back to the server. Also returns
+ * an indication of whether or not the context is complete.
+ *
+ * Return Value:
+ * Returns TRUE if successful; otherwise FALSE.
+ */
+ TimeStamp tsExpiry;
+ SecBufferDesc sbdOut;
+ SecBuffer sbOut;
+ SecBufferDesc sbdIn;
+ SecBuffer sbIn;
+ ULONG fContextAttr;
+
+ if (!pAS->fInitialized) {
+ SecurityStatus = _AcquireCredentialsHandle(NULL, _T(NTLM_PACKAGE_NAME),
+ SECPKG_CRED_OUTBOUND, NULL, (NTLM_mode == SSP_NTLM) ? NULL : pAuthIdentity, NULL, NULL,
+ &pAS->hcred, &tsExpiry);
+ if (SecurityStatus < 0)
+ return FALSE;
+ pAS->fHaveCredHandle = TRUE;
+ }
+
+ /* Prepare output buffer */
+ sbdOut.ulVersion = 0;
+ sbdOut.cBuffers = 1;
+ sbdOut.pBuffers = &sbOut;
+ sbOut.cbBuffer = *pcbOut;
+ sbOut.BufferType = SECBUFFER_TOKEN;
+ sbOut.pvBuffer = pOut;
+
+ /* Prepare input buffer */
+ if (pAS->fInitialized) {
+ sbdIn.ulVersion = 0;
+ sbdIn.cBuffers = 1;
+ sbdIn.pBuffers = &sbIn;
+ sbIn.cbBuffer = cbIn;
+ sbIn.BufferType = SECBUFFER_TOKEN;
+ sbIn.pvBuffer = pIn;
+ }
+ SecurityStatus = _InitializeSecurityContext(&pAS->hcred,
+ pAS->fInitialized ? &pAS->hctxt : NULL, NULL, 0, 0,
+ SECURITY_NATIVE_DREP, pAS->fInitialized ? &sbdIn : NULL,
+ 0, &pAS->hctxt, &sbdOut, &fContextAttr, &tsExpiry);
+ if (SecurityStatus < 0)
+ return FALSE;
+ pAS->fHaveCtxtHandle = TRUE;
+
+ /* If necessary, complete token */
+ if (SecurityStatus == SEC_I_COMPLETE_NEEDED || SecurityStatus == SEC_I_COMPLETE_AND_CONTINUE) {
+ SecurityStatus = _CompleteAuthToken(&pAS->hctxt, &sbdOut);
+ if (SecurityStatus < 0)
+ return FALSE;
+ }
+ *pcbOut = sbOut.cbBuffer;
+ if (!pAS->fInitialized)
+ pAS->fInitialized = TRUE;
+ *pfDone = !(SecurityStatus == SEC_I_CONTINUE_NEEDED
+ || SecurityStatus == SEC_I_COMPLETE_AND_CONTINUE );
+ return TRUE;
+}
+
+
+BOOL GenServerContext(PAUTH_SEQ pAS, PVOID pIn, DWORD cbIn, PVOID pOut,
+ PDWORD pcbOut, PBOOL pfDone, char * credentials)
+{
+/*
+ * Routine Description:
+ *
+ * Takes an input buffer coming from the client and returns a buffer
+ * to be sent to the client. Also returns an indication of whether or
+ * not the context is complete.
+ *
+ * Return Value:
+ *
+ * Returns TRUE if successful; otherwise FALSE.
+ */
+
+ SecBufferDesc sbdOut;
+ SecBuffer sbOut;
+ SecBufferDesc sbdIn;
+ SecBuffer sbIn;
+ ULONG fContextAttr;
+ SecPkgContext_Names namebuffer;
+
+ if (!pAS->fInitialized) {
+ SecurityStatus = _AcquireCredentialsHandle(NULL, _T("NTLM"),
+ SECPKG_CRED_INBOUND, NULL, NULL, NULL, NULL, &pAS->hcred,
+ &pAS->hcredLifeTime);
+ if (SecurityStatus < 0)
+ return FALSE;
+ pAS->fHaveCredHandle = TRUE;
+ }
+
+ /* Prepare output buffer */
+ sbdOut.ulVersion = 0;
+ sbdOut.cBuffers = 1;
+ sbdOut.pBuffers = &sbOut;
+ sbOut.cbBuffer = *pcbOut;
+ sbOut.BufferType = SECBUFFER_TOKEN;
+ sbOut.pvBuffer = pOut;
+
+ /* Prepare input buffer */
+ sbdIn.ulVersion = 0;
+ sbdIn.cBuffers = 1;
+ sbdIn.pBuffers = &sbIn;
+ sbIn.cbBuffer = cbIn;
+ sbIn.BufferType = SECBUFFER_TOKEN;
+ sbIn.pvBuffer = pIn;
+ SecurityStatus = _AcceptSecurityContext(&pAS->hcred,
+ pAS->fInitialized ? &pAS->hctxt : NULL, &sbdIn, (NTLM_mode == SSP_NTLM) ? ASC_REQ_DELEGATE : 0,
+ SECURITY_NATIVE_DREP, &pAS->hctxt, &sbdOut, &fContextAttr,
+ &pAS->hctxtLifeTime);
+ if (SecurityStatus < 0)
+ return FALSE;
+ pAS->fHaveCtxtHandle = TRUE;
+
+ /* If necessary, complete token */
+ if (SecurityStatus == SEC_I_COMPLETE_NEEDED || SecurityStatus == SEC_I_COMPLETE_AND_CONTINUE) {
+ SecurityStatus = _CompleteAuthToken(&pAS->hctxt, &sbdOut);
+ if (SecurityStatus < 0)
+ return FALSE;
+ }
+
+ if (credentials != NULL) {
+ SecurityStatus = _QueryContextAttributes(&pAS->hctxt, SECPKG_ATTR_NAMES, &namebuffer);
+ if (SecurityStatus < 0)
+ return FALSE;
+ strcpy(credentials, namebuffer.sUserName);
+ }
+
+ *pcbOut = sbOut.cbBuffer;
+ if (!pAS->fInitialized)
+ pAS->fInitialized = TRUE;
+ *pfDone = !(SecurityStatus = SEC_I_CONTINUE_NEEDED
+ || SecurityStatus == SEC_I_COMPLETE_AND_CONTINUE);
+ return TRUE;
+}
+
+
+BOOL WINAPI SSP_LogonUser(PTSTR szUser, PTSTR szPassword, PTSTR szDomain)
+{
+ AUTH_SEQ asServer = {0};
+ AUTH_SEQ asClient = {0};
+ BOOL fDone = FALSE;
+ BOOL fResult = FALSE;
+ DWORD cbOut = 0;
+ DWORD cbIn = 0;
+
+ SEC_WINNT_AUTH_IDENTITY ai;
+
+ do {
+ if (!hModule)
+ break;
+
+ /* Initialize auth identity structure */
+ ZeroMemory(&ai, sizeof(ai));
+ ai.Domain = szDomain;
+ ai.DomainLength = lstrlen(szDomain);
+ ai.User = szUser;
+ ai.UserLength = lstrlen(szUser);
+ ai.Password = szPassword;
+ ai.PasswordLength = lstrlen(szPassword);
+#if defined(UNICODE) || defined(_UNICODE)
+ ai.Flags = SEC_WINNT_AUTH_IDENTITY_UNICODE;
+#else
+ ai.Flags = SEC_WINNT_AUTH_IDENTITY_ANSI;
+#endif
+
+ /* Prepare client message (negotiate) */
+ cbOut = cbMaxToken;
+ if (!GenClientContext(&asClient, &ai, NULL, 0, pClientBuf, &cbOut, &fDone))
+ break;
+
+ /* Prepare server message (challenge) */
+ cbIn = cbOut;
+ cbOut = cbMaxToken;
+ if (!GenServerContext(&asServer, pClientBuf, cbIn, pServerBuf, &cbOut,
+ &fDone, NULL))
+ break;
+/* Most likely failure: AcceptServerContext fails with SEC_E_LOGON_DENIED
+ * in the case of bad szUser or szPassword.
+ * Unexpected Result: Logon will succeed if you pass in a bad szUser and
+ * the guest account is enabled in the specified domain.
+ */
+
+ /* Prepare client message (authenticate) */
+ cbIn = cbOut;
+ cbOut = cbMaxToken;
+ if (!GenClientContext(&asClient, &ai, pServerBuf, cbIn, pClientBuf, &cbOut,
+ &fDone))
+ break;
+
+ /* Prepare server message (authentication) */
+ cbIn = cbOut;
+ cbOut = cbMaxToken;
+ if (!GenServerContext(&asServer, pClientBuf, cbIn, pServerBuf, &cbOut,
+ &fDone, NULL))
+ break;
+ fResult = TRUE;
+ } while(0);
+
+ /* Clean up resources */
+ if (asClient.fHaveCtxtHandle)
+ _DeleteSecurityContext(&asClient.hctxt);
+ if (asClient.fHaveCredHandle)
+ _FreeCredentialsHandle(&asClient.hcred);
+ if (asServer.fHaveCtxtHandle)
+ _DeleteSecurityContext(&asServer.hctxt);
+ if (asServer.fHaveCredHandle)
+ _FreeCredentialsHandle(&asServer.hcred);
+
+ return fResult;
+}
+
+
+const char * WINAPI SSP_MakeChallenge(PVOID PNegotiateBuf, int NegotiateLen)
+{
+ BOOL fDone = FALSE;
+ PVOID fResult = NULL;
+ DWORD cbOut = 0;
+ DWORD cbIn = 0;
+ ntlm_challenge * challenge;
+ const char * encoded = NULL;
+
+ if (NTLM_asServer.fHaveCtxtHandle)
+ _DeleteSecurityContext(&NTLM_asServer.hctxt);
+ if (NTLM_asServer.fHaveCredHandle)
+ _FreeCredentialsHandle(&NTLM_asServer.hcred);
+
+ NTLM_LocalCall = FALSE;
+ Use_Unicode = FALSE;
+ memcpy(pClientBuf, PNegotiateBuf, NegotiateLen);
+ ZeroMemory(pServerBuf, cbMaxToken);
+ ZeroMemory(&NTLM_asServer, sizeof(NTLM_asServer));
+ do {
+ if (!hModule)
+ break;
+
+ /* Prepare server message (challenge) */
+ cbIn = NegotiateLen;
+ cbOut = cbMaxToken;
+ if (!GenServerContext(&NTLM_asServer, pClientBuf, cbIn, pServerBuf, &cbOut,
+ &fDone, NULL))
+ break;
+ fResult = pServerBuf;
+ } while(0);
+ if (fResult != NULL) {
+ challenge = (ntlm_challenge *) fResult;
+ Use_Unicode = NEGOTIATE_UNICODE & challenge->flags;
+ NTLM_LocalCall = NEGOTIATE_THIS_IS_LOCAL_CALL & challenge->flags;
+ encoded = base64_encode_bin((char *) fResult, cbOut);
+ }
+ return encoded;
+}
+
+
+BOOL WINAPI SSP_ValidateCredentials(PVOID PAutenticateBuf, int AutenticateLen, char * credentials)
+{
+ BOOL fDone = FALSE;
+ BOOL fResult = FALSE;
+ DWORD cbOut = 0;
+ DWORD cbIn = 0;
+
+ memcpy(pClientBuf, PAutenticateBuf, AutenticateLen);
+ ZeroMemory(pServerBuf, cbMaxToken);
+ do {
+ if (!hModule)
+ break;
+
+ /* Prepare server message (authentication) */
+ cbIn = AutenticateLen;
+ cbOut = cbMaxToken;
+ if (!GenServerContext(&NTLM_asServer, pClientBuf, cbIn, pServerBuf, &cbOut,
+ &fDone, credentials))
+ break;
+ fResult = TRUE;
+ } while(0);
+
+ return fResult;
+}
Index: squid/lib/util.c
diff -u squid/lib/util.c:1.12.6.3 squid/lib/util.c:1.12.14.7
--- squid/lib/util.c:1.12.6.3 Thu Jun 30 19:17:21 2005
+++ squid/lib/util.c Sat Jul 2 02:58:57 2005
@@ -33,6 +33,8 @@
*
*/
+#ifndef UTIL_C
+#define UTIL_C
#define _etext etext
#include "config.h"
@@ -739,3 +741,4 @@
write(2, "\n", 1);
abort();
}
+#endif /* UTIL_C */
Index: squid/lib/win32lib.c
diff -u /dev/null squid/lib/win32lib.c:1.1.32.21
--- /dev/null Thu Jan 1 01:00:00 1970
+++ squid/lib/win32lib.c Sun Oct 30 01:24:43 2005
@@ -0,0 +1,638 @@
+/*
+ * $Id$
+ *
+ * * * * * * * * Legal stuff * * * * * * *
+ *
+ * (C) 2001 Guido Serassio ,
+ * inspired by previous work by Romeo Anghelache & Eric Stern.
+ *
+ * SQUID Web Proxy Cache http://www.squid-cache.org/
+ * ----------------------------------------------------------
+ *
+ * Squid is the result of efforts by numerous individuals from
+ * the Internet community; see the CONTRIBUTORS file for full
+ * details. Many organizations have provided support for Squid's
+ * development; see the SPONSORS file for full details. Squid is
+ * Copyrighted (C) 2001 by the Regents of the University of
+ * California; see the COPYRIGHT file for full details. Squid
+ * incorporates software developed and/or copyrighted by other
+ * sources; see the CREDITS file for full details.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
+ *
+ */
+
+#include "squid.h"
+
+/* The following code section is part of an EXPERIMENTAL native */
+/* Windows NT/2000 Squid port - Compiles only on MS Visual C++ */
+#if defined(_SQUID_MSWIN_)
+
+#undef strerror
+#define sys_nerr _sys_nerr
+
+#undef assert
+#include
+#include
+#include
+#include
+#include
+#if HAVE_WIN32_PSAPI
+#include
+#endif
+
+THREADLOCAL int ws32_result;
+THREADLOCAL int _so_err;
+THREADLOCAL int _so_err_siz = sizeof(int);
+LPCRITICAL_SECTION dbg_mutex = NULL;
+
+/* internal to Microsoft CRTLIB */
+#define FPIPE 0x08 /* file handle refers to a pipe */
+typedef struct {
+ long osfhnd; /* underlying OS file HANDLE */
+ char osfile; /* attributes of file (e.g., open in text mode?) */
+ char pipech; /* one char buffer for handles opened on pipes */
+#ifdef _MT
+ int lockinitflag;
+ CRITICAL_SECTION lock;
+#endif /* _MT */
+ } ioinfo;
+#define IOINFO_L2E 5
+#define IOINFO_ARRAY_ELTS (1 << IOINFO_L2E)
+#define _pioinfo(i) ( __pioinfo[(i) >> IOINFO_L2E] + ((i) & (IOINFO_ARRAY_ELTS - 1)) )
+#define _osfile(i) ( _pioinfo(i)->osfile )
+#define _osfhnd(i) ( _pioinfo(i)->osfhnd )
+
+#if defined(_MSC_VER) /* Microsoft C Compiler ONLY */
+
+extern _CRTIMP ioinfo * __pioinfo[];
+int __cdecl _free_osfhnd(int);
+#define FOPEN 0x01 /* file handle open */
+
+#elif defined(__MINGW32__) /* MinGW environment */
+
+#define FOPEN 0x01 /* file handle open */
+__MINGW_IMPORT ioinfo * __pioinfo[];
+int _free_osfhnd(int);
+
+#endif
+
+
+#if defined(_MSC_VER) /* Microsoft C Compiler ONLY */
+size_t getpagesize()
+{
+ return 4096;
+}
+
+int64_t WIN32_strtoll(const char *nptr, char **endptr, int base)
+{
+ const char *s;
+ int64_t acc;
+ int64_t val;
+ int neg, any;
+ char c;
+
+ /*
+ * Skip white space and pick up leading +/- sign if any.
+ * If base is 0, allow 0x for hex and 0 for octal, else
+ * assume decimal; if base is already 16, allow 0x.
+ */
+ s = nptr;
+ do {
+ c = *s++;
+ } while (isspace(c));
+ if (c == '-') {
+ neg = 1;
+ c = *s++;
+ } else {
+ neg = 0;
+ if (c == '+')
+ c = *s++;
+ }
+ if ((base == 0 || base == 16) &&
+ c == '0' && (*s == 'x' || *s == 'X')) {
+ c = s[1];
+ s += 2;
+ base = 16;
+ }
+ if (base == 0)
+ base = c == '0' ? 8 : 10;
+ acc = any = 0;
+ if (base < 2 || base > 36) {
+ errno = EINVAL;
+ if (endptr != NULL)
+ *endptr = (char *)(any ? s - 1 : nptr);
+ return acc;
+ }
+
+ /* The classic bsd implementation requires div/mod operators
+ * to compute a cutoff. Benchmarking proves that is very, very
+ * evil to some 32 bit processors. Instead, look for underflow
+ * in both the mult and add/sub operation. Unlike the bsd impl,
+ * we also work strictly in a signed int64 word as we haven't
+ * implemented the unsigned type in win32.
+ *
+ * Set 'any' if any `digits' consumed; make it negative to indicate
+ * overflow.
+ */
+ val = 0;
+ for ( ; ; c = *s++) {
+ if (c >= '0' && c <= '9')
+ c -= '0';
+ else if (c >= 'A' && c <= 'Z')
+ c -= 'A' - 10;
+ else if (c >= 'a' && c <= 'z')
+ c -= 'a' - 10;
+ else
+ break;
+ if (c >= base)
+ break;
+ val *= base;
+ if ( (any < 0) /* already noted an over/under flow - short circuit */
+ || (neg && (val > acc || (val -= c) > acc)) /* underflow */
+ || (!neg && (val < acc || (val += c) < acc))) { /* overflow */
+ any = -1; /* once noted, over/underflows never go away */
+ } else {
+ acc = val;
+ any = 1;
+ }
+ }
+
+ if (any < 0) {
+ acc = neg ? INT64_MIN : INT64_MAX;
+ errno = ERANGE;
+ } else if (!any) {
+ errno = EINVAL;
+ }
+ if (endptr != NULL)
+ *endptr = (char *)(any ? s - 1 : nptr);
+ return (acc);
+}
+#endif
+
+uid_t geteuid(void)
+{
+ return 100;
+}
+
+uid_t getuid(void)
+{
+ return 100;
+}
+
+int setuid(uid_t uid)
+{
+ return 0;
+}
+
+int seteuid(uid_t euid)
+{
+ return 0;
+}
+
+gid_t getegid(void)
+{
+ return 100;
+}
+
+gid_t getgid(void)
+{
+ return 100;
+}
+
+int setgid(gid_t gid)
+{
+ return 0;
+}
+
+int setegid(gid_t egid)
+{
+ return 0;
+}
+
+int chroot(const char *dirname)
+{
+ if (SetCurrentDirectory(dirname))
+ return 0;
+ else
+ return GetLastError();
+}
+
+void GetProcessName(pid_t pid, char * ProcessName)
+{
+ HANDLE hProcess;
+
+ strcpy(ProcessName, "unknown");
+#if HAVE_WIN32_PSAPI
+ /* Get a handle to the process. */
+ hProcess = OpenProcess( PROCESS_QUERY_INFORMATION |
+ PROCESS_VM_READ,
+ FALSE, pid );
+ /* Get the process name. */
+ if (NULL != hProcess) {
+ HMODULE hMod;
+ DWORD cbNeeded;
+
+ if (EnumProcessModules(hProcess, &hMod, sizeof(hMod), &cbNeeded))
+ GetModuleBaseName(hProcess, hMod, ProcessName, sizeof(ProcessName));
+ else {
+ CloseHandle(hProcess);
+ return;
+ }
+ } else
+ return;
+ CloseHandle(hProcess);
+#endif
+}
+
+int kill(pid_t pid, int sig)
+{
+ HANDLE hProcess;
+ char MyProcessName[MAX_PATH];
+ char ProcessNameToCheck[MAX_PATH];
+
+ if (sig == 0) {
+ if ((hProcess = OpenProcess(PROCESS_QUERY_INFORMATION |
+ PROCESS_VM_READ,
+ FALSE, pid)) == NULL)
+ return -1;
+ else {
+ CloseHandle(hProcess);
+ GetProcessName(getpid(), MyProcessName);
+ GetProcessName(pid, ProcessNameToCheck);
+ if (strcmp(MyProcessName, ProcessNameToCheck) == 0)
+ return 0;
+ return -1;
+ }
+ }
+ else return 0;
+}
+
+int gettimeofday( struct timeval * pcur_time, struct timezone * tz)
+{
+
+ struct _timeb current;
+
+ _ftime(¤t);
+
+ pcur_time->tv_sec=current.time;
+ pcur_time->tv_usec=current.millitm * 1000L;
+ if (tz)
+ {
+ tz->tz_minuteswest = current.timezone; /* minutes west of Greenwich */
+ tz->tz_dsttime = current.dstflag; /* type of dst correction */
+ }
+
+ return 0;
+}
+
+int statfs(const char *path, struct statfs *sfs)
+{
+ char drive[4];
+ DWORD spc, bps, freec, totalc;
+ DWORD vsn, maxlen, flags;
+
+ if (!sfs)
+ {
+ errno=EINVAL;
+ return -1;
+ }
+
+ strncpy(drive,path,2);
+ drive[2]='\0';
+ strcat(drive,"\\");
+
+ if (!GetDiskFreeSpace(drive, &spc, &bps, &freec, &totalc)) {
+ errno=ENOENT;
+ return -1;
+ }
+ if (!GetVolumeInformation(drive, NULL, 0, &vsn, &maxlen, &flags, NULL, 0))
+ {
+ errno=ENOENT;
+ return -1;
+ }
+ sfs->f_type = flags;
+ sfs->f_bsize = spc*bps;
+ sfs->f_blocks = totalc;
+ sfs->f_bfree = sfs->f_bavail = freec;
+ sfs->f_files = -1;
+ sfs->f_ffree = -1;
+ sfs->f_fsid = vsn;
+ sfs->f_namelen = maxlen;
+ return 0;
+}
+
+#if USE_TRUNCATE
+int
+WIN32_ftruncate (int fd, off_t size)
+{
+ HANDLE file;
+ DWORD error;
+ LARGE_INTEGER size64;
+ LARGE_INTEGER test64;
+
+ if (fd < 0) {
+ errno = EBADF;
+ return -1;
+ }
+
+ size64.QuadPart = (__int64)size;
+ test64.QuadPart = 0;
+
+ file = (HANDLE)_get_osfhandle(fd);
+
+ /* Get current file position to check File Handle */
+ test64.LowPart = SetFilePointer(file, test64.LowPart, &test64.HighPart, FILE_CURRENT);
+ if ((test64.LowPart == INVALID_SET_FILE_POINTER) && ((error = GetLastError()) != NO_ERROR))
+ goto WIN32_ftruncate_error;
+
+ /* Set the current File Pointer position */
+ size64.LowPart = SetFilePointer(file, size64.LowPart, &size64.HighPart, FILE_BEGIN);
+ if ((size64.LowPart == INVALID_SET_FILE_POINTER) && ((error = GetLastError()) != NO_ERROR))
+ goto WIN32_ftruncate_error;
+ else if (!SetEndOfFile(file)) {
+ int error = GetLastError ();
+ goto WIN32_ftruncate_error;
+ }
+ return 0;
+
+WIN32_ftruncate_error:
+ switch (error)
+ {
+ case ERROR_INVALID_HANDLE:
+ errno = EBADF;
+ break;
+ default:
+ errno = EIO;
+ break;
+ }
+
+ return -1;
+}
+
+int WIN32_truncate (const char *pathname, off_t length)
+{
+ int fd;
+ int res = -1;
+
+ fd = open(pathname, O_RDWR);
+
+ if (fd == -1)
+ errno = EBADF;
+ else {
+ res = WIN32_ftruncate(fd, length);
+ _close(fd);
+ }
+
+ return res;
+}
+#endif
+
+static struct _wsaerrtext {
+ int err;
+ const char *errconst;
+ const char *errdesc;
+} _wsaerrtext[] = {
+ {WSA_E_CANCELLED, "WSA_E_CANCELLED", "Lookup cancelled."},
+ {WSA_E_NO_MORE, "WSA_E_NO_MORE", "No more data available."},
+ {WSAEACCES, "WSAEACCES", "Permission denied."},
+ {WSAEADDRINUSE, "WSAEADDRINUSE", "Address already in use."},
+ {WSAEADDRNOTAVAIL, "WSAEADDRNOTAVAIL", "Cannot assign requested address."},
+ {WSAEAFNOSUPPORT, "WSAEAFNOSUPPORT", "Address family not supported by protocol family."},
+ {WSAEALREADY, "WSAEALREADY", "Operation already in progress."},
+ {WSAEBADF, "WSAEBADF", "Bad file number."},
+ {WSAECANCELLED, "WSAECANCELLED", "Operation cancelled."},
+ {WSAECONNABORTED, "WSAECONNABORTED", "Software caused connection abort."},
+ {WSAECONNREFUSED, "WSAECONNREFUSED", "Connection refused."},
+ {WSAECONNRESET, "WSAECONNRESET", "Connection reset by peer."},
+ {WSAEDESTADDRREQ, "WSAEDESTADDRREQ", "Destination address required."},
+ {WSAEDQUOT, "WSAEDQUOT", "Disk quota exceeded."},
+ {WSAEFAULT, "WSAEFAULT", "Bad address."},
+ {WSAEHOSTDOWN, "WSAEHOSTDOWN", "Host is down."},
+ {WSAEHOSTUNREACH, "WSAEHOSTUNREACH", "No route to host."},
+ {WSAEINPROGRESS, "WSAEINPROGRESS", "Operation now in progress."},
+ {WSAEINTR, "WSAEINTR", "Interrupted function call."},
+ {WSAEINVAL, "WSAEINVAL", "Invalid argument."},
+ {WSAEINVALIDPROCTABLE, "WSAEINVALIDPROCTABLE", "Invalid procedure table from service provider."},
+ {WSAEINVALIDPROVIDER, "WSAEINVALIDPROVIDER", "Invalid service provider version number."},
+ {WSAEISCONN, "WSAEISCONN", "Socket is already connected."},
+ {WSAELOOP, "WSAELOOP", "Too many levels of symbolic links."},
+ {WSAEMFILE, "WSAEMFILE", "Too many open files."},
+ {WSAEMSGSIZE, "WSAEMSGSIZE", "Message too long."},
+ {WSAENAMETOOLONG, "WSAENAMETOOLONG", "File name is too long."},
+ {WSAENETDOWN, "WSAENETDOWN", "Network is down."},
+ {WSAENETRESET, "WSAENETRESET", "Network dropped connection on reset."},
+ {WSAENETUNREACH, "WSAENETUNREACH", "Network is unreachable."},
+ {WSAENOBUFS, "WSAENOBUFS", "No buffer space available."},
+ {WSAENOMORE, "WSAENOMORE", "No more data available."},
+ {WSAENOPROTOOPT, "WSAENOPROTOOPT", "Bad protocol option."},
+ {WSAENOTCONN, "WSAENOTCONN", "Socket is not connected."},
+ {WSAENOTEMPTY, "WSAENOTEMPTY", "Directory is not empty."},
+ {WSAENOTSOCK, "WSAENOTSOCK", "Socket operation on nonsocket."},
+ {WSAEOPNOTSUPP, "WSAEOPNOTSUPP", "Operation not supported."},
+ {WSAEPFNOSUPPORT, "WSAEPFNOSUPPORT", "Protocol family not supported."},
+ {WSAEPROCLIM, "WSAEPROCLIM", "Too many processes."},
+ {WSAEPROTONOSUPPORT, "WSAEPROTONOSUPPORT", "Protocol not supported."},
+ {WSAEPROTOTYPE, "WSAEPROTOTYPE", "Protocol wrong type for socket."},
+ {WSAEPROVIDERFAILEDINIT, "WSAEPROVIDERFAILEDINIT", "Unable to initialise a service provider."},
+ {WSAEREFUSED, "WSAEREFUSED", "Refused."},
+ {WSAEREMOTE, "WSAEREMOTE", "Too many levels of remote in path."},
+ {WSAESHUTDOWN, "WSAESHUTDOWN", "Cannot send after socket shutdown."},
+ {WSAESOCKTNOSUPPORT, "WSAESOCKTNOSUPPORT", "Socket type not supported."},
+ {WSAESTALE, "WSAESTALE", "Stale NFS file handle."},
+ {WSAETIMEDOUT, "WSAETIMEDOUT", "Connection timed out."},
+ {WSAETOOMANYREFS, "WSAETOOMANYREFS", "Too many references."},
+ {WSAEUSERS, "WSAEUSERS", "Too many users."},
+ {WSAEWOULDBLOCK, "WSAEWOULDBLOCK", "Resource temporarily unavailable."},
+ {WSANOTINITIALISED, "WSANOTINITIALISED", "Successful WSAStartup not yet performed."},
+ {WSASERVICE_NOT_FOUND, "WSASERVICE_NOT_FOUND", "Service not found."},
+ {WSASYSCALLFAILURE, "WSASYSCALLFAILURE", "System call failure."},
+ {WSASYSNOTREADY, "WSASYSNOTREADY", "Network subsystem is unavailable."},
+ {WSATYPE_NOT_FOUND, "WSATYPE_NOT_FOUND", "Class type not found."},
+ {WSAVERNOTSUPPORTED, "WSAVERNOTSUPPORTED", "Winsock.dll version out of range."},
+ {WSAEDISCON, "WSAEDISCON", "Graceful shutdown in progress."}
+};
+
+/*
+ * wsastrerror() - description of WSAGetLastError()
+ */
+const char *
+wsastrerror(int err)
+{
+ static char xwsaerror_buf[BUFSIZ];
+ int i, errind = -1;
+
+ if (err == 0)
+ return "(0) No error.";
+ for (i = 0; i < sizeof(_wsaerrtext)/sizeof(struct _wsaerrtext); i++) {
+ if (_wsaerrtext[i].err != err)
+ continue;
+ errind = i;
+ break;
+ }
+ if (errind == -1)
+ snprintf(xwsaerror_buf, BUFSIZ, "Unknown");
+ else
+ snprintf(xwsaerror_buf, BUFSIZ, "%s, %s", _wsaerrtext[errind].errconst, _wsaerrtext[errind].errdesc);
+ return xwsaerror_buf;
+}
+
+struct passwd *getpwnam(char * unused)
+{
+ static struct passwd pwd = {NULL, NULL, 100, 100, NULL, NULL, NULL};
+ return &pwd;
+}
+
+struct group *getgrnam(char * unused)
+{
+ static struct group grp = {NULL, NULL, 100, NULL};
+ return &grp;
+}
+
+/*
+ * WIN32_strerror with argument for late notification */
+
+const char *
+WIN32_strerror(int err)
+{
+ static char xbstrerror_buf[BUFSIZ];
+
+ if (err < 0 || err >= sys_nerr)
+ strncpy(xbstrerror_buf, wsastrerror(err), BUFSIZ);
+ else
+ strncpy(xbstrerror_buf, strerror(err), BUFSIZ);
+ return xbstrerror_buf;
+}
+
+int WIN32_Close_FD_Socket(int fd)
+
+{
+ int result = 0;
+
+ if (closesocket(_get_osfhandle(fd)) == SOCKET_ERROR) {
+ errno = WSAGetLastError();
+ result = 1;
+ }
+ _free_osfhnd(fd);
+ _osfile(fd) = 0;
+ return result;
+}
+
+#if defined(__MINGW32__) /* MinGW environment */
+int _free_osfhnd(int filehandle)
+{
+ if ( ((unsigned)filehandle < SQUID_MAXFD) &&
+ (_osfile(filehandle) & FOPEN) &&
+ (_osfhnd(filehandle) != (long)INVALID_HANDLE_VALUE) )
+ {
+ switch (filehandle) {
+ case 0:
+ SetStdHandle( STD_INPUT_HANDLE, NULL );
+ break;
+ case 1:
+ SetStdHandle( STD_OUTPUT_HANDLE, NULL );
+ break;
+ case 2:
+ SetStdHandle( STD_ERROR_HANDLE, NULL );
+ break;
+ }
+ _osfhnd(filehandle) = (long)INVALID_HANDLE_VALUE;
+ return(0);
+ } else {
+ errno = EBADF; /* bad handle */
+ _doserrno = 0L; /* not an OS error */
+ return -1;
+ }
+}
+#endif
+
+struct errorentry {
+ unsigned long WIN32_code;
+ int POSIX_errno;
+};
+
+static struct errorentry errortable[] = {
+ {ERROR_INVALID_FUNCTION, EINVAL},
+ {ERROR_FILE_NOT_FOUND, ENOENT},
+ {ERROR_PATH_NOT_FOUND, ENOENT},
+ {ERROR_TOO_MANY_OPEN_FILES, EMFILE},
+ {ERROR_ACCESS_DENIED, EACCES},
+ {ERROR_INVALID_HANDLE, EBADF},
+ {ERROR_ARENA_TRASHED, ENOMEM},
+ {ERROR_NOT_ENOUGH_MEMORY, ENOMEM},
+ {ERROR_INVALID_BLOCK, ENOMEM},
+ {ERROR_BAD_ENVIRONMENT, E2BIG},
+ {ERROR_BAD_FORMAT, ENOEXEC},
+ {ERROR_INVALID_ACCESS, EINVAL},
+ {ERROR_INVALID_DATA, EINVAL},
+ {ERROR_INVALID_DRIVE, ENOENT},
+ {ERROR_CURRENT_DIRECTORY, EACCES},
+ {ERROR_NOT_SAME_DEVICE, EXDEV},
+ {ERROR_NO_MORE_FILES, ENOENT},
+ {ERROR_LOCK_VIOLATION, EACCES},
+ {ERROR_BAD_NETPATH, ENOENT},
+ {ERROR_NETWORK_ACCESS_DENIED, EACCES},
+ {ERROR_BAD_NET_NAME, ENOENT},
+ {ERROR_FILE_EXISTS, EEXIST},
+ {ERROR_CANNOT_MAKE, EACCES},
+ {ERROR_FAIL_I24, EACCES},
+ {ERROR_INVALID_PARAMETER, EINVAL},
+ {ERROR_NO_PROC_SLOTS, EAGAIN},
+ {ERROR_DRIVE_LOCKED, EACCES},
+ {ERROR_BROKEN_PIPE, EPIPE},
+ {ERROR_DISK_FULL, ENOSPC},
+ {ERROR_INVALID_TARGET_HANDLE, EBADF},
+ {ERROR_INVALID_HANDLE, EINVAL},
+ {ERROR_WAIT_NO_CHILDREN, ECHILD},
+ {ERROR_CHILD_NOT_COMPLETE, ECHILD},
+ {ERROR_DIRECT_ACCESS_HANDLE, EBADF},
+ {ERROR_NEGATIVE_SEEK, EINVAL},
+ {ERROR_SEEK_ON_DEVICE, EACCES},
+ {ERROR_DIR_NOT_EMPTY, ENOTEMPTY },
+ {ERROR_NOT_LOCKED, EACCES},
+ {ERROR_BAD_PATHNAME, ENOENT},
+ {ERROR_MAX_THRDS_REACHED, EAGAIN},
+ {ERROR_LOCK_FAILED, EACCES},
+ {ERROR_ALREADY_EXISTS, EEXIST},
+ {ERROR_FILENAME_EXCED_RANGE, ENOENT},
+ {ERROR_NESTING_NOT_ALLOWED, EAGAIN},
+ {ERROR_NOT_ENOUGH_QUOTA, ENOMEM}
+};
+
+#define MIN_EXEC_ERROR ERROR_INVALID_STARTING_CODESEG
+#define MAX_EXEC_ERROR ERROR_INFLOOP_IN_RELOC_CHAIN
+
+#define MIN_EACCES_RANGE ERROR_WRITE_PROTECT
+#define MAX_EACCES_RANGE ERROR_SHARING_BUFFER_EXCEEDED
+
+void WIN32_maperror(unsigned long WIN32_oserrno)
+{
+ int i;
+
+ _doserrno = WIN32_oserrno;
+ for (i = 0; i < (sizeof(errortable)/sizeof(struct errorentry)); ++i) {
+ if (WIN32_oserrno == errortable[i].WIN32_code) {
+ errno = errortable[i].POSIX_errno;
+ return;
+ }
+ }
+ if (WIN32_oserrno >= MIN_EACCES_RANGE && WIN32_oserrno <= MAX_EACCES_RANGE)
+ errno = EACCES;
+ else if (WIN32_oserrno >= MIN_EXEC_ERROR && WIN32_oserrno <= MAX_EXEC_ERROR)
+ errno = ENOEXEC;
+ else
+ errno = EINVAL;
+}
+#endif
Index: squid/port/.cvsignore
diff -u /dev/null squid/port/.cvsignore:1.1.2.1
--- /dev/null Thu Jan 1 01:00:00 1970
+++ squid/port/.cvsignore Sun Nov 10 08:02:10 2002
@@ -0,0 +1,2 @@
+.cvsignore
+Makefile.in
Index: squid/port/Makefile.am
diff -u /dev/null squid/port/Makefile.am:1.1.2.1
--- /dev/null Thu Jan 1 01:00:00 1970
+++ squid/port/Makefile.am Sun Nov 10 08:02:10 2002
@@ -0,0 +1,6 @@
+## Process this file with automake to produce Makefile.in
+#
+# $Id$
+#
+
+SUBDIRS = win32
Index: squid/port/win32/.cvsignore
diff -u /dev/null squid/port/win32/.cvsignore:1.1.4.2
--- /dev/null Thu Jan 1 01:00:00 1970
+++ squid/port/win32/.cvsignore Sun Nov 10 08:02:11 2002
@@ -0,0 +1,4 @@
+.cvsignore
+Debug
+Release
+Makefile.in
Index: squid/port/win32/Build.dsp
diff -u /dev/null squid/port/win32/Build.dsp:1.1.2.1
--- /dev/null Thu Jan 1 01:00:00 1970
+++ squid/port/win32/Build.dsp Sat Nov 27 03:37:32 2004
@@ -0,0 +1,63 @@
+# Microsoft Developer Studio Project File - Name="Build" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Generic Project" 0x010a
+
+CFG=Build - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "Build.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "Build.mak" CFG="Build - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "Build - Win32 Release" (based on "Win32 (x86) Generic Project")
+!MESSAGE "Build - Win32 Debug" (based on "Win32 (x86) Generic Project")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+MTL=midl.exe
+
+!IF "$(CFG)" == "Build - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Target_Dir ""
+
+!ELSEIF "$(CFG)" == "Build - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Build___Win32_Debug"
+# PROP BASE Intermediate_Dir "Build___Win32_Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Target_Dir ""
+
+!ENDIF
+
+# Begin Target
+
+# Name "Build - Win32 Release"
+# Name "Build - Win32 Debug"
+# End Target
+# End Project
Index: squid/port/win32/Makefile.am
diff -u /dev/null squid/port/win32/Makefile.am:1.1.2.8
--- /dev/null Thu Jan 1 01:00:00 1970
+++ squid/port/win32/Makefile.am Sun May 1 00:50:11 2005
@@ -0,0 +1,66 @@
+## Process this file with automake to produce Makefile.in
+#
+# $Id$
+#
+
+EXTRA_DIST = \
+ auth_modules.cmd \
+ Build.dsp \
+ cf_data.dsp \
+ default_config_file.cmd \
+ doc.dsp \
+ icons.cmd \
+ icons.dsp \
+ install.dsp \
+ modules.dsp \
+ PerlPreprocessing.dsp \
+ repl_modules.cmd \
+ squid.dsw \
+ squid_conf_default.dsp \
+ squid_mswin.mak \
+ store_modules.cmd \
+ update.cmd \
+ cachemgr/cachemgr.dsp \
+ cf_gen/cf_gen.dsp \
+ dnsserver/dnsserver.dsp \
+ fake_auth/fake_auth.dsp \
+ include/autoconf.h \
+ include/autoconf.h.ssl \
+ include/cdefs.h \
+ include/crypt.h \
+ include/getopt.h \
+ include/Readdir.h \
+ include/squid-mswin.h \
+ ip_user_check/ip_user_check.dsp \
+ LDAP_auth/LDAP_auth.dsp \
+ LDAP_group/LDAP_group.dsp \
+ libawin32/libawin32.dsp \
+ libbasic/libbasic.dsp \
+ libdigest/libdigest.dsp \
+ libgnuregex/libgnuregex.dsp \
+ libheap/libheap.dsp \
+ liblru/liblru.dsp \
+ libmiscutil/libmiscutil.dsp \
+ libntlm/libntlm.dsp \
+ libntlmauth/libntlmauth.dsp \
+ libnull/libnull.dsp \
+ libsnmp/libsnmp.dsp \
+ libsspwin32/libsspwin32.dsp \
+ libufs/libufs.dsp \
+ NCSA_auth/NCSA_auth.dsp \
+ nt_auth/nt_auth.dsp \
+ ntlm_win32_auth/ntlm_win32_auth.dsp \
+ pinger/pinger.dsp \
+ squid/buildcount.dsm \
+ squid/buildver.h \
+ squid/resource.h \
+ squid/squid.dsp \
+ squid/squid.mak \
+ squid/squid.rc \
+ squid/squid.rc2 \
+ pinger/pinger.dsp \
+ squidclient/squidclient.dsp \
+ src/encrypt.c \
+ src/readdir.c \
+ unlinkd/unlinkd.dsp \
+ win32_check_group/win32_check_group.dsp
Index: squid/port/win32/PerlPreprocessing.dsp
diff -u /dev/null squid/port/win32/PerlPreprocessing.dsp:1.1.2.2
--- /dev/null Thu Jan 1 01:00:00 1970
+++ squid/port/win32/PerlPreprocessing.dsp Wed Mar 27 13:01:10 2002
@@ -0,0 +1,129 @@
+# Microsoft Developer Studio Project File - Name="PerlPreprocessing" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Generic Project" 0x010a
+
+CFG=PerlPreprocessing - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "PerlPreprocessing.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "PerlPreprocessing.mak" CFG="PerlPreprocessing - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "PerlPreprocessing - Win32 Release" (based on "Win32 (x86) Generic Project")
+!MESSAGE "PerlPreprocessing - Win32 Debug" (based on "Win32 (x86) Generic Project")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+MTL=midl.exe
+
+!IF "$(CFG)" == "PerlPreprocessing - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "."
+# PROP Intermediate_Dir "."
+# PROP Target_Dir ""
+
+!ELSEIF "$(CFG)" == "PerlPreprocessing - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "."
+# PROP Intermediate_Dir "."
+# PROP Target_Dir ""
+
+!ENDIF
+
+# Begin Target
+
+# Name "PerlPreprocessing - Win32 Release"
+# Name "PerlPreprocessing - Win32 Debug"
+# Begin Source File
+
+SOURCE=..\..\src\enums.h
+
+!IF "$(CFG)" == "PerlPreprocessing - Win32 Release"
+
+# PROP Intermediate_Dir "."
+# PROP Ignore_Default_Tool 1
+# Begin Custom Build
+InputDir=\WORK\CYGWIN-SVC-2_5\src
+InputPath=..\..\src\enums.h
+
+"$(InputDir)\string_arrays.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ perl $(InputDir)\mk-string-arrays.pl <$(InputPath) >$(InputDir)\string_arrays.c
+
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "PerlPreprocessing - Win32 Debug"
+
+# PROP Intermediate_Dir "."
+# PROP Ignore_Default_Tool 1
+# Begin Custom Build
+InputDir=\WORK\CYGWIN-SVC-2_5\src
+InputPath=..\..\src\enums.h
+
+"$(InputDir)\string_arrays.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ perl $(InputDir)\mk-string-arrays.pl <$(InputPath) >$(InputDir)\string_arrays.c
+
+# End Custom Build
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\globals.h
+
+!IF "$(CFG)" == "PerlPreprocessing - Win32 Release"
+
+# PROP Intermediate_Dir "."
+# PROP Ignore_Default_Tool 1
+# Begin Custom Build
+InputDir=\WORK\CYGWIN-SVC-2_5\src
+InputPath=..\..\src\globals.h
+
+"$(InputDir)\globals.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ perl $(InputDir)\mk-globals-c.pl <$(InputPath) >$(InputDir)\globals.c
+
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "PerlPreprocessing - Win32 Debug"
+
+# PROP Intermediate_Dir "."
+# PROP Ignore_Default_Tool 1
+# Begin Custom Build
+InputDir=\WORK\CYGWIN-SVC-2_5\src
+InputPath=..\..\src\globals.h
+
+"$(InputDir)\globals.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ perl $(InputDir)\mk-globals-c.pl <$(InputPath) >$(InputDir)\globals.c
+
+# End Custom Build
+
+!ENDIF
+
+# End Source File
+# End Target
+# End Project
Index: squid/port/win32/auth_modules.cmd
diff -u /dev/null squid/port/win32/auth_modules.cmd:1.1.2.2
--- /dev/null Thu Jan 1 01:00:00 1970
+++ squid/port/win32/auth_modules.cmd Wed Mar 27 13:01:10 2002
@@ -0,0 +1,16 @@
+@echo off
+if exist %temp%\auth_modules.txt del %temp%\auth_modules.txt
+:loop
+echo %1 >> %temp%\auth_modules.txt
+shift /1
+if NOT "%1"=="" goto :loop
+echo /* automatically generated by %0 %*
+echo * do not edit
+echo */
+echo #include "squid.h"
+for /F %%m in (%temp%\auth_modules.txt) do echo extern AUTHSSETUP authSchemeSetup_%%m;
+echo void authSchemeSetup(void)
+echo {
+for /F %%m in (%temp%\auth_modules.txt) do echo authSchemeAdd("%%m", authSchemeSetup_%%m);
+echo }
+if exist %temp%\auth_modules.txt del %temp%\auth_modules.txt
Index: squid/port/win32/cf_data.dsp
diff -u /dev/null squid/port/win32/cf_data.dsp:1.1.2.2
--- /dev/null Thu Jan 1 01:00:00 1970
+++ squid/port/win32/cf_data.dsp Wed Mar 27 13:01:10 2002
@@ -0,0 +1,112 @@
+# Microsoft Developer Studio Project File - Name="cf_data" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Generic Project" 0x010a
+
+CFG=cf_data - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "cf_data.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "cf_data.mak" CFG="cf_data - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "cf_data - Win32 Release" (based on "Win32 (x86) Generic Project")
+!MESSAGE "cf_data - Win32 Debug" (based on "Win32 (x86) Generic Project")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+MTL=midl.exe
+
+!IF "$(CFG)" == "cf_data - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "."
+# PROP Intermediate_Dir "."
+# PROP Target_Dir ""
+
+!ELSEIF "$(CFG)" == "cf_data - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "cf_data___Win32_Debug"
+# PROP BASE Intermediate_Dir "cf_data___Win32_Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "."
+# PROP Intermediate_Dir "."
+# PROP Target_Dir ""
+
+!ENDIF
+
+# Begin Target
+
+# Name "cf_data - Win32 Release"
+# Name "cf_data - Win32 Debug"
+# Begin Source File
+
+SOURCE=..\..\src\cf.data.pre
+
+!IF "$(CFG)" == "cf_data - Win32 Release"
+
+# PROP Ignore_Default_Tool 1
+USERDEP__CF_DA="squid_mswin.mak"
+# Begin Custom Build
+InputDir=\WORK\CYGWIN-SVC-2_5\src
+ProjDir=.
+InputPath=..\..\src\cf.data.pre
+
+BuildCmds= \
+ nmake /f $(ProjDir)\squid_mswin.mak cf.data \
+ nmake /f $(ProjDir)\squid_mswin.mak cf_gen_defines.h \
+
+
+"$(InputDir)\cf.data" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(InputDir)\cf_gen_defines.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "cf_data - Win32 Debug"
+
+# PROP Ignore_Default_Tool 1
+USERDEP__CF_DA="squid_mswin.mak"
+# Begin Custom Build
+InputDir=\WORK\CYGWIN-SVC-2_5\src
+ProjDir=.
+InputPath=..\..\src\cf.data.pre
+
+BuildCmds= \
+ nmake /f $(ProjDir)\squid_mswin.mak cf.data \
+ nmake /f $(ProjDir)\squid_mswin.mak cf_gen_defines.h \
+
+
+"$(InputDir)\cf.data" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(InputDir)\cf_gen_defines.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+# End Custom Build
+
+!ENDIF
+
+# End Source File
+# End Target
+# End Project
Index: squid/port/win32/default_config_file.cmd
diff -u /dev/null squid/port/win32/default_config_file.cmd:1.1.2.5
--- /dev/null Thu Jan 1 01:00:00 1970
+++ squid/port/win32/default_config_file.cmd Sat Apr 23 03:10:01 2005
@@ -0,0 +1,9 @@
+@echo off
+echo /* automatically generated by %0 %*
+echo * do not edit
+echo */
+echo #define DEFAULT_CONFIG_FILE "%1"
+echo #define DEFAULT_SQUID_ERROR_DIR "%2"
+echo #define DEFAULT_CACHEMGR_CONFIG "%3"
+echo /* Version number of package */
+FOR /F "usebackq skip=2 tokens=2 delims=) " %%i in (`find "AM_INIT_AUTOMAKE" ../../configure.in`) do echo #define VERSION "%%i"
Index: squid/port/win32/doc.dsp
diff -u /dev/null squid/port/win32/doc.dsp:1.1.2.1
--- /dev/null Thu Jan 1 01:00:00 1970
+++ squid/port/win32/doc.dsp Sun May 1 00:50:11 2005
@@ -0,0 +1,133 @@
+# Microsoft Developer Studio Project File - Name="doc" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Generic Project" 0x010a
+
+CFG=doc - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "doc.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "doc.mak" CFG="doc - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "doc - Win32 Release" (based on "Win32 (x86) Generic Project")
+!MESSAGE "doc - Win32 Debug" (based on "Win32 (x86) Generic Project")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+MTL=midl.exe
+
+!IF "$(CFG)" == "doc - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "doc___Win32_Release"
+# PROP BASE Intermediate_Dir "doc___Win32_Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "doc___Win32_Release"
+# PROP Intermediate_Dir "doc___Win32_Release"
+# PROP Target_Dir ""
+
+!ELSEIF "$(CFG)" == "doc - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "doc___Win32_Debug"
+# PROP BASE Intermediate_Dir "doc___Win32_Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "doc___Win32_Debug"
+# PROP Intermediate_Dir "doc___Win32_Debug"
+# PROP Target_Dir ""
+
+!ENDIF
+
+# Begin Target
+
+# Name "doc - Win32 Release"
+# Name "doc - Win32 Debug"
+# Begin Source File
+
+SOURCE=..\..\doc\cachemgr.cgi.8.in
+
+!IF "$(CFG)" == "doc - Win32 Release"
+
+# PROP Ignore_Default_Tool 1
+USERDEP__CACHE="squid_mswin.mak"
+# Begin Custom Build
+InputDir=\work\nt-2.5\doc
+ProjDir=.
+InputPath=..\..\doc\cachemgr.cgi.8.in
+
+"$(InputDir)\cachemgr.cgi.8" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ nmake /f $(ProjDir)\squid_mswin.mak cachemgr.cgi.8
+
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "doc - Win32 Debug"
+
+# PROP Ignore_Default_Tool 1
+USERDEP__CACHE="squid_mswin.mak"
+# Begin Custom Build
+InputDir=\work\nt-2.5\doc
+ProjDir=.
+InputPath=..\..\doc\cachemgr.cgi.8.in
+
+"$(InputDir)\cachemgr.cgi.8" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ nmake /f $(ProjDir)\squid_mswin.mak cachemgr.cgi.8
+
+# End Custom Build
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\doc\squid.8.in
+
+!IF "$(CFG)" == "doc - Win32 Release"
+
+# PROP Ignore_Default_Tool 1
+USERDEP__SQUID="squid_mswin.mak"
+# Begin Custom Build
+InputDir=\work\nt-2.5\doc
+ProjDir=.
+InputPath=..\..\doc\squid.8.in
+
+"$(InputDir)\squid.8" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ nmake /f $(ProjDir)\squid_mswin.mak squid.8
+
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "doc - Win32 Debug"
+
+# PROP Ignore_Default_Tool 1
+USERDEP__SQUID="squid_mswin.mak"
+# Begin Custom Build
+InputDir=\work\nt-2.5\doc
+ProjDir=.
+InputPath=..\..\doc\squid.8.in
+
+"$(InputDir)\squid.8" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ nmake /f $(ProjDir)\squid_mswin.mak squid.8
+
+# End Custom Build
+
+!ENDIF
+
+# End Source File
+# End Target
+# End Project
Index: squid/port/win32/icons.cmd
diff -u /dev/null squid/port/win32/icons.cmd:1.1.8.1
--- /dev/null Thu Jan 1 01:00:00 1970
+++ squid/port/win32/icons.cmd Sun Sep 15 12:14:56 2002
@@ -0,0 +1,4 @@
+@echo off
+cd /D %1
+sh icons.shar
+attrib -r *.gif
Index: squid/port/win32/icons.dsp
diff -u /dev/null squid/port/win32/icons.dsp:1.1.8.1
--- /dev/null Thu Jan 1 01:00:00 1970
+++ squid/port/win32/icons.dsp Sun Sep 15 12:14:56 2002
@@ -0,0 +1,256 @@
+# Microsoft Developer Studio Project File - Name="icons" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Generic Project" 0x010a
+
+CFG=icons - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "icons.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "icons.mak" CFG="icons - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "icons - Win32 Release" (based on "Win32 (x86) Generic Project")
+!MESSAGE "icons - Win32 Debug" (based on "Win32 (x86) Generic Project")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+MTL=midl.exe
+
+!IF "$(CFG)" == "icons - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "..\..\icons"
+# PROP Intermediate_Dir "."
+# PROP Target_Dir ""
+
+!ELSEIF "$(CFG)" == "icons - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "..\..\icons"
+# PROP Intermediate_Dir "."
+# PROP Target_Dir ""
+
+!ENDIF
+
+# Begin Target
+
+# Name "icons - Win32 Release"
+# Name "icons - Win32 Debug"
+# Begin Source File
+
+SOURCE=..\..\icons\icons.shar
+
+!IF "$(CFG)" == "icons - Win32 Release"
+
+# PROP Intermediate_Dir "."
+# Begin Custom Build
+OutDir=.\..\..\icons
+ProjDir=.
+InputPath=..\..\icons\icons.shar
+
+BuildCmds= \
+ nmake /f $(ProjDir)\squid_mswin.mak icons
+
+"$(OutDir)\anthony-binhex.gif" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\anthony-bomb.gif" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\anthony-box.gif" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\anthony-box2.gif" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\anthony-c.gif" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\anthony-compressed.gif" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\anthony-dir.gif" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\anthony-dirup.gif" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\anthony-dvi.gif" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\anthony-f.gif" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\anthony-image.gif" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\anthony-image2.gif" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\anthony-layout.gif" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\anthony-link.gif" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\anthony-movie.gif" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\anthony-pdf.gif" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\anthony-portal.gif" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\anthony-ps.gif" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\anthony-quill.gif" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\anthony-script.gif" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\anthony-sound.gif" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\anthony-tar.gif" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\anthony-tex.gif" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\anthony-text.gif" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\anthony-unknown.gif" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\anthony-xbm.gif" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\anthony-xpm.gif" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "icons - Win32 Debug"
+
+# PROP Intermediate_Dir "."
+# Begin Custom Build
+OutDir=.\..\..\icons
+ProjDir=.
+InputPath=..\..\icons\icons.shar
+
+BuildCmds= \
+ nmake /f $(ProjDir)\squid_mswin.mak icons
+
+"$(OutDir)\anthony-binhex.gif" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\anthony-bomb.gif" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\anthony-box.gif" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\anthony-box2.gif" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\anthony-c.gif" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\anthony-compressed.gif" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\anthony-dir.gif" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\anthony-dirup.gif" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\anthony-dvi.gif" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\anthony-f.gif" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\anthony-image.gif" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\anthony-image2.gif" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\anthony-layout.gif" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\anthony-link.gif" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\anthony-movie.gif" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\anthony-pdf.gif" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\anthony-portal.gif" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\anthony-ps.gif" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\anthony-quill.gif" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\anthony-script.gif" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\anthony-sound.gif" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\anthony-tar.gif" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\anthony-tex.gif" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\anthony-text.gif" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\anthony-unknown.gif" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\anthony-xbm.gif" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\anthony-xpm.gif" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+# End Custom Build
+
+!ENDIF
+
+# End Source File
+# End Target
+# End Project
Index: squid/port/win32/install.dsp
diff -u /dev/null squid/port/win32/install.dsp:1.1.2.1
--- /dev/null Thu Jan 1 01:00:00 1970
+++ squid/port/win32/install.dsp Fri May 3 11:39:56 2002
@@ -0,0 +1,94 @@
+# Microsoft Developer Studio Project File - Name="install" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Generic Project" 0x010a
+
+CFG=install - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "install.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "install.mak" CFG="install - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "install - Win32 Release" (based on "Win32 (x86) Generic Project")
+!MESSAGE "install - Win32 Debug" (based on "Win32 (x86) Generic Project")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+MTL=midl.exe
+
+!IF "$(CFG)" == "install - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Target_Dir ""
+
+!ELSEIF "$(CFG)" == "install - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Target_Dir ""
+
+!ENDIF
+
+# Begin Target
+
+# Name "install - Win32 Release"
+# Name "install - Win32 Debug"
+# Begin Source File
+
+SOURCE=.\update.cmd
+
+!IF "$(CFG)" == "install - Win32 Release"
+
+# PROP Ignore_Default_Tool 1
+# Begin Custom Build
+ProjDir=.
+InputPath=.\update.cmd
+
+"dummy.file" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(ProjDir)\update.cmd release c:\squid
+
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "install - Win32 Debug"
+
+# PROP Ignore_Default_Tool 1
+# Begin Custom Build
+ProjDir=.
+InputPath=.\update.cmd
+
+"dummy.file" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(ProjDir)\update.cmd debug c:\squid
+
+# End Custom Build
+
+!ENDIF
+
+# End Source File
+# End Target
+# End Project
Index: squid/port/win32/modules.dsp
diff -u /dev/null squid/port/win32/modules.dsp:1.1.2.4
--- /dev/null Thu Jan 1 01:00:00 1970
+++ squid/port/win32/modules.dsp Sun Jun 1 09:07:34 2003
@@ -0,0 +1,205 @@
+# Microsoft Developer Studio Project File - Name="modules" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Generic Project" 0x010a
+
+CFG=modules - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "modules.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "modules.mak" CFG="modules - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "modules - Win32 Release" (based on "Win32 (x86) Generic Project")
+!MESSAGE "modules - Win32 Debug" (based on "Win32 (x86) Generic Project")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+MTL=midl.exe
+
+!IF "$(CFG)" == "modules - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "..\..\src"
+# PROP Intermediate_Dir "."
+# PROP Target_Dir ""
+
+!ELSEIF "$(CFG)" == "modules - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "modules___Win32_Debug"
+# PROP BASE Intermediate_Dir "modules___Win32_Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "..\..\src"
+# PROP Intermediate_Dir "."
+# PROP Target_Dir ""
+
+!ENDIF
+
+# Begin Target
+
+# Name "modules - Win32 Release"
+# Name "modules - Win32 Debug"
+# Begin Source File
+
+SOURCE=.\auth_modules.cmd
+
+!IF "$(CFG)" == "modules - Win32 Release"
+
+# PROP Intermediate_Dir "."
+# PROP Ignore_Default_Tool 1
+USERDEP__AUTH_="squid_mswin.mak"
+# Begin Custom Build
+OutDir=.\..\..\src
+ProjDir=.
+InputPath=.\auth_modules.cmd
+
+"$(OutDir)\auth_modules.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ nmake /f $(ProjDir)\squid_mswin.mak auth_modules.c
+
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "modules - Win32 Debug"
+
+# PROP Intermediate_Dir "."
+# PROP Ignore_Default_Tool 1
+USERDEP__AUTH_="squid_mswin.mak"
+# Begin Custom Build
+OutDir=.\..\..\src
+ProjDir=.
+InputPath=.\auth_modules.cmd
+
+"$(OutDir)\auth_modules.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ nmake /f $(ProjDir)\squid_mswin.mak auth_modules.c
+
+# End Custom Build
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=.\default_config_file.cmd
+
+!IF "$(CFG)" == "modules - Win32 Release"
+
+USERDEP__DEFAU="squid_mswin.mak" "..\..\configure.in"
+# Begin Custom Build
+ProjDir=.
+InputPath=.\default_config_file.cmd
+
+"$(ProjDir)\include\default_config_file.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ nmake /f $(ProjDir)\squid_mswin.mak default_config_file.h
+
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "modules - Win32 Debug"
+
+USERDEP__DEFAU="squid_mswin.mak" "..\..\configure.in"
+# Begin Custom Build
+ProjDir=.
+InputPath=.\default_config_file.cmd
+
+"$(ProjDir)\include\default_config_file.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ nmake /f $(ProjDir)\squid_mswin.mak default_config_file.h
+
+# End Custom Build
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=.\repl_modules.cmd
+
+!IF "$(CFG)" == "modules - Win32 Release"
+
+# PROP Intermediate_Dir "."
+# PROP Ignore_Default_Tool 1
+USERDEP__REPL_="squid_mswin.mak"
+# Begin Custom Build
+OutDir=.\..\..\src
+ProjDir=.
+InputPath=.\repl_modules.cmd
+
+"$(OutDir)\repl_modules.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ nmake /f $(ProjDir)\squid_mswin.mak repl_modules.c
+
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "modules - Win32 Debug"
+
+# PROP Intermediate_Dir "."
+# PROP Ignore_Default_Tool 1
+USERDEP__REPL_="squid_mswin.mak"
+# Begin Custom Build
+OutDir=.\..\..\src
+ProjDir=.
+InputPath=.\repl_modules.cmd
+
+"$(OutDir)\repl_modules.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ nmake /f $(ProjDir)\squid_mswin.mak repl_modules.c
+
+# End Custom Build
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=.\store_modules.cmd
+
+!IF "$(CFG)" == "modules - Win32 Release"
+
+# PROP Intermediate_Dir "."
+# PROP Ignore_Default_Tool 1
+USERDEP__STORE="squid_mswin.mak"
+# Begin Custom Build
+OutDir=.\..\..\src
+ProjDir=.
+InputPath=.\store_modules.cmd
+
+"$(OutDir)\store_modules.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ nmake /f $(ProjDir)\squid_mswin.mak store_modules.c
+
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "modules - Win32 Debug"
+
+# PROP Intermediate_Dir "."
+# PROP Ignore_Default_Tool 1
+USERDEP__STORE="squid_mswin.mak"
+# Begin Custom Build
+OutDir=.\..\..\src
+ProjDir=.
+InputPath=.\store_modules.cmd
+
+"$(OutDir)\store_modules.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ nmake /f $(ProjDir)\squid_mswin.mak store_modules.c
+
+# End Custom Build
+
+!ENDIF
+
+# End Source File
+# End Target
+# End Project
Index: squid/port/win32/readme.txt
diff -u /dev/null squid/port/win32/readme.txt:1.1.2.1
--- /dev/null Thu Jan 1 01:00:00 1970
+++ squid/port/win32/readme.txt Sat Jun 14 03:35:44 2003
@@ -0,0 +1,3 @@
+To contact the maintainer of this package, e-mail on squidnt@acmeconsulting.it.
+The latest version and documentation can be found on
+http://www.acmeconsulting.it/SquidNT.htm.
Index: squid/port/win32/repl_modules.cmd
diff -u /dev/null squid/port/win32/repl_modules.cmd:1.1.2.2
--- /dev/null Thu Jan 1 01:00:00 1970
+++ squid/port/win32/repl_modules.cmd Wed Mar 27 13:01:10 2002
@@ -0,0 +1,16 @@
+@echo off
+if exist %temp%\repl_modules.txt del %temp%\repl_modules.txt
+:loop
+echo %1 >> %temp%\repl_modules.txt
+shift /1
+if NOT "%1"=="" goto :loop
+echo /* automatically generated by %0 %*
+echo * do not edit
+echo */
+echo #include "squid.h"
+for /F %%m in (%temp%\repl_modules.txt) do echo extern REMOVALPOLICYCREATE createRemovalPolicy_%%m;
+echo void storeReplSetup(void)
+echo {
+for /F %%m in (%temp%\repl_modules.txt) do echo storeReplAdd("%%m", createRemovalPolicy_%%m);
+echo }
+if exist %temp%\repl_modules.txt del %temp%\repl_modules.txt
Index: squid/port/win32/squid.dsw
diff -u /dev/null squid/port/win32/squid.dsw:1.1.2.27
--- /dev/null Thu Jan 1 01:00:00 1970
+++ squid/port/win32/squid.dsw Sun May 1 00:50:11 2005
@@ -0,0 +1,632 @@
+Microsoft Developer Studio Workspace File, Format Version 6.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "Build"=".\Build.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name cachemgr
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name dnsserver
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name fake_auth
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name ip_user_check
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name LDAP_auth
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name LDAP_group
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name NCSA_auth
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name nt_auth
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name ntlm_win32_auth
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name squid
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name squidclient
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name unlinkd
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name win32_check_group
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name icons
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name doc
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "LDAP_auth"=".\LDAP_auth\LDAP_auth.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name libmiscutil
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "LDAP_group"=".\LDAP_group\LDAP_group.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "NCSA_auth"=".\NCSA_auth\NCSA_auth.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name libmiscutil
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "PerlPreprocessing"=".\PerlPreprocessing.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "cachemgr"=".\cachemgr\cachemgr.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name libmiscutil
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "cf_data"=".\cf_data.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "cf_gen"=".\cf_gen\cf_gen.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name libmiscutil
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name cf_data
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "dnsserver"=".\dnsserver\dnsserver.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name libmiscutil
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "doc"=".\doc.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "fake_auth"=".\fake_auth\fake_auth.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name libmiscutil
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "icons"=".\icons.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "install"=".\install.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name Build
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "ip_user_check"=".\ip_user_check\ip_user_check.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name libmiscutil
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "libawin32"=".\libawin32\libawin32.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name modules
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "libbasic"=".\libbasic\libbasic.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name modules
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "libdigest"=".\libdigest\libdigest.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name modules
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "libgnuregex"=".\libgnuregex\libgnuregex.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name modules
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "libheap"=".\libheap\libheap.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name modules
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "liblru"=".\liblru\liblru.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name modules
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "libmiscutil"=".\libmiscutil\libmiscutil.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name modules
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "libntlm"=".\libntlm\libntlm.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name modules
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "libntlmauth"=".\libntlmauth\libntlmauth.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name modules
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "libnull"=".\libnull\libnull.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name modules
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "libsnmp"=".\libsnmp\libsnmp.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name modules
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "libsspwin32"=".\libsspwin32\libsspwin32.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "libufs"=".\libufs\libufs.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name modules
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "modules"=".\modules.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "nt_auth"=".\nt_auth\nt_auth.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name libmiscutil
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name libsspwin32
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "ntlm_win32_auth"=".\ntlm_win32_auth\ntlm_win32_auth.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name libntlmauth
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name libmiscutil
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name libsspwin32
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "pinger"=".\pinger\pinger.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name libmiscutil
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name PerlPreprocessing
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "squid"=".\squid\squid.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name libgnuregex
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name libmiscutil
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name PerlPreprocessing
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name libntlmauth
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name libsnmp
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name modules
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name squid_conf_default
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name libbasic
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name liblru
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name libntlm
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name libufs
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name libawin32
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name libheap
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name libdigest
+ End Project Dependency
+ Begin Project Dependency
+ Project_Dep_Name libnull
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "squid_conf_default"=".\squid_conf_default.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name cf_gen
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "squidclient"=".\squidclient\squidclient.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name libmiscutil
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "unlinkd"=".\unlinkd\unlinkd.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "win32_check_group"=".\win32_check_group\win32_check_group.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name libmiscutil
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
Index: squid/port/win32/squid_conf_default.dsp
diff -u /dev/null squid/port/win32/squid_conf_default.dsp:1.1.2.3
--- /dev/null Thu Jan 1 01:00:00 1970
+++ squid/port/win32/squid_conf_default.dsp Wed Mar 27 13:01:10 2002
@@ -0,0 +1,114 @@
+# Microsoft Developer Studio Project File - Name="squid_conf_default" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Generic Project" 0x010a
+
+CFG=squid_conf_default - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "squid_conf_default.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "squid_conf_default.mak" CFG="squid_conf_default - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "squid_conf_default - Win32 Release" (based on "Win32 (x86) Generic Project")
+!MESSAGE "squid_conf_default - Win32 Debug" (based on "Win32 (x86) Generic Project")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+MTL=midl.exe
+
+!IF "$(CFG)" == "squid_conf_default - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "..\..\src"
+# PROP Intermediate_Dir "."
+# PROP Target_Dir ""
+# Begin Special Build Tool
+SOURCE="$(InputPath)"
+PostBuild_Cmds=del ..\..\src\squid.conf.default move squid.conf.default ..\..\src\squid.conf.default del ..\..\src\cf_parser.h move cf_parser.h ..\..\src\cf_parser.h
+# End Special Build Tool
+
+!ELSEIF "$(CFG)" == "squid_conf_default - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "squid_conf_default___Win32_Debug"
+# PROP BASE Intermediate_Dir "squid_conf_default___Win32_Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "..\..\src"
+# PROP Intermediate_Dir "."
+# PROP Target_Dir ""
+# Begin Special Build Tool
+SOURCE="$(InputPath)"
+PostBuild_Cmds=del ..\..\src\squid.conf.default move squid.conf.default ..\..\src\squid.conf.default del ..\..\src\cf_parser.h move cf_parser.h ..\..\src\cf_parser.h
+# End Special Build Tool
+
+!ENDIF
+
+# Begin Target
+
+# Name "squid_conf_default - Win32 Release"
+# Name "squid_conf_default - Win32 Debug"
+# Begin Source File
+
+SOURCE=..\..\src\cf.data
+
+!IF "$(CFG)" == "squid_conf_default - Win32 Release"
+
+# PROP Ignore_Default_Tool 1
+# Begin Custom Build
+OutDir=.\..\..\src
+ProjDir=.
+InputPath=..\..\src\cf.data
+
+BuildCmds= \
+ $(ProjDir)\cf_gen\Release\cf_gen $(InputPath)
+
+"$(OutDir)\squid.conf.default" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\cf_parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "squid_conf_default - Win32 Debug"
+
+# PROP Ignore_Default_Tool 1
+# Begin Custom Build
+OutDir=.\..\..\src
+ProjDir=.
+InputPath=..\..\src\cf.data
+
+BuildCmds= \
+ $(ProjDir)\cf_gen\debug\cf_gen $(InputPath)
+
+"$(OutDir)\squid.conf.default" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(OutDir)\cf_parser.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+# End Custom Build
+
+!ENDIF
+
+# End Source File
+# End Target
+# End Project
Index: squid/port/win32/squid_mswin.mak
diff -u /dev/null squid/port/win32/squid_mswin.mak:1.1.2.9
--- /dev/null Thu Jan 1 01:00:00 1970
+++ squid/port/win32/squid_mswin.mak Sun Oct 2 08:22:21 2005
@@ -0,0 +1,103 @@
+THISMAKEFILE = squid_mswin.mak
+
+prefix = c:/squid
+exec_prefix = $(prefix)/bin
+exec_suffix = .exe
+cgi_suffix = .cgi
+top_srcdir = ..\..
+bindir = $(exec_prefix)
+libexecdir = $(prefix)/libexec
+sysconfdir = $(prefix)/etc
+datadir = $(prefix)/share
+localstatedir = $(prefix)/var
+srcdir = ..\..\src
+docdir = ..\..\doc
+win32includedir = .\include
+iconsdir = $(top_srcdir)\icons
+
+# Gotta love the DOS legacy
+#
+SQUID_EXE = squid$(exec_suffix)
+CLIENT_EXE = client$(exec_suffix)
+DNSSERVER_EXE = dnsserver$(exec_suffix)
+UNLINKD_EXE = unlinkd$(exec_suffix)
+PINGER_EXE = pinger$(exec_suffix)
+CACHEMGR_EXE = cachemgr$(cgi_suffix)
+DISKD_EXE = diskd$(exec_suffix)
+
+DEFAULT_HTTP_PORT = 3128
+DEFAULT_ICP_PORT = 3130
+DEFAULT_PREFIX = $(prefix)
+DEFAULT_CONFIG_FILE = $(sysconfdir)/squid.conf
+DEFAULT_CACHEMGR_CONFIG = $(sysconfdir)/cachemgr.conf
+DEFAULT_MIME_TABLE = $(sysconfdir)/mime.conf
+DEFAULT_DNSSERVER = $(libexecdir)/$(DNSSERVER_EXE)
+DEFAULT_LOG_PREFIX = $(localstatedir)/logs
+DEFAULT_CACHE_LOG = $(DEFAULT_LOG_PREFIX)/cache.log
+DEFAULT_ACCESS_LOG = $(DEFAULT_LOG_PREFIX)/access.log
+DEFAULT_STORE_LOG = $(DEFAULT_LOG_PREFIX)/store.log
+DEFAULT_PID_FILE = $(DEFAULT_LOG_PREFIX)/squid.pid
+DEFAULT_SWAP_DIR = $(localstatedir)/cache
+DEFAULT_PINGER = $(libexecdir)/$(PINGER_EXE)
+DEFAULT_UNLINKD = $(libexecdir)/$(UNLINKD_EXE)
+DEFAULT_DISKD = $(libexecdir)/$(DISKD_EXE)
+DEFAULT_ICON_DIR = $(datadir)/icons
+DEFAULT_ERROR_DIR = $(datadir)/errors/English
+DEFAULT_MIB_PATH = $(datadir)/mib.txt
+DEFAULT_HOSTS = none
+
+AUTH_MODULES = basic ntlm digest
+REPL_POLICIES = lru heap
+STORE_MODULES = ufs awin32 null
+
+SUBSTITUTE=sed "\
+ s%@DEFAULT_CONFIG_FILE@%$(DEFAULT_CONFIG_FILE)%g;\
+ s%@DEFAULT_CACHEMGR_CONFIG@%$(DEFAULT_CACHEMGR_CONFIG)%g;\
+ s%@DEFAULT_ERROR_DIR@%$(DEFAULT_ERROR_DIR)%g;\
+ s%@DEFAULT_MIME_TABLE@%$(DEFAULT_MIME_TABLE)%g;\
+ "
+
+cf_gen_defines.h: $(srcdir)\cf_gen_defines $(srcdir)\cf.data.pre
+ gawk -f $(srcdir)\cf_gen_defines <$(srcdir)\cf.data.pre >$(srcdir)\cf_gen_defines.h
+
+cf.data: $(srcdir)\cf.data.pre .\$(THISMAKEFILE)
+ sed "\
+ s%@DEFAULT_HTTP_PORT@%$(DEFAULT_HTTP_PORT)%g;\
+ s%@DEFAULT_ICP_PORT@%$(DEFAULT_ICP_PORT)%g;\
+ s%@DEFAULT_MIME_TABLE@%$(DEFAULT_MIME_TABLE)%g;\
+ s%@DEFAULT_DNSSERVER@%$(DEFAULT_DNSSERVER)%g;\
+ s%@DEFAULT_UNLINKD@%$(DEFAULT_UNLINKD)%g;\
+ s%@DEFAULT_PINGER@%$(DEFAULT_PINGER)%g;\
+ s%@DEFAULT_DISKD@%$(DEFAULT_DISKD)%g;\
+ s%@DEFAULT_CACHE_LOG@%$(DEFAULT_CACHE_LOG)%g;\
+ s%@DEFAULT_ACCESS_LOG@%$(DEFAULT_ACCESS_LOG)%g;\
+ s%@DEFAULT_STORE_LOG@%$(DEFAULT_STORE_LOG)%g;\
+ s%@DEFAULT_PID_FILE@%$(DEFAULT_PID_FILE)%g;\
+ s%@DEFAULT_SWAP_DIR@%$(DEFAULT_SWAP_DIR)%g;\
+ s%@DEFAULT_ICON_DIR@%$(DEFAULT_ICON_DIR)%g;\
+ s%@DEFAULT_MIB_PATH@%$(DEFAULT_MIB_PATH)%g;\
+ s%@DEFAULT_ERROR_DIR@%$(DEFAULT_ERROR_DIR)%g;\
+ s%@DEFAULT_PREFIX@%$(DEFAULT_PREFIX)%g;\
+ s%@DEFAULT_HOSTS@%$(DEFAULT_HOSTS)%g;"\
+ < $(srcdir)\cf.data.pre >$(srcdir)\cf.data
+
+auth_modules.c: .\auth_modules.cmd .\$(THISMAKEFILE)
+ .\auth_modules.cmd $(AUTH_MODULES) >$(srcdir)\auth_modules.c
+
+repl_modules.c: .\repl_modules.cmd .\$(THISMAKEFILE)
+ .\repl_modules.cmd $(REPL_POLICIES) >$(srcdir)\repl_modules.c
+
+store_modules.c: .\store_modules.cmd .\$(THISMAKEFILE)
+ .\store_modules.cmd $(STORE_MODULES) >$(srcdir)\store_modules.c
+
+default_config_file.h: .\$(THISMAKEFILE)
+ .\default_config_file.cmd $(DEFAULT_CONFIG_FILE) $(DEFAULT_ERROR_DIR) $(DEFAULT_CACHEMGR_CONFIG) >$(win32includedir)\default_config_file.h
+
+icons: .\icons.cmd $(iconsdir)\icons.shar
+ .\icons.cmd $(iconsdir)
+
+squid.8: $(docdir)\squid.8.in .\$(THISMAKEFILE)
+ $(SUBSTITUTE) < $(docdir)\squid.8.in > $(docdir)\squid.8
+
+cachemgr.cgi.8: $(docdir)\cachemgr.cgi.8.in .\$(THISMAKEFILE)
+ $(SUBSTITUTE) < $(docdir)\cachemgr.cgi.8.in > $(docdir)\cachemgr.cgi.8
Index: squid/port/win32/store_modules.cmd
diff -u /dev/null squid/port/win32/store_modules.cmd:1.1.2.2
--- /dev/null Thu Jan 1 01:00:00 1970
+++ squid/port/win32/store_modules.cmd Wed Mar 27 13:01:10 2002
@@ -0,0 +1,16 @@
+@echo off
+if exist %temp%\store_modules.txt del %temp%\store_modules.txt
+:loop
+echo %1 >> %temp%\store_modules.txt
+shift /1
+if NOT "%1"=="" goto :loop
+echo /* automatically generated by %0 %*
+echo * do not edit
+echo */
+echo #include "squid.h"
+for /F %%m in (%temp%\store_modules.txt) do echo extern STSETUP storeFsSetup_%%m;
+echo void storeFsSetup(void)
+echo {
+for /F %%m in (%temp%\store_modules.txt) do echo storeFsAdd("%%m", storeFsSetup_%%m);
+echo }
+if exist %temp%\store_modules.txt del %temp%\store_modules.txt
Index: squid/port/win32/update.cmd
diff -u /dev/null squid/port/win32/update.cmd:1.1.2.27
--- /dev/null Thu Jan 1 01:00:00 1970
+++ squid/port/win32/update.cmd Tue Nov 8 06:44:26 2005
@@ -0,0 +1,63 @@
+@echo off
+if %1==release net stop "SquidNT"
+
+if not exist %2 md %2
+if not exist %2\bin md %2\bin
+if not exist %2\sbin md %2\sbin
+if not exist %2\libexec md %2\libexec
+if not exist %2\docs md %2\docs
+if not exist %2\etc md %2\etc
+if not exist %2\var\logs md %2\var\logs
+if not exist %2\share\errors\english md %2\share\errors\english
+if not exist %2\share\errors\italian md %2\share\errors\italian
+if not exist %2\share\icons md %2\share\icons
+
+copy %0\..\squid\%1\squid.exe %2\sbin\squid.exe
+copy %0\..\unlinkd\%1\unlinkd.exe %2\libexec\unlinkd.exe
+copy %0\..\dnsserver\%1\dnsserver.exe %2\libexec\dnsserver.exe
+copy %0\..\pinger\%1\pinger.exe %2\libexec\pinger.exe
+copy %0\..\squidclient\%1\squidclient.exe %2\bin\squidclient.exe
+copy %0\..\fake_auth\%1\fake_auth.exe %2\libexec\fakeauth_auth.exe
+copy %0\..\nt_auth\%1\nt_auth.exe %2\libexec\win32_auth.exe
+copy %0\..\ncsa_auth\%1\ncsa_auth.exe %2\libexec\ncsa_auth.exe
+copy %0\..\ntlm_win32_auth\%1\ntlm_win32_auth.exe %2\libexec\win32_ntlm_auth.exe
+copy %0\..\ldap_auth\%1\ldap_auth.exe %2\libexec\squid_ldap_auth.exe
+copy %0\..\ldap_group\%1\ldap_group.exe %2\libexec\squid_ldap_group.exe
+copy %0\..\win32_check_group\%1\win32_check_group.exe %2\libexec\win32_check_group.exe
+copy %0\..\ip_user_check\%1\ip_user_check.exe %2\libexec\ip_user_check.exe
+copy %0\..\cachemgr\%1\cachemgr.exe %2\libexec\cachemgr.cgi
+
+copy %0\..\..\..\src\squid.conf.default %2\etc\squid.conf.default
+copy %0\..\..\..\src\mime.conf.default %2\etc\mime.conf.default
+copy %0\..\..\..\src\cachemgr.conf %2\etc\cachemgr.conf.default
+copy %0\..\..\..\src\mib.txt %2\share\mib.txt
+
+copy %0\..\..\..\errors\english\err_* %2\share\errors\english > NUL
+copy %0\..\..\..\errors\italian\err_* %2\share\errors\italian > NUL
+
+copy %0\..\..\..\icons\*.gif %2\share\icons > NUL
+
+copy %0\..\readme.txt %2\docs\readme.txt
+copy %0\..\..\..\helpers\ntlm_auth\NTLMSSP-WIN32\readme.txt %2\docs\win32_ntlm_auth.txt
+copy %0\..\..\..\helpers\external_acl\win32_group\readme.txt %2\docs\win32_check_group.txt
+copy %0\..\..\..\helpers\external_acl\ip_user\README %2\docs\ip_user_check.txt
+copy %0\..\..\..\helpers\basic_auth\win32_locallogon\readme.txt %2\docs\win32_auth.txt
+copy %0\..\..\..\doc\win32-relnotes.html %2\docs\win32-relnotes.html
+copy %0\..\..\..\doc\debug-sections.txt %2\docs\debug-sections.txt
+copy %0\..\..\..\doc\HTTP-codes.txt %2\docs\HTTP-codes.txt
+copy %0\..\..\..\doc\release-notes\release-2.5.html %2\docs\release-2.5.html
+type %0\..\..\..\helpers\basic_auth\LDAP\squid_ldap_auth.8 | man2htm2 > %2\docs\squid_ldap_auth.html
+type %0\..\..\..\helpers\external_acl\LDAP_group\squid_ldap_group.8 | man2htm2 > %2\docs\squid_ldap_group.html
+type %0\..\..\..\doc\squid.8 | man2htm2 > %2\docs\squid.html
+type %0\..\..\..\doc\cachemgr.cgi.8 | man2htm2 > %2\docs\cachemgr.cgi.html
+
+copy %0\..\..\..\README %2\README
+copy %0\..\..\..\COPYRIGHT %2\COPYRIGHT
+copy %0\..\..\..\COPYING %2\COPYING
+copy %0\..\..\..\CONTRIBUTORS %2\CONTRIBUTORS
+copy %0\..\..\..\CREDITS %2\CREDITS
+copy %0\..\..\..\SPONSORS %2\SPONSORS
+copy %0\..\..\..\QUICKSTART %2\QUICKSTART
+copy %0\..\..\..\ChangeLog %2\ChangeLog
+
+if %1==release net start "SquidNT"
Index: squid/port/win32/LDAP_auth/.cvsignore
diff -u /dev/null squid/port/win32/LDAP_auth/.cvsignore:1.1.2.1
--- /dev/null Thu Jan 1 01:00:00 1970
+++ squid/port/win32/LDAP_auth/.cvsignore Mon Apr 8 12:27:23 2002
@@ -0,0 +1,3 @@
+.cvsignore
+Debug
+Release
Index: squid/port/win32/LDAP_auth/LDAP_auth.dsp
diff -u /dev/null squid/port/win32/LDAP_auth/LDAP_auth.dsp:1.1.2.8
--- /dev/null Thu Jan 1 01:00:00 1970
+++ squid/port/win32/LDAP_auth/LDAP_auth.dsp Fri Apr 22 12:08:52 2005
@@ -0,0 +1,109 @@
+# Microsoft Developer Studio Project File - Name="LDAP_auth" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Application" 0x0101
+
+CFG=LDAP_auth - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "LDAP_auth.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "LDAP_auth.mak" CFG="LDAP_auth - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "LDAP_auth - Win32 Release" (based on "Win32 (x86) Application")
+!MESSAGE "LDAP_auth - Win32 Debug" (based on "Win32 (x86) Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+MTL=midl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "LDAP_auth - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /G6 /MT /W3 /GX /O2 /I "../../../include" /I "../../../src" /I "../include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "HAVE_CONFIG_H" /D _FILE_OFFSET_BITS=64 /YX /FD /c
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x410 /d "NDEBUG"
+# ADD RSC /l 0x410 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
+# ADD LINK32 Wldap32.lib ws2_32.lib psapi.lib /nologo /subsystem:console /machine:I386
+# SUBTRACT LINK32 /pdb:none
+
+!ELSEIF "$(CFG)" == "LDAP_auth - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /G6 /MTd /W3 /Gm /GX /ZI /Od /I "../../../include" /I "../../../src" /I "../include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "HAVE_CONFIG_H" /D _FILE_OFFSET_BITS=64 /YX /FD /GZ /c
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x410 /d "_DEBUG"
+# ADD RSC /l 0x410 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 Wldap32.lib ws2_32.lib psapi.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# SUBTRACT LINK32 /pdb:none
+
+!ENDIF
+
+# Begin Target
+
+# Name "LDAP_auth - Win32 Release"
+# Name "LDAP_auth - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=..\..\..\helpers\basic_auth\LDAP\squid_ldap_auth.c
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# End Target
+# End Project
Index: squid/port/win32/LDAP_group/.cvsignore
diff -u /dev/null squid/port/win32/LDAP_group/.cvsignore:1.1.4.1
--- /dev/null Thu Jan 1 01:00:00 1970
+++ squid/port/win32/LDAP_group/.cvsignore Sat Nov 30 05:55:04 2002
@@ -0,0 +1,3 @@
+.cvsignore
+Debug
+Release
Index: squid/port/win32/LDAP_group/LDAP_group.dsp
diff -u /dev/null squid/port/win32/LDAP_group/LDAP_group.dsp:1.1.4.2
--- /dev/null Thu Jan 1 01:00:00 1970
+++ squid/port/win32/LDAP_group/LDAP_group.dsp Fri Apr 22 12:08:52 2005
@@ -0,0 +1,102 @@
+# Microsoft Developer Studio Project File - Name="LDAP_group" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=LDAP_group - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "LDAP_group.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "LDAP_group.mak" CFG="LDAP_group - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "LDAP_group - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "LDAP_group - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "LDAP_group - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /G6 /W3 /GX /O2 /I "../../../include" /I "../../../src" /I "../include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "HAVE_CONFIG_H" /D _FILE_OFFSET_BITS=64 /YX /FD /c
+# ADD BASE RSC /l 0x410 /d "NDEBUG"
+# ADD RSC /l 0x410 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 ws2_32.lib Wldap32.lib /nologo /subsystem:console /machine:I386
+
+!ELSEIF "$(CFG)" == "LDAP_group - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /G6 /W3 /Gm /GX /ZI /Od /I "../../../include" /I "../../../src" /I "../include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "HAVE_CONFIG_H" /D _FILE_OFFSET_BITS=64 /YX /FD /GZ /c
+# ADD BASE RSC /l 0x410 /d "_DEBUG"
+# ADD RSC /l 0x410 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 ws2_32.lib Wldap32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+
+!ENDIF
+
+# Begin Target
+
+# Name "LDAP_group - Win32 Release"
+# Name "LDAP_group - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=..\..\..\helpers\external_acl\ldap_group\squid_ldap_group.c
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# End Target
+# End Project
Index: squid/port/win32/NCSA_auth/.cvsignore
diff -u /dev/null squid/port/win32/NCSA_auth/.cvsignore:1.1.4.1
--- /dev/null Thu Jan 1 01:00:00 1970
+++ squid/port/win32/NCSA_auth/.cvsignore Sat Apr 13 10:11:41 2002
@@ -0,0 +1,3 @@
+.cvsignore
+Debug
+Release
Index: squid/port/win32/NCSA_auth/NCSA_auth.dsp
diff -u /dev/null squid/port/win32/NCSA_auth/NCSA_auth.dsp:1.1.4.5
--- /dev/null Thu Jan 1 01:00:00 1970
+++ squid/port/win32/NCSA_auth/NCSA_auth.dsp Fri Apr 22 12:08:52 2005
@@ -0,0 +1,106 @@
+# Microsoft Developer Studio Project File - Name="NCSA_auth" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=NCSA_auth - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "NCSA_auth.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "NCSA_auth.mak" CFG="NCSA_auth - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "NCSA_auth - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "NCSA_auth - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "NCSA_auth - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /G6 /MT /W3 /GX /O2 /I "../../../include" /I "../../../src" /I "../include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D _FILE_OFFSET_BITS=64 /YX /FD /c
+# ADD BASE RSC /l 0x410 /d "NDEBUG"
+# ADD RSC /l 0x410 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 ws2_32.lib psapi.lib /nologo /subsystem:console /machine:I386
+
+!ELSEIF "$(CFG)" == "NCSA_auth - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /G6 /MTd /W3 /Gm /GX /ZI /Od /I "../../../include" /I "../../../src" /I "../include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D _FILE_OFFSET_BITS=64 /YX /FD /GZ /c
+# ADD BASE RSC /l 0x410 /d "_DEBUG"
+# ADD RSC /l 0x410 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 ws2_32.lib psapi.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+
+!ENDIF
+
+# Begin Target
+
+# Name "NCSA_auth - Win32 Release"
+# Name "NCSA_auth - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=..\src\encrypt.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\helpers\basic_auth\NCSA\ncsa_auth.c
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# End Target
+# End Project
Index: squid/port/win32/cachemgr/.cvsignore
diff -u /dev/null squid/port/win32/cachemgr/.cvsignore:1.1.2.1
--- /dev/null Thu Jan 1 01:00:00 1970
+++ squid/port/win32/cachemgr/.cvsignore Mon Apr 8 12:27:23 2002
@@ -0,0 +1,3 @@
+.cvsignore
+Debug
+Release
Index: squid/port/win32/cachemgr/cachemgr.dsp
diff -u /dev/null squid/port/win32/cachemgr/cachemgr.dsp:1.1.2.4
--- /dev/null Thu Jan 1 01:00:00 1970
+++ squid/port/win32/cachemgr/cachemgr.dsp Fri Apr 22 12:08:52 2005
@@ -0,0 +1,110 @@
+# Microsoft Developer Studio Project File - Name="cachemgr" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=cachemgr - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "cachemgr.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "cachemgr.mak" CFG="cachemgr - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "cachemgr - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "cachemgr - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "cachemgr - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /G6 /MT /W3 /GX /O2 /I "../../src" /I "../../../include" /I "../include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "HAVE_CONFIG_H" /D _FILE_OFFSET_BITS=64 /YX /FD /c
+# ADD BASE RSC /l 0x410 /d "NDEBUG"
+# ADD RSC /l 0x410 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 ws2_32.lib psapi.lib /nologo /subsystem:console /machine:I386
+
+!ELSEIF "$(CFG)" == "cachemgr - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /G6 /MTd /W3 /Gm /GX /ZI /Od /I "../../../include" /I "../include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "HAVE_CONFIG_H" /D _FILE_OFFSET_BITS=64 /YX /FD /GZ /c
+# ADD BASE RSC /l 0x410 /d "_DEBUG"
+# ADD RSC /l 0x410 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 ws2_32.lib psapi.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+
+!ENDIF
+
+# Begin Target
+
+# Name "cachemgr - Win32 Release"
+# Name "cachemgr - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=..\..\..\src\cachemgr.c
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=..\..\..\include\snprintf.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\include\util.h
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# End Target
+# End Project
Index: squid/port/win32/cf_gen/.cvsignore
diff -u /dev/null squid/port/win32/cf_gen/.cvsignore:1.1.2.1
--- /dev/null Thu Jan 1 01:00:00 1970
+++ squid/port/win32/cf_gen/.cvsignore Mon Apr 8 12:27:23 2002
@@ -0,0 +1,3 @@
+.cvsignore
+Debug
+Release
Index: squid/port/win32/cf_gen/cf_gen.dsp
diff -u /dev/null squid/port/win32/cf_gen/cf_gen.dsp:1.1.2.5
--- /dev/null Thu Jan 1 01:00:00 1970
+++ squid/port/win32/cf_gen/cf_gen.dsp Fri Apr 22 12:08:52 2005
@@ -0,0 +1,110 @@
+# Microsoft Developer Studio Project File - Name="cf_gen" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=cf_gen - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "cf_gen.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "cf_gen.mak" CFG="cf_gen - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "cf_gen - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "cf_gen - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "cf_gen - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /G6 /MT /W3 /GX /O2 /I "../../include" /I "../" /I "../../src../include" /I "../../../include" /I "../../" /I "../../src" /I "../include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "HAVE_CONFIG_H" /D _FILE_OFFSET_BITS=64 /YX /FD /c
+# ADD BASE RSC /l 0x410 /d "NDEBUG"
+# ADD RSC /l 0x410 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 ws2_32.lib psapi.lib /nologo /subsystem:console /machine:I386
+
+!ELSEIF "$(CFG)" == "cf_gen - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /G6 /MTd /W3 /Gm /GX /ZI /Od /I "../../../include" /I "../../" /I "../../src" /I "../include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "HAVE_CONFIG_H" /D _FILE_OFFSET_BITS=64 /YX /FD /GZ /c
+# ADD BASE RSC /l 0x410 /d "_DEBUG"
+# ADD RSC /l 0x410 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 ws2_32.lib psapi.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+
+!ENDIF
+
+# Begin Target
+
+# Name "cf_gen - Win32 Release"
+# Name "cf_gen - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=..\..\..\src\cf_gen.c
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=..\..\..\src\cf_gen_defines.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\include\config.h
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# End Target
+# End Project
Index: squid/port/win32/dnsserver/.cvsignore
diff -u /dev/null squid/port/win32/dnsserver/.cvsignore:1.1.2.1
--- /dev/null Thu Jan 1 01:00:00 1970
+++ squid/port/win32/dnsserver/.cvsignore Mon Apr 8 12:18:38 2002
@@ -0,0 +1,3 @@
+.cvsignore
+Debug
+Release
Index: squid/port/win32/dnsserver/dnsserver.dsp
diff -u /dev/null squid/port/win32/dnsserver/dnsserver.dsp:1.1.2.3
--- /dev/null Thu Jan 1 01:00:00 1970
+++ squid/port/win32/dnsserver/dnsserver.dsp Fri Apr 22 12:08:53 2005
@@ -0,0 +1,102 @@
+# Microsoft Developer Studio Project File - Name="dnsserver" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=dnsserver - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "dnsserver.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "dnsserver.mak" CFG="dnsserver - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "dnsserver - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "dnsserver - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "dnsserver - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /G6 /MT /W3 /GX /O2 /I "../../../include" /I "../../../src" /I "../include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D _FILE_OFFSET_BITS=64 /YX /FD /c
+# ADD BASE RSC /l 0x410 /d "NDEBUG"
+# ADD RSC /l 0x410 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 ws2_32.lib psapi.lib /nologo /subsystem:console /machine:I386
+
+!ELSEIF "$(CFG)" == "dnsserver - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /G6 /MTd /W3 /Gm /GX /ZI /Od /I "../../../include" /I "../../../src" /I "../include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D _FILE_OFFSET_BITS=64 /YX /FD /GZ /c
+# ADD BASE RSC /l 0x410 /d "_DEBUG"
+# ADD RSC /l 0x410 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 ws2_32.lib psapi.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+
+!ENDIF
+
+# Begin Target
+
+# Name "dnsserver - Win32 Release"
+# Name "dnsserver - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=..\..\..\src\dnsserver.c
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# End Target
+# End Project
Index: squid/port/win32/fake_auth/.cvsignore
diff -u /dev/null squid/port/win32/fake_auth/.cvsignore:1.1.2.1
--- /dev/null Thu Jan 1 01:00:00 1970
+++ squid/port/win32/fake_auth/.cvsignore Mon Apr 8 12:27:23 2002
@@ -0,0 +1,3 @@
+.cvsignore
+Debug
+Release
Index: squid/port/win32/fake_auth/fake_auth.dsp
diff -u /dev/null squid/port/win32/fake_auth/fake_auth.dsp:1.1.2.7
--- /dev/null Thu Jan 1 01:00:00 1970
+++ squid/port/win32/fake_auth/fake_auth.dsp Fri Apr 22 12:08:53 2005
@@ -0,0 +1,106 @@
+# Microsoft Developer Studio Project File - Name="fake_auth" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=fake_auth - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "fake_auth.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "fake_auth.mak" CFG="fake_auth - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "fake_auth - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "fake_auth - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "fake_auth - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /G6 /MT /W3 /GX /O2 /I "../../../include" /I "../../../src" /I "../include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "HAVE_CONFIG_H" /D _FILE_OFFSET_BITS=64 /YX /FD /c
+# ADD BASE RSC /l 0x410 /d "NDEBUG"
+# ADD RSC /l 0x410 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 ws2_32.lib psapi.lib /nologo /subsystem:console /machine:I386
+
+!ELSEIF "$(CFG)" == "fake_auth - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /G6 /MTd /W3 /Gm /GX /ZI /Od /I "../../../include" /I "../../../src" /I "../include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "HAVE_CONFIG_H" /D _FILE_OFFSET_BITS=64 /YX /FD /GZ /c
+# ADD BASE RSC /l 0x410 /d "_DEBUG"
+# ADD RSC /l 0x410 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 ws2_32.lib psapi.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+
+!ENDIF
+
+# Begin Target
+
+# Name "fake_auth - Win32 Release"
+# Name "fake_auth - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=..\..\..\helpers\ntlm_auth\fakeauth\fakeauth_auth.c
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=..\..\..\helpers\ntlm_auth\fakeauth\ntlm.h
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# End Target
+# End Project
Index: squid/port/win32/include/.cvsignore
diff -u /dev/null squid/port/win32/include/.cvsignore:1.1.2.1
--- /dev/null Thu Jan 1 01:00:00 1970
+++ squid/port/win32/include/.cvsignore Sun Apr 18 01:04:55 2004
@@ -0,0 +1,2 @@
+.cvsignore
+default_config_file.h
Index: squid/port/win32/include/Readdir.h
diff -u /dev/null squid/port/win32/include/Readdir.h:1.1.2.2
--- /dev/null Thu Jan 1 01:00:00 1970
+++ squid/port/win32/include/Readdir.h Fri Jul 8 14:34:06 2005
@@ -0,0 +1,33 @@
+/*
+ * Structures and types used to implement opendir/readdir/closedir
+ * on Windows 95/NT.
+*/
+
+#include
+#include
+#include
+
+#ifdef _MSC_VER /* Microsoft C Compiler ONLY */
+/* struct dirent - same as Unix */
+struct dirent {
+ ino_t d_ino; /* inode (always 1 in WIN32) */
+ off_t d_off; /* offset to this dirent */
+ unsigned short d_reclen; /* length of d_name */
+ char d_name[_MAX_FNAME+1]; /* filename (null terminated) */
+};
+
+/* typedef DIR - not the same as Unix */
+typedef struct {
+ long handle; /* _findfirst/_findnext handle */
+ short offset; /* offset into directory */
+ short finished; /* 1 if there are not more files */
+ struct _finddata_t fileinfo; /* from _findfirst/_findnext */
+ char *dir; /* the dir we are reading */
+ struct dirent dent; /* the dirent to return */
+} DIR;
+
+/* Function prototypes */
+DIR * opendir(const char *);
+struct dirent * readdir(DIR *);
+int closedir(DIR *);
+#endif
Index: squid/port/win32/include/autoconf.h
diff -u /dev/null squid/port/win32/include/autoconf.h:1.1.2.43
--- /dev/null Thu Jan 1 01:00:00 1970
+++ squid/port/win32/include/autoconf.h Sat Mar 11 09:07:50 2006
@@ -0,0 +1,1002 @@
+/* include/autoconf.h. Generated by configure. */
+/* include/autoconf.h.in. Generated from configure.in by autoheader. */
+/*
+ * All configurable options are enabled by using --enable-....
+ * when running configure. See configure --help for a list
+ * of all available options.
+ *
+ * You are free to edit this file, but it will be overwritten
+ * each time you run configure. You may need to edit this file
+ * if configure falsely picks up a library function or structure
+ * that doesn't really work on your system.
+ *
+ * Another way to block a function that should not be detected
+ * is to
+ * setenv ac_cv_func_ no
+ * before running configure, as in
+ * setenv ac_cv_func_setresuid no
+ *
+ * It is possible to enable some of the configurable options
+ * by editing this file alone, but some of them requires changes
+ * in the Makefiles, wich is done automatically by configure.
+ *
+ */
+
+#ifndef __CONFIGURE_H__
+#define __CONFIGURE_H__
+/* $Id$ */
+
+/*
+ * configure command line used to configure Squid
+ */
+
+#undef SQUID_CONFIGURE_OPTIONS
+
+/*********************************
+ * START OF CONFIGURABLE OPTIONS *
+ *********************************/
+/*
+ * If you are upset that the cachemgr.cgi form comes up with the hostname
+ * field blank, then define this to getfullhostname()
+ */
+/* #undef CACHEMGR_HOSTNAME */
+
+/*
+ * What default TCP port to use for HTTP listening?
+ */
+#ifndef CACHE_HTTP_PORT
+#define CACHE_HTTP_PORT 3128
+#endif
+
+/*
+ * What default UDP port to use for ICP listening?
+ */
+#ifndef CACHE_ICP_PORT
+#define CACHE_ICP_PORT 3130
+#endif
+
+/* Define to do simple malloc debugging */
+/* #undef XMALLOC_DEBUG */
+
+/* Define for log file trace of mem alloc/free */
+/* #undef MEM_GEN_TRACE */
+
+/* Define to have malloc statistics */
+/* #undef XMALLOC_STATISTICS */
+
+/* Define to have a detailed trace of memory allocations */
+/* #undef XMALLOC_TRACE */
+
+/* #undef FORW_VIA_DB */
+
+/* Defines how many threads aufs uses for I/O */
+/* #undef AUFS_IO_THREADS */
+
+/*
+ * If you want to use Squid's ICMP features (highly recommended!) then
+ * define this. When USE_ICMP is defined, Squid will send ICMP pings
+ * to origin server sites. This information is used in numerous ways:
+ * - Sent in ICP replies so neighbor caches know how close
+ * you are to the source.
+ * - For finding the closest instance of a URN.
+ * - With the 'test_reachability' option. Squid will return
+ * ICP_OP_MISS_NOFETCH for sites which it cannot ping.
+ */
+/* #undef USE_ICMP */
+
+/*
+ * Traffic management via "delay pools".
+ */
+/* #undef DELAY_POOLS */
+
+/*
+ * If you want to log User-Agent request header values, define this.
+ * By default, they are written to useragent.log in the Squid log
+ * directory.
+ */
+#define USE_USERAGENT_LOG 1
+
+/*
+ * If you want to log Referer request header values, define this.
+ * By default, they are written to referer.log in the Squid log
+ * directory.
+ */
+#define USE_REFERER_LOG 1
+
+/*
+ * A dangerous feature which causes Squid to kill its parent process
+ * (presumably the RunCache script) upon receipt of SIGTERM or SIGINT.
+ * Use with caution.
+ */
+/* #undef KILL_PARENT_OPT */
+
+/* Define to enable SNMP monitoring of Squid */
+#define SQUID_SNMP 1
+
+/*
+ * Define to enable WCCP
+ */
+/* #undef USE_WCCP */
+
+/*
+ * Squid frequently calls gettimeofday() for accurate timestamping.
+ * If you are concerned that gettimeofday() is called too often, and
+ * could be causing performance degradation, then you can define
+ * ALARM_UPDATES_TIME and cause Squid's clock to be updated at regular
+ * intervals (one second) with ALARM signals.
+ */
+/* #undef ALARM_UPDATES_TIME */
+
+/*
+ * Define this to include code which lets you specify access control
+ * elements based on ethernet hardware addresses. This code uses
+ * functions found in 4.4 BSD derviations (e.g. FreeBSD, ?).
+ */
+#define USE_ARP_ACL 1
+
+/*
+ * Define this to include code for the Hypertext Cache Protocol (HTCP)
+ */
+#define USE_HTCP 1
+
+/*
+ * Use Cache Digests for locating objects in neighbor caches. This
+ * code is still semi-experimental.
+ */
+#define USE_CACHE_DIGESTS 1
+
+/*
+ * Cache Array Routing Protocol
+ */
+/* #undef USE_CARP */
+
+/* Define if NTLM is allowed to fail gracefully when a helper has problems */
+/* #undef NTLM_FAIL_OPEN */
+
+/*
+ * Define Windows NT & Windows 2000 run service mode
+ */
+#define USE_WIN32_SERVICE 1
+
+/********************************
+ * END OF CONFIGURABLE OPTIONS *
+ ********************************/
+
+/* Define if struct tm has tm_gmtoff member */
+/* #undef HAVE_TM_GMTOFF */
+
+/* Define if struct mallinfo has mxfast member */
+/* #undef HAVE_EXT_MALLINFO */
+
+/* Default FD_SETSIZE value */
+#define DEFAULT_FD_SETSIZE 64
+
+/* Maximum number of open filedescriptors */
+#define SQUID_MAXFD 2048
+
+/* UDP send buffer size */
+#define SQUID_UDP_SO_SNDBUF 8192
+
+/* UDP receive buffer size */
+#define SQUID_UDP_SO_RCVBUF 8192
+
+/* TCP send buffer size */
+#define SQUID_TCP_SO_SNDBUF 8192
+
+/* TCP receive buffer size */
+#define SQUID_TCP_SO_RCVBUF 8192
+
+/* Host type from configure */
+#define CONFIG_HOST_TYPE "i686-pc-winnt"
+
+/* If we need to declare sys_errlist[] as external */
+/* #undef NEED_SYS_ERRLIST */
+
+/* If gettimeofday is known to take only one argument */
+/* #undef GETTIMEOFDAY_NO_TZP */
+
+/* If libresolv.a has been hacked to export _dns_ttl_ */
+/* #undef LIBRESOLV_DNS_TTL_HACK */
+
+/* Define if struct ip has ip_hl member */
+/* #undef HAVE_IP_HL */
+
+/* Define if your compiler supports prototyping */
+/* #undef HAVE_ANSI_PROTOTYPES */
+
+/* Define if we should use GNU regex */
+#define USE_GNUREGEX 1
+
+/* signed size_t, grr */
+/* #undef ssize_t */
+
+/*
+ * Yay! Another Linux brokenness. Its not good enough to know that
+ * setresuid() exists, because RedHat 5.0 declare setresuid() but
+ * doesn't implement it.
+ */
+/* #undef HAVE_SETRESUID */
+
+/* Define if you have struct rusage */
+#define HAVE_STRUCT_RUSAGE 1
+
+/* Define if you have PSAPI.DLL on Windows systems */
+#define HAVE_WIN32_PSAPI 1
+
+/*
+ * This makes warnings go away. If you have socklen_t defined in your
+ * /usr/include files, then this should remain undef'd. Otherwise it
+ * should be defined to int.
+ */
+#define socklen_t int
+
+/*
+ * By default (for now anyway) Squid includes options which allows
+ * the cache administrator to violate the HTTP protocol specification
+ * in terms of cache behaviour. Setting this to '0' will disable
+ * such code.
+ */
+#define HTTP_VIOLATIONS 1
+
+/*
+ * Enable support for Transparent Proxy on systems using IP-Filter
+ * address redirection. This provides "masquerading" support for non
+ * Linux system.
+ */
+/* #undef IPF_TRANSPARENT */
+
+/*
+ * Enable support for Transparent Proxy on systems using PF address
+ * redirection. This provides "masquerading" support for OpenBSD.
+ */
+/* #undef PF_TRANSPARENT */
+
+/*
+ * Enable code for assiting in finding memory leaks. Hacker stuff only.
+ */
+/* #undef USE_LEAKFINDER */
+
+/*
+ * type of fd_set array
+ */
+#define fd_mask int
+
+/*
+ * If _res structure has nsaddr_list member
+ */
+/* #undef HAVE_RES_NSADDR_LIST */
+
+/*
+ * If _res structure has ns_list member
+ */
+/* #undef HAVE_RES_NS_LIST */
+
+/*
+ * Compile in support for Ident (RFC 931) lookups? Enabled by default.
+ */
+#define USE_IDENT 1
+
+/*
+ * If your system has statvfs(), and if it actually works!
+ */
+/* #undef HAVE_STATVFS */
+
+/*
+ * If --disable-internal-dns was given to configure, then we'll use
+ * the dnsserver processes instead.
+ */
+/* #undef USE_DNSSERVERS */
+
+/*
+ * we check for the existance of struct mallinfo
+ */
+/* #undef HAVE_STRUCT_MALLINFO */
+
+/*
+ * Some systems dont have va_copy */
+/* #undef HAVE_VA_COPY */
+
+/*
+ * Some systems support __va_copy */
+/* #undef HAVE___VA_COPY */
+
+
+/*
+ * Do we want to use truncate(2) or unlink(2)?
+ */
+/* #undef USE_TRUNCATE */
+
+/*
+ * Allow underscores in host names
+ */
+#define ALLOW_HOSTNAME_UNDERSCORES 1
+
+/*
+ * Use the heap-based replacement techniques
+ */
+/* #undef HEAP_REPLACEMENT */
+
+/*
+ * message type for message queues
+ */
+#define mtyp_t long
+
+/*
+ * Define this to include code for SSL encryption.
+ */
+/* #undef USE_SSL */
+
+/*
+ * Define this to make use of the OpenSSL libraries for
+ * MD5 calculation rather than Squid's own MD5 implementation
+ * or if building with SSL encryption (USE_SSL)
+ */
+/* #undef USE_OPENSSL */
+
+/* Define if you want to set the COSS membuf size */
+/* #undef COSS_MEMBUF_SZ */
+
+/* Print stacktraces on fatal errors */
+/* #undef PRINT_STACK_TRACE */
+
+/*
+ * Define this if unlinkd is required
+ * (strongly recommended for ufs storage type)
+ */
+#define USE_UNLINKD 1
+
+/*
+ * Enable support for Transparent Proxy on Linux 2.4 systems
+ */
+/* #undef LINUX_NETFILTER */
+
+/*
+ * Do we have unix sockets? (required for the winbind ntlm helper
+ */
+/* #undef HAVE_UNIXSOCKET */
+
+/*
+ * Known-size integers
+ */
+
+#define int16_t short
+
+#define u_int16_t unsigned short
+
+#define int32_t int
+
+#define u_int32_t unsigned int
+
+#define int64_t __int64
+
+#define u_int64_t unsigned __int64
+
+/* The number of bytes in a __int64. */
+#define SIZEOF___INT64 8
+
+/* The number of bytes in a int16_t. */
+#define SIZEOF_INT16_T 2
+
+/* The number of bytes in a int32_t. */
+#define SIZEOF_INT32_T 4
+
+/* The number of bytes in a int64_t. */
+#define SIZEOF_INT64_T 8
+
+/* The number of bytes in a off_t. */
+#define SIZEOF_OFF_T 4
+
+/* The number of bytes in a size_t. */
+#define SIZEOF_SIZE_T 4
+
+/* The number of bytes in a u_int16_t. */
+#define SIZEOF_U_INT16_T 2
+
+/* The number of bytes in a u_int32_t. */
+#define SIZEOF_U_INT32_T 4
+
+/* The number of bytes in a u_int64_t. */
+#define SIZEOF_U_INT64_T 8
+
+/* The number of bytes in a uint16_t. */
+#define SIZEOF_UINT16_T 2
+
+/* The number of bytes in a uint32_t. */
+#define SIZEOF_UINT32_T 4
+
+/* The number of bytes in a uint64_t. */
+#define SIZEOF_UINT64_T 8
+
+/*
+ * Enable support for the X-Accelerator-Vary HTTP header
+ */
+/* #undef X_ACCELERATOR_VARY */
+
+
+/* Enable hostname sanity checks */
+#define CHECK_HOSTNAMES 1
+
+/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
+ systems. This function is required for `alloca.c' support on those systems.
+ */
+/* #undef CRAY_STACKSEG_END */
+
+/* Define to 1 if using `alloca.c'. */
+/* #undef C_ALLOCA */
+
+/* Define to 1 if you have `alloca', as a function or macro. */
+#define HAVE_ALLOCA 1
+
+/* Define to 1 if you have and it should be used (not on Ultrix).
+ */
+/* #undef HAVE_ALLOCA_H */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_ARPA_INET_H */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_ARPA_NAMESER_H */
+
+/* Define to 1 if you have the header file. */
+#define HAVE_ASSERT_H 1
+
+/* Define to 1 if you have the `backtrace_symbols_fd' function. */
+/* #undef HAVE_BACKTRACE_SYMBOLS_FD */
+
+/* Define to 1 if you have the `bcopy' function. */
+/* #undef HAVE_BCOPY */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_BSTRING_H */
+
+/* Define to 1 if you have the `bswap_16' function. */
+/* #undef HAVE_BSWAP_16 */
+
+/* Define to 1 if you have the `bswap_32' function. */
+/* #undef HAVE_BSWAP_32 */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_BYTESWAP_H */
+
+/* Define to 1 if you have the `crypt' function. */
+#define HAVE_CRYPT 1
+
+/* Define to 1 if you have the header file. */
+#define HAVE_CRYPT_H 1
+
+/* Define to 1 if you have the header file. */
+#define HAVE_CTYPE_H 1
+
+/* Define to 1 if you have the header file, and it defines `DIR'.
+ */
+#define HAVE_DIRENT_H 1
+
+/* Define to 1 if you have the `drand48' function. */
+/* #undef HAVE_DRAND48 */
+
+/* Define to 1 if you have the header file. */
+#define HAVE_ERRNO_H 1
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_EXECINFO_H */
+
+/* Define to 1 if you have the `fchmod' function. */
+/* #undef HAVE_FCHMOD */
+
+/* Define to 1 if you have the header file. */
+#define HAVE_FCNTL_H 1
+
+/* Define to 1 if you have the `getdtablesize' function. */
+/* #undef HAVE_GETDTABLESIZE */
+
+/* Define to 1 if you have the header file. */
+#define HAVE_GETOPT_H 1
+
+/* Define to 1 if you have the `getpagesize' function. */
+#define HAVE_GETPAGESIZE 1
+
+/* Define to 1 if you have the `getpass' function. */
+/* #undef HAVE_GETPASS */
+
+/* Define to 1 if you have the `getrlimit' function. */
+/* #undef HAVE_GETRLIMIT */
+
+/* Define to 1 if you have the `getrusage' function. */
+#define HAVE_GETRUSAGE 1
+
+/* Define to 1 if you have the `getspnam' function. */
+/* #undef HAVE_GETSPNAM */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_GLIB_H */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_GNUMALLOC_H */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_GRP_H */
+
+/* Define to 1 if you have the `initgroups' function. */
+/* #undef HAVE_INITGROUPS */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_INTTYPES_H */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_IP_COMPAT_H */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_IP_FIL_COMPAT_H */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_IP_FIL_H */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_IP_NAT_H */
+
+/* Define to 1 if you have the `44bsd' library (-l44bsd). */
+/* #undef HAVE_LIB44BSD */
+
+/* Define to 1 if you have the `bind' library (-lbind). */
+/* #undef HAVE_LIBBIND */
+
+/* Define to 1 if you have the `bsd' library (-lbsd). */
+/* #undef HAVE_LIBBSD */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_LIBC_H */
+
+/* Define to 1 if you have the `dl' library (-ldl). */
+/* #undef HAVE_LIBDL */
+
+/* Define to 1 if you have the `gnumalloc' library (-lgnumalloc). */
+/* #undef HAVE_LIBGNUMALLOC */
+
+/* Define to 1 if you have the `intl' library (-lintl). */
+/* #undef HAVE_LIBINTL */
+
+/* Define to 1 if you have the `m' library (-lm). */
+/* #undef HAVE_LIBM */
+
+/* Define to 1 if you have the `malloc' library (-lmalloc). */
+/* #undef HAVE_LIBMALLOC */
+
+/* Define to 1 if you have the `nsl' library (-lnsl). */
+/* #undef HAVE_LIBNSL */
+
+/* Define to 1 if you have the `pthread' library (-lpthread). */
+/* #undef HAVE_LIBPTHREAD */
+
+/* Define to 1 if you have the `resolv' library (-lresolv). */
+/* #undef HAVE_LIBRESOLV */
+
+/* Define to 1 if you have the `rt' library (-lrt). */
+/* #undef HAVE_LIBRT */
+
+/* Define to 1 if you have the `socket' library (-lsocket). */
+/* #undef HAVE_LIBSOCKET */
+
+/* Define to 1 if you have the header file. */
+#define HAVE_LIMITS_H 1
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_LINUX_NETFILTER_IPV4_H */
+
+/* Define to 1 if you have the `lrand48' function. */
+/* #undef HAVE_LRAND48 */
+
+/* Define to 1 if you have the `mallinfo' function. */
+/* #undef HAVE_MALLINFO */
+
+/* Define to 1 if you have the `mallocblksize' function. */
+/* #undef HAVE_MALLOCBLKSIZE */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_MALLOC_H */
+
+/* Define to 1 if you have the `mallopt' function. */
+/* #undef HAVE_MALLOPT */
+
+/* Define to 1 if you have the header file. */
+#define HAVE_MATH_H 1
+
+/* Define to 1 if you have the `memcpy' function. */
+#define HAVE_MEMCPY 1
+
+/* Define to 1 if you have the `memmove' function. */
+#define HAVE_MEMMOVE 1
+
+/* Define to 1 if you have the header file. */
+#define HAVE_MEMORY_H 1
+
+/* Define to 1 if you have the `memset' function. */
+#define HAVE_MEMSET 1
+
+/* Define to 1 if you have the `mkstemp' function. */
+/* #undef HAVE_MKSTEMP */
+
+/* Define to 1 if you have the `mktime' function. */
+#define HAVE_MKTIME 1
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_MOUNT_H */
+
+/* Define to 1 if you have the `mstats' function. */
+/* #undef HAVE_MSTATS */
+
+/* Define to 1 if you have the header file, and it defines `DIR'. */
+/* #undef HAVE_NDIR_H */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_NETDB_H */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_NETINET_IF_ETHER_H */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_NETINET_IN_H */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_NETINET_IP_COMPAT_H */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_NETINET_IP_FIL_COMPAT_H */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_NETINET_IP_FIL_H */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_NETINET_IP_NAT_H */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_NETINET_TCP_H */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_NET_IF_H */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_NET_PFVAR_H */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_NSS_COMMON_H */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_NSS_H */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_OPENSSL_ERR_H */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_OPENSSL_MD5_H */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_OPENSSL_SSL_H */
+
+/* Define to 1 if you have the `poll' function. */
+/* #undef HAVE_POLL */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_POLL_H */
+
+/* Define to 1 if you have the `pthread_attr_setschedparam' function. */
+/* #undef HAVE_PTHREAD_ATTR_SETSCHEDPARAM */
+
+/* Define to 1 if you have the `pthread_attr_setscope' function. */
+/* #undef HAVE_PTHREAD_ATTR_SETSCOPE */
+
+/* Define to 1 if you have the `pthread_setschedparam' function. */
+/* #undef HAVE_PTHREAD_SETSCHEDPARAM */
+
+/* Define to 1 if you have the `pthread_sigmask' function. */
+/* #undef HAVE_PTHREAD_SIGMASK */
+
+/* Define to 1 if you have the `putenv' function. */
+#define HAVE_PUTENV 1
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_PWD_H */
+
+/* Define to 1 if you have the `random' function. */
+/* #undef HAVE_RANDOM */
+
+/* Define to 1 if you have the `regcomp' function. */
+#define HAVE_REGCOMP 1
+
+/* Define to 1 if you have the `regexec' function. */
+#define HAVE_REGEXEC 1
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_REGEX_H */
+
+/* Define to 1 if you have the `regfree' function. */
+#define HAVE_REGFREE 1
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_RESOLV_H */
+
+/* Define to 1 if you have the `res_init' function. */
+/* #undef HAVE_RES_INIT */
+
+/* Define to 1 if you have the `rint' function. */
+/* #undef HAVE_RINT */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_SASL_H */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_SASL_SASL_H */
+
+/* Define to 1 if you have the `sbrk' function. */
+/* #undef HAVE_SBRK */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_SCHED_H */
+
+/* Define to 1 if you have the `seteuid' function. */
+/* #undef HAVE_SETEUID */
+
+/* Define to 1 if you have the `setgroups' function. */
+/* #undef HAVE_SETGROUPS */
+
+/* Define to 1 if you have the `setpgrp' function. */
+/* #undef HAVE_SETPGRP */
+
+/* Define to 1 if you have the `setrlimit' function. */
+/* #undef HAVE_SETRLIMIT */
+
+/* Define to 1 if you have the `setsid' function. */
+/* #undef HAVE_SETSID */
+
+/* Define to 1 if you have the `sigaction' function. */
+/* #undef HAVE_SIGACTION */
+
+/* Define to 1 if you have the header file. */
+#define HAVE_SIGNAL_H 1
+
+/* Define to 1 if you have the `snprintf' function. */
+#define HAVE_SNPRINTF 1
+
+/* Define to 1 if you have the `srand48' function. */
+/* #undef HAVE_SRAND48 */
+
+/* Define to 1 if you have the `srandom' function. */
+/* #undef HAVE_SRANDOM */
+
+/* Define to 1 if you have the `statfs' function. */
+#define HAVE_STATFS 1
+
+/* Define to 1 if you have the header file. */
+#define HAVE_STDARG_H 1
+
+/* Define to 1 if you have the header file. */
+#define HAVE_STDDEF_H 1
+
+/* Define to 1 if you have the header file. */
+#define HAVE_STDINT_H 1
+
+/* Define to 1 if you have the header file. */
+#define HAVE_STDIO_H 1
+
+/* Define to 1 if you have the header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the `strerror' function. */
+#define HAVE_STRERROR 1
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_STRINGS_H */
+
+/* Define to 1 if you have the header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the `strtoll' function. */
+#define HAVE_STRTOLL 1
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_SYSCALL_H */
+
+/* Define to 1 if you have the `sysconf' function. */
+/* #undef HAVE_SYSCONF */
+
+/* Define to 1 if you have the `syslog' function. */
+/* #undef HAVE_SYSLOG */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_SYSLOG_H */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_SYS_BITYPES_H */
+
+/* Define to 1 if you have the header file, and it defines `DIR'.
+ */
+/* #undef HAVE_SYS_DIR_H */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_SYS_FILE_H */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_SYS_IOCTL_H */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_SYS_MOUNT_H */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_SYS_MSG_H */
+
+/* Define to 1 if you have the header file, and it defines `DIR'.
+ */
+/* #undef HAVE_SYS_NDIR_H */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_SYS_PARAM_H */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_SYS_RESOURCE_H */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_SYS_SELECT_H */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_SYS_SOCKET_H */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_SYS_STATVFS_H */
+
+/* Define to 1 if you have the header file. */
+#define HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_SYS_SYSCALL_H */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_SYS_TIME_H */
+
+/* Define to 1 if you have the header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_SYS_UN_H */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_SYS_VFS_H */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_SYS_WAIT_H */
+
+/* Define to 1 if you have the `tempnam' function. */
+#define HAVE_TEMPNAM 1
+
+/* Define to 1 if you have the `timegm' function. */
+/* #undef HAVE_TIMEGM */
+
+/* Define to 1 if you have the header file. */
+#define HAVE_TIME_H 1
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_UNISTD_H */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_UTIME_H */
+
+/* Define to 1 if you have the header file. */
+#define HAVE_VARARGS_H 1
+
+/* Define to 1 if you have the `vsnprintf' function. */
+#define HAVE_VSNPRINTF 1
+
+/* Support large cache files > 2GB */
+#define LARGE_CACHE_FILES 1
+
+/* Define to 1 if your C compiler doesn't accept -c and -o together. */
+/* #undef NO_MINUS_C_MINUS_O */
+
+/* Name of package */
+#define PACKAGE "squid"
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT ""
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME ""
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING ""
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME ""
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION ""
+
+/* The size of a `int', as computed by sizeof. */
+#define SIZEOF_INT 4
+
+/* The size of a `long', as computed by sizeof. */
+#define SIZEOF_LONG 4
+
+/* The size of a `long long', as computed by sizeof. */
+#define SIZEOF_LONG_LONG 8
+
+/* The size of a `short', as computed by sizeof. */
+#define SIZEOF_SHORT 2
+
+/* The size of a `void *', as computed by sizeof. */
+#define SIZEOF_VOID_P 4
+
+/* If using the C implementation of alloca, define if you know the
+ direction of stack growth for your system; otherwise it will be
+ automatically deduced at run-time.
+ STACK_DIRECTION > 0 => grows toward higher addresses
+ STACK_DIRECTION < 0 => grows toward lower addresses
+ STACK_DIRECTION = 0 => direction of growth unknown */
+/* #undef STACK_DIRECTION */
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Define to 1 if your processor stores words with the most significant byte
+ first (like Motorola and SPARC, unlike Intel and VAX). */
+/* #undef WORDS_BIGENDIAN */
+
+/* Define to empty if `const' does not conform to ANSI C. */
+/* #undef const */
+
+/* Define to `int' if does not define. */
+/* #undef fd_mask */
+
+/* Define to `int' if does not define. */
+/* #undef off_t */
+
+/* Define to `int' if does not define. */
+#define pid_t int
+
+/* Define to `unsigned int' if does not define. */
+/* #undef size_t */
+
+/* Define to `int' if does not define. */
+/* #undef ssize_t */
+
+#if DELAY_POOLS
+#define STR_DELAY_POOLS "--enable-delay-pools "
+#else
+#define STR_DELAY_POOLS ""
+#endif
+#if USE_ICMP
+#define STR_USE_ICMP "--enable-icmp "
+#else
+#define STR_USE_ICMP ""
+#endif
+#if USE_DNSSERVERS
+#define STR_USE_DNSSERVERS "--disable-internal-dns "
+#else
+#define STR_USE_DNSSERVERS ""
+#endif
+#if USE_SSL
+#define STR_USE_SSL "--enable-ssl "
+#else
+#define STR_USE_SSL ""
+#endif
+#if USE_CARP
+#define STR_USE_CARP "--enable-carp "
+#else
+#define STR_USE_CARP ""
+#endif
+#if USE_ARP_ACL
+#define STR_USE_ARP_ACL "--enable-arp-acl "
+#else
+#define STR_USE_ARP_ACL ""
+#endif
+
+#define SQUID_CONFIGURE_OPTIONS "--enable-win32-service --enable-underscores --enable-storeio='ufs awin32 null' " \
+ "--enable-removal-policies='heap lru' --enable-snmp --enable-htcp --disable-wccp --enable-useragent-log " \
+ "--enable-referer-log --enable-auth='basic ntlm digest' --enable-basic-auth-helpers='LDAP ncsa_auth win32_locallogon' " \
+ "--enable-ntlm-auth-helpers=NTLMSSP-WIN32 --enable-external-acl-helpers='win32_group ldap_group' --enable-large-cache-files "\
+ STR_DELAY_POOLS \
+ STR_USE_ICMP \
+ STR_USE_DNSSERVERS \
+ STR_USE_SSL \
+ STR_USE_CARP \
+ STR_USE_ARP_ACL \
+ "--prefix=c:/squid"
+
+#endif /* __CONFIGURE_H__ */
Index: squid/port/win32/include/autoconf.h.ssl
diff -u /dev/null squid/port/win32/include/autoconf.h.ssl:1.1.2.6
--- /dev/null Thu Jan 1 01:00:00 1970
+++ squid/port/win32/include/autoconf.h.ssl Sat Mar 11 09:07:50 2006
@@ -0,0 +1,1002 @@
+/* include/autoconf.h. Generated by configure. */
+/* include/autoconf.h.in. Generated from configure.in by autoheader. */
+/*
+ * All configurable options are enabled by using --enable-....
+ * when running configure. See configure --help for a list
+ * of all available options.
+ *
+ * You are free to edit this file, but it will be overwritten
+ * each time you run configure. You may need to edit this file
+ * if configure falsely picks up a library function or structure
+ * that doesn't really work on your system.
+ *
+ * Another way to block a function that should not be detected
+ * is to
+ * setenv ac_cv_func_ no
+ * before running configure, as in
+ * setenv ac_cv_func_setresuid no
+ *
+ * It is possible to enable some of the configurable options
+ * by editing this file alone, but some of them requires changes
+ * in the Makefiles, wich is done automatically by configure.
+ *
+ */
+
+#ifndef __CONFIGURE_H__
+#define __CONFIGURE_H__
+/* $Id$ */
+
+/*
+ * configure command line used to configure Squid
+ */
+
+#undef SQUID_CONFIGURE_OPTIONS
+
+/*********************************
+ * START OF CONFIGURABLE OPTIONS *
+ *********************************/
+/*
+ * If you are upset that the cachemgr.cgi form comes up with the hostname
+ * field blank, then define this to getfullhostname()
+ */
+/* #undef CACHEMGR_HOSTNAME */
+
+/*
+ * What default TCP port to use for HTTP listening?
+ */
+#ifndef CACHE_HTTP_PORT
+#define CACHE_HTTP_PORT 3128
+#endif
+
+/*
+ * What default UDP port to use for ICP listening?
+ */
+#ifndef CACHE_ICP_PORT
+#define CACHE_ICP_PORT 3130
+#endif
+
+/* Define to do simple malloc debugging */
+/* #undef XMALLOC_DEBUG */
+
+/* Define for log file trace of mem alloc/free */
+/* #undef MEM_GEN_TRACE */
+
+/* Define to have malloc statistics */
+/* #undef XMALLOC_STATISTICS */
+
+/* Define to have a detailed trace of memory allocations */
+/* #undef XMALLOC_TRACE */
+
+/* #undef FORW_VIA_DB */
+
+/* Defines how many threads aufs uses for I/O */
+/* #undef AUFS_IO_THREADS */
+
+/*
+ * If you want to use Squid's ICMP features (highly recommended!) then
+ * define this. When USE_ICMP is defined, Squid will send ICMP pings
+ * to origin server sites. This information is used in numerous ways:
+ * - Sent in ICP replies so neighbor caches know how close
+ * you are to the source.
+ * - For finding the closest instance of a URN.
+ * - With the 'test_reachability' option. Squid will return
+ * ICP_OP_MISS_NOFETCH for sites which it cannot ping.
+ */
+/* #undef USE_ICMP */
+
+/*
+ * Traffic management via "delay pools".
+ */
+/* #undef DELAY_POOLS */
+
+/*
+ * If you want to log User-Agent request header values, define this.
+ * By default, they are written to useragent.log in the Squid log
+ * directory.
+ */
+#define USE_USERAGENT_LOG 1
+
+/*
+ * If you want to log Referer request header values, define this.
+ * By default, they are written to referer.log in the Squid log
+ * directory.
+ */
+#define USE_REFERER_LOG 1
+
+/*
+ * A dangerous feature which causes Squid to kill its parent process
+ * (presumably the RunCache script) upon receipt of SIGTERM or SIGINT.
+ * Use with caution.
+ */
+/* #undef KILL_PARENT_OPT */
+
+/* Define to enable SNMP monitoring of Squid */
+#define SQUID_SNMP 1
+
+/*
+ * Define to enable WCCP
+ */
+/* #undef USE_WCCP */
+
+/*
+ * Squid frequently calls gettimeofday() for accurate timestamping.
+ * If you are concerned that gettimeofday() is called too often, and
+ * could be causing performance degradation, then you can define
+ * ALARM_UPDATES_TIME and cause Squid's clock to be updated at regular
+ * intervals (one second) with ALARM signals.
+ */
+/* #undef ALARM_UPDATES_TIME */
+
+/*
+ * Define this to include code which lets you specify access control
+ * elements based on ethernet hardware addresses. This code uses
+ * functions found in 4.4 BSD derviations (e.g. FreeBSD, ?).
+ */
+#define USE_ARP_ACL 1
+
+/*
+ * Define this to include code for the Hypertext Cache Protocol (HTCP)
+ */
+#define USE_HTCP 1
+
+/*
+ * Use Cache Digests for locating objects in neighbor caches. This
+ * code is still semi-experimental.
+ */
+#define USE_CACHE_DIGESTS 1
+
+/*
+ * Cache Array Routing Protocol
+ */
+/* #undef USE_CARP */
+
+/* Define if NTLM is allowed to fail gracefully when a helper has problems */
+/* #undef NTLM_FAIL_OPEN */
+
+/*
+ * Define Windows NT & Windows 2000 run service mode
+ */
+#define USE_WIN32_SERVICE 1
+
+/********************************
+ * END OF CONFIGURABLE OPTIONS *
+ ********************************/
+
+/* Define if struct tm has tm_gmtoff member */
+/* #undef HAVE_TM_GMTOFF */
+
+/* Define if struct mallinfo has mxfast member */
+/* #undef HAVE_EXT_MALLINFO */
+
+/* Default FD_SETSIZE value */
+#define DEFAULT_FD_SETSIZE 64
+
+/* Maximum number of open filedescriptors */
+#define SQUID_MAXFD 2048
+
+/* UDP send buffer size */
+#define SQUID_UDP_SO_SNDBUF 8192
+
+/* UDP receive buffer size */
+#define SQUID_UDP_SO_RCVBUF 8192
+
+/* TCP send buffer size */
+#define SQUID_TCP_SO_SNDBUF 8192
+
+/* TCP receive buffer size */
+#define SQUID_TCP_SO_RCVBUF 8192
+
+/* Host type from configure */
+#define CONFIG_HOST_TYPE "i686-pc-winnt"
+
+/* If we need to declare sys_errlist[] as external */
+/* #undef NEED_SYS_ERRLIST */
+
+/* If gettimeofday is known to take only one argument */
+/* #undef GETTIMEOFDAY_NO_TZP */
+
+/* If libresolv.a has been hacked to export _dns_ttl_ */
+/* #undef LIBRESOLV_DNS_TTL_HACK */
+
+/* Define if struct ip has ip_hl member */
+/* #undef HAVE_IP_HL */
+
+/* Define if your compiler supports prototyping */
+/* #undef HAVE_ANSI_PROTOTYPES */
+
+/* Define if we should use GNU regex */
+#define USE_GNUREGEX 1
+
+/* signed size_t, grr */
+/* #undef ssize_t */
+
+/*
+ * Yay! Another Linux brokenness. Its not good enough to know that
+ * setresuid() exists, because RedHat 5.0 declare setresuid() but
+ * doesn't implement it.
+ */
+/* #undef HAVE_SETRESUID */
+
+/* Define if you have struct rusage */
+#define HAVE_STRUCT_RUSAGE 1
+
+/* Define if you have PSAPI.DLL on Windows systems */
+#define HAVE_WIN32_PSAPI 1
+
+/*
+ * This makes warnings go away. If you have socklen_t defined in your
+ * /usr/include files, then this should remain undef'd. Otherwise it
+ * should be defined to int.
+ */
+#define socklen_t int
+
+/*
+ * By default (for now anyway) Squid includes options which allows
+ * the cache administrator to violate the HTTP protocol specification
+ * in terms of cache behaviour. Setting this to '0' will disable
+ * such code.
+ */
+#define HTTP_VIOLATIONS 1
+
+/*
+ * Enable support for Transparent Proxy on systems using IP-Filter
+ * address redirection. This provides "masquerading" support for non
+ * Linux system.
+ */
+/* #undef IPF_TRANSPARENT */
+
+/*
+ * Enable support for Transparent Proxy on systems using PF address
+ * redirection. This provides "masquerading" support for OpenBSD.
+ */
+/* #undef PF_TRANSPARENT */
+
+/*
+ * Enable code for assiting in finding memory leaks. Hacker stuff only.
+ */
+/* #undef USE_LEAKFINDER */
+
+/*
+ * type of fd_set array
+ */
+#define fd_mask int
+
+/*
+ * If _res structure has nsaddr_list member
+ */
+/* #undef HAVE_RES_NSADDR_LIST */
+
+/*
+ * If _res structure has ns_list member
+ */
+/* #undef HAVE_RES_NS_LIST */
+
+/*
+ * Compile in support for Ident (RFC 931) lookups? Enabled by default.
+ */
+#define USE_IDENT 1
+
+/*
+ * If your system has statvfs(), and if it actually works!
+ */
+/* #undef HAVE_STATVFS */
+
+/*
+ * If --disable-internal-dns was given to configure, then we'll use
+ * the dnsserver processes instead.
+ */
+/* #undef USE_DNSSERVERS */
+
+/*
+ * we check for the existance of struct mallinfo
+ */
+/* #undef HAVE_STRUCT_MALLINFO */
+
+/*
+ * Some systems dont have va_copy */
+/* #undef HAVE_VA_COPY */
+
+/*
+ * Some systems support __va_copy */
+/* #undef HAVE___VA_COPY */
+
+
+/*
+ * Do we want to use truncate(2) or unlink(2)?
+ */
+/* #undef USE_TRUNCATE */
+
+/*
+ * Allow underscores in host names
+ */
+#define ALLOW_HOSTNAME_UNDERSCORES 1
+
+/*
+ * Use the heap-based replacement techniques
+ */
+/* #undef HEAP_REPLACEMENT */
+
+/*
+ * message type for message queues
+ */
+#define mtyp_t long
+
+/*
+ * Define this to include code for SSL encryption.
+ */
+#define USE_SSL 1
+
+/*
+ * Define this to make use of the OpenSSL libraries for
+ * MD5 calculation rather than Squid's own MD5 implementation
+ * or if building with SSL encryption (USE_SSL)
+ */
+#define USE_OPENSSL 1
+
+/* Define if you want to set the COSS membuf size */
+/* #undef COSS_MEMBUF_SZ */
+
+/* Print stacktraces on fatal errors */
+/* #undef PRINT_STACK_TRACE */
+
+/*
+ * Define this if unlinkd is required
+ * (strongly recommended for ufs storage type)
+ */
+#define USE_UNLINKD 1
+
+/*
+ * Enable support for Transparent Proxy on Linux 2.4 systems
+ */
+/* #undef LINUX_NETFILTER */
+
+/*
+ * Do we have unix sockets? (required for the winbind ntlm helper
+ */
+/* #undef HAVE_UNIXSOCKET */
+
+/*
+ * Known-size integers
+ */
+
+#define int16_t short
+
+#define u_int16_t unsigned short
+
+#define int32_t int
+
+#define u_int32_t unsigned int
+
+#define int64_t __int64
+
+#define u_int64_t unsigned __int64
+
+/* The number of bytes in a __int64. */
+#define SIZEOF___INT64 8
+
+/* The number of bytes in a int16_t. */
+#define SIZEOF_INT16_T 2
+
+/* The number of bytes in a int32_t. */
+#define SIZEOF_INT32_T 4
+
+/* The number of bytes in a int64_t. */
+#define SIZEOF_INT64_T 8
+
+/* The number of bytes in a off_t. */
+#define SIZEOF_OFF_T 4
+
+/* The number of bytes in a size_t. */
+#define SIZEOF_SIZE_T 4
+
+/* The number of bytes in a u_int16_t. */
+#define SIZEOF_U_INT16_T 2
+
+/* The number of bytes in a u_int32_t. */
+#define SIZEOF_U_INT32_T 4
+
+/* The number of bytes in a u_int64_t. */
+#define SIZEOF_U_INT64_T 8
+
+/* The number of bytes in a uint16_t. */
+#define SIZEOF_UINT16_T 2
+
+/* The number of bytes in a uint32_t. */
+#define SIZEOF_UINT32_T 4
+
+/* The number of bytes in a uint64_t. */
+#define SIZEOF_UINT64_T 8
+
+/*
+ * Enable support for the X-Accelerator-Vary HTTP header
+ */
+/* #undef X_ACCELERATOR_VARY */
+
+
+/* Enable hostname sanity checks */
+#define CHECK_HOSTNAMES 1
+
+/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
+ systems. This function is required for `alloca.c' support on those systems.
+ */
+/* #undef CRAY_STACKSEG_END */
+
+/* Define to 1 if using `alloca.c'. */
+/* #undef C_ALLOCA */
+
+/* Define to 1 if you have `alloca', as a function or macro. */
+#define HAVE_ALLOCA 1
+
+/* Define to 1 if you have and it should be used (not on Ultrix).
+ */
+/* #undef HAVE_ALLOCA_H */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_ARPA_INET_H */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_ARPA_NAMESER_H */
+
+/* Define to 1 if you have the header file. */
+#define HAVE_ASSERT_H 1
+
+/* Define to 1 if you have the `backtrace_symbols_fd' function. */
+/* #undef HAVE_BACKTRACE_SYMBOLS_FD */
+
+/* Define to 1 if you have the `bcopy' function. */
+/* #undef HAVE_BCOPY */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_BSTRING_H */
+
+/* Define to 1 if you have the `bswap_16' function. */
+/* #undef HAVE_BSWAP_16 */
+
+/* Define to 1 if you have the `bswap_32' function. */
+/* #undef HAVE_BSWAP_32 */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_BYTESWAP_H */
+
+/* Define to 1 if you have the `crypt' function. */
+#define HAVE_CRYPT 1
+
+/* Define to 1 if you have the header file. */
+#define HAVE_CRYPT_H 1
+
+/* Define to 1 if you have the header file. */
+#define HAVE_CTYPE_H 1
+
+/* Define to 1 if you have the header file, and it defines `DIR'.
+ */
+#define HAVE_DIRENT_H 1
+
+/* Define to 1 if you have the `drand48' function. */
+/* #undef HAVE_DRAND48 */
+
+/* Define to 1 if you have the header file. */
+#define HAVE_ERRNO_H 1
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_EXECINFO_H */
+
+/* Define to 1 if you have the `fchmod' function. */
+/* #undef HAVE_FCHMOD */
+
+/* Define to 1 if you have the header file. */
+#define HAVE_FCNTL_H 1
+
+/* Define to 1 if you have the `getdtablesize' function. */
+/* #undef HAVE_GETDTABLESIZE */
+
+/* Define to 1 if you have the header file. */
+#define HAVE_GETOPT_H 1
+
+/* Define to 1 if you have the `getpagesize' function. */
+#define HAVE_GETPAGESIZE 1
+
+/* Define to 1 if you have the `getpass' function. */
+/* #undef HAVE_GETPASS */
+
+/* Define to 1 if you have the `getrlimit' function. */
+/* #undef HAVE_GETRLIMIT */
+
+/* Define to 1 if you have the `getrusage' function. */
+#define HAVE_GETRUSAGE 1
+
+/* Define to 1 if you have the `getspnam' function. */
+/* #undef HAVE_GETSPNAM */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_GLIB_H */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_GNUMALLOC_H */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_GRP_H */
+
+/* Define to 1 if you have the `initgroups' function. */
+/* #undef HAVE_INITGROUPS */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_INTTYPES_H */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_IP_COMPAT_H */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_IP_FIL_COMPAT_H */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_IP_FIL_H */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_IP_NAT_H */
+
+/* Define to 1 if you have the `44bsd' library (-l44bsd). */
+/* #undef HAVE_LIB44BSD */
+
+/* Define to 1 if you have the `bind' library (-lbind). */
+/* #undef HAVE_LIBBIND */
+
+/* Define to 1 if you have the `bsd' library (-lbsd). */
+/* #undef HAVE_LIBBSD */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_LIBC_H */
+
+/* Define to 1 if you have the `dl' library (-ldl). */
+/* #undef HAVE_LIBDL */
+
+/* Define to 1 if you have the `gnumalloc' library (-lgnumalloc). */
+/* #undef HAVE_LIBGNUMALLOC */
+
+/* Define to 1 if you have the `intl' library (-lintl). */
+/* #undef HAVE_LIBINTL */
+
+/* Define to 1 if you have the `m' library (-lm). */
+/* #undef HAVE_LIBM */
+
+/* Define to 1 if you have the `malloc' library (-lmalloc). */
+/* #undef HAVE_LIBMALLOC */
+
+/* Define to 1 if you have the `nsl' library (-lnsl). */
+/* #undef HAVE_LIBNSL */
+
+/* Define to 1 if you have the `pthread' library (-lpthread). */
+/* #undef HAVE_LIBPTHREAD */
+
+/* Define to 1 if you have the `resolv' library (-lresolv). */
+/* #undef HAVE_LIBRESOLV */
+
+/* Define to 1 if you have the `rt' library (-lrt). */
+/* #undef HAVE_LIBRT */
+
+/* Define to 1 if you have the `socket' library (-lsocket). */
+/* #undef HAVE_LIBSOCKET */
+
+/* Define to 1 if you have the header file. */
+#define HAVE_LIMITS_H 1
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_LINUX_NETFILTER_IPV4_H */
+
+/* Define to 1 if you have the `lrand48' function. */
+/* #undef HAVE_LRAND48 */
+
+/* Define to 1 if you have the `mallinfo' function. */
+/* #undef HAVE_MALLINFO */
+
+/* Define to 1 if you have the `mallocblksize' function. */
+/* #undef HAVE_MALLOCBLKSIZE */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_MALLOC_H */
+
+/* Define to 1 if you have the `mallopt' function. */
+/* #undef HAVE_MALLOPT */
+
+/* Define to 1 if you have the header file. */
+#define HAVE_MATH_H 1
+
+/* Define to 1 if you have the `memcpy' function. */
+#define HAVE_MEMCPY 1
+
+/* Define to 1 if you have the `memmove' function. */
+#define HAVE_MEMMOVE 1
+
+/* Define to 1 if you have the header file. */
+#define HAVE_MEMORY_H 1
+
+/* Define to 1 if you have the `memset' function. */
+#define HAVE_MEMSET 1
+
+/* Define to 1 if you have the `mkstemp' function. */
+/* #undef HAVE_MKSTEMP */
+
+/* Define to 1 if you have the `mktime' function. */
+#define HAVE_MKTIME 1
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_MOUNT_H */
+
+/* Define to 1 if you have the `mstats' function. */
+/* #undef HAVE_MSTATS */
+
+/* Define to 1 if you have the header file, and it defines `DIR'. */
+/* #undef HAVE_NDIR_H */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_NETDB_H */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_NETINET_IF_ETHER_H */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_NETINET_IN_H */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_NETINET_IP_COMPAT_H */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_NETINET_IP_FIL_COMPAT_H */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_NETINET_IP_FIL_H */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_NETINET_IP_NAT_H */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_NETINET_TCP_H */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_NET_IF_H */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_NET_PFVAR_H */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_NSS_COMMON_H */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_NSS_H */
+
+/* Define to 1 if you have the header file. */
+#define HAVE_OPENSSL_ERR_H 1
+
+/* Define to 1 if you have the header file. */
+#define HAVE_OPENSSL_MD5_H 1
+
+/* Define to 1 if you have the header file. */
+#define HAVE_OPENSSL_SSL_H 1
+
+/* Define to 1 if you have the `poll' function. */
+/* #undef HAVE_POLL */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_POLL_H */
+
+/* Define to 1 if you have the `pthread_attr_setschedparam' function. */
+/* #undef HAVE_PTHREAD_ATTR_SETSCHEDPARAM */
+
+/* Define to 1 if you have the `pthread_attr_setscope' function. */
+/* #undef HAVE_PTHREAD_ATTR_SETSCOPE */
+
+/* Define to 1 if you have the `pthread_setschedparam' function. */
+/* #undef HAVE_PTHREAD_SETSCHEDPARAM */
+
+/* Define to 1 if you have the `pthread_sigmask' function. */
+/* #undef HAVE_PTHREAD_SIGMASK */
+
+/* Define to 1 if you have the `putenv' function. */
+#define HAVE_PUTENV 1
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_PWD_H */
+
+/* Define to 1 if you have the `random' function. */
+/* #undef HAVE_RANDOM */
+
+/* Define to 1 if you have the `regcomp' function. */
+#define HAVE_REGCOMP 1
+
+/* Define to 1 if you have the `regexec' function. */
+#define HAVE_REGEXEC 1
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_REGEX_H */
+
+/* Define to 1 if you have the `regfree' function. */
+#define HAVE_REGFREE 1
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_RESOLV_H */
+
+/* Define to 1 if you have the `res_init' function. */
+/* #undef HAVE_RES_INIT */
+
+/* Define to 1 if you have the `rint' function. */
+/* #undef HAVE_RINT */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_SASL_H */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_SASL_SASL_H */
+
+/* Define to 1 if you have the `sbrk' function. */
+/* #undef HAVE_SBRK */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_SCHED_H */
+
+/* Define to 1 if you have the `seteuid' function. */
+/* #undef HAVE_SETEUID */
+
+/* Define to 1 if you have the `setgroups' function. */
+/* #undef HAVE_SETGROUPS */
+
+/* Define to 1 if you have the `setpgrp' function. */
+/* #undef HAVE_SETPGRP */
+
+/* Define to 1 if you have the `setrlimit' function. */
+/* #undef HAVE_SETRLIMIT */
+
+/* Define to 1 if you have the `setsid' function. */
+/* #undef HAVE_SETSID */
+
+/* Define to 1 if you have the `sigaction' function. */
+/* #undef HAVE_SIGACTION */
+
+/* Define to 1 if you have the header file. */
+#define HAVE_SIGNAL_H 1
+
+/* Define to 1 if you have the `snprintf' function. */
+#define HAVE_SNPRINTF 1
+
+/* Define to 1 if you have the `srand48' function. */
+/* #undef HAVE_SRAND48 */
+
+/* Define to 1 if you have the `srandom' function. */
+/* #undef HAVE_SRANDOM */
+
+/* Define to 1 if you have the `statfs' function. */
+#define HAVE_STATFS 1
+
+/* Define to 1 if you have the header file. */
+#define HAVE_STDARG_H 1
+
+/* Define to 1 if you have the header file. */
+#define HAVE_STDDEF_H 1
+
+/* Define to 1 if you have the header file. */
+#define HAVE_STDINT_H 1
+
+/* Define to 1 if you have the header file. */
+#define HAVE_STDIO_H 1
+
+/* Define to 1 if you have the header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the `strerror' function. */
+#define HAVE_STRERROR 1
+
+/* Define to 1 if you have the