You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by dg...@hyperreal.org on 1999/08/06 02:56:11 UTC

cvs commit: apache-2.0/mpm/src/support/SHA1 README.sha1 convert-sha1.pl htpasswd-sha1.pl ldif-sha1.example

dgaudet     99/08/05 17:56:10

  Modified:    mpm      INSTALL Makefile.tmpl config.layout configure
               mpm/src  .gdbinit ApacheCore.dsp ApacheCore.mak
                        Configuration.tmpl Configure
               mpm/src/ap Makefile.tmpl ap_md5c.c
               mpm/src/helpers GuessOS TestCompile buildinfo.sh mkshadow.sh
               mpm/src/include ap.h ap_config.h ap_md5.h ap_mmn.h
                        http_conf_globals.h http_core.h httpd.h
               mpm/src/main buff.c http_connection.c http_core.c
                        http_main.c http_protocol.c rfc1413.c util.c
                        util_script.c util_uri.c
               mpm/src/modules/mpm/prefork prefork.c
               mpm/src/modules/proxy ApacheModuleProxy.dsp
                        ApacheModuleProxy.mak proxy_cache.c
               mpm/src/modules/standard .cvsignore mod_auth.c mod_auth_db.c
                        mod_auth_dbm.c mod_cgi.c mod_log_config.c
                        mod_rewrite.c mod_rewrite.h
               mpm/src/os/bs2000 Makefile.tmpl bs2login.c os.h
               mpm/src/os/tpf os.c os.h
               mpm/src/os/unix unixd.c
               mpm/src/os/win32 ApacheModuleRewrite.dsp
                        ApacheModuleRewrite.mak os.h registry.c
               mpm/src/regex debug.c main.c split.c
               mpm/src/support Makefile.tmpl README ab.c apxs.8 apxs.pl
                        htdigest.c htpasswd.1 htpasswd.c httpd.8 httpd.exp
                        suexec.c
  Added:       mpm/src/ap ap_checkpass.c ap_sha1.c
               mpm/src/include ap_sha1.h
               mpm/src/modules/standard mod_vhost_alias.c
               mpm/src/support/SHA1 README.sha1 convert-sha1.pl
                        htpasswd-sha1.pl ldif-sha1.example
  Log:
  merge the differences in apache-1.3 from tag apache-apr-merge-3 up
  to mpm-merge-1 onto the mpm tree
  
  prior to the merge, the mpm tree was tagged with apache-1_3-merge-1-pre
  and after the merge, the mpm tree will be tagged with apache-1_3-merge-1-post
  
  note: none of htdocs/manual is present in mpm at this point.
  
  Revision  Changes    Path
  1.2       +2 -2      apache-2.0/mpm/INSTALL
  
  Index: INSTALL
  ===================================================================
  RCS file: /home/cvs/apache-2.0/mpm/INSTALL,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- INSTALL	1999/06/18 18:39:11	1.1
  +++ INSTALL	1999/08/06 00:53:52	1.2
  @@ -83,7 +83,7 @@
              - FreeBSD   - Solaris       - AIX          - Mac OS
              - OpenBSD   - IRIX          - SCO          - OpenStep/Mach
              - NetBSD    - HPUX          - ReliantUNIX
  -           - BSDI      - Digital Unix  
  +           - BSDI      - Digital Unix  - DGUX
   
           o Entirely unsupported platforms are:
              - Ultrix
  @@ -326,7 +326,7 @@
        this way implicitly enables them itself). 
        
            Note 1: The --enable-shared option DOES NOT AUTOMATICALLY enable the
  -                 module because there are variants like `--enable-shared=all'
  +                 module because there are variants like `--enable-shared=max'
                    which should not imply `--enable-module=all'.  
   
            Note 2: Per default the DSO mechanism is globally disabled, i.e. no
  
  
  
  1.2       +7 -0      apache-2.0/mpm/Makefile.tmpl
  
  Index: Makefile.tmpl
  ===================================================================
  RCS file: /home/cvs/apache-2.0/mpm/Makefile.tmpl,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Makefile.tmpl	1999/06/18 18:39:11	1.1
  +++ Makefile.tmpl	1999/08/06 00:53:52	1.2
  @@ -259,6 +259,7 @@
   	$(MKDIR) $(root)$(iconsdir)
   	$(MKDIR) $(root)$(cgidir)
   	$(MKDIR) $(root)$(includedir)
  +	$(MKDIR) $(root)$(includedir)/xml
   	$(MKDIR) $(root)$(runtimedir)
   	$(MKDIR) $(root)$(logfiledir)
   	$(MKDIR) $(root)$(proxycachedir)
  @@ -277,6 +278,11 @@
   	-@if [ ".`grep '^[ 	]*AddModule.*mod_so\.o' $(TOP)/$(SRC)/Configuration.apaci`" != . ]; then \
   		echo "$(INSTALL_CORE) $(TOP)/$(SRC)/$(TARGET) $(root)$(sbindir)/$(TARGET)"; \
   		$(INSTALL_CORE) $(TOP)/$(SRC)/$(TARGET) $(root)$(sbindir)/$(TARGET); \
  +		SHLIB_EXPORT_FILES="`grep '^SHLIB_EXPORT_FILES=' $(TOP)/$(SRC)/Makefile | sed -e 's:^.*=::'`"; \
  +		if [ ".$${SHLIB_EXPORT_FILES}" != . ]; then \
  +			$(CP) $(TOP)/$(SRC)/support/httpd.exp $(root)$(libexecdir)/; \
  +			chmod 644 $(root)$(libexecdir)/httpd.exp; \
  +		fi; \
   	else \
   		echo "$(INSTALL_PROGRAM) $(TOP)/$(SRC)/$(TARGET) $(root)$(sbindir)/$(TARGET)"; \
   		$(INSTALL_PROGRAM) $(TOP)/$(SRC)/$(TARGET) $(root)$(sbindir)/$(TARGET); \
  @@ -422,6 +428,7 @@
   install-include:
   	@echo "===> [include: Installing Apache C header files]"
   	$(CP) $(TOP)/$(SRC)/include/*.h $(root)$(includedir)/
  +	$(CP) $(TOP)/$(SRC)/lib/expat-lite/*.h $(root)$(includedir)/xml/
   	@osdir=`grep '^OSDIR=' $(TOP)/$(SRC)/Makefile.config | sed -e 's:^OSDIR=.*/os/:os/:'`; \
   		echo "$(CP) $(TOP)/$(SRC)/$${osdir}/os.h $(root)$(includedir)/"; \
   		$(CP) $(TOP)/$(SRC)/$${osdir}/os.h $(root)$(includedir)/; \
  
  
  
  1.2       +22 -1     apache-2.0/mpm/config.layout
  
  Index: config.layout
  ===================================================================
  RCS file: /home/cvs/apache-2.0/mpm/config.layout,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- config.layout	1999/06/18 18:39:12	1.1
  +++ config.layout	1999/08/06 00:53:53	1.2
  @@ -101,7 +101,7 @@
       sysconfdir:    /etc/httpd/conf
       datadir:       /home/httpd
       iconsdir:      $datadir/icons
  -    htdocsdir:     $datadir/htdocs
  +    htdocsdir:     $datadir/html
       cgidir:        $datadir/cgi-bin
       includedir:    $prefix/include/apache
       localstatedir: /var
  @@ -129,3 +129,24 @@
       logfiledir:    $localstatedir/logs
       proxycachedir: $localstatedir/proxy
   </Layout>
  +
  +#  BeOS layout...
  +<Layout beos>
  +    prefix:        /boot/home/apache
  +    exec_prefix:   $prefix
  +    bindir:        $exec_prefix/bin
  +    sbindir:       $exec_prefix/bin
  +    libexecdir:    $exec_prefix/libexec
  +    mandir:        $prefix/man
  +    sysconfdir:    $prefix/conf
  +    datadir:       $prefix
  +    iconsdir:      $datadir/icons
  +    htdocsdir:     $datadir/htdocs
  +    cgidir:        $datadir/cgi-bin
  +    includedir:    $prefix/include
  +    localstatedir: $prefix
  +    runtimedir:    $localstatedir/logs
  +    logfiledir:    $localstatedir/logs
  +    proxycachedir: $localstatedir/proxy
  +</Layout>
  +
  
  
  
  1.4       +4 -4      apache-2.0/mpm/configure
  
  Index: configure
  ===================================================================
  RCS file: /home/cvs/apache-2.0/mpm/configure,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- configure	1999/07/10 18:20:15	1.3
  +++ configure	1999/08/06 00:53:53	1.4
  @@ -1004,14 +1004,14 @@
           exit 1
       fi
       if [ "x`$aux/getuid.sh`" != "x0" ]; then
  -        echo " + Warning: You enabled the suEXEC feature. Be aware that you need" 1>&2
  -        echo " + root privileges for this, at the latest at the installation step." 1>&2
  +        echo " + Warning: You have enabled the suEXEC feature. Be aware that you need" 1>&2
  +        echo " + root privileges to complete the final installation step." 1>&2
       fi
   fi
   if [ "x$PERL" = "xno-perl-on-this-system" ]; then
       if [ "x$quiet" = "xno" ]; then
  -        echo " + Warning: no Perl interpreter available for support scripts."
  -        echo " + Perhaps you have to select one with --with-perl=FILE."
  +        echo " + Warning: no Perl interpreter detected for support scripts."
  +        echo " + Perhaps you need to specify one with --with-perl=FILE."
       fi
   fi
   
  
  
  
  1.2       +13 -0     apache-2.0/mpm/src/.gdbinit
  
  Index: .gdbinit
  ===================================================================
  RCS file: /home/cvs/apache-2.0/mpm/src/.gdbinit,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- .gdbinit	1999/06/18 18:39:22	1.1
  +++ .gdbinit	1999/08/06 00:53:57	1.2
  @@ -18,3 +18,16 @@
   define rh
   	run -f /home/dgaudet/ap2/conf/mpm.conf
   end
  +
  +define dump_string_array
  +    set $a = (char **)((array_header *)$arg0)->elts
  +    set $n = (int)((array_header *)$arg0)->nelts
  +    set $i = 0
  +    while $i < $n
  +	printf "[%u] '%s'\n", $i, $a[$i]
  +	set $i = $i + 1
  +    end
  +end
  +document dump_string_array
  +    Print all of the elements in an array of strings.
  +end
  
  
  
  1.2       +4 -4      apache-2.0/mpm/src/ApacheCore.dsp
  
  Index: ApacheCore.dsp
  ===================================================================
  RCS file: /home/cvs/apache-2.0/mpm/src/ApacheCore.dsp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ApacheCore.dsp	1999/06/18 18:39:22	1.1
  +++ ApacheCore.dsp	1999/08/06 00:53:58	1.2
  @@ -44,7 +44,7 @@
   # PROP Ignore_Export_Lib 0
   # PROP Target_Dir ""
   # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
  -# ADD CPP /nologo /MD /W3 /GX /O2 /I ".\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
  +# ADD CPP /nologo /MD /W3 /GX /O2 /I ".\include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "WIN32_LEAN_AND_MEAN" /YX /FD /c
   # ADD BASE MTL /nologo /D "NDEBUG" /win32
   # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
   # ADD BASE RSC /l 0x809 /d "NDEBUG"
  @@ -54,7 +54,7 @@
   # 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 /dll /machine:I386
  -# ADD LINK32 os\win32\ApacheOSR\ApacheOS.lib regex\release\regex.lib ap\Release\ap.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib wsock32.lib /nologo /subsystem:windows /dll /machine:I386
  +# ADD LINK32 os\win32\ApacheOSR\ApacheOS.lib regex\release\regex.lib ap\Release\ap.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ws2_32.lib /nologo /subsystem:windows /dll /machine:I386
   
   !ELSEIF  "$(CFG)" == "ApacheCore - Win32 Debug"
   
  @@ -70,7 +70,7 @@
   # PROP Ignore_Export_Lib 0
   # PROP Target_Dir ""
   # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c
  -# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I ".\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FR /YX /FD /c
  +# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I ".\include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "WIN32_LEAN_AND_MEAN" /FR /YX /FD /c
   # ADD BASE MTL /nologo /D "_DEBUG" /win32
   # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
   # ADD BASE RSC /l 0x809 /d "_DEBUG"
  @@ -80,7 +80,7 @@
   # 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 /dll /debug /machine:I386
  -# ADD LINK32 os\win32\ApacheOSD\ApacheOS.lib regex\debug\regex.lib ap\Debug\ap.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib wsock32.lib /nologo /subsystem:windows /dll /debug /machine:I386
  +# ADD LINK32 os\win32\ApacheOSD\ApacheOS.lib regex\debug\regex.lib ap\Debug\ap.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ws2_32.lib /nologo /subsystem:windows /dll /debug /machine:I386
   # SUBTRACT LINK32 /map
   
   !ENDIF 
  
  
  
  1.2       +4 -303    apache-2.0/mpm/src/ApacheCore.mak
  
  Index: ApacheCore.mak
  ===================================================================
  RCS file: /home/cvs/apache-2.0/mpm/src/ApacheCore.mak,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ApacheCore.mak	1999/06/18 18:39:22	1.1
  +++ ApacheCore.mak	1999/08/06 00:53:59	1.2
  @@ -144,7 +144,7 @@
   LINK32=link.exe
   LINK32_FLAGS=os\win32\ApacheOSR\ApacheOS.lib regex\release\regex.lib\
    ap\Release\ap.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\
  - advapi32.lib shell32.lib wsock32.lib /nologo /subsystem:windows /dll\
  + advapi32.lib shell32.lib ws2_32.lib /nologo /subsystem:windows /dll\
    /incremental:no /pdb:"$(OUTDIR)\ApacheCore.pdb" /machine:I386\
    /def:".\ApacheCore.def" /out:"$(OUTDIR)\ApacheCore.dll"\
    /implib:"$(OUTDIR)\ApacheCore.lib" 
  @@ -408,7 +408,7 @@
   LINK32=link.exe
   LINK32_FLAGS=os\win32\ApacheOSD\ApacheOS.lib regex\debug\regex.lib\
    ap\Debug\ap.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\
  - advapi32.lib shell32.lib wsock32.lib /nologo /subsystem:windows /dll\
  + advapi32.lib shell32.lib ws2_32.lib /nologo /subsystem:windows /dll\
    /incremental:yes /pdb:"$(OUTDIR)\ApacheCore.pdb" /debug /machine:I386\
    /def:".\ApacheCore.def" /out:"$(OUTDIR)\ApacheCore.dll"\
    /implib:"$(OUTDIR)\ApacheCore.lib" 
  @@ -506,14 +506,6 @@
   	".\include\util_uri.h"\
   	".\os\win32\os.h"\
   	".\os\win32\readdir.h"\
  -	{$(INCLUDE)}"sys\stat.h"\
  -	{$(INCLUDE)}"sys\types.h"\
  -	
  -NODEP_CPP_ALLOC=\
  -	".\include\ap_config_auto.h"\
  -	".\include\ebcdic.h"\
  -	".\include\os.h"\
  -	".\include\sfio.h"\
   	
   
   "$(INTDIR)\alloc.obj"	"$(INTDIR)\alloc.sbr" : $(SOURCE) $(DEP_CPP_ALLOC)\
  @@ -561,14 +553,6 @@
   	".\include\util_uri.h"\
   	".\os\win32\os.h"\
   	".\os\win32\readdir.h"\
  -	{$(INCLUDE)}"sys\stat.h"\
  -	{$(INCLUDE)}"sys\types.h"\
  -	
  -NODEP_CPP_BUFF_=\
  -	".\include\ap_config_auto.h"\
  -	".\include\ebcdic.h"\
  -	".\include\os.h"\
  -	".\include\sfio.h"\
   	
   
   "$(INTDIR)\buff.obj"	"$(INTDIR)\buff.sbr" : $(SOURCE) $(DEP_CPP_BUFF_)\
  @@ -611,15 +595,7 @@
   	".\include\util_uri.h"\
   	".\os\win32\os.h"\
   	".\os\win32\readdir.h"\
  -	{$(INCLUDE)}"sys\stat.h"\
  -	{$(INCLUDE)}"sys\types.h"\
   	
  -NODEP_CPP_BUILD=\
  -	".\include\ap_config_auto.h"\
  -	".\include\ebcdic.h"\
  -	".\include\os.h"\
  -	".\include\sfio.h"\
  -	
   
   "$(INTDIR)\buildmark.obj"	"$(INTDIR)\buildmark.sbr" : $(SOURCE)\
    $(DEP_CPP_BUILD) "$(INTDIR)"
  @@ -693,14 +669,6 @@
   	".\include\util_uri.h"\
   	".\os\win32\os.h"\
   	".\os\win32\readdir.h"\
  -	{$(INCLUDE)}"sys\stat.h"\
  -	{$(INCLUDE)}"sys\types.h"\
  -	
  -NODEP_CPP_HTTP_=\
  -	".\include\ap_config_auto.h"\
  -	".\include\ebcdic.h"\
  -	".\include\os.h"\
  -	".\include\sfio.h"\
   	
   
   "$(INTDIR)\http_config.obj"	"$(INTDIR)\http_config.sbr" : $(SOURCE)\
  @@ -770,14 +738,6 @@
   	".\include\util_uri.h"\
   	".\os\win32\os.h"\
   	".\os\win32\readdir.h"\
  -	{$(INCLUDE)}"sys\stat.h"\
  -	{$(INCLUDE)}"sys\types.h"\
  -	
  -NODEP_CPP_HTTP_C=\
  -	".\include\ap_config_auto.h"\
  -	".\include\ebcdic.h"\
  -	".\include\os.h"\
  -	".\include\sfio.h"\
   	
   
   "$(INTDIR)\http_core.obj"	"$(INTDIR)\http_core.sbr" : $(SOURCE)\
  @@ -829,14 +789,6 @@
   	".\include\util_uri.h"\
   	".\os\win32\os.h"\
   	".\os\win32\readdir.h"\
  -	{$(INCLUDE)}"sys\stat.h"\
  -	{$(INCLUDE)}"sys\types.h"\
  -	
  -NODEP_CPP_HTTP_L=\
  -	".\include\ap_config_auto.h"\
  -	".\include\ebcdic.h"\
  -	".\include\os.h"\
  -	".\include\sfio.h"\
   	
   
   "$(INTDIR)\http_log.obj"	"$(INTDIR)\http_log.sbr" : $(SOURCE) $(DEP_CPP_HTTP_L)\
  @@ -910,14 +862,6 @@
   	".\os\win32\readdir.h"\
   	".\os\win32\registry.h"\
   	".\os\win32\service.h"\
  -	{$(INCLUDE)}"sys\stat.h"\
  -	{$(INCLUDE)}"sys\types.h"\
  -	
  -NODEP_CPP_HTTP_M=\
  -	".\include\ap_config_auto.h"\
  -	".\include\ebcdic.h"\
  -	".\include\os.h"\
  -	".\include\sfio.h"\
   	
   
   "$(INTDIR)\http_main.obj"	"$(INTDIR)\http_main.sbr" : $(SOURCE)\
  @@ -979,14 +923,6 @@
   	".\include\util_uri.h"\
   	".\os\win32\os.h"\
   	".\os\win32\readdir.h"\
  -	{$(INCLUDE)}"sys\stat.h"\
  -	{$(INCLUDE)}"sys\types.h"\
  -	
  -NODEP_CPP_HTTP_P=\
  -	".\include\ap_config_auto.h"\
  -	".\include\ebcdic.h"\
  -	".\include\os.h"\
  -	".\include\sfio.h"\
   	
   
   "$(INTDIR)\http_protocol.obj"	"$(INTDIR)\http_protocol.sbr" : $(SOURCE)\
  @@ -1046,15 +982,7 @@
   	".\include\util_uri.h"\
   	".\os\win32\os.h"\
   	".\os\win32\readdir.h"\
  -	{$(INCLUDE)}"sys\stat.h"\
  -	{$(INCLUDE)}"sys\types.h"\
   	
  -NODEP_CPP_HTTP_R=\
  -	".\include\ap_config_auto.h"\
  -	".\include\ebcdic.h"\
  -	".\include\os.h"\
  -	".\include\sfio.h"\
  -	
   
   "$(INTDIR)\http_request.obj"	"$(INTDIR)\http_request.sbr" : $(SOURCE)\
    $(DEP_CPP_HTTP_R) "$(INTDIR)"
  @@ -1107,15 +1035,7 @@
   	".\include\util_uri.h"\
   	".\os\win32\os.h"\
   	".\os\win32\readdir.h"\
  -	{$(INCLUDE)}"sys\stat.h"\
  -	{$(INCLUDE)}"sys\types.h"\
   	
  -NODEP_CPP_HTTP_V=\
  -	".\include\ap_config_auto.h"\
  -	".\include\ebcdic.h"\
  -	".\include\os.h"\
  -	".\include\sfio.h"\
  -	
   
   "$(INTDIR)\http_vhost.obj"	"$(INTDIR)\http_vhost.sbr" : $(SOURCE)\
    $(DEP_CPP_HTTP_V) "$(INTDIR)"
  @@ -1206,14 +1126,6 @@
   	".\include\util_uri.h"\
   	".\os\win32\os.h"\
   	".\os\win32\readdir.h"\
  -	{$(INCLUDE)}"sys\stat.h"\
  -	{$(INCLUDE)}"sys\types.h"\
  -	
  -NODEP_CPP_MOD_A=\
  -	".\include\ap_config_auto.h"\
  -	".\include\ebcdic.h"\
  -	".\include\os.h"\
  -	".\include\sfio.h"\
   	
   
   "$(INTDIR)\mod_access.obj"	"$(INTDIR)\mod_access.sbr" : $(SOURCE)\
  @@ -1271,14 +1183,6 @@
   	".\include\util_uri.h"\
   	".\os\win32\os.h"\
   	".\os\win32\readdir.h"\
  -	{$(INCLUDE)}"sys\stat.h"\
  -	{$(INCLUDE)}"sys\types.h"\
  -	
  -NODEP_CPP_MOD_AC=\
  -	".\include\ap_config_auto.h"\
  -	".\include\ebcdic.h"\
  -	".\include\os.h"\
  -	".\include\sfio.h"\
   	
   
   "$(INTDIR)\mod_actions.obj"	"$(INTDIR)\mod_actions.sbr" : $(SOURCE)\
  @@ -1324,14 +1228,6 @@
   	".\include\util_uri.h"\
   	".\os\win32\os.h"\
   	".\os\win32\readdir.h"\
  -	{$(INCLUDE)}"sys\stat.h"\
  -	{$(INCLUDE)}"sys\types.h"\
  -	
  -NODEP_CPP_MOD_AL=\
  -	".\include\ap_config_auto.h"\
  -	".\include\ebcdic.h"\
  -	".\include\os.h"\
  -	".\include\sfio.h"\
   	
   
   "$(INTDIR)\mod_alias.obj"	"$(INTDIR)\mod_alias.sbr" : $(SOURCE)\
  @@ -1387,14 +1283,6 @@
   	".\include\util_uri.h"\
   	".\os\win32\os.h"\
   	".\os\win32\readdir.h"\
  -	{$(INCLUDE)}"sys\stat.h"\
  -	{$(INCLUDE)}"sys\types.h"\
  -	
  -NODEP_CPP_MOD_AS=\
  -	".\include\ap_config_auto.h"\
  -	".\include\ebcdic.h"\
  -	".\include\os.h"\
  -	".\include\sfio.h"\
   	
   
   "$(INTDIR)\mod_asis.obj"	"$(INTDIR)\mod_asis.sbr" : $(SOURCE) $(DEP_CPP_MOD_AS)\
  @@ -1446,15 +1334,7 @@
   	".\include\util_uri.h"\
   	".\os\win32\os.h"\
   	".\os\win32\readdir.h"\
  -	{$(INCLUDE)}"sys\stat.h"\
  -	{$(INCLUDE)}"sys\types.h"\
   	
  -NODEP_CPP_MOD_AU=\
  -	".\include\ap_config_auto.h"\
  -	".\include\ebcdic.h"\
  -	".\include\os.h"\
  -	".\include\sfio.h"\
  -	
   
   "$(INTDIR)\mod_auth.obj"	"$(INTDIR)\mod_auth.sbr" : $(SOURCE) $(DEP_CPP_MOD_AU)\
    "$(INTDIR)"
  @@ -1473,6 +1353,7 @@
   	".\include\ap_config.h"\
   	".\include\ap_ctype.h"\
   	".\include\buff.h"\
  +	".\include\fnmatch.h"\
   	".\include\hsregex.h"\
   	".\include\http_config.h"\
   	".\include\http_core.h"\
  @@ -1511,15 +1392,7 @@
   	".\include\util_uri.h"\
   	".\os\win32\os.h"\
   	".\os\win32\readdir.h"\
  -	{$(INCLUDE)}"sys\stat.h"\
  -	{$(INCLUDE)}"sys\types.h"\
   	
  -NODEP_CPP_MOD_AUT=\
  -	".\include\ap_config_auto.h"\
  -	".\include\ebcdic.h"\
  -	".\include\os.h"\
  -	".\include\sfio.h"\
  -	
   
   "$(INTDIR)\mod_autoindex.obj"	"$(INTDIR)\mod_autoindex.sbr" : $(SOURCE)\
    $(DEP_CPP_MOD_AUT) "$(INTDIR)"
  @@ -1538,6 +1411,7 @@
   	".\include\ap_config.h"\
   	".\include\ap_ctype.h"\
   	".\include\buff.h"\
  +	".\include\fnmatch.h"\
   	".\include\hsregex.h"\
   	".\include\http_conf_globals.h"\
   	".\include\http_config.h"\
  @@ -1578,15 +1452,7 @@
   	".\include\util_uri.h"\
   	".\os\win32\os.h"\
   	".\os\win32\readdir.h"\
  -	{$(INCLUDE)}"sys\stat.h"\
  -	{$(INCLUDE)}"sys\types.h"\
   	
  -NODEP_CPP_MOD_C=\
  -	".\include\ap_config_auto.h"\
  -	".\include\ebcdic.h"\
  -	".\include\os.h"\
  -	".\include\sfio.h"\
  -	
   
   "$(INTDIR)\mod_cgi.obj"	"$(INTDIR)\mod_cgi.sbr" : $(SOURCE) $(DEP_CPP_MOD_C)\
    "$(INTDIR)"
  @@ -1643,15 +1509,7 @@
   	".\include\util_uri.h"\
   	".\os\win32\os.h"\
   	".\os\win32\readdir.h"\
  -	{$(INCLUDE)}"sys\stat.h"\
  -	{$(INCLUDE)}"sys\types.h"\
   	
  -NODEP_CPP_MOD_D=\
  -	".\include\ap_config_auto.h"\
  -	".\include\ebcdic.h"\
  -	".\include\os.h"\
  -	".\include\sfio.h"\
  -	
   
   "$(INTDIR)\mod_dir.obj"	"$(INTDIR)\mod_dir.sbr" : $(SOURCE) $(DEP_CPP_MOD_D)\
    "$(INTDIR)"
  @@ -1696,15 +1554,7 @@
   	".\include\util_uri.h"\
   	".\os\win32\os.h"\
   	".\os\win32\readdir.h"\
  -	{$(INCLUDE)}"sys\stat.h"\
  -	{$(INCLUDE)}"sys\types.h"\
   	
  -NODEP_CPP_MOD_E=\
  -	".\include\ap_config_auto.h"\
  -	".\include\ebcdic.h"\
  -	".\include\os.h"\
  -	".\include\sfio.h"\
  -	
   
   "$(INTDIR)\mod_env.obj"	"$(INTDIR)\mod_env.sbr" : $(SOURCE) $(DEP_CPP_MOD_E)\
    "$(INTDIR)"
  @@ -1761,14 +1611,6 @@
   	".\include\util_uri.h"\
   	".\os\win32\os.h"\
   	".\os\win32\readdir.h"\
  -	{$(INCLUDE)}"sys\stat.h"\
  -	{$(INCLUDE)}"sys\types.h"\
  -	
  -NODEP_CPP_MOD_I=\
  -	".\include\ap_config_auto.h"\
  -	".\include\ebcdic.h"\
  -	".\include\os.h"\
  -	".\include\sfio.h"\
   	
   
   "$(INTDIR)\mod_imap.obj"	"$(INTDIR)\mod_imap.sbr" : $(SOURCE) $(DEP_CPP_MOD_I)\
  @@ -1826,16 +1668,6 @@
   	".\include\util_uri.h"\
   	".\os\win32\os.h"\
   	".\os\win32\readdir.h"\
  -	{$(INCLUDE)}"sys\stat.h"\
  -	{$(INCLUDE)}"sys\types.h"\
  -	
  -NODEP_CPP_MOD_IN=\
  -	".\include\ap_config_auto.h"\
  -	".\include\ebcdic.h"\
  -	".\include\os.h"\
  -	".\include\sfio.h"\
  -	".\modules\standard\config.h"\
  -	".\modules\standard\modules\perl\mod_perl.h"\
   	
   
   "$(INTDIR)\mod_include.obj"	"$(INTDIR)\mod_include.sbr" : $(SOURCE)\
  @@ -1891,13 +1723,6 @@
   	".\include\util_uri.h"\
   	".\os\win32\os.h"\
   	".\os\win32\readdir.h"\
  -	{$(INCLUDE)}"sys\stat.h"\
  -	{$(INCLUDE)}"sys\types.h"\
  -	
  -NODEP_CPP_MOD_IS=\
  -	".\include\ap_config_auto.h"\
  -	".\include\ebcdic.h"\
  -	".\include\sfio.h"\
   	
   
   "$(INTDIR)\mod_isapi.obj"	"$(INTDIR)\mod_isapi.sbr" : $(SOURCE)\
  @@ -1947,15 +1772,7 @@
   	".\include\util_uri.h"\
   	".\os\win32\os.h"\
   	".\os\win32\readdir.h"\
  -	{$(INCLUDE)}"sys\stat.h"\
  -	{$(INCLUDE)}"sys\types.h"\
   	
  -NODEP_CPP_MOD_L=\
  -	".\include\ap_config_auto.h"\
  -	".\include\ebcdic.h"\
  -	".\include\os.h"\
  -	".\include\sfio.h"\
  -	
   
   "$(INTDIR)\mod_log_config.obj"	"$(INTDIR)\mod_log_config.sbr" : $(SOURCE)\
    $(DEP_CPP_MOD_L) "$(INTDIR)"
  @@ -2002,15 +1819,7 @@
   	".\include\util_uri.h"\
   	".\os\win32\os.h"\
   	".\os\win32\readdir.h"\
  -	{$(INCLUDE)}"sys\stat.h"\
  -	{$(INCLUDE)}"sys\types.h"\
   	
  -NODEP_CPP_MOD_M=\
  -	".\include\ap_config_auto.h"\
  -	".\include\ebcdic.h"\
  -	".\include\os.h"\
  -	".\include\sfio.h"\
  -	
   
   "$(INTDIR)\mod_mime.obj"	"$(INTDIR)\mod_mime.sbr" : $(SOURCE) $(DEP_CPP_MOD_M)\
    "$(INTDIR)"
  @@ -2063,14 +1872,6 @@
   	".\include\util_uri.h"\
   	".\os\win32\os.h"\
   	".\os\win32\readdir.h"\
  -	{$(INCLUDE)}"sys\stat.h"\
  -	{$(INCLUDE)}"sys\types.h"\
  -	
  -NODEP_CPP_MOD_N=\
  -	".\include\ap_config_auto.h"\
  -	".\include\ebcdic.h"\
  -	".\include\os.h"\
  -	".\include\sfio.h"\
   	
   
   "$(INTDIR)\mod_negotiation.obj"	"$(INTDIR)\mod_negotiation.sbr" : $(SOURCE)\
  @@ -2120,14 +1921,6 @@
   	".\include\util_uri.h"\
   	".\os\win32\os.h"\
   	".\os\win32\readdir.h"\
  -	{$(INCLUDE)}"sys\stat.h"\
  -	{$(INCLUDE)}"sys\types.h"\
  -	
  -NODEP_CPP_MOD_S=\
  -	".\include\ap_config_auto.h"\
  -	".\include\ebcdic.h"\
  -	".\include\os.h"\
  -	".\include\sfio.h"\
   	
   
   "$(INTDIR)\mod_setenvif.obj"	"$(INTDIR)\mod_setenvif.sbr" : $(SOURCE)\
  @@ -2175,14 +1968,6 @@
   	".\include\util_uri.h"\
   	".\os\win32\os.h"\
   	".\os\win32\readdir.h"\
  -	{$(INCLUDE)}"sys\stat.h"\
  -	{$(INCLUDE)}"sys\types.h"\
  -	
  -NODEP_CPP_MOD_SO=\
  -	".\include\ap_config_auto.h"\
  -	".\include\ebcdic.h"\
  -	".\include\os.h"\
  -	".\include\sfio.h"\
   	
   
   "$(INTDIR)\mod_so.obj"	"$(INTDIR)\mod_so.sbr" : $(SOURCE) $(DEP_CPP_MOD_SO)\
  @@ -2228,15 +2013,7 @@
   	".\include\util_uri.h"\
   	".\os\win32\os.h"\
   	".\os\win32\readdir.h"\
  -	{$(INCLUDE)}"sys\stat.h"\
  -	{$(INCLUDE)}"sys\types.h"\
   	
  -NODEP_CPP_MOD_U=\
  -	".\include\ap_config_auto.h"\
  -	".\include\ebcdic.h"\
  -	".\include\os.h"\
  -	".\include\sfio.h"\
  -	
   
   "$(INTDIR)\mod_userdir.obj"	"$(INTDIR)\mod_userdir.sbr" : $(SOURCE)\
    $(DEP_CPP_MOD_U) "$(INTDIR)"
  @@ -2281,13 +2058,6 @@
   	".\include\util_uri.h"\
   	".\os\win32\os.h"\
   	".\os\win32\readdir.h"\
  -	{$(INCLUDE)}"sys\stat.h"\
  -	{$(INCLUDE)}"sys\types.h"\
  -	
  -NODEP_CPP_MODUL=\
  -	".\include\ap_config_auto.h"\
  -	".\include\ebcdic.h"\
  -	".\include\sfio.h"\
   	
   
   "$(INTDIR)\modules.obj"	"$(INTDIR)\modules.sbr" : $(SOURCE) $(DEP_CPP_MODUL)\
  @@ -2321,11 +2091,6 @@
   	".\include\hsregex.h"\
   	".\include\multithread.h"\
   	".\os\win32\os.h"\
  -	{$(INCLUDE)}"sys\stat.h"\
  -	{$(INCLUDE)}"sys\types.h"\
  -	
  -NODEP_CPP_MULTI=\
  -	".\include\ap_config_auto.h"\
   	
   
   "$(INTDIR)\multithread.obj"	"$(INTDIR)\multithread.sbr" : $(SOURCE)\
  @@ -2393,14 +2158,7 @@
   	".\include\util_uri.h"\
   	".\os\win32\os.h"\
   	".\os\win32\readdir.h"\
  -	{$(INCLUDE)}"sys\stat.h"\
  -	{$(INCLUDE)}"sys\types.h"\
   	
  -NODEP_CPP_REGIS=\
  -	".\include\ap_config_auto.h"\
  -	".\include\ebcdic.h"\
  -	".\include\sfio.h"\
  -	
   
   "$(INTDIR)\registry.obj"	"$(INTDIR)\registry.sbr" : $(SOURCE) $(DEP_CPP_REGIS)\
    "$(INTDIR)"
  @@ -2449,14 +2207,6 @@
   	".\include\util_uri.h"\
   	".\os\win32\os.h"\
   	".\os\win32\readdir.h"\
  -	{$(INCLUDE)}"sys\stat.h"\
  -	{$(INCLUDE)}"sys\types.h"\
  -	
  -NODEP_CPP_RFC14=\
  -	".\include\ap_config_auto.h"\
  -	".\include\ebcdic.h"\
  -	".\include\os.h"\
  -	".\include\sfio.h"\
   	
   
   "$(INTDIR)\rfc1413.obj"	"$(INTDIR)\rfc1413.sbr" : $(SOURCE) $(DEP_CPP_RFC14)\
  @@ -2512,14 +2262,7 @@
   	".\os\win32\readdir.h"\
   	".\os\win32\registry.h"\
   	".\os\win32\service.h"\
  -	{$(INCLUDE)}"sys\stat.h"\
  -	{$(INCLUDE)}"sys\types.h"\
   	
  -NODEP_CPP_SERVI=\
  -	".\include\ap_config_auto.h"\
  -	".\include\ebcdic.h"\
  -	".\include\sfio.h"\
  -	
   
   "$(INTDIR)\service.obj"	"$(INTDIR)\service.sbr" : $(SOURCE) $(DEP_CPP_SERVI)\
    "$(INTDIR)"
  @@ -2568,15 +2311,7 @@
   	".\main\test_char.h"\
   	".\os\win32\os.h"\
   	".\os\win32\readdir.h"\
  -	{$(INCLUDE)}"sys\stat.h"\
  -	{$(INCLUDE)}"sys\types.h"\
   	
  -NODEP_CPP_UTIL_=\
  -	".\include\ap_config_auto.h"\
  -	".\include\ebcdic.h"\
  -	".\include\os.h"\
  -	".\include\sfio.h"\
  -	
   
   "$(INTDIR)\util.obj"	"$(INTDIR)\util.sbr" : $(SOURCE) $(DEP_CPP_UTIL_)\
    "$(INTDIR)"
  @@ -2586,9 +2321,6 @@
   !ENDIF 
   
   SOURCE=.\main\util_date.c
  -
  -!IF  "$(CFG)" == "ApacheCore - Win32 Release"
  -
   DEP_CPP_UTIL_D=\
   	".\include\ap_config.h"\
   	".\include\ap_ctype.h"\
  @@ -2662,15 +2394,7 @@
   	".\include\util_uri.h"\
   	".\os\win32\os.h"\
   	".\os\win32\readdir.h"\
  -	{$(INCLUDE)}"sys\stat.h"\
  -	{$(INCLUDE)}"sys\types.h"\
   	
  -NODEP_CPP_UTIL_M=\
  -	".\include\ap_config_auto.h"\
  -	".\include\ebcdic.h"\
  -	".\include\os.h"\
  -	".\include\sfio.h"\
  -	
   
   "$(INTDIR)\util_md5.obj"	"$(INTDIR)\util_md5.sbr" : $(SOURCE) $(DEP_CPP_UTIL_M)\
    "$(INTDIR)"
  @@ -2731,15 +2455,7 @@
   	".\include\util_uri.h"\
   	".\os\win32\os.h"\
   	".\os\win32\readdir.h"\
  -	{$(INCLUDE)}"sys\stat.h"\
  -	{$(INCLUDE)}"sys\types.h"\
   	
  -NODEP_CPP_UTIL_S=\
  -	".\include\ap_config_auto.h"\
  -	".\include\ebcdic.h"\
  -	".\include\os.h"\
  -	".\include\sfio.h"\
  -	
   
   "$(INTDIR)\util_script.obj"	"$(INTDIR)\util_script.sbr" : $(SOURCE)\
    $(DEP_CPP_UTIL_S) "$(INTDIR)"
  @@ -2788,15 +2504,7 @@
   	".\main\uri_delims.h"\
   	".\os\win32\os.h"\
   	".\os\win32\readdir.h"\
  -	{$(INCLUDE)}"sys\stat.h"\
  -	{$(INCLUDE)}"sys\types.h"\
   	
  -NODEP_CPP_UTIL_U=\
  -	".\include\ap_config_auto.h"\
  -	".\include\ebcdic.h"\
  -	".\include\os.h"\
  -	".\include\sfio.h"\
  -	
   
   "$(INTDIR)\util_uri.obj"	"$(INTDIR)\util_uri.sbr" : $(SOURCE) $(DEP_CPP_UTIL_U)\
    "$(INTDIR)"
  @@ -2841,13 +2549,6 @@
   	".\include\util_uri.h"\
   	".\os\win32\os.h"\
   	".\os\win32\readdir.h"\
  -	{$(INCLUDE)}"sys\stat.h"\
  -	{$(INCLUDE)}"sys\types.h"\
  -	
  -NODEP_CPP_UTIL_W=\
  -	".\include\ap_config_auto.h"\
  -	".\include\ebcdic.h"\
  -	".\include\sfio.h"\
   	
   
   "$(INTDIR)\util_win32.obj"	"$(INTDIR)\util_win32.sbr" : $(SOURCE)\
  
  
  
  1.6       +7 -0      apache-2.0/mpm/src/Configuration.tmpl
  
  Index: Configuration.tmpl
  ===================================================================
  RCS file: /home/cvs/apache-2.0/mpm/src/Configuration.tmpl,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Configuration.tmpl	1999/07/23 18:52:28	1.5
  +++ Configuration.tmpl	1999/08/06 00:54:00	1.6
  @@ -230,6 +230,13 @@
   
   # AddModule modules/experimental/mod_mmap_static.o
   
  +## mod_vhost_alias provides support for mass virtual hosting
  +## by dynamically changing the document root and CGI directory
  +## based on the host header or local IP address of the request.
  +## See "../htdocs/manual/vhosts/mass.html".
  +
  +# AddModule modules/standard/mod_vhost_alias.o
  +
   ##
   ## Config manipulation modules
   ##
  
  
  
  1.14      +81 -12    apache-2.0/mpm/src/Configure
  
  Index: Configure
  ===================================================================
  RCS file: /home/cvs/apache-2.0/mpm/src/Configure,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- Configure	1999/07/16 18:24:23	1.13
  +++ Configure	1999/08/06 00:54:00	1.14
  @@ -612,6 +612,7 @@
   	LIBS="$LIBS -lsocket -lnsl -lgen"
   	LD_SHLIB='cc'
   	LDFLAGS_SHLIB="-Zlink=so"
  +	LDFLAGS_MOD_SHLIB=$LDFLAGS_SHLIB
   	LDFLAGS_SHLIB_EXPORT="-Zlink=dynamic -Wl,-Bexport"
   	CFLAGS_SHLIB='-Zpic'
   	;;
  @@ -627,10 +628,9 @@
       BS2000*-siemens-sysv4*)
   	OS='BS2000'
   	OSDIR='os/bs2000'
  -	CC='c89 -XLLML -XLLMK'
  +	CC='c89 -XLLML -XLLMK -XL'
   	CFLAGS="$CFLAGS -DCHARSET_EBCDIC -DSVR4 -D_XPG_IV"
   	DEF_WANTHSREGEX=yes
  -	LIBS="$LIBS -lsocket -lnsl -lc"
   	DBM_LIB=""
   	;;
       *-siemens-sysv4*)
  @@ -750,6 +750,11 @@
   	CC='cc'
   	RANLIB='true'
   	;;
  +    *-tandem-oss)
  +	OS='Tandem OSS'
  +	CFLAGS="-D_TANDEM_SOURCE -D_XOPEN_SOURCE_EXTENDED=1 -g"
  +	CC='c89'
  +	;;
       *) # default: Catch systems we don't know about
   	OS='Unknown and unsupported OS'
       	echo Sorry, but we cannot grok \"$PLAT\"
  @@ -941,6 +946,7 @@
   ##
   TLD_SHLIB=`egrep '^LD_SHLIB=' Makefile.config | tail -1 | awk -F= '{print $2}'`
   TLDFLAGS_SHLIB=`egrep '^LDFLAGS_SHLIB=' Makefile.config | tail -1 | awk -F= '{print $2}'`
  +TLDFLAGS_MOD_SHLIB=`egrep '^LDFLAGS_MOD_SHLIB=' Makefile.config | tail -1 | awk -F= '{print $2}'`
   TLDFLAGS_SHLIB_EXPORT=`egrep '^LDFLAGS_SHLIB_EXPORT=' Makefile.config | tail -1 | awk -F= '{print $2}'`
   TCFLAGS_SHLIB=`egrep '^CFLAGS_SHLIB=' Makefile.config | tail -1 | awk -F= '{print $2}'`
   
  @@ -975,23 +981,30 @@
   	*-linux1)
   	    CFLAGS_SHLIB="-fpic"
   	    LDFLAGS_SHLIB="-Bshareable"
  +	    LDFLAGS_MOD_SHLIB=$LDFLAGS_SHLIB
   	    LDFLAGS_SHLIB_EXPORT="-rdynamic"
   	    ;;
   	*-linux2)
  +		LD_SHLIB="gcc"
   	    CFLAGS_SHLIB="-fpic"
  -	    LDFLAGS_SHLIB="-Bshareable"
  +	    LDFLAGS_SHLIB="-shared"
  +	    LDFLAGS_MOD_SHLIB=$LDFLAGS_SHLIB
   	    LDFLAGS_SHLIB_EXPORT="-rdynamic"
   	    SHLIB_SUFFIX_DEPTH=0
   	    ;;
   	*-freebsd2*)
  +		LD_SHLIB="gcc"
   	    CFLAGS_SHLIB="-fpic"
  -	    LDFLAGS_SHLIB="-Bshareable"
  +	    LDFLAGS_SHLIB="-shared"
  +	    LDFLAGS_MOD_SHLIB=$LDFLAGS_SHLIB
   	    LDFLAGS_SHLIB_EXPORT=""
   	    SHLIB_SUFFIX_DEPTH=2
   	    ;;
   	*-freebsd3*|*-freebsd4*)
  +		LD_SHLIB="gcc"
   	    CFLAGS_SHLIB="-fpic"
  -	    LDFLAGS_SHLIB="-Bshareable"
  +	    LDFLAGS_SHLIB="-shared"
  +	    LDFLAGS_MOD_SHLIB=$LDFLAGS_SHLIB
   	    OBJFORMAT=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` 
   	    if [ "x$OBJFORMAT" = "xelf" ]; then
   		LDFLAGS_SHLIB_EXPORT="-Wl,-E"
  @@ -1004,6 +1017,7 @@
   	*-openbsd*)
   	    CFLAGS_SHLIB="-fPIC"
   	    LDFLAGS_SHLIB="-Bforcearchive -Bshareable"
  +	    LDFLAGS_MOD_SHLIB=$LDFLAGS_SHLIB
   	    LDFLAGS_SHLIB_EXPORT=""
   	    SHLIB_SUFFIX_DEPTH=2
   	    ;;
  @@ -1016,21 +1030,25 @@
   		LDFLAGS_SHLIB="-shared"
   		LDFLAGS_SHLIB_EXPORT="-Wl,-E"
   	    fi
  +	    LDFLAGS_MOD_SHLIB=$LDFLAGS_SHLIB
   	    SHLIB_SUFFIX_DEPTH=2
   	    ;;
   	*-bsdi3)
   	    LD_SHLIB="shlicc2"
   	    LDFLAGS_SHLIB="-r"
  +	    LDFLAGS_MOD_SHLIB=$LDFLAGS_SHLIB
   	    ;;
   	*-bsdi)
   	    CFLAGS_SHLIB="-fPIC"
   	    LDFLAGS_SHLIB="-shared"
  +	    LDFLAGS_MOD_SHLIB=$LDFLAGS_SHLIB
   	    LDFLAGS_SHLIB_EXPORT="-rdynamic"
   	    ;;
    	*-next-openstep*)
    	    LD_SHLIB='cc'
    	    CFLAGS_SHLIB='-dynamic -fno-common'
    	    LDFLAGS_SHLIB='-bundle -undefined warning'
  +	    LDFLAGS_MOD_SHLIB=$LDFLAGS_SHLIB
    	    LDFLAGS_SHLIB_EXPORT=''
    	    SHLIB_SUFFIX_DEPTH=0
    	    ;;
  @@ -1038,15 +1056,18 @@
   	    LD_SHLIB="cc"
   	    CFLAGS_SHLIB=""
   	    LDFLAGS_SHLIB='$(EXTRA_LDFLAGS) -bundle -undefined suppress'
  +	    LDFLAGS_MOD_SHLIB=$LDFLAGS_SHLIB
   	    LDFLAGS_SHLIB_EXPORT=""
   	    SHLIB_SUFFIX_DEPTH=0
   	    ;;
   	*-solaris2*)
  -	    case $CC in
  -		*/gcc|gcc ) CFLAGS_SHLIB="-fPIC" ;;
  -		*/cc|cc   ) CFLAGS_SHLIB="-KPIC" ;;
  -	    esac
  +	    if [ "x`$CC -v 2>&1 | grep gcc`" != "x" ]; then
  +	        CFLAGS_SHLIB="-fPIC"
  +	    else
  +	        CFLAGS_SHLIB="-KPIC"
  +	    fi
   	    LDFLAGS_SHLIB="-G"
  +	    LDFLAGS_MOD_SHLIB=$LDFLAGS_SHLIB
   	    LDFLAGS_SHLIB_EXPORT=""
   	    SHLIB_SUFFIX_DEPTH=1
   	    ;;
  @@ -1056,6 +1077,7 @@
   		*/acc|acc ) CFLAGS_SHLIB="-pic" ;;
   	    esac
   	    LDFLAGS_SHLIB="-assert pure-text"
  +	    LDFLAGS_MOD_SHLIB=$LDFLAGS_SHLIB
   	    LDFLAGS_SHLIB_EXPORT=""
   	    ;;
   	*-sgi-irix32)
  @@ -1074,6 +1096,7 @@
   	    else
   		LDFLAGS_SHLIB="-shared"
   	    fi
  +	    LDFLAGS_MOD_SHLIB=$LDFLAGS_SHLIB
   	    LDFLAGS_SHLIB_EXPORT=""
   	    ;;
   	*-sgi-irix64)
  @@ -1092,6 +1115,7 @@
   	    else
   		LDFLAGS_SHLIB="-shared"
   	    fi
  +	    LDFLAGS_MOD_SHLIB=$LDFLAGS_SHLIB
   	    LDFLAGS_SHLIB_EXPORT=""
   	    ;;
   	*-sgi-irix)
  @@ -1100,6 +1124,7 @@
   		*/cc|cc   ) CFLAGS_SHLIB="-KPIC" ;;
   	    esac
   	    LDFLAGS_SHLIB="-shared"
  +	    LDFLAGS_MOD_SHLIB=$LDFLAGS_SHLIB
   	    LDFLAGS_SHLIB_EXPORT=""
   	    ;;
   	*-dec-osf*)
  @@ -1108,6 +1133,7 @@
   		*/cc|cc   ) CFLAGS_SHLIB="" ;;
   	    esac
   	    LDFLAGS_SHLIB="-shared -expect_unresolved '*' -s"
  +	    LDFLAGS_MOD_SHLIB=$LDFLAGS_SHLIB
   	    LDFLAGS_SHLIB_EXPORT=""
   	    ;;
   	*-unixware*)
  @@ -1116,6 +1142,7 @@
   		*/cc|cc   ) CFLAGS_SHLIB="-KPIC" ;;
   	    esac
   	    LDFLAGS_SHLIB="-Bdynamic -G"
  +	    LDFLAGS_MOD_SHLIB=$LDFLAGS_SHLIB
   	    LDFLAGS_SHLIB_EXPORT="-Wl,-Bexport"
   	    ;;
   	 *-sco5*)
  @@ -1125,6 +1152,7 @@
   	     esac
   	     LDFLAGS_SHLIB="-G"
   	     LDFLAGS_SHLIB_EXPORT="-Wl,-Bexport"
  +	    LDFLAGS_MOD_SHLIB=$LDFLAGS_SHLIB
   	     SHLIB_SUFFIX_DEPTH=1
   	     ;;
   	RM*-siemens-sysv4*)
  @@ -1134,6 +1162,7 @@
   		*/cc|cc   ) CFLAGS_SHLIB="-KPIC" ;;
   	    esac
   	    LDFLAGS_SHLIB="-G"
  +	    LDFLAGS_MOD_SHLIB=$LDFLAGS_SHLIB
   	    LDFLAGS_SHLIB_EXPORT="-Wl,-Blargedynsym"
   	    ;;
   	*-siemens-sysv4*)
  @@ -1143,6 +1172,7 @@
   		*/cc|cc   ) CFLAGS_SHLIB="-KPIC" ;;
   	    esac
   	    LDFLAGS_SHLIB="-G"
  +	    LDFLAGS_MOD_SHLIB=$LDFLAGS_SHLIB
   	    LDFLAGS_SHLIB_EXPORT=""
   	    SHLIB_SUFFIX_DEPTH=0
   	    DEF_SHARED_CORE=yes
  @@ -1153,6 +1183,7 @@
   		*/cc|cc   ) CFLAGS_SHLIB="-KPIC" ;;
   	    esac
   	    LDFLAGS_SHLIB="-G"
  +	    LDFLAGS_MOD_SHLIB=$LDFLAGS_SHLIB
   	    LDFLAGS_SHLIB_EXPORT=""
   	    DEF_SHARED_CORE=yes
   	    ;;
  @@ -1162,6 +1193,7 @@
   		*/cc|cc   ) CFLAGS_SHLIB="+z" ;;
   	    esac
   	    LDFLAGS_SHLIB="-b"
  +	    LDFLAGS_MOD_SHLIB=$LDFLAGS_SHLIB
   	    LDFLAGS_SHLIB_EXPORT="-Wl,-E -Wl,-B,deferred"
   	    SHLIB_SUFFIX_NAME=sl
   	    ;;
  @@ -1171,6 +1203,7 @@
   		*/cc|cc   ) CFLAGS_SHLIB="+z" ;;
   	    esac
   	    LDFLAGS_SHLIB="-b"
  +	    LDFLAGS_MOD_SHLIB=$LDFLAGS_SHLIB
   	    LDFLAGS_SHLIB_EXPORT="-Wl,-E -Wl,-B,deferred -Wl,+s"
   	    SHLIB_SUFFIX_NAME=sl
   	    ;;
  @@ -1187,6 +1220,7 @@
   		    LDFLAGS_SHLIB="-H512 -T512 -bhalt:4 -bM:SRE -e _nostart"
   		    ;;
   	    esac
  +	    LDFLAGS_MOD_SHLIB="$LDFLAGS_SHLIB -bI:@libexecdir@/httpd.exp -lc"
   	    LDFLAGS_SHLIB="$LDFLAGS_SHLIB -bI:\$(SRCDIR)/support/httpd.exp "
   	    LDFLAGS_SHLIB="$LDFLAGS_SHLIB -bE:\`echo \$@|sed -e 's:\.so\$\$:.exp:'\`"
   	    LDFLAGS_SHLIB="$LDFLAGS_SHLIB -lc"
  @@ -1196,12 +1230,14 @@
   	*-*-powermax*)
   	    LD_SHLIB='cc'
   	    LDFLAGS_SHLIB="-Zlink=so"
  +	    LDFLAGS_MOD_SHLIB=$LDFLAGS_SHLIB
   	    LDFLAGS_SHLIB_EXPORT="-Zlink=dynamic -Wl,-Bexport"
   	    CFLAGS_SHLIB='-Zpic'
   	    ;;
   	*-OS/2*)
   	    DEF_SHARED_CORE=yes
   	    LDFLAGS_SHLIB="`echo $LDFLAGS|sed -e s/-Zexe//` -Zdll"
  +	    LDFLAGS_MOD_SHLIB=$LDFLAGS_SHLIB
   	    SHLIB_SUFFIX_NAME=dll
   	    SHLIB_SUFFIX_DEPTH=0
   	    LD_SHLIB=$CC
  @@ -1212,6 +1248,15 @@
   	    SHCORE_IMPLIB='ApacheCoreOS2.a'
   	    OS_MODULE_INCLUDE='Makefile.OS2'
   	    ;;
  +	*-dgux)
  +	    case $CC in
  +		*/gcc|gcc ) CFLAGS_SHLIB="-fpic" ;;
  +	    esac
  +	    DEF_SHARED_CORE=yes
  +	    LDFLAGS_SHLIB="-G"
  +	    LDFLAGS_MOD_SHLIB=$LDFLAGS_SHLIB
  +	    LDFLAGS_SHLIB_EXPORT=""
  +            ;;
   	*)
   	    ##  ok, no known explict support for shared objects
   	    ##  on this platform, but we give not up immediately.
  @@ -1237,6 +1282,7 @@
   		    #   so we can guess the flags from its knowledge
   		    CFLAGS_SHLIB="`$PERL -V:cccdlflags | cut -d\' -f2`"
   		    LDFLAGS_SHLIB="`$PERL -V:lddlflags | cut -d\' -f2`"
  +		    LDFLAGS_MOD_SHLIB=$LDFLAGS_SHLIB
   		    LDFLAGS_SHLIB_EXPORT="`$PERL -V:ccdlflags | cut -d\' -f2`"
   		    #   but additionally we have to inform the
   		    #   user that we are just guessing the flags
  @@ -1380,12 +1426,31 @@
       *-dg-dgux*)
   	# R4.11MU02 requires -lsocket -lnsl ... no idea if it's earlier or
   	# later than what we already knew about.  PR#732
  -	if ./helpers/TestCompile lib socket; then
  -	    LIBS="$LIBS -lsocket"
  +	if ./helpers/TestCompile lib nsl; then
  +	    LIBS="$LIBS -lnsl"
  +	    TLIB='-lnsl'
   	fi
  +	if TLIB=$TLIB ./helpers/TestCompile lib socket; then
  +	    LIBS="-lsocket $LIBS"
  +	fi
  +	;;
  +    BS2000*-siemens-sysv4*)
  +	# Depending on the BS2000 OS and compiler/crte release,
  +	# -lnsl may be available (or may be not).
  +	# In standard SVR4 systems, -lsocket relies on some symbols
  +	# from -lnsl, so the test for -lnsl must appear first.
   	if ./helpers/TestCompile lib nsl; then
   	    LIBS="$LIBS -lnsl"
  +	    TLIB='-lnsl'
  +	fi
  +	if TLIB=$TLIB ./helpers/TestCompile lib socket; then
  +	    LIBS="-lsocket $LIBS"
   	fi
  +	if ./helpers/TestCompile func initgroups; then
  +	    :
  +	else
  +	    CFLAGS="$CFLAGS -DNEED_INITGROUPS"
  +	fi
   	;;
   esac
   
  @@ -1673,7 +1738,7 @@
   	#    select the special subtarget for shared core generation
   	SUBTARGET=target_shared
   	#    determine additional suffixes for libhttpd.so
  -	V=1 R=3 P=7
  +	V=1 R=3 P=8
   	if [ "x$SHLIB_SUFFIX_DEPTH" = "x0" ]; then
   	    SHLIB_SUFFIX_LIST=""
   	fi
  @@ -1709,6 +1774,9 @@
       if [ "x$TLDFLAGS_SHLIB_EXPORT" = "x" ]; then
   	echo "LDFLAGS_SHLIB_EXPORT=$LDFLAGS_SHLIB_EXPORT" >> Makefile.config
       fi
  +    if [ "x$TLDFLAGS_MOD_SHLIB" = "x" ]; then
  +	echo "LDFLAGS_MOD_SHLIB=$LDFLAGS_MOD_SHLIB" >> Makefile.config
  +    fi
       echo "LD_SHCORE_DEF=$LD_SHCORE_DEF" >> Makefile.config
       echo "LD_SHCORE_LIBS=$LD_SHCORE_LIBS" >> Makefile.config
       echo "SHARED_CORE_EP=$SHARED_CORE_EP" >> Makefile.config
  @@ -1860,6 +1928,7 @@
   echo "SUBTARGET=$SUBTARGET" >> Makefile
   echo "SHLIB_SUFFIX_NAME=$SHLIB_SUFFIX_NAME" >> Makefile
   echo "SHLIB_SUFFIX_LIST=$SHLIB_SUFFIX_LIST" >> Makefile
  +echo "SHLIB_EXPORT_FILES=$SHLIB_EXPORT_FILES" >> Makefile
   echo "" >> Makefile
   
   ####################################################################
  
  
  
  1.8       +2 -1      apache-2.0/mpm/src/ap/Makefile.tmpl
  
  Index: Makefile.tmpl
  ===================================================================
  RCS file: /home/cvs/apache-2.0/mpm/src/ap/Makefile.tmpl,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- Makefile.tmpl	1999/07/11 16:36:50	1.7
  +++ Makefile.tmpl	1999/08/06 00:54:07	1.8
  @@ -6,7 +6,8 @@
   LIB=libap.a
   
   OBJS=ap_cpystrn.o ap_execve.o ap_fnmatch.o ap_getpass.o ap_md5c.o ap_signal.o \
  -     ap_slack.o ap_snprintf.o ap_buf.o ap_hooks.o
  +     ap_slack.o ap_snprintf.o ap_sha1.o ap_checkpass.o \
  +     ap_buf.o ap_hooks.o
   
   .c.o:
   	$(CC) -c $(INCLUDES) $(CFLAGS) $<
  
  
  
  1.2       +8 -47     apache-2.0/mpm/src/ap/ap_md5c.c
  
  Index: ap_md5c.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/mpm/src/ap/ap_md5c.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ap_md5c.c	1999/06/18 18:39:24	1.1
  +++ ap_md5c.c	1999/08/06 00:54:08	1.2
  @@ -415,15 +415,14 @@
    * Define the Magic String prefix that identifies a password as being
    * hashed using our algorithm.
    */
  -static const char *apr1_id = "$apr1$";
  +const char *apr1_id = "$apr1$";
   
   /*
    * The following MD5 password encryption code was largely borrowed from
    * the FreeBSD 3.0 /usr/src/lib/libcrypt/crypt.c file, which is
    * licenced as stated at the top of this file.
    */
  -
  -static void to64(char *s, unsigned long v, int n)
  +API_EXPORT(void) ap_to64(char *s, unsigned long v, int n)
   {
       static unsigned char itoa64[] =         /* 0 ... 63 => ASCII - 64 */
   	"./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
  @@ -572,12 +571,12 @@
   
       p = passwd + strlen(passwd);
   
  -    l = (final[ 0]<<16) | (final[ 6]<<8) | final[12]; to64(p, l, 4); p += 4;
  -    l = (final[ 1]<<16) | (final[ 7]<<8) | final[13]; to64(p, l, 4); p += 4;
  -    l = (final[ 2]<<16) | (final[ 8]<<8) | final[14]; to64(p, l, 4); p += 4;
  -    l = (final[ 3]<<16) | (final[ 9]<<8) | final[15]; to64(p, l, 4); p += 4;
  -    l = (final[ 4]<<16) | (final[10]<<8) | final[ 5]; to64(p, l, 4); p += 4;
  -    l =                    final[11]                ; to64(p, l, 2); p += 2;
  +    l = (final[ 0]<<16) | (final[ 6]<<8) | final[12]; ap_to64(p, l, 4); p += 4;
  +    l = (final[ 1]<<16) | (final[ 7]<<8) | final[13]; ap_to64(p, l, 4); p += 4;
  +    l = (final[ 2]<<16) | (final[ 8]<<8) | final[14]; ap_to64(p, l, 4); p += 4;
  +    l = (final[ 3]<<16) | (final[ 9]<<8) | final[15]; ap_to64(p, l, 4); p += 4;
  +    l = (final[ 4]<<16) | (final[10]<<8) | final[ 5]; ap_to64(p, l, 4); p += 4;
  +    l =                    final[11]                ; ap_to64(p, l, 2); p += 2;
       *p = '\0';
   
       /*
  @@ -586,42 +585,4 @@
       memset(final, 0, sizeof(final));
   
       ap_cpystrn(result, passwd, nbytes - 1);
  -}
  -
  -/*
  - * Validate a plaintext password against a smashed one.  Use either
  - * crypt() (if available) or ap_MD5Encode(), depending upon the format
  - * of the smashed input password.  Return NULL if they match, or
  - * an explanatory text string if they don't.
  - */
  -
  -API_EXPORT(char *) ap_validate_password(const char *passwd, const char *hash)
  -{
  -    char sample[120];
  -    char *crypt_pw;
  -
  -    if (!strncmp(hash, apr1_id, strlen(apr1_id))) {
  -	/*
  -	 * The hash was created using our custom algorithm.
  -	 */
  -	ap_MD5Encode((const unsigned char *)passwd,
  -		     (const unsigned char *)hash, sample, sizeof(sample));
  -    }
  -    else {
  -	/*
  -	 * It's not our algorithm, so feed it to crypt() if possible.
  -	 */
  -#if defined(WIN32) || defined(TPF)
  -	/*
  -	 * On Windows, the only alternative to our MD5 algorithm is plain
  -	 * text.
  -	 */
  -	ap_cpystrn(sample, passwd, sizeof(sample) - 1);
  -#else
  -	crypt_pw = crypt(passwd, hash);
  -	ap_cpystrn(sample, crypt_pw, sizeof(sample) - 1);
  -#endif
  -    }
  -
  -    return (strcmp(sample, hash) == 0) ? NULL : "password mismatch";
   }
  
  
  
  1.1                  apache-2.0/mpm/src/ap/ap_checkpass.c
  
  Index: ap_checkpass.c
  ===================================================================
  /* ====================================================================
   * Copyright (c) 1996-1999 The Apache Group.  All rights reserved.
   *
   * 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 acknowledgment:
   *    "This product includes software developed by the Apache Group
   *    for use in the Apache HTTP server project (http://www.apache.org/)."
   *
   * 4. The names "Apache Server" and "Apache Group" must not be used to
   *    endorse or promote products derived from this software without
   *    prior written permission. For written permission, please contact
   *    apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache"
   *    nor may "Apache" appear in their names without prior written
   *    permission of the Apache Group.
   *
   * 6. Redistributions of any form whatsoever must retain the following
   *    acknowledgment:
   *    "This product includes software developed by the Apache Group
   *    for use in the Apache HTTP server project (http://www.apache.org/)."
   *
   * THIS SOFTWARE IS PROVIDED BY THE APACHE GROUP ``AS IS'' AND ANY
   * EXPRESSED 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 APACHE GROUP OR
   * ITS 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.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Group and was originally based
   * on public domain software written at the National Center for
   * Supercomputing Applications, University of Illinois, Urbana-Champaign.
   * For more information on the Apache Group and the Apache HTTP server
   * project, please see <http://www.apache.org/>.
   *
   * Simple password verify, which 'know's about various password
   * types, such as the simple base64 encoded crypt()s, MD5 $ marked
   * FreeBSD style and netscape SHA1's.
   */
  #include <string.h>
  
  #include "ap_config.h"
  #include "ap_md5.h"
  #include "ap_sha1.h"
  #include "ap.h"
  #ifdef CHARSET_EBCDIC
  #include "ebcdic.h"
  #endif /*CHARSET_EBCDIC*/
  #if HAVE_CRYPT_H
  #include <crypt.h>
  #endif
  
  /*
   * Validate a plaintext password against a smashed one.  Use either
   * crypt() (if available), ap_MD5Encode() or ap_SHA1Encode depending 
   * upon the format of the smashed input password.  
   *
   * Return NULL if they match, or an explanatory text string if they don't.
   */
  
  API_EXPORT(char *) ap_validate_password(const char *passwd, const char *hash)
  {
      char sample[120];
      char *crypt_pw;
  
      /* FreeBSD style MD5 string 
       */
      if (!strncmp(hash, apr1_id, strlen(apr1_id))) {
  
  	ap_MD5Encode((const unsigned char *)passwd,
  		     (const unsigned char *)hash, sample, sizeof(sample));
      }
      /* Netscape / SHA1 ldap style strng  
       */
      else if (!strncmp(hash, sha1_id, strlen(sha1_id))) {
  
   	ap_sha1_base64(passwd, strlen(passwd), sample);
      }
      else {
  	/*
  	 * It's not our algorithm, so feed it to crypt() if possible.
  	 */
  #if defined(WIN32) || defined(TPF)
  	/*
  	 * On Windows, the only alternative to our MD5 algorithm is plain
  	 * text.
  	 */
  	ap_cpystrn(sample, passwd, sizeof(sample) - 1);
  #else
  	crypt_pw = crypt(passwd, hash);
  	ap_cpystrn(sample, crypt_pw, sizeof(sample) - 1);
  #endif
      }
      return (strcmp(sample, hash) == 0) ? NULL : "password mismatch";
  }
  
  
  
  1.1                  apache-2.0/mpm/src/ap/ap_sha1.c
  
  Index: ap_sha1.c
  ===================================================================
  /* ====================================================================
   * Copyright (c) 1996-1999 The Apache Group.  All rights reserved.
   *
   * 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 acknowledgment:
   *    "This product includes software developed by the Apache Group
   *    for use in the Apache HTTP server project (http://www.apache.org/)."
   *
   * 4. The names "Apache Server" and "Apache Group" must not be used to
   *    endorse or promote products derived from this software without
   *    prior written permission. For written permission, please contact
   *    apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache"
   *    nor may "Apache" appear in their names without prior written
   *    permission of the Apache Group.
   *
   * 6. Redistributions of any form whatsoever must retain the following
   *    acknowledgment:
   *    "This product includes software developed by the Apache Group
   *    for use in the Apache HTTP server project (http://www.apache.org/)."
   *
   * THIS SOFTWARE IS PROVIDED BY THE APACHE GROUP ``AS IS'' AND ANY
   * EXPRESSED 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 APACHE GROUP OR
   * ITS 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.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Group and was originally based
   * on public domain software written at the National Center for
   * Supercomputing Applications, University of Illinois, Urbana-Champaign.
   * For more information on the Apache Group and the Apache HTTP server
   * project, please see <http://www.apache.org/>.
   *
   * The only exported function:
   *
   * 	 ap_sha1_base64(const char *clear, int len, char *out);
   *
   * provides a means to SHA1 crypt/encode a plaintext password in
   * a way which makes password files compatible with those commonly
   * used in netscape web and ldap installations. It was put together
   * by Clinton Wong <cl...@netcom.com>, who also notes that:
   *
   * Note: SHA1 support is useful for migration purposes, but is less
   *     secure than Apache's password format, since Apache's (MD5)
   *     password format uses a random eight character salt to generate
   *     one of many possible hashes for the same password.  Netscape
   *     uses plain SHA1 without a salt, so the same password
   *     will always generate the same hash, making it easier
   *     to break since the search space is smaller.
   *
   * See also the documentation in support/SHA1 as to hints on how to 
   * migrate an existing netscape installation and other supplied utitlites.
   *
   * This software also makes use of the following components: 
   *
   * NIST Secure Hash Algorithm
   *  	heavily modified by Uwe Hollerbach uh@alumni.caltech edu
   *	from Peter C. Gutmann's implementation as found in
   *	Applied Cryptography by Bruce Schneier
   *	This code is hereby placed in the public domain
   *
   * MIME Base 64 encoding based on src/metamail/codes.c in metamail,
   *	available at: ftp://thumper.bellcore.com/pub/nsb/
   *
   * Metamail's copyright is:
   * 	Copyright (c) 1991 Bell Communications Research, Inc. (Bellcore)
   * 	Permission to use, copy, modify, and distribute this material 
   *	for any purpose and without fee is hereby granted, provided 
   *	that the above copyright notice and this permission notice 
   *	appear in all copies, and that the name of Bellcore not be 
   *	used in advertising or publicity pertaining to this 
   *	material without the specific, prior written permission 
   *	of an authorized representative of Bellcore.  BELLCORE 
   *	MAKES NO REPRESENTATIONS ABOUT THE ACCURACY OR SUITABILITY 
   *	OF THIS MATERIAL FOR ANY PURPOSE.  IT IS PROVIDED "AS IS", 
   *	WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES.
   */
  
  #include <string.h>
  
  #include "ap_config.h"
  #include "ap_sha1.h"
  #include "ap.h"
  #ifdef CHARSET_EBCDIC
  #include "ebcdic.h"
  #endif /*CHARSET_EBCDIC*/
  
  /* a bit faster & bigger, if defined */
  #define UNROLL_LOOPS
  
  /* NIST's proposed modification to SHA, 7/11/94 */
  #define USE_MODIFIED_SHA
  
  /* SHA f()-functions */
  #define f1(x,y,z)	((x & y) | (~x & z))
  #define f2(x,y,z)	(x ^ y ^ z)
  #define f3(x,y,z)	((x & y) | (x & z) | (y & z))
  #define f4(x,y,z)	(x ^ y ^ z)
  
  /* SHA constants */
  #define CONST1		0x5a827999L
  #define CONST2		0x6ed9eba1L
  #define CONST3		0x8f1bbcdcL
  #define CONST4		0xca62c1d6L
  
  /* 32-bit rotate */
  
  #define ROT32(x,n)	((x << n) | (x >> (32 - n)))
  
  #define FUNC(n,i)						\
      temp = ROT32(A,5) + f##n(B,C,D) + E + W[i] + CONST##n;	\
      E = D; D = C; C = ROT32(B,30); B = A; A = temp
  
  typedef unsigned char AP_BYTE;     /* an 8-bit quantity */
  typedef unsigned long AP_LONG;     /* a 32-bit quantity */
   
  #define SHA_BLOCKSIZE           64
  #define SHA_DIGESTSIZE          20
   
  typedef struct {
      AP_LONG digest[5];             /* message digest */
      AP_LONG count_lo, count_hi;    /* 64-bit bit count */
      AP_LONG data[16];              /* SHA data buffer */
      int local;                  /* unprocessed amount in data */
  } SHA_INFO;
  
  static void sha_init(SHA_INFO *);
  static void sha_update(SHA_INFO *, const AP_BYTE *, int);
  static void sha_final(SHA_INFO *);
  static void sha_raw_swap(SHA_INFO *);
  static void output64chunk(unsigned char, unsigned char, unsigned char,
  			  int, unsigned char **);
  static void encode_mime64(unsigned char *, unsigned char *, int);
  void sha1_base64(char *, int, char *);
  
  /* do SHA transformation */
  static void sha_transform(SHA_INFO *sha_info)
  {
      int i;
      AP_LONG temp, A, B, C, D, E, W[80];
  
      for (i = 0; i < 16; ++i) {
  	W[i] = sha_info->data[i];
      }
      for (i = 16; i < 80; ++i) {
  	W[i] = W[i-3] ^ W[i-8] ^ W[i-14] ^ W[i-16];
  #ifdef USE_MODIFIED_SHA
  	W[i] = ROT32(W[i], 1);
  #endif /* USE_MODIFIED_SHA */
      }
      A = sha_info->digest[0];
      B = sha_info->digest[1];
      C = sha_info->digest[2];
      D = sha_info->digest[3];
      E = sha_info->digest[4];
  #ifdef UNROLL_LOOPS
      FUNC(1, 0);  FUNC(1, 1);  FUNC(1, 2);  FUNC(1, 3);  FUNC(1, 4);
      FUNC(1, 5);  FUNC(1, 6);  FUNC(1, 7);  FUNC(1, 8);  FUNC(1, 9);
      FUNC(1,10);  FUNC(1,11);  FUNC(1,12);  FUNC(1,13);  FUNC(1,14);
      FUNC(1,15);  FUNC(1,16);  FUNC(1,17);  FUNC(1,18);  FUNC(1,19);
  
      FUNC(2,20);  FUNC(2,21);  FUNC(2,22);  FUNC(2,23);  FUNC(2,24);
      FUNC(2,25);  FUNC(2,26);  FUNC(2,27);  FUNC(2,28);  FUNC(2,29);
      FUNC(2,30);  FUNC(2,31);  FUNC(2,32);  FUNC(2,33);  FUNC(2,34);
      FUNC(2,35);  FUNC(2,36);  FUNC(2,37);  FUNC(2,38);  FUNC(2,39);
  
      FUNC(3,40);  FUNC(3,41);  FUNC(3,42);  FUNC(3,43);  FUNC(3,44);
      FUNC(3,45);  FUNC(3,46);  FUNC(3,47);  FUNC(3,48);  FUNC(3,49);
      FUNC(3,50);  FUNC(3,51);  FUNC(3,52);  FUNC(3,53);  FUNC(3,54);
      FUNC(3,55);  FUNC(3,56);  FUNC(3,57);  FUNC(3,58);  FUNC(3,59);
  
      FUNC(4,60);  FUNC(4,61);  FUNC(4,62);  FUNC(4,63);  FUNC(4,64);
      FUNC(4,65);  FUNC(4,66);  FUNC(4,67);  FUNC(4,68);  FUNC(4,69);
      FUNC(4,70);  FUNC(4,71);  FUNC(4,72);  FUNC(4,73);  FUNC(4,74);
      FUNC(4,75);  FUNC(4,76);  FUNC(4,77);  FUNC(4,78);  FUNC(4,79);
  #else /* !UNROLL_LOOPS */
      for (i = 0; i < 20; ++i) {
  	FUNC(1,i);
      }
      for (i = 20; i < 40; ++i) {
  	FUNC(2,i);
      }
      for (i = 40; i < 60; ++i) {
  	FUNC(3,i);
      }
      for (i = 60; i < 80; ++i) {
  	FUNC(4,i);
      }
  #endif /* !UNROLL_LOOPS */
      sha_info->digest[0] += A;
      sha_info->digest[1] += B;
      sha_info->digest[2] += C;
      sha_info->digest[3] += D;
      sha_info->digest[4] += E;
  }
  
  union endianTest {
      long Long;
      char Char[sizeof(long)];
  };
  
  static char isLittleEndian(void)
  {
      static union endianTest u;
      u.Long = 1;
      return (u.Char[0] == 1);
  }
  
  /* change endianness of data */
  
  /* count is the number of bytes to do an endian flip */
  static void maybe_byte_reverse(AP_LONG *buffer, int count)
  {
      int i;
      AP_BYTE ct[4], *cp;
  
      if (isLittleEndian()) {    /* do the swap only if it is little endian */
  	count /= sizeof(AP_LONG);
  	cp = (AP_BYTE *) buffer;
  	for (i = 0; i < count; ++i) {
  	    ct[0] = cp[0];
  	    ct[1] = cp[1];
  	    ct[2] = cp[2];
  	    ct[3] = cp[3];
  	    cp[0] = ct[3];
  	    cp[1] = ct[2];
  	    cp[2] = ct[1];
  	    cp[3] = ct[0];
  	    cp += sizeof(AP_LONG);
  	}
      }
  }
  
  /* initialize the SHA digest */
  
  static void sha_init(SHA_INFO *sha_info)
  {
      sha_info->digest[0] = 0x67452301L;
      sha_info->digest[1] = 0xefcdab89L;
      sha_info->digest[2] = 0x98badcfeL;
      sha_info->digest[3] = 0x10325476L;
      sha_info->digest[4] = 0xc3d2e1f0L;
      sha_info->count_lo = 0L;
      sha_info->count_hi = 0L;
      sha_info->local = 0;
  }
  
  /* update the SHA digest */
  
  static void sha_update(SHA_INFO *sha_info, const AP_BYTE *buffer, int count)
  {
      int i;
  
      if ((sha_info->count_lo + ((AP_LONG) count << 3)) < sha_info->count_lo) {
  	++sha_info->count_hi;
      }
      sha_info->count_lo += (AP_LONG) count << 3;
      sha_info->count_hi += (AP_LONG) count >> 29;
      if (sha_info->local) {
  	i = SHA_BLOCKSIZE - sha_info->local;
  	if (i > count) {
  	    i = count;
  	}
  	memcpy(((AP_BYTE *) sha_info->data) + sha_info->local, buffer, i);
  	count -= i;
  	buffer += i;
  	sha_info->local += i;
  	if (sha_info->local == SHA_BLOCKSIZE) {
  	    maybe_byte_reverse(sha_info->data, SHA_BLOCKSIZE);
  	    sha_transform(sha_info);
  	}
  	else {
  	    return;
  	}
      }
      while (count >= SHA_BLOCKSIZE) {
  	memcpy(sha_info->data, buffer, SHA_BLOCKSIZE);
  	buffer += SHA_BLOCKSIZE;
  	count -= SHA_BLOCKSIZE;
  	maybe_byte_reverse(sha_info->data, SHA_BLOCKSIZE);
  	sha_transform(sha_info);
      }
      memcpy(sha_info->data, buffer, count);
      sha_info->local = count;
  }
  
  /* finish computing the SHA digest */
  
  static void sha_final(SHA_INFO *sha_info)
  {
      int count;
      AP_LONG lo_bit_count, hi_bit_count;
  
      lo_bit_count = sha_info->count_lo;
      hi_bit_count = sha_info->count_hi;
      count = (int) ((lo_bit_count >> 3) & 0x3f);
      ((AP_BYTE *) sha_info->data)[count++] = 0x80;
      if (count > SHA_BLOCKSIZE - 8) {
  	memset(((AP_BYTE *) sha_info->data) + count, 0, SHA_BLOCKSIZE - count);
  	maybe_byte_reverse(sha_info->data, SHA_BLOCKSIZE);
  	sha_transform(sha_info);
  	memset((AP_BYTE *) sha_info->data, 0, SHA_BLOCKSIZE - 8);
      }
      else {
  	memset(((AP_BYTE *) sha_info->data) + count, 0,
  	       SHA_BLOCKSIZE - 8 - count);
      }
      maybe_byte_reverse(sha_info->data, SHA_BLOCKSIZE);
      sha_info->data[14] = hi_bit_count;
      sha_info->data[15] = lo_bit_count;
      sha_transform(sha_info);
  }
  
  /*
     internally implemented as an array of longs, need to swap if 
     you're going to access the memory in the raw, instead of looping
     through with arrays of longs.
  */
  
  static void sha_raw_swap(SHA_INFO *sha_info)
  {
      int i;
  
      for (i = 0; i < 5; ++i) {
  	maybe_byte_reverse((AP_LONG *) &sha_info->digest[i], 4);
      }
  }
  
  static char basis_64[] =
    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
  
  static void output64chunk(unsigned char c1, unsigned char c2, unsigned char c3,
  			  int pads, unsigned char **outfile)
  {
      *(*outfile)++ = basis_64[c1>>2];
  
      *(*outfile)++ = basis_64[((c1 & 0x3)<< 4) | ((c2 & 0xF0) >> 4)];
      if (pads == 2) {
  	*(*outfile)++ = '=';
  	*(*outfile)++ = '=';
      }
      else if (pads) {
  	*(*outfile)++ =  basis_64[((c2 & 0xF) << 2) | ((c3 & 0xC0) >>6)];
  	*(*outfile)++ = '=';
      }
      else {
  	*(*outfile)++ = basis_64[((c2 & 0xF) << 2) | ((c3 & 0xC0) >>6)];
  	*(*outfile)++ = basis_64[c3 & 0x3F];
      }
  }
  
  static void encode_mime64(unsigned char *in, unsigned char *out, int length)
  {
      int diff, ct = 0;
  
      while ((diff = length - ct)) {
  	if ( diff >= 3 ) {
  	    diff = 3;
  	    output64chunk(in[ct], in[ct+1], in[ct+2], 0, &out);
  	}
  	else if (diff == 2) {
  	    output64chunk(in[ct], in[ct+1], 0, 1, &out);
  	}
  	else if (diff == 1) {
  	    output64chunk(in[ct], 0, 0, 2, &out);
  	}
  	ct += diff;
      }
      *out++ = 0;
  }
  
  /* {SHA} is the prefix used for base64 encoded sha1 in
   * ldap data interchange format.
   */
  const char *sha1_id = "{SHA}";
  
  API_EXPORT(void) ap_sha1_base64(const char *clear, int len, char *out)
  {
      SHA_INFO context;
  
      if (!strncmp(clear, sha1_id, strlen(sha1_id))) {
  	clear += strlen(sha1_id);
      }
  
      sha_init(&context);
      sha_update(&context, clear, len);
      sha_final(&context);
  
      sha_raw_swap(&context);
  
      /* private marker. */
      strcpy(out, sha1_id);
  
      /* SHA1 hash is always 20 chars */
      encode_mime64((char *)context.digest, out+strlen(sha1_id), 20);
      /* output of MIME Base 64 encoded SHA1 is always
       * 28 characters + strlen(sha1_id) */
  }
  
  
  
  1.2       +5 -1      apache-2.0/mpm/src/helpers/GuessOS
  
  Index: GuessOS
  ===================================================================
  RCS file: /home/cvs/apache-2.0/mpm/src/helpers/GuessOS,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- GuessOS	1999/06/18 18:39:26	1.1
  +++ GuessOS	1999/08/06 00:54:11	1.2
  @@ -150,6 +150,10 @@
   	echo "${MACHINE}-dec-osf"; exit 0
   	;;
   
  +	NONSTOP_KERNEL:*:*:*)
  +	echo "${MACHINE}-tandem-oss"; exit 0; 
  +	;;
  +
       QNX:*)
   	if [ "$VERSION" -gt 422 ]; then
   	    echo "${MACHINE}-qssl-qnx32"
  @@ -243,7 +247,7 @@
   
       Rhapsody:*:*:*)
   	case "${MACHINE}" in
  -	    "Power Macintosh") MACHINE=powerpc ;;
  +	    Power*) MACHINE=powerpc ;;
   	esac
   	echo "${MACHINE}-apple-rhapsody${RELEASE}"; exit 0
   	;;
  
  
  
  1.2       +11 -6     apache-2.0/mpm/src/helpers/TestCompile
  
  Index: TestCompile
  ===================================================================
  RCS file: /home/cvs/apache-2.0/mpm/src/helpers/TestCompile,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TestCompile	1999/06/18 18:39:26	1.1
  +++ TestCompile	1999/08/06 00:54:12	1.2
  @@ -49,10 +49,15 @@
   cd ./helpers
   
   #
  -# Handle "verbose", "silent" and "runit" flags
  +# Handle "verbose", "silent" and "runit" flags. Allow for them
  +# to be set via the environment
   #
  -VERBOSE=no
  -RUNIT="no"
  +if [ "x$VERBOSE" = "x" ]; then
  +    VERBOSE="no"
  +fi
  +if [ "x$TCRUNIT" = "x" ]; then
  +    TCRUNIT="no";
  +fi
   case "$1" in
       "-v")
           VERBOSE="yes"
  @@ -63,7 +68,7 @@
   	shift
   	;;
       "-r")
  -        RUNIT="yes"
  +        TCRUNIT="yes"
   	shift
   	;;
   esac
  @@ -77,7 +82,7 @@
   	if [ "x$2" = "x" ]; then
   	    exit
   	fi
  -	TLIB="-l$2"
  +	TLIB="-l$2 $TLIB"
   	if [ "x$VERBOSE" = "xyes" ]; then
   	    ERRDIR=""
   	else
  @@ -211,7 +216,7 @@
   # have PrintPath just search this directory.
   
   if ./PrintPath -s -p`pwd` $TARGET ; then
  -    if [ "x$RUNIT" = "xyes" ]; then
  +    if [ "x$TCRUNIT" = "xyes" ]; then
   	`pwd`/$TARGET
       fi
       exstat=0
  
  
  
  1.2       +6 -6      apache-2.0/mpm/src/helpers/buildinfo.sh
  
  Index: buildinfo.sh
  ===================================================================
  RCS file: /home/cvs/apache-2.0/mpm/src/helpers/buildinfo.sh,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- buildinfo.sh	1999/06/18 18:39:26	1.1
  +++ buildinfo.sh	1999/08/06 00:54:12	1.2
  @@ -58,10 +58,10 @@
   if [ "x$username" = "x" ]; then
       username="$USER"
       if [ "x$username" = "x" ]; then
  -        username="`whoami 2>/dev/null |\
  +        username="`(whoami) 2>/dev/null |\
                      awk '{ printf("%s", $1); }'`"
           if [ "x$username" = "x" ]; then
  -            username="`who am i 2>/dev/null |\
  +            username="`(who am i) 2>/dev/null |\
                          awk '{ printf("%s", $1); }'`"
               if [ "x$username" = "x" ]; then
                   username='unknown'
  @@ -73,10 +73,10 @@
   #
   #   determine hostname and domainname
   #
  -hostname="`uname -n 2>/dev/null |\
  +hostname="`(uname -n) 2>/dev/null |\
              awk '{ printf("%s", $1); }'`"
   if [ "x$hostname" = "x" ]; then
  -    hostname="`hostname 2>/dev/null |\
  +    hostname="`(hostname) 2>/dev/null |\
                  awk '{ printf("%s", $1); }'`"
       if [ "x$hostname" = "x" ]; then
           hostname='unknown'
  @@ -115,8 +115,8 @@
   if [ "x$time_year" = "x" ]; then
       time_year="`date '+%y' | awk '{ printf("%s", $1); }'`"
       case $time_year in
  -        9[0-9]*) time_year="19$time_year" ;;
  -              *) time_year="20$time_year" ;;
  +        [5-9][0-9]) time_year="19$time_year" ;;
  +        [0-4][0-9]) time_year="20$time_year" ;;
       esac
   fi
   case $time_month in
  
  
  
  1.2       +3 -3      apache-2.0/mpm/src/helpers/mkshadow.sh
  
  Index: mkshadow.sh
  ===================================================================
  RCS file: /home/cvs/apache-2.0/mpm/src/helpers/mkshadow.sh,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- mkshadow.sh	1999/06/18 18:39:27	1.1
  +++ mkshadow.sh	1999/08/06 00:54:12	1.2
  @@ -52,7 +52,7 @@
   if [ ! -d $dst ]; then
       mkdir $dst
   fi
  -DIRS="`cd $src
  +DIRS="`cd $src; \
          find . -type d -print |\
          sed -e '/\/CVS/d' \
              -e '/^\.$/d' \
  @@ -64,7 +64,7 @@
   IFS="$OIFS"
   
   #   fill directory tree with symlinks to files
  -FILES="`cd $src
  +FILES="`cd $src; \
           find . -depth -print |\
           sed -e '/\.o$/d' \
               -e '/\.a$/d' \
  @@ -81,7 +81,7 @@
   OIFS="$IFS" IFS="$DIFS"
   for file in $FILES; do
        #  don't use `-type f' above for find because of symlinks
  -     if [ -d $file ]; then
  +     if [ -d "$src/$file" ]; then
            continue
        fi
        basename=`echo $file | sed -e 's:^.*/::'`
  
  
  
  1.2       +1 -0      apache-2.0/mpm/src/include/ap.h
  
  Index: ap.h
  ===================================================================
  RCS file: /home/cvs/apache-2.0/mpm/src/include/ap.h,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ap.h	1999/06/18 18:39:27	1.1
  +++ ap.h	1999/08/06 00:54:16	1.2
  @@ -161,6 +161,7 @@
   			    __attribute__((format(printf,3,4)));
   API_EXPORT(int) ap_vsnprintf(char *buf, size_t len, const char *format,
   			     va_list ap);
  +API_EXPORT(char *) ap_validate_password(const char *passwd, const char *hash);
   
   #ifdef __cplusplus
   }
  
  
  
  1.4       +13 -5     apache-2.0/mpm/src/include/ap_config.h
  
  Index: ap_config.h
  ===================================================================
  RCS file: /home/cvs/apache-2.0/mpm/src/include/ap_config.h,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ap_config.h	1999/07/12 22:51:08	1.3
  +++ ap_config.h	1999/08/06 00:54:16	1.4
  @@ -399,6 +399,7 @@
   #endif
   
   #elif defined(MAC_OS) || defined(MAC_OS_X_SERVER) /* Mac OS (>= 10.0) and Mac OS X Server (<= 5.x) */
  +#undef PLATFORM
   #ifdef MAC_OS_X_SERVER
   #define PLATFORM "Mac OS X Server"
   #else
  @@ -614,12 +615,10 @@
   #define HAVE_SHMGET 1
   #define USE_SHMGET_SCOREBOARD
   #ifdef _OSD_POSIX /* BS2000-POSIX mainframe needs initgroups */
  -#define NEED_INITGROUPS
   #define NEED_HASHBANG_EMUL /* execve() doesn't start shell scripts by default */
  -#undef HAVE_SHMGET
  +#define _KMEMUSER          /* Enable SHM_R/SHM_W defines in <shm.h> */
   #undef NEED_STRCASECMP
   #undef NEED_STRNCASECMP
  -#undef USE_SHMGET_SCOREBOARD
   #undef bzero
   #endif /*_OSD_POSIX*/
   
  @@ -933,6 +932,12 @@
   #undef  offsetof
   #define offsetof(s_type,field) ((size_t)&(((s_type*)0)->field))
   
  +#elif defined(__TANDEM)
  +#define NO_WRITEV
  +#define NO_KILLPG
  +#define NEED_INITGROUPS
  +#define NO_SLACK
  +
   #else
   /* Unknown system - Edit these to match */
   #ifdef BSD
  @@ -1016,8 +1021,11 @@
   #include <stdio.h>
   #include <stdlib.h>
   #include <string.h>
  +#ifdef __TANDEM
  +#include <strings.h>
  +#endif
   #include "ap_ctype.h"
  -#if !defined(MPE) && !defined(WIN32) && !defined(TPF)
  +#if !defined(MPE) && !defined(WIN32) && !defined(TPF) && !defined(__TANDEM)
   #include <sys/file.h>
   #endif
   #ifndef WIN32
  @@ -1043,7 +1051,7 @@
   #endif
   
   #else /* WIN32 */
  -#include <winsock.h>
  +#include <winsock2.h>
   #include <malloc.h>
   #include <io.h>
   #include <fcntl.h>
  
  
  
  1.2       +3 -1      apache-2.0/mpm/src/include/ap_md5.h
  
  Index: ap_md5.h
  ===================================================================
  RCS file: /home/cvs/apache-2.0/mpm/src/include/ap_md5.h,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ap_md5.h	1999/06/18 18:39:28	1.1
  +++ ap_md5.h	1999/08/06 00:54:17	1.2
  @@ -104,6 +104,8 @@
       unsigned char buffer[64];	/* input buffer */
   } AP_MD5_CTX;
   
  +extern const char *apr1_id;		/* MD5 passwd marker string */
  +
   API_EXPORT(void) ap_MD5Init(AP_MD5_CTX *context);
   API_EXPORT(void) ap_MD5Update(AP_MD5_CTX *context, const unsigned char *input,
   			      unsigned int inputLen);
  @@ -111,7 +113,7 @@
   API_EXPORT(void) ap_MD5Encode(const unsigned char *password,
   			      const unsigned char *salt,
   			      char *result, size_t nbytes);
  -API_EXPORT(char *) ap_validate_password(const char *passwd, const char *hash);
  +API_EXPORT(void) ap_to64(char *s, unsigned long v, int n);
   
   #ifdef __cplusplus
   }
  
  
  
  1.2       +2 -1      apache-2.0/mpm/src/include/ap_mmn.h
  
  Index: ap_mmn.h
  ===================================================================
  RCS file: /home/cvs/apache-2.0/mpm/src/include/ap_mmn.h,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ap_mmn.h	1999/06/18 18:39:28	1.1
  +++ ap_mmn.h	1999/08/06 00:54:17	1.2
  @@ -219,6 +219,7 @@
    *                        export ap_add_file_conf
    * 19990320.3           - add ap_regexec()
    * 19990604.4           - add ap_field_noparam()
  + * 19990621.5           - add local_ip/host to conn_rec for mass-vhost
    */
   
   #define MODULE_MAGIC_COOKIE 0x41503133UL /* "AP13" */
  @@ -226,7 +227,7 @@
   #ifndef MODULE_MAGIC_NUMBER_MAJOR
   #define MODULE_MAGIC_NUMBER_MAJOR 19990320
   #endif
  -#define MODULE_MAGIC_NUMBER_MINOR 4                     /* 0...n */
  +#define MODULE_MAGIC_NUMBER_MINOR 5                     /* 0...n */
   #define MODULE_MAGIC_NUMBER MODULE_MAGIC_NUMBER_MAJOR	/* backward compat */
   
   /* Useful for testing for features. */
  
  
  
  1.2       +3 -0      apache-2.0/mpm/src/include/http_conf_globals.h
  
  Index: http_conf_globals.h
  ===================================================================
  RCS file: /home/cvs/apache-2.0/mpm/src/include/http_conf_globals.h,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- http_conf_globals.h	1999/06/18 18:39:28	1.1
  +++ http_conf_globals.h	1999/08/06 00:54:18	1.2
  @@ -75,6 +75,9 @@
    */
   /* TODO: extern char ap_coredump_dir[MAX_STRING_LEN]; */
   
  +/* TODO: extern int ap_configtestonly;  ... although it pains me because this breaks an abstraction */
  +/* TODO: extern int ap_docrootcheck; */
  +
   #ifdef __cplusplus
   }
   #endif
  
  
  
  1.2       +10 -5     apache-2.0/mpm/src/include/http_core.h
  
  Index: http_core.h
  ===================================================================
  RCS file: /home/cvs/apache-2.0/mpm/src/include/http_core.h,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- http_core.h	1999/06/18 18:39:28	1.1
  +++ http_core.h	1999/08/06 00:54:19	1.2
  @@ -128,8 +128,8 @@
   /* Used for constructing self-referencing URLs, and things like SERVER_PORT,
    * and SERVER_NAME.
    */
  -API_EXPORT(char *) ap_construct_url(pool *p, const char *uri, const request_rec *r);
  -API_EXPORT(const char *) ap_get_server_name(const request_rec *r);
  +API_EXPORT(char *) ap_construct_url(pool *p, const char *uri, request_rec *r);
  +API_EXPORT(const char *) ap_get_server_name(request_rec *r);
   API_EXPORT(unsigned) ap_get_server_port(const request_rec *r);
   API_EXPORT(unsigned long) ap_get_limit_req_body(const request_rec *r);
   API_EXPORT(void) ap_custom_response(request_rec *r, int status, char *string);
  @@ -156,10 +156,11 @@
   /* 
    * CGI Script stuff for Win32...
    */
  -typedef enum { FileTypeUNKNOWN, FileTypeBIN, FileTypeEXE, FileTypeSCRIPT } file_type_e;
  +typedef enum { eFileTypeUNKNOWN, eFileTypeBIN, eFileTypeEXE16, eFileTypeEXE32, 
  +               eFileTypeSCRIPT } file_type_e;
   typedef enum { INTERPRETER_SOURCE_UNSET, INTERPRETER_SOURCE_REGISTRY, 
                  INTERPRETER_SOURCE_SHEBANG } interpreter_source_e;
  -API_EXPORT(file_type_e) ap_get_win32_interpreter(const request_rec *, char*, char **);
  +API_EXPORT(file_type_e) ap_get_win32_interpreter(const request_rec *, char **);
   #endif
   
   #ifdef CORE_PRIVATE
  @@ -230,7 +231,11 @@
   
       signed int content_md5 : 2;  /* calculate Content-MD5? */
   
  -    unsigned use_canonical_name : 2; /* bit 0 = on/off, bit 1 = unset/set */
  +#define USE_CANONICAL_NAME_OFF   (0)
  +#define USE_CANONICAL_NAME_ON    (1)
  +#define USE_CANONICAL_NAME_DNS   (2)
  +#define USE_CANONICAL_NAME_UNSET (3)
  +    unsigned use_canonical_name : 2;
   
       /* since is_fnmatch(conf->d) was being called so frequently in
        * directory_walk() and its relatives, this field was created and
  
  
  
  1.11      +6 -1      apache-2.0/mpm/src/include/httpd.h
  
  Index: httpd.h
  ===================================================================
  RCS file: /home/cvs/apache-2.0/mpm/src/include/httpd.h,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- httpd.h	1999/08/05 19:56:05	1.10
  +++ httpd.h	1999/08/06 00:54:19	1.11
  @@ -405,7 +405,7 @@
    * Always increases along the same track as the source branch.
    * For example, Apache 1.4.2 would be '10402100', 2.5b7 would be '20500007'.
    */
  -#define APACHE_RELEASE 10307000
  +#define APACHE_RELEASE 10308000
   
   #define SERVER_PROTOCOL "HTTP/1.1"
   #ifndef SERVER_SUPPORT
  @@ -812,6 +812,10 @@
       signed int double_reverse:2;/* have we done double-reverse DNS?
   				 * -1 yes/failure, 0 not yet, 1 yes/success */
       int keepalives;		/* How many times have we used it? */
  +    char *local_ip;		/* server IP address */
  +    char *local_host;		/* used for ap_get_server_name when
  +				 * UseCanonicalName is set to DNS
  +				 * (ignores setting of HostnameLookups) */
       void *conn_config;		/* Notes on *this* connection */
   };
   
  @@ -949,6 +953,7 @@
   API_EXPORT(char *) ap_uuencode(pool *p, char *string); 
   #ifdef OS2
   void os2pathname(char *path);
  +char *ap_double_quotes(pool *p, char *str);
   #endif
   
   API_EXPORT(int)    ap_regexec(const regex_t *preg, const char *string,
  
  
  
  1.1                  apache-2.0/mpm/src/include/ap_sha1.h
  
  Index: ap_sha1.h
  ===================================================================
  /* ====================================================================
   * Copyright (c) 1996-1999 The Apache Group.  All rights reserved.
   *
   * 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 acknowledgment:
   *    "This product includes software developed by the Apache Group
   *    for use in the Apache HTTP server project (http://www.apache.org/)."
   *
   * 4. The names "Apache Server" and "Apache Group" must not be used to
   *    endorse or promote products derived from this software without
   *    prior written permission. For written permission, please contact
   *    apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache"
   *    nor may "Apache" appear in their names without prior written
   *    permission of the Apache Group.
   *
   * 6. Redistributions of any form whatsoever must retain the following
   *    acknowledgment:
   *    "This product includes software developed by the Apache Group
   *    for use in the Apache HTTP server project (http://www.apache.org/)."
   *
   * THIS SOFTWARE IS PROVIDED BY THE APACHE GROUP ``AS IS'' AND ANY
   * EXPRESSED 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 APACHE GROUP OR
   * ITS 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.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Group and was originally based
   * on public domain software written at the National Center for
   * Supercomputing Applications, University of Illinois, Urbana-Champaign.
   * For more information on the Apache Group and the Apache HTTP server
   * project, please see <http://www.apache.org/>.
   *
   * NIST Secure Hash Algorithm
   * 	heavily modified by Uwe Hollerbach uh@alumni.caltech edu
   * 	from Peter C. Gutmann's implementation as found in
   * 	Applied Cryptography by Bruce Schneier
   * 	This code is hereby placed in the public domain
   *
   * MIME Base 64 encoding based on src/metamail/codes.c in metamail,
   *	available at: ftp://thumper.bellcore.com/pub/nsb/
   *
   * Metamail's copyright is:
   *	Copyright (c) 1991 Bell Communications Research, Inc. (Bellcore)
   * 
   *	Permission to use, copy, modify, and distribute this material 
   * 	for any purpose and without fee is hereby granted, provided 
   * 	that the above copyright notice and this permission notice 
   * 	appear in all copies, and that the name of Bellcore not be 
   * 	used in advertising or publicity pertaining to this 
   * 	material without the specific, prior written permission 
   * 	of an authorized representative of Bellcore.  BELLCORE 
   * 	MAKES NO REPRESENTATIONS ABOUT THE ACCURACY OR SUITABILITY 
   * 	OF THIS MATERIAL FOR ANY PURPOSE.  IT IS PROVIDED "AS IS", 
   * 	WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES.
   */
  
  #ifndef APACHE_SHA1_H
  #define APACHE_SHA1_H
  
  #ifdef __cplusplus
  extern "C" {
  #endif
  
  extern const char *sha1_id;	/* passwd prefix marker for SHA1 */
  API_EXPORT(void) ap_sha1_base64(const char *clear, int len, char *out);
  
  #ifdef __cplusplus
  }
  #endif
  
  #endif	/* !APACHE_MD5_H */
  
  
  
  1.8       +1 -0      apache-2.0/mpm/src/main/buff.c
  
  Index: buff.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/mpm/src/main/buff.c,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- buff.c	1999/07/01 04:07:19	1.7
  +++ buff.c	1999/08/06 00:54:29	1.8
  @@ -325,6 +325,7 @@
       return rv;
   }
   
  +
   /*
    * Read up to nbyte bytes into buf.
    * If fewer than byte bytes are currently available, then return those.
  
  
  
  1.16      +2 -0      apache-2.0/mpm/src/main/http_connection.c
  
  Index: http_connection.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/mpm/src/main/http_connection.c,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- http_connection.c	1999/08/05 19:56:12	1.15
  +++ http_connection.c	1999/08/06 00:54:29	1.16
  @@ -270,6 +270,8 @@
   
       conn->pool = p;
       conn->local_addr = *saddr;
  +    conn->local_ip = ap_pstrdup(conn->pool,
  +				inet_ntoa(conn->local_addr.sin_addr));
       conn->base_server = server;
       conn->client = inout;
   
  
  
  
  1.17      +106 -69   apache-2.0/mpm/src/main/http_core.c
  
  Index: http_core.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/mpm/src/main/http_core.c,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- http_core.c	1999/08/04 21:47:20	1.16
  +++ http_core.c	1999/08/06 00:54:30	1.17
  @@ -129,7 +129,7 @@
   
       conf->content_md5 = 2;
   
  -    conf->use_canonical_name = 1 | 2;	/* 2 = unset, default on */
  +    conf->use_canonical_name = USE_CANONICAL_NAME_UNSET;
   
       conf->hostname_lookups = HOSTNAME_LOOKUP_UNSET;
       conf->do_rfc1413 = DEFAULT_RFC1413 | 2; /* set bit 1 to indicate default */
  @@ -231,7 +231,7 @@
       if ((new->content_md5 & 2) == 0) {
           conf->content_md5 = new->content_md5;
       }
  -    if ((new->use_canonical_name & 2) == 0) {
  +    if (new->use_canonical_name != USE_CANONICAL_NAME_UNSET) {
   	conf->use_canonical_name = new->use_canonical_name;
       }
   
  @@ -641,17 +641,46 @@
    * name" as supplied by a possible Host: header or full URI.  We never
    * trust the port passed in the client's headers, we always use the
    * port of the actual socket.
  + *
  + * The DNS option to UseCanonicalName causes this routine to do a
  + * reverse lookup on the local IP address of the connectiona and use
  + * that for the ServerName. This makes its value more reliable while
  + * at the same time allowing Demon's magic virtual hosting to work.
  + * The assumption is that DNS lookups are sufficiently quick...
  + * -- fanf 1998-10-03
    */
  -API_EXPORT(const char *) ap_get_server_name(const request_rec *r)
  +API_EXPORT(const char *) ap_get_server_name(request_rec *r)
   {
  +    conn_rec *conn = r->connection;
       core_dir_config *d;
   
       d = (core_dir_config *)ap_get_module_config(r->per_dir_config,
   						&core_module);
  -    if (d->use_canonical_name & 1) {
  -	return r->server->server_hostname;
  +
  +    if (d->use_canonical_name == USE_CANONICAL_NAME_OFF) {
  +        return r->hostname ? r->hostname : r->server->server_hostname;
  +    }
  +    if (d->use_canonical_name == USE_CANONICAL_NAME_DNS) {
  +        if (conn->local_host == NULL) {
  +	    struct in_addr *iaddr;
  +	    struct hostent *hptr;
  +	    iaddr = &(conn->local_addr.sin_addr);
  +	    hptr = gethostbyaddr((char *)iaddr, sizeof(struct in_addr),
  +				 AF_INET);
  +	    if (hptr != NULL) {
  +	        conn->local_host = ap_pstrdup(conn->pool,
  +					      (void *)hptr->h_name);
  +		ap_str_tolower(conn->local_host);
  +	    }
  +	    else {
  +	        conn->local_host = ap_pstrdup(conn->pool,
  +					      r->server->server_hostname);
  +	    }
  +	}
  +	return conn->local_host;
       }
  -    return r->hostname ? r->hostname : r->server->server_hostname;
  +    /* default */
  +    return r->server->server_hostname;
   }
   
   API_EXPORT(unsigned) ap_get_server_port(const request_rec *r)
  @@ -662,40 +691,21 @@
       
       port = r->server->port ? r->server->port : ap_default_port(r);
   
  -    if (d->use_canonical_name & 1) {
  -	return port;
  +    if (d->use_canonical_name == USE_CANONICAL_NAME_OFF
  +	|| d->use_canonical_name == USE_CANONICAL_NAME_DNS) {
  +        return r->hostname ? ntohs(r->connection->local_addr.sin_port)
  +			   : port;
       }
  -    /* ZZZ change to AP function, and make sure AP func can deal with IPv6. */
  -    return r->hostname ? ntohs(r->connection->local_addr.sin_port)
  -		       : port;
  +    /* default */
  +    return port;
   }
   
   API_EXPORT(char *) ap_construct_url(pool *p, const char *uri,
  -				    const request_rec *r)
  +				    request_rec *r)
   {
  -    unsigned port;
  -    const char *host;
  -    core_dir_config *d =
  -      (core_dir_config *)ap_get_module_config(r->per_dir_config, &core_module);
  -
  -    if (d->use_canonical_name & 1) {
  -	port = r->server->port ? r->server->port : ap_default_port(r);
  -	host = r->server->server_hostname;
  -    }
  -    else {
  -        if (r->hostname) {
  -	  /* ZZZ change to AP function. IPv6 */
  -            port = ntohs(r->connection->local_addr.sin_port);
  -	}
  -        else if (r->server->port) {
  -            port = r->server->port;
  -	}
  -        else {
  -            port = ap_default_port(r);
  -	}
  +    unsigned port = ap_get_server_port(r);
  +    const char *host = ap_get_server_name(r);
   
  -	host = r->hostname ? r->hostname : r->server->server_hostname;
  -    }
       if (ap_is_default_port(port, r)) {
   	return ap_pstrcat(p, ap_http_method(r), "://", host, uri, NULL);
       }
  @@ -803,7 +813,6 @@
   }
   
   API_EXPORT (file_type_e) ap_get_win32_interpreter(const  request_rec *r, 
  -                                                  char*  ext, 
                                                     char** interpreter )
   {
       HANDLE hFile;
  @@ -811,50 +820,68 @@
       BOOLEAN bResult;
       char buffer[1024];
       core_dir_config *d;
  -    file_type_e fileType = FileTypeUNKNOWN;
       int i;
  +    file_type_e fileType = eFileTypeUNKNOWN;
  +    char *ext = NULL;
  +    char *exename = NULL;
   
       d = (core_dir_config *)ap_get_module_config(r->per_dir_config, 
                                                   &core_module);
  +
  +    /* Find the file extension */
  +    exename = strrchr(r->filename, '/');
  +    if (!exename) {
  +        exename = strrchr(r->filename, '\\');
  +    }
  +    if (!exename) {
  +        exename = r->filename;
  +    }
  +    else {
  +        exename++;
  +    }
  +    ext = strrchr(exename, '.');
   
  -    if (d->script_interpreter_source == INTERPRETER_SOURCE_REGISTRY) {
  -        /* 
  -         * Check the registry
  -         */
  +    if (ext && (!strcasecmp(ext,".bat") || !strcasecmp(ext,".cmd"))) {
  +        return eFileTypeEXE32;
  +    }
  +
  +    /* If the file has an extension and it is not .com and not .exe and
  +     * we've been instructed to search the registry, then do it!
  +     */
  +    if (ext && strcasecmp(ext,".exe") && strcasecmp(ext,".com") &&
  +        d->script_interpreter_source == INTERPRETER_SOURCE_REGISTRY) {
  +         /* Check the registry */
           *interpreter = get_interpreter_from_win32_registry(r->pool, ext);
           if (*interpreter)
  -            return FileTypeSCRIPT;
  +            return eFileTypeSCRIPT;
           else {
               ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, r->server,
                "ScriptInterpreterSource config directive set to \"registry\".\n\t"
                "Registry was searched but interpreter not found. Trying the shebang line.");
           }
  -    }
  +    }        
   
  -    /* 
  -     * Look for a #! line in the script
  -     */
  +    /* Need to peek into the file figure out what it really is... */
       hFile = CreateFile(r->filename, GENERIC_READ, FILE_SHARE_READ, NULL,
                          OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
  -
       if (hFile == INVALID_HANDLE_VALUE) {
  -        return FileTypeUNKNOWN;
  +        return eFileTypeUNKNOWN;
       }
  -
       bResult = ReadFile(hFile, (void*) &buffer, sizeof(buffer) - 1, 
                          &nBytesRead, NULL);
       if (!bResult || (nBytesRead == 0)) {
           ap_log_rerror(APLOG_MARK, APLOG_ERR, r,
                         "ReadFile(%s) failed", r->filename);
           CloseHandle(hFile);
  -        return (FileTypeUNKNOWN);
  +        return eFileTypeUNKNOWN;
       }
       CloseHandle(hFile);
  -    
       buffer[nBytesRead] = '\0';
  -    
  +
  +    /* Script or executable, that is the question... */
       if ((buffer[0] == '#') && (buffer[1] == '!')) {
  -        fileType = FileTypeSCRIPT;
  +        /* Assuming file is a script since it starts with a shebang */
  +        fileType = eFileTypeSCRIPT;
           for (i = 2; i < sizeof(buffer); i++) {
               if ((buffer[i] == '\r')
                   || (buffer[i] == '\n')) {
  @@ -862,16 +889,21 @@
               }
           }
           buffer[i] = '\0';
  -        for (i = 2; buffer[i] == ' '; ++i)
  +        for (i = 2; buffer[i] == ' ' ; ++i)
               ;
           *interpreter = ap_pstrdup(r->pool, buffer + i ); 
       }
       else {
  -        /* Check to see if it's a executable */
  -        IMAGE_DOS_HEADER *hdr = (IMAGE_DOS_HEADER*)buffer;
  -        if (hdr->e_magic == IMAGE_DOS_SIGNATURE && hdr->e_cblp < 512) {
  -            fileType = FileTypeEXE;
  +        /* Not a script, is it an executable? */
  +        IMAGE_DOS_HEADER *hdr = (IMAGE_DOS_HEADER*)buffer;    
  +        if ((nBytesRead >= sizeof(IMAGE_DOS_HEADER)) && (hdr->e_magic == IMAGE_DOS_SIGNATURE)) {
  +            if (hdr->e_lfarlc < 0x40)
  +                fileType = eFileTypeEXE16;
  +            else
  +                fileType = eFileTypeEXE32;
           }
  +        else
  +            fileType = eFileTypeUNKNOWN;
       }
   
       return fileType;
  @@ -980,7 +1012,7 @@
       }
   
       arg = ap_os_canonical_filename(cmd->pool, arg);
  -    if (!ap_is_directory(arg)) {
  +    if (/* TODO: ap_configtestonly && ap_docrootcheck && */ !ap_is_directory(arg)) {
   	if (cmd->server->is_virtual) {
   	    fprintf(stderr, "Warning: DocumentRoot [%s] does not exist\n",
   		    arg);
  @@ -1342,10 +1374,6 @@
       *endp = '\0';
   
       cmd->path = ap_getword_conf(cmd->pool, &arg);
  -#ifdef OS2
  -    /* Fix OS/2 HPFS filename case problem. */
  -    cmd->path = strlwr(cmd->path);
  -#endif    
       cmd->override = OR_ALL|ACCESS_CONF;
   
       if (thiscmd->cmd_data) { /* <DirectoryMatch> */
  @@ -1938,15 +1966,25 @@
   }
   
   static const char *set_use_canonical_name(cmd_parms *cmd, core_dir_config *d, 
  -					  int arg)
  +					  char *arg)
   {
       const char *err = ap_check_cmd_context(cmd, NOT_IN_LIMIT);
  -
       if (err != NULL) {
   	return err;
       }
  -    
  -    d->use_canonical_name = arg != 0;
  +
  +    if (strcasecmp(arg, "on") == 0) {
  +        d->use_canonical_name = USE_CANONICAL_NAME_ON;
  +    }
  +    else if (strcasecmp(arg, "off") == 0) {
  +        d->use_canonical_name = USE_CANONICAL_NAME_OFF;
  +    }
  +    else if (strcasecmp(arg, "dns") == 0) {
  +        d->use_canonical_name = USE_CANONICAL_NAME_DNS;
  +    }
  +    else {
  +        return "parameter must be 'on', 'off', or 'dns'";
  +    }
       return NULL;
   }
   
  @@ -2314,9 +2352,8 @@
   { "ContentDigest", set_content_md5, NULL, OR_OPTIONS,
     FLAG, "whether or not to send a Content-MD5 header with each request" },
   { "UseCanonicalName", set_use_canonical_name, NULL,
  -  OR_OPTIONS, FLAG,
  -  "Whether or not to always use the canonical ServerName : Port when "
  -  "constructing URLs" },
  +  RSRC_CONF, TAKE1,
  +  "How to work out the ServerName : Port when constructing URLs" },
   /* TODOC: MaxServers is deprecated */
   /* TODOC: ServersSafetyLimit is deprecated */
   /* TODO: RlimitFoo should all be part of mod_cgi, not in the core */
  
  
  
  1.8       +3 -3      apache-2.0/mpm/src/main/http_main.c
  
  Index: http_main.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/mpm/src/main/http_main.c,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- http_main.c	1999/08/01 14:12:30	1.7
  +++ http_main.c	1999/08/06 00:54:30	1.8
  @@ -163,7 +163,7 @@
   #ifdef SUEXEC_BIN
       printf(" -D SUEXEC_BIN=\"" SUEXEC_BIN "\"\n");
   #endif
  -#ifdef SHARED_CORE_DIR
  +#if defined(SHARED_CORE) && defined(SHARED_CORE_DIR)
       printf(" -D SHARED_CORE_DIR=\"" SHARED_CORE_DIR "\"\n");
   #endif
   #ifdef DEFAULT_PIDLOG
  @@ -204,9 +204,9 @@
   	pad[i] = ' ';
       pad[i] = '\0';
   #ifdef SHARED_CORE
  -    fprintf(stderr, "Usage: %s [-R directory] [-d directory] [-f file]\n", bin);
  +    fprintf(stderr, "Usage: %s [-R directory] [-D name] [-d directory] [-f file]\n", bin);
   #else
  -    fprintf(stderr, "Usage: %s [-d directory] [-f file]\n", bin);
  +    fprintf(stderr, "Usage: %s [-D name] [-d directory] [-f file]\n", bin);
   #endif
       fprintf(stderr, "       %s [-C \"directive\"] [-c \"directive\"]\n", pad);
       fprintf(stderr, "       %s [-v] [-V] [-h] [-l] [-L] [-S] [-t]\n", pad);
  
  
  
  1.15      +91 -9     apache-2.0/mpm/src/main/http_protocol.c
  
  Index: http_protocol.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/mpm/src/main/http_protocol.c,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- http_protocol.c	1999/07/31 09:31:22	1.14
  +++ http_protocol.c	1999/08/06 00:54:31	1.15
  @@ -764,10 +764,6 @@
   
   	    for (x = r->uri; (x = strchr(x, '\\')) != NULL; )
   		*x = '/';
  -#ifndef WIN32   /* for OS/2 only: */
  -	    /* Fix OS/2 HPFS filename case problem. */
  -	    ap_str_tolower(r->uri);
  -#endif
   	}
   #endif  /* OS2 || WIN32 */
       }
  @@ -1469,6 +1465,84 @@
                && strstr(ua, "MSIE 3")));
   }
   
  +/* This routine is called by ap_table_do and merges all instances of
  + * the passed field values into a single array that will be further
  + * processed by some later routine.  Originally intended to help split
  + * and recombine multiple Vary fields, though it is generic to any field
  + * consisting of comma/space-separated tokens.
  + */
  +static int uniq_field_values(void *d, const char *key, const char *val)
  +{
  +    array_header *values;
  +    char *start;
  +    char *e;
  +    char **strpp;
  +    int  i;
  +
  +    values = (array_header *)d;
  +
  +    e = ap_pstrdup(values->pool, val);
  +
  +    do {
  +        /* Find a non-empty fieldname */
  +
  +        while (*e == ',' || ap_isspace(*e)) {
  +            ++e;
  +        }
  +        if (*e == '\0') {
  +            break;
  +        }
  +        start = e;
  +        while (*e != '\0' && *e != ',' && !ap_isspace(*e)) {
  +            ++e;
  +        }
  +        if (*e != '\0') {
  +            *e++ = '\0';
  +        }
  +
  +        /* Now add it to values if it isn't already represented.
  +         * Could be replaced by a ap_array_strcasecmp() if we had one.
  +         */
  +        for (i = 0, strpp = (char **) values->elts; i < values->nelts;
  +             ++i, ++strpp) {
  +            if (*strpp && strcasecmp(*strpp, start) == 0) {
  +                break;
  +            }
  +        }
  +        if (i == values->nelts) {  /* if not found */
  +           *(char **)ap_push_array(values) = start;
  +        }
  +    } while (*e != '\0');
  +
  +    return 1;
  +}
  +
  +/*
  + * Since some clients choke violently on multiple Vary fields, or
  + * Vary fields with duplicate tokens, combine any multiples and remove
  + * any duplicates.
  + */
  +static void fixup_vary(request_rec *r)
  +{
  +    array_header *varies;
  +
  +    varies = ap_make_array(r->pool, 5, sizeof(char *));
  +
  +    /* Extract all Vary fields from the headers_out, separate each into
  +     * its comma-separated fieldname values, and then add them to varies
  +     * if not already present in the array.
  +     */
  +    ap_table_do((int (*)(void *, const char *, const char *))uniq_field_values,
  +		(void *) varies, r->headers_out, "Vary", NULL);
  +
  +    /* If we found any, replace old Vary fields with unique-ified value */
  +
  +    if (varies->nelts > 0) {
  +	ap_table_setn(r->headers_out, "Vary",
  +		      ap_array_pstrcat(r->pool, varies, ','));
  +    }
  +}
  +
   API_EXPORT(void) ap_send_http_header(request_rec *r)
   {
       int i;
  @@ -1483,6 +1557,9 @@
           r->sent_bodyct = 1;
           return;
       }
  +    else {
  +	fixup_vary(r);
  +    }
   
       /*
        * Now that we are ready to send a response, we need to combine the two
  @@ -1899,13 +1976,18 @@
       if ((rv = ap_setup_client_block(r, REQUEST_CHUNKED_PASS)))
           return rv;
   
  -    /* If we are discarding the request body, then we must already know
  -     * the final status code, therefore disable the sending of 100 continue.
  +    /* In order to avoid sending 100 Continue when we already know the
  +     * final response status, and yet not kill the connection if there is
  +     * no request body to be read, we need to duplicate the test from
  +     * ap_should_client_block() here negated rather than call it directly.
        */
  -    r->expecting_100 = 0;
  -
  -    if (ap_should_client_block(r)) {
  +    if ((r->read_length == 0) && (r->read_chunked || (r->remaining > 0))) {
           char dumpbuf[HUGE_STRING_LEN];
  +
  +        if (r->expecting_100) {
  +            r->connection->keepalive = -1;
  +            return OK;
  +        }
   
           while ((rv = ap_get_client_block(r, dumpbuf, HUGE_STRING_LEN)) > 0)
               continue;
  
  
  
  1.3       +12 -2     apache-2.0/mpm/src/main/rfc1413.c
  
  Index: rfc1413.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/mpm/src/main/rfc1413.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- rfc1413.c	1999/07/06 21:32:11	1.2
  +++ rfc1413.c	1999/08/06 00:54:32	1.3
  @@ -147,6 +147,9 @@
   		ntohs(our_sin->sin_port));
   
       /* send query to server. Handle short write. */
  +#ifdef CHARSET_EBCDIC
  +    ebcdic2ascii(&buffer, &buffer, buflen);
  +#endif
       i = 0;
       while(i < strlen(buffer)) {
           int j;
  @@ -168,8 +171,12 @@
        */
   
       i = 0;
  -    memset(buffer, 0, sizeof(buffer));
  -    while((cp = strchr(buffer, '\n')) == NULL && i < sizeof(buffer) - 1) {
  +    memset(buffer, '\0', sizeof(buffer));
  +    /*
  +     * Note that the strchr function below checks for 10 instead of '\n'
  +     * this allows it to work on both ASCII and EBCDIC machines.
  +     */
  +    while((cp = strchr(buffer, '\012')) == NULL && i < sizeof(buffer) - 1) {
           int j;
   	j = read(sock, buffer+i, (sizeof(buffer) - 1) - i);
   	if (j < 0 && errno != EINTR) {
  @@ -183,6 +190,9 @@
       }
   
   /* RFC1413_USERLEN = 512 */
  +#ifdef CHARSET_EBCDIC
  +    ascii2ebcdic(&buffer, &buffer, (size_t)i);
  +#endif
       if (sscanf(buffer, "%u , %u : USERID :%*[^:]:%512s", &rmt_port, &our_port,
   	       user) != 3 || ntohs(rmt_sin->sin_port) != rmt_port
   	|| ntohs(our_sin->sin_port) != our_port)
  
  
  
  1.4       +32 -3     apache-2.0/mpm/src/main/util.c
  
  Index: util.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/mpm/src/main/util.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- util.c	1999/07/25 14:24:01	1.3
  +++ util.c	1999/08/06 00:54:33	1.4
  @@ -131,12 +131,15 @@
       const char *semi;
   
       semi = strchr(intype, ';');
  -    if (semi != NULL) {
  +    if (semi == NULL) {
  +	return ap_pstrdup(p, intype);
  +    } 
  +    else {
   	while ((semi > intype) && ap_isspace(semi[-1])) {
   	    semi--;
   	}
  +	return ap_pstrndup(p, intype, semi - intype);
       }
  -    return ap_pstrndup(p, intype, semi - intype);
   }
   
   API_EXPORT(char *) ap_ht_time(pool *p, time_t t, const char *fmt, int gmt)
  @@ -1769,7 +1772,7 @@
   #ifdef NEED_INITGROUPS
   int initgroups(const char *name, gid_t basegid)
   {
  -#if defined(QNX) || defined(MPE) || defined(BEOS) || defined(_OSD_POSIX) || defined(TPF)
  +#if defined(QNX) || defined(MPE) || defined(BEOS) || defined(_OSD_POSIX) || defined(TPF) || defined(__TANDEM)
   /* QNX, MPE and BeOS do not appear to support supplementary groups. */
       return 0;
   #else /* ndef QNX */
  @@ -2170,6 +2173,32 @@
   
       strcpy(path, newpath);
   };
  +
  +/* quotes in the string are doubled up.
  + * Used to escape quotes in args passed to OS/2's cmd.exe
  + */
  +char *ap_double_quotes(pool *p, char *str)
  +{
  +    int num_quotes = 0;
  +    int len = 0;
  +    char *quote_doubled_str, *dest;
  +    
  +    while (str[len]) {
  +        num_quotes += str[len++] == '\"';
  +    }
  +    
  +    quote_doubled_str = ap_palloc(p, len + num_quotes + 1);
  +    dest = quote_doubled_str;
  +    
  +    while (*str) {
  +        if (*str == '\"')
  +            *(dest++) = '\"';
  +        *(dest++) = *(str++);
  +    }
  +    
  +    *dest = 0;
  +    return quote_doubled_str;
  +}
   #endif
   
   
  
  
  
  1.2       +129 -64   apache-2.0/mpm/src/main/util_script.c
  
  Index: util_script.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/mpm/src/main/util_script.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- util_script.c	1999/06/18 18:39:30	1.1
  +++ util_script.c	1999/08/06 00:54:34	1.2
  @@ -66,6 +66,11 @@
   #include "util_script.h"
   #include "util_date.h"		/* For parseHTTPdate() */
   
  +#ifdef OS2
  +#define INCL_DOS
  +#include <os2.h>
  +#endif
  +
   /*
    * Various utility functions which are common to a whole lot of
    * script-type extensions mechanisms, and might as well be gathered
  @@ -264,6 +269,7 @@
       ap_table_addn(e, "SERVER_SIGNATURE", ap_psignature("", r));
       ap_table_addn(e, "SERVER_SOFTWARE", ap_get_server_version());
       ap_table_addn(e, "SERVER_NAME", ap_get_server_name(r));
  +    ap_table_addn(e, "SERVER_ADDR", r->connection->local_ip);	/* Apache */
       ap_table_addn(e, "SERVER_PORT",
   		  ap_psprintf(r->pool, "%u", ap_get_server_port(r)));
       host = ap_get_remote_host(c, r->per_dir_config, REMOTE_HOST);
  @@ -701,54 +707,126 @@
   #ifdef OS2
       {
   	/* Additions by Alec Kloss, to allow exec'ing of scripts under OS/2 */
  -	int is_script;
  +	int is_script = 0;
   	char interpreter[2048];	/* hope it's enough for the interpreter path */
  +	char error_object[260];
   	FILE *program;
  +        char *cmdline = r->filename, *cmdline_pos;
  +        int cmdlen;
  +	char *args = "", *args_end;
  +	ULONG rc;
  +        RESULTCODES rescodes;
  +        int env_len, e;
  +        char *env_block, *env_block_pos;
   
  +	if (r->args && r->args[0] && !strchr(r->args, '='))
  +	    args = r->args;
  +	    
   	program = fopen(r->filename, "rt");
  +	
   	if (!program) {
   	    ap_log_rerror(APLOG_MARK, APLOG_ERR, r, "fopen(%s) failed",
   			 r->filename);
   	    return (pid);
   	}
  +	
   	fgets(interpreter, sizeof(interpreter), program);
   	fclose(program);
  +	
   	if (!strncmp(interpreter, "#!", 2)) {
   	    is_script = 1;
  -	    interpreter[strlen(interpreter) - 1] = '\0';
  -	}
  -	else {
  -	    is_script = 0;
  +            interpreter[strlen(interpreter) - 1] = '\0';
  +            if (interpreter[2] != '/' && interpreter[2] != '\\' && interpreter[3] != ':') {
  +                char buffer[300];
  +                if (DosSearchPath(SEARCH_ENVIRONMENT, "PATH", interpreter+2, buffer, sizeof(buffer)) == 0) {
  +                    strcpy(interpreter+2, buffer);
  +                } else {
  +                    strcat(interpreter, ".exe");
  +                    if (DosSearchPath(SEARCH_ENVIRONMENT, "PATH", interpreter+2, buffer, sizeof(buffer)) == 0) {
  +                        strcpy(interpreter+2, buffer);
  +                    }
  +                }
  +            }
   	}
   
  -	if ((!r->args) || (!r->args[0]) || strchr(r->args, '=')) {
  -	    /* More additions by Alec Kloss for OS/2 */
  -	    if (is_script) {
  -		/* here's the stuff to run the interpreter */
  -		pid = spawnle(P_NOWAIT, interpreter + 2, interpreter + 2, r->filename, NULL, env);
  -	    }
  -	    else if (strstr(strupr(r->filename), ".CMD") > 0) {
  -		/* Special case to allow use of REXX commands as scripts. */
  -		os2pathname(r->filename);
  -		pid = spawnle(P_NOWAIT, SHELL_PATH, SHELL_PATH, "/C", r->filename, NULL, env);
  -	    }
  -	    else {
  -		pid = spawnle(P_NOWAIT, r->filename, argv0, NULL, env);
  -	    }
  +        if (is_script) {
  +            cmdline = ap_pstrcat(r->pool, interpreter+2, " ", r->filename, NULL);
  +        }
  +        else if (strstr(strupr(r->filename), ".CMD") > 0) {
  +            /* Special case to allow use of REXX commands as scripts. */
  +            os2pathname(r->filename);
  +            cmdline = ap_pstrcat(r->pool, SHELL_PATH, " /C ", r->filename, NULL);
  +        }
  +        else {
  +            cmdline = r->filename;
   	}
  -	else {
  -	    if (strstr(strupr(r->filename), ".CMD") > 0) {
  -		/* Special case to allow use of REXX commands as scripts. */
  -		os2pathname(r->filename);
  -		pid = spawnve(P_NOWAIT, SHELL_PATH, create_argv_cmd(r->pool, argv0, r->args,
  -						  r->filename), env);
  -	    }
  -	    else {
  -		pid = spawnve(P_NOWAIT, r->filename,
  -		      create_argv(r->pool, NULL, NULL, NULL, argv0, r->args), env);
  -	    }
  +	
  +        args = ap_pstrdup(r->pool, args);
  +        ap_unescape_url(args);
  +        args = ap_double_quotes(r->pool, args);
  +        args_end = args + strlen(args);
  +
  +        if (args_end - args > 4000) { /* cmd.exe won't handle lines longer than 4k */
  +            args_end = args + 4000;
  +            *args_end = 0;
  +        }
  +
  +        /* +4 = 1 space between progname and args, 2 for double null at end, 2 for possible quote on first arg */
  +        cmdlen = strlen(cmdline) + strlen(args) + 4; 
  +        cmdline_pos = cmdline;
  +
  +        while (*cmdline_pos) {
  +            cmdlen += 2 * (*cmdline_pos == '+');  /* Allow space for each arg to be quoted */
  +            cmdline_pos++;
  +        }
  +
  +        cmdline = ap_pstrndup(r->pool, cmdline, cmdlen);
  +        cmdline_pos = cmdline + strlen(cmdline);
  +
  +	while (args < args_end) {
  +            char *arg;
  +	    
  +            arg = ap_getword_nc(r->pool, &args, '+');
  +
  +            if (strpbrk(arg, "&|<> "))
  +                arg = ap_pstrcat(r->pool, "\"", arg, "\"", NULL);
  +
  +            *(cmdline_pos++) = ' ';
  +            strcpy(cmdline_pos, arg);
  +            cmdline_pos += strlen(cmdline_pos);
  +        }
  +
  +        *(++cmdline_pos) = 0; /* Add required second terminator */
  +	args = strchr(cmdline, ' ');
  +	
  +	if (args) {
  +	    *args = 0;
  +	    args++;
  +	}
  +
  +        /* Create environment block from list of envariables */
  +        for (env_len=1, e=0; env[e]; e++)
  +            env_len += strlen(env[e]) + 1;
  +
  +        env_block = ap_palloc(r->pool, env_len);
  +        env_block_pos = env_block;
  +
  +        for (e=0; env[e]; e++) {
  +            strcpy(env_block_pos, env[e]);
  +            env_block_pos += strlen(env_block_pos) + 1;
  +        }
  +
  +        *env_block_pos = 0; /* environment block is terminated by a double null */
  +
  +	rc = DosExecPgm(error_object, sizeof(error_object), EXEC_ASYNC, cmdline, env_block, &rescodes, cmdline);
  +	
  +	if (rc) {
  +            ap_log_rerror(APLOG_MARK, APLOG_ERR, r, "DosExecPgm(%s %s) failed, %s - %s",
  +                          cmdline, args ? args : "", ap_os_error_message(rc), error_object );
  +	    return -1;
   	}
  -	return (pid);
  +	
  +	return rescodes.codeTerminate;
       }
   #elif defined(WIN32)
       {
  @@ -776,34 +854,10 @@
           pid = -1;
   
           if (!shellcmd) {
  -            /* Find the file name */
  -            exename = strrchr(r->filename, '/');
  -            if (!exename) {
  -                exename = strrchr(r->filename, '\\');
  -            }
  -            if (!exename) {
  -                exename = r->filename;
  -            }
  -            else {
  -                exename++;
  -            }
   
  -            ext = strrchr(exename, '.');
  -            if ((ext) && (!strcasecmp(ext,".bat") ||
  -                          !strcasecmp(ext,".cmd"))) {
  -                fileType = FileTypeEXE;
  -            }
  -            else if ((ext) && (!strcasecmp(ext,".exe") ||
  -                               !strcasecmp(ext,".com"))) {
  -                /* 16 bit or 32 bit? */
  -                fileType = FileTypeEXE;
  -            }
  -            else {
  -                /* Maybe a script or maybe a binary.. */
  -                fileType = ap_get_win32_interpreter(r, ext, &interpreter);
  -            }
  +            fileType = ap_get_win32_interpreter(r, &interpreter);
   
  -            if (fileType == FileTypeUNKNOWN) {
  +            if (fileType == eFileTypeUNKNOWN) {
                   ap_log_rerror(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, r,
                                 "%s is not executable; ensure interpreted scripts have "
                                 "\"#!\" first line", 
  @@ -920,13 +974,24 @@
           if (CreateProcess(NULL, pCommand, NULL, NULL, TRUE, 0, pEnvBlock,
                             ap_make_dirstr_parent(r->pool, r->filename),
                             &si, &pi)) {
  -            pid = pi.dwProcessId;
  -            /*
  -             * We must close the handles to the new process and its main thread
  -             * to prevent handle and memory leaks.
  -             */ 
  -            CloseHandle(pi.hProcess);
  -            CloseHandle(pi.hThread);
  +            if (fileType == eFileTypeEXE16) {
  +                /* Hack to get 16-bit CGI's working. It works for all the 
  +                 * standard modules shipped with Apache. pi.dwProcessId is 0 
  +                 * for 16-bit CGIs and all the Unix specific code that calls 
  +                 * ap_call_exec interprets this as a failure case. And we can't 
  +                 * use -1 either because it is mapped to 0 by the caller.
  +                 */
  +                pid = -2;
  +            }
  +            else {
  +                pid = pi.dwProcessId;
  +                /*
  +                 * We must close the handles to the new process and its main thread
  +                 * to prevent handle and memory leaks.
  +                 */ 
  +                CloseHandle(pi.hProcess);
  +                CloseHandle(pi.hThread);
  +            }
           }
           return (pid);
       }
  
  
  
  1.2       +15 -8     apache-2.0/mpm/src/main/util_uri.c
  
  Index: util_uri.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/mpm/src/main/util_uri.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- util_uri.c	1999/06/18 18:39:31	1.1
  +++ util_uri.c	1999/08/06 00:54:34	1.2
  @@ -185,11 +185,18 @@
   
   	/* Construct scheme://site string */
   	if (uptr->hostname) {
  +	    int is_default_port;
  +
  +	    is_default_port =
  +		(uptr->port_str == NULL ||
  +		 uptr->port == 0 ||
  +		 uptr->port == ap_default_port_for_scheme(uptr->scheme));
  +
   	    ret = ap_pstrcat (p,
   			uptr->scheme, "://", ret, 
   			uptr->hostname ? uptr->hostname : "",
  -			uptr->port_str ? ":" : "",
  -			uptr->port_str ? uptr->port_str : "",
  +			is_default_port ? "" : ":",
  +			is_default_port ? "" : uptr->port_str,
   			NULL);
   	}
       }
  @@ -265,8 +272,8 @@
       /* This is a sub-RE which will break down the hostinfo part,
        * i.e., user, password, hostname and port.
        * $          12      3 4        5       6 7    */
  -    re_str    = "^(([^:]*)(:(.*))?@)?([^@:]*)(:(.*))?$";
  -    /*             ^^user^ :pw      ^host^   port */
  +    re_str    = "^(([^:]*)(:(.*))?@)?([^@:]*)(:([0-9]*))?$";
  +    /*             ^^user^ :pw        ^host^ ^:[port]^ */
       if ((ret = regcomp(&re_hostpart, re_str, REG_EXTENDED)) != 0) {
   	char line[1024];
   
  @@ -344,9 +351,9 @@
   	    return HTTP_BAD_REQUEST;
   	}
   
  -	/* $          12      3 4        5       6 7    */
  -	/*        = "^(([^:]*)(:(.*))?@)?([^@:]*)(:(.*))?$" */
  -	/*             ^^user^ :pw      ^host^   port */
  +	/* $      12      3 4        5       6 7            */
  +	/*      "^(([^:]*)(:(.*))?@)?([^@:]*)(:([0-9]*))?$" */
  +	/*         ^^user^ :pw        ^host^ ^:[port]^      */
   
   	/* empty user is valid, that's why we test $1 but use $2 */
   	if (match[1].rm_so != match[1].rm_eo)
  @@ -370,7 +377,7 @@
   
   		port = strtol(uptr->port_str, &endstr, 10);
   		uptr->port = port;
  -		if (*endstr != '\0' || uptr->port != port) {
  +		if (*endstr != '\0') {
   		    /* Invalid characters after ':' found */
   		    return HTTP_BAD_REQUEST;
   		}
  
  
  
  1.25      +26 -0     apache-2.0/mpm/src/modules/mpm/prefork/prefork.c
  
  Index: prefork.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/mpm/src/modules/mpm/prefork/prefork.c,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- prefork.c	1999/08/05 19:56:22	1.24
  +++ prefork.c	1999/08/06 00:54:42	1.25
  @@ -669,6 +669,8 @@
   	ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_EMERG, server_conf,
   		    "Child cannot open lock semaphore, rc=%d", rc);
   	clean_child_exit(APEXIT_CHILDINIT);
  +    } else {
  +        ap_register_cleanup(p, NULL, accept_mutex_cleanup, ap_null_cleanup);
       }
   }
   
  @@ -2204,6 +2206,9 @@
   		break;		/* We have a socket ready for reading */
   	    else {
   
  +/* TODO: this accept result handling stuff should be abstracted...
  + * it's already out of date between the various unix mpms
  + */
   		/* Our old behaviour here was to continue after accept()
   		 * errors.  But this leads us into lots of troubles
   		 * because most of the errors are quite fatal.  For
  @@ -2255,6 +2260,27 @@
   		case ENETUNREACH:
   #endif
                       break;
  +#ifdef ENETDOWN
  +		case ENETDOWN:
  +		     /*
  +		      * When the network layer has been shut down, there
  +		      * is not much use in simply exiting: the parent
  +		      * would simply re-create us (and we'd fail again).
  +		      * Use the CHILDFATAL code to tear the server down.
  +		      * @@@ Martin's idea for possible improvement:
  +		      * A different approach would be to define
  +		      * a new APEXIT_NETDOWN exit code, the reception
  +		      * of which would make the parent shutdown all
  +		      * children, then idle-loop until it detected that
  +		      * the network is up again, and restart the children.
  +		      * Ben Hyde noted that temporary ENETDOWN situations
  +		      * occur in mobile IP.
  +		      */
  +		    ap_log_error(APLOG_MARK, APLOG_EMERG, server_conf,
  +			"accept: giving up.");
  +		    clean_child_exit(APEXIT_CHILDFATAL);
  +#endif /*ENETDOWN*/
  +
   #ifdef TPF
   		case EINACT:
   		    ap_log_error(APLOG_MARK, APLOG_EMERG, server_conf,
  
  
  
  1.2       +4 -4      apache-2.0/mpm/src/modules/proxy/ApacheModuleProxy.dsp
  
  Index: ApacheModuleProxy.dsp
  ===================================================================
  RCS file: /home/cvs/apache-2.0/mpm/src/modules/proxy/ApacheModuleProxy.dsp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ApacheModuleProxy.dsp	1999/06/18 18:39:34	1.1
  +++ ApacheModuleProxy.dsp	1999/08/06 00:54:45	1.2
  @@ -45,7 +45,7 @@
   # PROP Ignore_Export_Lib 0
   # PROP Target_Dir ""
   # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
  -# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "SHARED_MODULE" /YX /FD /c
  +# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "SHARED_MODULE" /D "WIN32_LEAN_AND_MEAN" /YX /FD /c
   # ADD BASE MTL /nologo /D "NDEBUG" /win32
   # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
   # ADD BASE RSC /l 0x809 /d "NDEBUG"
  @@ -55,7 +55,7 @@
   # 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 /dll /machine:I386
  -# ADD LINK32 ..\..\CoreR\ApacheCore.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib wsock32.lib /nologo /subsystem:windows /dll /machine:I386
  +# ADD LINK32 ..\..\CoreR\ApacheCore.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ws2_32.lib /nologo /subsystem:windows /dll /machine:I386
   
   !ELSEIF  "$(CFG)" == "ApacheModuleProxy - Win32 Debug"
   
  @@ -71,7 +71,7 @@
   # PROP Ignore_Export_Lib 0
   # PROP Target_Dir ""
   # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c
  -# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "SHARED_MODULE" /YX /FD /c
  +# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "SHARED_MODULE" /D "WIN32_LEAN_AND_MEAN" /YX /FD /c
   # ADD BASE MTL /nologo /D "_DEBUG" /win32
   # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
   # ADD BASE RSC /l 0x809 /d "_DEBUG"
  @@ -81,7 +81,7 @@
   # 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 /dll /debug /machine:I386
  -# ADD LINK32 ..\..\CoreD\ApacheCore.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib wsock32.lib /nologo /subsystem:windows /dll /debug /machine:I386
  +# ADD LINK32 ..\..\CoreD\ApacheCore.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ws2_32.lib /nologo /subsystem:windows /dll /debug /machine:I386
   
   !ENDIF 
   
  
  
  
  1.2       +55 -68    apache-2.0/mpm/src/modules/proxy/ApacheModuleProxy.mak
  
  Index: ApacheModuleProxy.mak
  ===================================================================
  RCS file: /home/cvs/apache-2.0/mpm/src/modules/proxy/ApacheModuleProxy.mak,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ApacheModuleProxy.mak	1999/06/18 18:39:34	1.1
  +++ ApacheModuleProxy.mak	1999/08/06 00:54:46	1.2
  @@ -30,6 +30,10 @@
   NULL=nul
   !ENDIF 
   
  +CPP=cl.exe
  +MTL=midl.exe
  +RSC=rc.exe
  +
   !IF  "$(CFG)" == "ApacheModuleProxy - Win32 Release"
   
   OUTDIR=.\Release
  @@ -63,53 +67,20 @@
   "$(OUTDIR)" :
       if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
   
  -CPP=cl.exe
   CPP_PROJ=/nologo /MD /W3 /GX /O2 /I "..\..\include" /D "NDEBUG" /D "WIN32" /D\
  - "_WINDOWS" /D "SHARED_MODULE" /Fp"$(INTDIR)\ApacheModuleProxy.pch" /YX\
  - /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c 
  + "_WINDOWS" /D "SHARED_MODULE" /D "WIN32_LEAN_AND_MEAN"\
  + /Fp"$(INTDIR)\ApacheModuleProxy.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD\
  + /c 
   CPP_OBJS=.\Release/
   CPP_SBRS=.
  -
  -.c{$(CPP_OBJS)}.obj::
  -   $(CPP) @<<
  -   $(CPP_PROJ) $< 
  -<<
  -
  -.cpp{$(CPP_OBJS)}.obj::
  -   $(CPP) @<<
  -   $(CPP_PROJ) $< 
  -<<
  -
  -.cxx{$(CPP_OBJS)}.obj::
  -   $(CPP) @<<
  -   $(CPP_PROJ) $< 
  -<<
  -
  -.c{$(CPP_SBRS)}.sbr::
  -   $(CPP) @<<
  -   $(CPP_PROJ) $< 
  -<<
  -
  -.cpp{$(CPP_SBRS)}.sbr::
  -   $(CPP) @<<
  -   $(CPP_PROJ) $< 
  -<<
  -
  -.cxx{$(CPP_SBRS)}.sbr::
  -   $(CPP) @<<
  -   $(CPP_PROJ) $< 
  -<<
  -
  -MTL=midl.exe
   MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
  -RSC=rc.exe
   BSC32=bscmake.exe
   BSC32_FLAGS=/nologo /o"$(OUTDIR)\ApacheModuleProxy.bsc" 
   BSC32_SBRS= \
   	
   LINK32=link.exe
   LINK32_FLAGS=..\..\CoreR\ApacheCore.lib kernel32.lib user32.lib gdi32.lib\
  - winspool.lib comdlg32.lib advapi32.lib shell32.lib wsock32.lib /nologo\
  + winspool.lib comdlg32.lib advapi32.lib shell32.lib ws2_32.lib /nologo\
    /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\ApacheModuleProxy.pdb"\
    /machine:I386 /out:"$(OUTDIR)\ApacheModuleProxy.dll"\
    /implib:"$(OUTDIR)\ApacheModuleProxy.lib" 
  @@ -162,12 +133,37 @@
   "$(OUTDIR)" :
       if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
   
  -CPP=cl.exe
   CPP_PROJ=/nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\include" /D "_DEBUG" /D\
  - "WIN32" /D "_WINDOWS" /D "SHARED_MODULE" /Fp"$(INTDIR)\ApacheModuleProxy.pch"\
  - /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c 
  + "WIN32" /D "_WINDOWS" /D "SHARED_MODULE" /D "WIN32_LEAN_AND_MEAN"\
  + /Fp"$(INTDIR)\ApacheModuleProxy.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD\
  + /c 
   CPP_OBJS=.\Debug/
   CPP_SBRS=.
  +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
  +BSC32=bscmake.exe
  +BSC32_FLAGS=/nologo /o"$(OUTDIR)\ApacheModuleProxy.bsc" 
  +BSC32_SBRS= \
  +	
  +LINK32=link.exe
  +LINK32_FLAGS=..\..\CoreD\ApacheCore.lib kernel32.lib user32.lib gdi32.lib\
  + winspool.lib comdlg32.lib advapi32.lib shell32.lib ws2_32.lib /nologo\
  + /subsystem:windows /dll /incremental:yes /pdb:"$(OUTDIR)\ApacheModuleProxy.pdb"\
  + /debug /machine:I386 /out:"$(OUTDIR)\ApacheModuleProxy.dll"\
  + /implib:"$(OUTDIR)\ApacheModuleProxy.lib" 
  +LINK32_OBJS= \
  +	"$(INTDIR)\mod_proxy.obj" \
  +	"$(INTDIR)\proxy_cache.obj" \
  +	"$(INTDIR)\proxy_connect.obj" \
  +	"$(INTDIR)\proxy_ftp.obj" \
  +	"$(INTDIR)\proxy_http.obj" \
  +	"$(INTDIR)\proxy_util.obj"
  +
  +"$(OUTDIR)\ApacheModuleProxy.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
  +    $(LINK32) @<<
  +  $(LINK32_FLAGS) $(LINK32_OBJS)
  +<<
  +
  +!ENDIF 
   
   .c{$(CPP_OBJS)}.obj::
      $(CPP) @<<
  @@ -199,35 +195,7 @@
      $(CPP_PROJ) $< 
   <<
   
  -MTL=midl.exe
  -MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
  -RSC=rc.exe
  -BSC32=bscmake.exe
  -BSC32_FLAGS=/nologo /o"$(OUTDIR)\ApacheModuleProxy.bsc" 
  -BSC32_SBRS= \
  -	
  -LINK32=link.exe
  -LINK32_FLAGS=..\..\CoreD\ApacheCore.lib kernel32.lib user32.lib gdi32.lib\
  - winspool.lib comdlg32.lib advapi32.lib shell32.lib wsock32.lib /nologo\
  - /subsystem:windows /dll /incremental:yes /pdb:"$(OUTDIR)\ApacheModuleProxy.pdb"\
  - /debug /machine:I386 /out:"$(OUTDIR)\ApacheModuleProxy.dll"\
  - /implib:"$(OUTDIR)\ApacheModuleProxy.lib" 
  -LINK32_OBJS= \
  -	"$(INTDIR)\mod_proxy.obj" \
  -	"$(INTDIR)\proxy_cache.obj" \
  -	"$(INTDIR)\proxy_connect.obj" \
  -	"$(INTDIR)\proxy_ftp.obj" \
  -	"$(INTDIR)\proxy_http.obj" \
  -	"$(INTDIR)\proxy_util.obj"
   
  -"$(OUTDIR)\ApacheModuleProxy.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
  -    $(LINK32) @<<
  -  $(LINK32_FLAGS) $(LINK32_OBJS)
  -<<
  -
  -!ENDIF 
  -
  -
   !IF "$(CFG)" == "ApacheModuleProxy - Win32 Release" || "$(CFG)" ==\
    "ApacheModuleProxy - Win32 Debug"
   SOURCE=.\mod_proxy.c
  @@ -239,6 +207,7 @@
   	"..\..\include\ap.h"\
   	"..\..\include\ap_config.h"\
   	"..\..\include\ap_ctype.h"\
  +	"..\..\include\ap_mmn.h"\
   	"..\..\include\buff.h"\
   	"..\..\include\explain.h"\
   	"..\..\include\hsregex.h"\
  @@ -264,12 +233,14 @@
   	"..\..\include\ap.h"\
   	"..\..\include\ap_config.h"\
   	"..\..\include\ap_ctype.h"\
  +	"..\..\include\ap_mmn.h"\
   	"..\..\include\buff.h"\
   	"..\..\include\explain.h"\
   	"..\..\include\hsregex.h"\
   	"..\..\include\http_config.h"\
   	"..\..\include\http_log.h"\
   	"..\..\include\http_protocol.h"\
  +	"..\..\include\http_request.h"\
   	"..\..\include\http_vhost.h"\
   	"..\..\include\httpd.h"\
   	"..\..\include\util_uri.h"\
  @@ -293,9 +264,11 @@
   	"..\..\include\ap_config.h"\
   	"..\..\include\ap_ctype.h"\
   	"..\..\include\ap_md5.h"\
  +	"..\..\include\ap_mmn.h"\
   	"..\..\include\buff.h"\
   	"..\..\include\explain.h"\
   	"..\..\include\hsregex.h"\
  +	"..\..\include\http_conf_globals.h"\
   	"..\..\include\http_config.h"\
   	"..\..\include\http_log.h"\
   	"..\..\include\http_main.h"\
  @@ -320,9 +293,11 @@
   	"..\..\include\ap_config.h"\
   	"..\..\include\ap_ctype.h"\
   	"..\..\include\ap_md5.h"\
  +	"..\..\include\ap_mmn.h"\
   	"..\..\include\buff.h"\
   	"..\..\include\explain.h"\
   	"..\..\include\hsregex.h"\
  +	"..\..\include\http_conf_globals.h"\
   	"..\..\include\http_config.h"\
   	"..\..\include\http_log.h"\
   	"..\..\include\http_main.h"\
  @@ -350,6 +325,7 @@
   	"..\..\include\ap.h"\
   	"..\..\include\ap_config.h"\
   	"..\..\include\ap_ctype.h"\
  +	"..\..\include\ap_mmn.h"\
   	"..\..\include\buff.h"\
   	"..\..\include\explain.h"\
   	"..\..\include\hsregex.h"\
  @@ -374,6 +350,7 @@
   	"..\..\include\ap.h"\
   	"..\..\include\ap_config.h"\
   	"..\..\include\ap_ctype.h"\
  +	"..\..\include\ap_mmn.h"\
   	"..\..\include\buff.h"\
   	"..\..\include\explain.h"\
   	"..\..\include\hsregex.h"\
  @@ -402,10 +379,12 @@
   	"..\..\include\ap.h"\
   	"..\..\include\ap_config.h"\
   	"..\..\include\ap_ctype.h"\
  +	"..\..\include\ap_mmn.h"\
   	"..\..\include\buff.h"\
   	"..\..\include\explain.h"\
   	"..\..\include\hsregex.h"\
   	"..\..\include\http_config.h"\
  +	"..\..\include\http_core.h"\
   	"..\..\include\http_log.h"\
   	"..\..\include\http_main.h"\
   	"..\..\include\http_protocol.h"\
  @@ -426,10 +405,12 @@
   	"..\..\include\ap.h"\
   	"..\..\include\ap_config.h"\
   	"..\..\include\ap_ctype.h"\
  +	"..\..\include\ap_mmn.h"\
   	"..\..\include\buff.h"\
   	"..\..\include\explain.h"\
   	"..\..\include\hsregex.h"\
   	"..\..\include\http_config.h"\
  +	"..\..\include\http_core.h"\
   	"..\..\include\http_log.h"\
   	"..\..\include\http_main.h"\
   	"..\..\include\http_protocol.h"\
  @@ -454,6 +435,7 @@
   	"..\..\include\ap.h"\
   	"..\..\include\ap_config.h"\
   	"..\..\include\ap_ctype.h"\
  +	"..\..\include\ap_mmn.h"\
   	"..\..\include\buff.h"\
   	"..\..\include\explain.h"\
   	"..\..\include\hsregex.h"\
  @@ -480,6 +462,7 @@
   	"..\..\include\ap.h"\
   	"..\..\include\ap_config.h"\
   	"..\..\include\ap_ctype.h"\
  +	"..\..\include\ap_mmn.h"\
   	"..\..\include\buff.h"\
   	"..\..\include\explain.h"\
   	"..\..\include\hsregex.h"\
  @@ -511,6 +494,7 @@
   	"..\..\include\ap_config.h"\
   	"..\..\include\ap_ctype.h"\
   	"..\..\include\ap_md5.h"\
  +	"..\..\include\ap_mmn.h"\
   	"..\..\include\buff.h"\
   	"..\..\include\explain.h"\
   	"..\..\include\hsregex.h"\
  @@ -520,6 +504,7 @@
   	"..\..\include\http_protocol.h"\
   	"..\..\include\httpd.h"\
   	"..\..\include\multithread.h"\
  +	"..\..\include\util_date.h"\
   	"..\..\include\util_uri.h"\
   	"..\..\os\win32\os.h"\
   	"..\..\os\win32\readdir.h"\
  @@ -537,6 +522,7 @@
   	"..\..\include\ap_config.h"\
   	"..\..\include\ap_ctype.h"\
   	"..\..\include\ap_md5.h"\
  +	"..\..\include\ap_mmn.h"\
   	"..\..\include\buff.h"\
   	"..\..\include\explain.h"\
   	"..\..\include\hsregex.h"\
  @@ -546,6 +532,7 @@
   	"..\..\include\http_protocol.h"\
   	"..\..\include\httpd.h"\
   	"..\..\include\multithread.h"\
  +	"..\..\include\util_date.h"\
   	"..\..\include\util_uri.h"\
   	"..\..\os\win32\os.h"\
   	"..\..\os\win32\readdir.h"\
  
  
  
  1.2       +2 -0      apache-2.0/mpm/src/modules/proxy/proxy_cache.c
  
  Index: proxy_cache.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/mpm/src/modules/proxy/proxy_cache.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- proxy_cache.c	1999/06/18 18:39:34	1.1
  +++ proxy_cache.c	1999/08/06 00:54:46	1.2
  @@ -1129,6 +1129,8 @@
   	    *p = '\0';
   #ifdef WIN32
   	    if (mkdir(c->filename) < 0 && errno != EEXIST)
  +#elif defined(__TANDEM)
  +	    if (mkdir(c->filename, S_IRWXU | S_IRWXG | S_IRWXO) < 0 && errno != EEXIST)
   #else
   	    if (mkdir(c->filename, S_IREAD | S_IWRITE | S_IEXEC) < 0 && errno != EEXIST)
   #endif /* WIN32 */
  
  
  
  1.2       +1 -0      apache-2.0/mpm/src/modules/standard/.cvsignore
  
  Index: .cvsignore
  ===================================================================
  RCS file: /home/cvs/apache-2.0/mpm/src/modules/standard/.cvsignore,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- .cvsignore	1999/06/18 18:39:35	1.1
  +++ .cvsignore	1999/08/06 00:54:52	1.2
  @@ -3,3 +3,4 @@
   *.so
   *.dll
   *.def
  +*.exp
  
  
  
  1.13      +0 -1      apache-2.0/mpm/src/modules/standard/mod_auth.c
  
  Index: mod_auth.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/mpm/src/modules/standard/mod_auth.c,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- mod_auth.c	1999/08/01 14:43:28	1.12
  +++ mod_auth.c	1999/08/06 00:54:52	1.13
  @@ -74,7 +74,6 @@
   #include "http_core.h"
   #include "http_log.h"
   #include "http_protocol.h"
  -#include "ap_md5.h"
   #include "http_request.h"
   
   typedef struct auth_config_struct {
  
  
  
  1.2       +0 -1      apache-2.0/mpm/src/modules/standard/mod_auth_db.c
  
  Index: mod_auth_db.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/mpm/src/modules/standard/mod_auth_db.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- mod_auth_db.c	1999/06/18 18:39:37	1.1
  +++ mod_auth_db.c	1999/08/06 00:54:53	1.2
  @@ -96,7 +96,6 @@
   #include "http_log.h"
   #include "http_protocol.h"
   #include <db.h>
  -#include "ap_md5.h"
   
   #if defined(DB_VERSION_MAJOR) && (DB_VERSION_MAJOR == 2)
   #define DB2
  
  
  
  1.2       +0 -1      apache-2.0/mpm/src/modules/standard/mod_auth_dbm.c
  
  Index: mod_auth_dbm.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/mpm/src/modules/standard/mod_auth_dbm.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- mod_auth_dbm.c	1999/06/18 18:39:37	1.1
  +++ mod_auth_dbm.c	1999/08/06 00:54:57	1.2
  @@ -80,7 +80,6 @@
   #else
   #include <ndbm.h>
   #endif
  -#include "ap_md5.h"
   
   /*
    * Module definition information - the part between the -START and -END
  
  
  
  1.5       +11 -0     apache-2.0/mpm/src/modules/standard/mod_cgi.c
  
  Index: mod_cgi.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/mpm/src/modules/standard/mod_cgi.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- mod_cgi.c	1999/07/27 12:05:08	1.4
  +++ mod_cgi.c	1999/08/06 00:55:00	1.5
  @@ -210,8 +210,19 @@
   	/* Soak up script output */
   	while (ap_bgets(argsbuffer, HUGE_STRING_LEN, script_in) > 0)
   	    continue;
  +#ifdef WIN32
  +        /* Soak up stderr and redirect it to the error log.
  +         * Script output to stderr is already directed to the error log
  +         * on Unix, thanks to the magic of fork().
  +         */
  +        while (ap_bgets(argsbuffer, HUGE_STRING_LEN, script_err) > 0) {
  +            ap_log_rerror(APLOG_MARK, APLOG_ERR | APLOG_NOERRNO, r, 
  +                          "%s", argsbuffer);            
  +        }
  +#else
   	while (ap_bgets(argsbuffer, HUGE_STRING_LEN, script_err) > 0)
   	    continue;
  +#endif
   	return ret;
       }
   
  
  
  
  1.13      +9 -0      apache-2.0/mpm/src/modules/standard/mod_log_config.c
  
  Index: mod_log_config.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/mpm/src/modules/standard/mod_log_config.c,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- mod_log_config.c	1999/08/01 14:43:29	1.12
  +++ mod_log_config.c	1999/08/06 00:55:00	1.13
  @@ -122,6 +122,7 @@
    * %...f:  filename
    * %...h:  remote host
    * %...a:  remote IP-address
  + * %...A:  local IP-address
    * %...{Foobar}i:  The contents of Foobar: header line(s) in the request
    *                 sent to the client.
    * %...l:  remote logname (from identd, if supplied)
  @@ -290,6 +291,11 @@
       return r->connection->remote_ip;
   }
   
  +static const char *log_local_address(request_rec *r, char *a)
  +{
  +    return r->connection->local_ip;
  +}
  +
   static const char *log_remote_logname(request_rec *r, char *a)
   {
       return ap_get_remote_logname(r);
  @@ -446,6 +452,9 @@
       },
       {   
           'a', log_remote_address, 0 
  +    },
  +    {   
  +        'A', log_local_address, 0 
       },
       {
           'l', log_remote_logname, 0
  
  
  
  1.2       +40 -51    apache-2.0/mpm/src/modules/standard/mod_rewrite.c
  
  Index: mod_rewrite.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/mpm/src/modules/standard/mod_rewrite.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- mod_rewrite.c	1999/06/18 18:39:39	1.1
  +++ mod_rewrite.c	1999/08/06 00:55:01	1.2
  @@ -91,6 +91,10 @@
   
   #include "mod_rewrite.h"
   
  +#ifndef NO_WRITEV
  +#include <sys/types.h>
  +#include <sys/uio.h>
  +#endif
   
   /*
   ** +-------------------------------------------------------+
  @@ -158,9 +162,9 @@
       { "RewriteBase",     cmd_rewritebase,     NULL, OR_FILEINFO, TAKE1,
         "the base URL of the per-directory context" },
       { "RewriteCond",     cmd_rewritecond,     NULL, OR_FILEINFO, RAW_ARGS,
  -      "a input string and a to be applied regexp-pattern" },
  +      "an input string and a to be applied regexp-pattern" },
       { "RewriteRule",     cmd_rewriterule,     NULL, OR_FILEINFO, RAW_ARGS,
  -      "a URL-applied regexp-pattern and a substitution URL" },
  +      "an URL-applied regexp-pattern and a substitution URL" },
       { "RewriteMap",      cmd_rewritemap,      NULL, RSRC_CONF,   TAKE2,
         "a mapname and a filename" },
       { "RewriteLock",     cmd_rewritelock,     NULL, RSRC_CONF,   TAKE1,
  @@ -208,6 +212,8 @@
       /* whether proxy module is available or not */
   static int proxy_available;
   
  +static char *lockname;
  +static int lockfd = -1;
   
   /*
   ** +-------------------------------------------------------+
  @@ -234,8 +240,6 @@
       a->rewritelogfile  = NULL;
       a->rewritelogfp    = -1;
       a->rewriteloglevel = 0;
  -    a->rewritelockfile = NULL;
  -    a->rewritelockfp   = -1;
       a->rewritemaps     = ap_make_array(p, 2, sizeof(rewritemap_entry));
       a->rewriteconds    = ap_make_array(p, 2, sizeof(rewritecond_entry));
       a->rewriterules    = ap_make_array(p, 2, sizeof(rewriterule_entry));
  @@ -270,12 +274,6 @@
           a->rewritelogfp    = overrides->rewritelogfp != -1 
                                ? overrides->rewritelogfp 
                                : base->rewritelogfp;
  -        a->rewritelockfile = overrides->rewritelockfile != NULL
  -                             ? overrides->rewritelockfile
  -                             : base->rewritelockfile;
  -        a->rewritelockfp   = overrides->rewritelockfp != -1
  -                             ? overrides->rewritelockfp
  -                             : base->rewritelockfp;
           a->rewritemaps     = ap_append_arrays(p, overrides->rewritemaps,
                                                 base->rewritemaps);
           a->rewriteconds    = ap_append_arrays(p, overrides->rewriteconds,
  @@ -291,8 +289,6 @@
           a->rewriteloglevel = overrides->rewriteloglevel;
           a->rewritelogfile  = overrides->rewritelogfile;
           a->rewritelogfp    = overrides->rewritelogfp;
  -        a->rewritelockfile = overrides->rewritelockfile;
  -        a->rewritelockfp   = overrides->rewritelockfp;
           a->rewritemaps     = overrides->rewritemaps;
           a->rewriteconds    = overrides->rewriteconds;
           a->rewriterules    = overrides->rewriterules;
  @@ -528,15 +524,12 @@
   
   static const char *cmd_rewritelock(cmd_parms *cmd, void *dconf, char *a1)
   {
  -    rewrite_server_conf *sconf;
       const char *error;
   
       if ((error = ap_check_cmd_context(cmd, GLOBAL_ONLY)) != NULL)
           return error;
  -    sconf = (rewrite_server_conf *)
  -            ap_get_module_config(cmd->server->module_config, &rewrite_module);
   
  -    sconf->rewritelockfile = a1;
  +    lockname = a1;
   
       return NULL;
   }
  @@ -2920,6 +2913,9 @@
       char buf[LONG_STRING_LEN];
       char c;
       int i;
  +#ifndef NO_WRITEV
  +    struct iovec iov[2];
  +#endif
   
       /* when `RewriteEngine off' was used in the per-server
        * context then the rewritemap-programs were not spawned.
  @@ -2934,8 +2930,16 @@
       rewritelock_alloc(r);
   
       /* write out the request key */
  +#ifdef NO_WRITEV
       write(fpin, key, strlen(key));
       write(fpin, "\n", 1);
  +#else
  +    iov[0].iov_base = key;
  +    iov[0].iov_len = strlen(key);
  +    iov[1].iov_base = "\n";
  +    iov[1].iov_len = 1;
  +    writev(fpin, iov, 2);
  +#endif
   
       /* read in the response value */
       i = 0;
  @@ -3254,28 +3258,26 @@
       conf = ap_get_module_config(s->module_config, &rewrite_module);
   
       /* only operate if a lockfile is used */
  -    if (conf->rewritelockfile == NULL
  -        || *(conf->rewritelockfile) == '\0') {
  +    if (lockname == NULL || *(lockname) == '\0') {
           return;
       }
   
       /* fixup the path, especially for rewritelock_remove() */
  -    conf->rewritelockfile = ap_server_root_relative(p, conf->rewritelockfile);
  +    lockname = ap_server_root_relative(p, lockname);
   
       /* create the lockfile */
  -    unlink(conf->rewritelockfile);
  -    if ((conf->rewritelockfp = ap_popenf(p, conf->rewritelockfile,
  -                                         O_WRONLY|O_CREAT,
  +    unlink(lockname);
  +    if ((lockfd = ap_popenf(p, lockname, O_WRONLY|O_CREAT,
                                            REWRITELOCK_MODE)) < 0) {
           ap_log_error(APLOG_MARK, APLOG_ERR, s,
                        "mod_rewrite: Parent could not create RewriteLock "
  -                     "file %s", conf->rewritelockfile);
  +                     "file %s", lockname);
           exit(1);
       }
   #if !defined(OS2) && !defined(WIN32)
       /* make sure the childs have access to this file */
       if (geteuid() == 0 /* is superuser */)
  -        chown(conf->rewritelockfile, ap_user_id, -1 /* no gid change */);
  +        chown(lockname, ap_user_id, -1 /* no gid change */);
   #endif
   
       return;
  @@ -3288,18 +3290,16 @@
       conf = ap_get_module_config(s->module_config, &rewrite_module);
   
       /* only operate if a lockfile is used */
  -    if (conf->rewritelockfile == NULL
  -        || *(conf->rewritelockfile) == '\0') {
  +    if (lockname == NULL || *(lockname) == '\0') {
           return;
       }
   
       /* open the lockfile (once per child) to get a unique fd */
  -    if ((conf->rewritelockfp = ap_popenf(p, conf->rewritelockfile,
  -                                         O_WRONLY,
  +    if ((lockfd = ap_popenf(p, lockname, O_WRONLY,
                                            REWRITELOCK_MODE)) < 0) {
           ap_log_error(APLOG_MARK, APLOG_ERR, s,
                        "mod_rewrite: Child could not open RewriteLock "
  -                     "file %s", conf->rewritelockfile);
  +                     "file %s", lockname);
           exit(1);
       }
       return;
  @@ -3307,43 +3307,29 @@
   
   static void rewritelock_remove(void *data)
   {
  -    server_rec *s;
  -    rewrite_server_conf *conf;
  -
  -    /* the data is really the server_rec */
  -    s = (server_rec *)data;
  -    conf = ap_get_module_config(s->module_config, &rewrite_module);
  -
       /* only operate if a lockfile is used */
  -    if (conf->rewritelockfile == NULL
  -        || *(conf->rewritelockfile) == '\0') {
  +    if (lockname == NULL || *(lockname) == '\0') {
           return;
       }
   
       /* remove the lockfile */
  -    unlink(conf->rewritelockfile);
  +    unlink(lockname);
  +    lockname = NULL;
  +    lockfd = -1;
   }
   
   static void rewritelock_alloc(request_rec *r)
   {
  -    rewrite_server_conf *conf;
  -
  -    conf = ap_get_module_config(r->server->module_config, &rewrite_module);
  -
  -    if (conf->rewritelockfp != -1) {
  -        fd_lock(r, conf->rewritelockfp);
  +    if (lockfd != -1) {
  +        fd_lock(r, lockfd);
       }
       return;
   }
   
   static void rewritelock_free(request_rec *r)
   {
  -    rewrite_server_conf *conf;
  -
  -    conf = ap_get_module_config(r->server->module_config, &rewrite_module);
  -
  -    if (conf->rewritelockfp != -1) {
  -        fd_unlock(r, conf->rewritelockfp);
  +    if (lockfd != -1) {
  +        fd_unlock(r, lockfd);
       }
       return;
   }
  @@ -3613,6 +3599,9 @@
       }
       else if (strcasecmp(var, "SERVER_NAME") == 0) {
           result = ap_get_server_name(r);
  +    }
  +    else if (strcasecmp(var, "SERVER_ADDR") == 0) { /* non-standard */
  +        result = r->connection->local_ip;
       }
       else if (strcasecmp(var, "SERVER_PORT") == 0) {
           ap_snprintf(resultbuf, sizeof(resultbuf), "%u", ap_get_server_port(r));
  
  
  
  1.2       +1 -3      apache-2.0/mpm/src/modules/standard/mod_rewrite.h
  
  Index: mod_rewrite.h
  ===================================================================
  RCS file: /home/cvs/apache-2.0/mpm/src/modules/standard/mod_rewrite.h,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- mod_rewrite.h	1999/06/18 18:39:39	1.1
  +++ mod_rewrite.h	1999/08/06 00:55:03	1.2
  @@ -157,7 +157,7 @@
   #endif
   #if !defined(USE_FCNTL) && !defined(USE_FLOCK)
   #define USE_FLOCK 1
  -#if !defined(MPE) && !defined(WIN32)
  +#if !defined(MPE) && !defined(WIN32) && !defined(__TANDEM)
   #include <sys/file.h>
   #endif
   #ifndef LOCK_UN
  @@ -302,8 +302,6 @@
       char         *rewritelogfile;  /* the RewriteLog filename */
       int           rewritelogfp;    /* the RewriteLog open filepointer */
       int           rewriteloglevel; /* the RewriteLog level of verbosity */
  -    char         *rewritelockfile; /* the RewriteLock filename */
  -    int           rewritelockfp;   /* the RewriteLock open filepointer */
       array_header *rewritemaps;     /* the RewriteMap entries */
       array_header *rewriteconds;    /* the RewriteCond entries (temporary) */
       array_header *rewriterules;    /* the RewriteRule entries */
  
  
  
  1.1                  apache-2.0/mpm/src/modules/standard/mod_vhost_alias.c
  
  Index: mod_vhost_alias.c
  ===================================================================
  /* ====================================================================
   * Copyright (c) 1995-1999 The Apache Group.  All rights reserved.
   *
   * 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 acknowledgment:
   *    "This product includes software developed by the Apache Group
   *    for use in the Apache HTTP server project (http://www.apache.org/)."
   *
   * 4. The names "Apache Server" and "Apache Group" must not be used to
   *    endorse or promote products derived from this software without
   *    prior written permission. For written permission, please contact
   *    apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache"
   *    nor may "Apache" appear in their names without prior written
   *    permission of the Apache Group.
   *
   * 6. Redistributions of any form whatsoever must retain the following
   *    acknowledgment:
   *    "This product includes software developed by the Apache Group
   *    for use in the Apache HTTP server project (http://www.apache.org/)."
   *
   * THIS SOFTWARE IS PROVIDED BY THE APACHE GROUP ``AS IS'' AND ANY
   * EXPRESSED 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 APACHE GROUP OR
   * ITS 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.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Group and was originally based
   * on public domain software written at the National Center for
   * Supercomputing Applications, University of Illinois, Urbana-Champaign.
   * For more information on the Apache Group and the Apache HTTP server
   * project, please see <http://www.apache.org/>.
   *
   */
  
  /*
   * mod_vhost_alias.c: support for dynamically configured mass virtual hosting
   * 
   * Copyright (c) 1998-1999 Demon Internet Ltd.
   *
   * This software was submitted by Demon Internet to the Apache Group
   * in May 1999. Future revisions and derivatives of this source code
   * must acknowledge Demon Internet as the original contributor of
   * this module. All other licensing and usage conditions are those
   * of the Apache Group.
   *
   * Originally written by Tony Finch <fa...@demon.net> <do...@dotat.at>.
   *
   * Implementation ideas were taken from mod_alias.c. The overall
   * concept is derived from the OVERRIDE_DOC_ROOT/OVERRIDE_CGIDIR
   * patch to Apache 1.3b3 and a similar feature in Demon's thttpd,
   * both written by James Grinter <jr...@blodwen.demon.co.uk>.
   */
  
  #include "httpd.h"
  #include "http_config.h"
  #include "http_core.h"
  
  
  module MODULE_VAR_EXPORT vhost_alias_module;
  
  
  /*
   * basic configuration things
   * we abbreviate "mod_vhost_alias" to "mva" for shorter names
   */
  
  typedef enum {
      VHOST_ALIAS_UNSET, VHOST_ALIAS_NONE, VHOST_ALIAS_NAME, VHOST_ALIAS_IP
  } mva_mode_e;
  
  /*
   * Per-server module config record.
   */
  typedef struct mva_sconf_t {
      char *doc_root;
      char *cgi_root;
      mva_mode_e doc_root_mode;
      mva_mode_e cgi_root_mode;
  } mva_sconf_t;
  
  static void *mva_create_server_config(pool *p, server_rec *s)
  {
      mva_sconf_t *conf;
  
      conf = (mva_sconf_t *) ap_pcalloc(p, sizeof(mva_sconf_t));
      conf->doc_root = NULL;
      conf->cgi_root = NULL;
      conf->doc_root_mode = VHOST_ALIAS_UNSET;
      conf->cgi_root_mode = VHOST_ALIAS_UNSET;
      return conf;
  }
  
  static void *mva_merge_server_config(pool *p, void *parentv, void *childv)
  {
      mva_sconf_t *parent = (mva_sconf_t *) parentv;
      mva_sconf_t *child = (mva_sconf_t *) childv;
      mva_sconf_t *conf;
  
      conf = (mva_sconf_t *) ap_pcalloc(p, sizeof(*conf));
      if (child->doc_root_mode == VHOST_ALIAS_UNSET) {
  	conf->doc_root_mode = parent->doc_root_mode;
  	conf->doc_root = parent->doc_root;
      }
      else {
  	conf->doc_root_mode = child->doc_root_mode;
  	conf->doc_root = child->doc_root;
      }
      if (child->cgi_root_mode == VHOST_ALIAS_UNSET) {
  	conf->cgi_root_mode = parent->cgi_root_mode;
  	conf->cgi_root = parent->cgi_root;
      }
      else {
  	conf->cgi_root_mode = child->cgi_root_mode;
  	conf->cgi_root = child->cgi_root;
      }
      return conf;
  }
  
  
  /*
   * These are just here to tell us what vhost_alias_set should do.
   * We don't put anything into them; we just use the cell addresses.
   */
  static int vhost_alias_set_doc_root_ip,
      vhost_alias_set_cgi_root_ip,
      vhost_alias_set_doc_root_name,
      vhost_alias_set_cgi_root_name;
  
  static const char *vhost_alias_set(cmd_parms *cmd, void *dummy, char *map)
  {
      mva_sconf_t *conf;
      mva_mode_e mode, *pmode;
      char **pmap;
      char *p;
    
      conf = (mva_sconf_t *) ap_get_module_config(cmd->server->module_config,
  						&vhost_alias_module);
      /* there ought to be a better way of doing this */
      if (&vhost_alias_set_doc_root_ip == cmd->info) {
  	mode = VHOST_ALIAS_IP;
  	pmap = &conf->doc_root;
  	pmode = &conf->doc_root_mode;
      }
      else if (&vhost_alias_set_cgi_root_ip == cmd->info) {
  	mode = VHOST_ALIAS_IP;
  	pmap = &conf->cgi_root;
  	pmode = &conf->cgi_root_mode;
      }
      else if (&vhost_alias_set_doc_root_name == cmd->info) {
  	mode = VHOST_ALIAS_NAME;
  	pmap = &conf->doc_root;
  	pmode = &conf->doc_root_mode;
      }
      else if (&vhost_alias_set_cgi_root_name == cmd->info) {
  	mode = VHOST_ALIAS_NAME;
  	pmap = &conf->cgi_root;
  	pmode = &conf->cgi_root_mode;
      }
      else {
  	return "INTERNAL ERROR: unknown command info";
      }
  
      if (*map != '/') {
  	if (strcasecmp(map, "none")) {
  	    return "format string must start with '/' or be 'none'";
  	}
  	*pmap = NULL;
  	*pmode = VHOST_ALIAS_NONE;
  	return NULL;
      }
  
      /* sanity check */
      p = map;
      while (*p != '\0') {
  	if (*p++ != '%') {
  	    continue;
  	}
  	/* we just found a '%' */
  	if (*p == 'p' || *p == '%') {
  	    ++p;
  	    continue;
  	}
  	/* optional dash */
  	if (*p == '-') {
  	    ++p;
  	}
  	/* digit N */
  	if (ap_isdigit(*p)) {
  	    ++p;
  	}
  	else {
  	    return "syntax error in format string";
  	}
  	/* optional plus */
  	if (*p == '+') {
  	    ++p;
  	}
  	/* do we end here? */
  	if (*p != '.') {
  	    continue;
  	}
  	++p;
  	/* optional dash */
  	if (*p == '-') {
  	    ++p;
  	}
  	/* digit M */
  	if (ap_isdigit(*p)) {
  	    ++p;
  	}
  	else {
  	    return "syntax error in format string";
  	}
  	/* optional plus */
  	if (*p == '+') {
  	    ++p;
  	}
      }
      *pmap = map;
      *pmode = mode;
      return NULL;
  }
  
  static const command_rec mva_commands[] =
  {
      {"VirtualScriptAlias", vhost_alias_set, &vhost_alias_set_cgi_root_name,
       RSRC_CONF, TAKE1, "how to create a ScriptAlias based on the host"},
      {"VirtualDocumentRoot", vhost_alias_set, &vhost_alias_set_doc_root_name,
       RSRC_CONF, TAKE1, "how to create the DocumentRoot based on the host"},
      {"VirtualScriptAliasIP", vhost_alias_set, &vhost_alias_set_cgi_root_ip,
       RSRC_CONF, TAKE1, "how to create a ScriptAlias based on the host"},
      {"VirtualDocumentRootIP", vhost_alias_set, &vhost_alias_set_doc_root_ip,
       RSRC_CONF, TAKE1, "how to create the DocumentRoot based on the host"},
      { NULL }
  };
  
  
  /*
   * This really wants to be a nested function
   * but C is too feeble to support them.
   */
  static ap_inline void vhost_alias_checkspace(request_rec *r, char *buf,
  					     char **pdest, int size)
  {
      /* XXX: what if size > HUGE_STRING_LEN? */
      if (*pdest + size > buf + HUGE_STRING_LEN) {
  	**pdest = '\0';
  	if (r->filename) {
  	    r->filename = ap_pstrcat(r->pool, r->filename, buf, NULL);
  	}
  	else {
  	    r->filename = ap_pstrdup(r->pool, buf);
  	}
  	*pdest = buf;
      }
  }
  
  static void vhost_alias_interpolate(request_rec *r, const char *name,
  				    const char *map, const char *uri)
  {
      /* 0..9 9..0 */
      enum { MAXDOTS = 19 };
      const char *dots[MAXDOTS+1];
      int ndots;
  
      char buf[HUGE_STRING_LEN];
      char *dest, last;
  
      int N, M, Np, Mp, Nd, Md;
      const char *start, *end;
  
      const char *p;
  
      ndots = 0;
      dots[ndots++] = name-1; /* slightly naughty */
      for (p = name; *p; ++p){
  	if (*p == '.' && ndots < MAXDOTS) {
  	    dots[ndots++] = p;
  	}
      }
      dots[ndots] = p;
  
      r->filename = NULL;
    
      dest = buf;
      last = '\0';
      while (*map) {
  	if (*map != '%') {
  	    /* normal characters */
  	    vhost_alias_checkspace(r, buf, &dest, 1);
  	    last = *dest++ = *map++;
  	    continue;
  	}
  	/* we are in a format specifier */
  	++map;
  	/* can't be a slash */
  	last = '\0';
  	/* %% -> % */
  	if (*map == '%') {
  	    ++map;
  	    vhost_alias_checkspace(r, buf, &dest, 1);
  	    *dest++ = '%';
  	    continue;
  	}
  	/* port number */
  	if (*map == 'p') {
  	    ++map;
  	    /* no. of decimal digits in a short plus one */
  	    vhost_alias_checkspace(r, buf, &dest, 7);
  	    dest += ap_snprintf(dest, 7, "%d", ap_get_server_port(r));
  	    continue;
  	}
  	/* deal with %-N+.-M+ -- syntax is already checked */
  	N = M = 0;   /* value */
  	Np = Mp = 0; /* is there a plus? */
  	Nd = Md = 0; /* is there a dash? */
  	if (*map == '-') ++map, Nd = 1;
  	N = *map++ - '0';
  	if (*map == '+') ++map, Np = 1;
  	if (*map == '.') {
  	    ++map;
  	    if (*map == '-') {
  		++map, Md = 1;
  	    }
  	    M = *map++ - '0';
  	    if (*map == '+') {
  		++map, Mp = 1;
  	    }
  	}
  	/* note that N and M are one-based indices, not zero-based */
  	start = dots[0]+1; /* ptr to the first character */
  	end = dots[ndots]; /* ptr to the character after the last one */
  	if (N != 0) {
  	    if (N > ndots) {
  		start = "_";
  		end = start+1;
  	    }
  	    else if (!Nd) {
  		start = dots[N-1]+1;
  		if (!Np) {
  		    end = dots[N];
  		}
  	    }
  	    else {
  		if (!Np) {
  		    start = dots[ndots-N]+1;
  		}
  		end = dots[ndots-N+1];
  	    }
  	}
  	if (M != 0) {
  	    if (M > end - start) {
  		start = "_";
  		end = start+1;
  	    }
  	    else if (!Md) {
  		start = start+M-1;
  		if (!Mp) {
  		    end = start+1;
  		}
  	    }
  	    else {
  		if (!Mp) {
  		    start = end-M;
  		}
  		end = end-M+1;
  	    }
  	}
  	vhost_alias_checkspace(r, buf, &dest, end - start);
  	for (p = start; p < end; ++p) {
  	    *dest++ = ap_tolower(*p);
  	}
      }
      *dest = '\0';
      /* no double slashes */
      if (last == '/') {
  	++uri;
      }
      if (r->filename) {
  	r->filename = ap_pstrcat(r->pool, r->filename, buf, uri, NULL);
      }
      else {
  	r->filename = ap_pstrcat(r->pool, buf, uri, NULL);
      }
  }
  
  static int mva_translate(request_rec *r)
  {
      mva_sconf_t *conf;
      const char *name, *map, *uri;
      mva_mode_e mode;
      int cgi;
    
      conf = (mva_sconf_t *) ap_get_module_config(r->server->module_config,
  					      &vhost_alias_module);
      if (!strncmp(r->uri, "/cgi-bin/", 9)) {
  	mode = conf->cgi_root_mode;
  	map = conf->cgi_root;
  	uri = r->uri + 8;
  	/*
  	 * can't force cgi immediately because we might not handle this
  	 * call if the mode is wrong
  	 */
  	cgi = 1;
      }
      else if (r->uri[0] == '/') {
  	mode = conf->doc_root_mode;
  	map = conf->doc_root;
  	uri = r->uri;
  	cgi = 0;
      }
      else {
  	return DECLINED;
      }
    
      if (mode == VHOST_ALIAS_NAME) {
  	name = ap_get_server_name(r);
      }
      else if (mode == VHOST_ALIAS_IP) {
  	name = r->connection->local_ip;
      }
      else {
  	return DECLINED;
      }
  
      vhost_alias_interpolate(r, name, map, uri);
  
      if (cgi) {
  	/* see is_scriptaliased() in mod_cgi */
  	r->handler = "cgi-script";
  	ap_table_setn(r->notes, "alias-forced-type", r->handler);
      }
  
      return OK;
  }
  
  
  module MODULE_VAR_EXPORT vhost_alias_module =
  {
      STANDARD_MODULE_STUFF,
      NULL,			/* initializer */
      NULL,			/* dir config creater */
      NULL,			/* dir merger --- default is to override */
      mva_create_server_config,	/* server config */
      mva_merge_server_config,	/* merge server configs */
      mva_commands,		/* command table */
      NULL,			/* handlers */
      mva_translate,		/* filename translation */
      NULL,			/* check_user_id */
      NULL,			/* check auth */
      NULL,			/* check access */
      NULL,			/* type_checker */
      NULL,			/* fixups */
      NULL,			/* logger */
      NULL,			/* header parser */
      NULL,			/* child_init */
      NULL,			/* child_exit */
      NULL			/* post read-request */
  };
  
  
  
  1.2       +45 -3     apache-2.0/mpm/src/os/bs2000/Makefile.tmpl
  
  Index: Makefile.tmpl
  ===================================================================
  RCS file: /home/cvs/apache-2.0/mpm/src/os/bs2000/Makefile.tmpl,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Makefile.tmpl	1999/06/18 18:39:40	1.1
  +++ Makefile.tmpl	1999/08/06 00:55:16	1.2
  @@ -36,7 +36,49 @@
   	    && rm Makefile.new
   
   $(OBJS): Makefile
  -os.o:	os.c os-inline.c
  -ebcdic.o: ebcdic.c
  +
   # DO NOT REMOVE
  -os.o:	os.c
  +bs2login.o: bs2login.c
  +bs2login.o: $(INCDIR)/httpd.h
  +bs2login.o: $(INCDIR)/ap_config.h
  +bs2login.o: $(INCDIR)/ap_mmn.h
  +bs2login.o: $(INCDIR)/ap_config_auto.h
  +bs2login.o: os.h
  +bs2login.o: $(INCDIR)/ap_ctype.h
  +bs2login.o: $(INCDIR)/hsregex.h
  +bs2login.o: $(INCDIR)/alloc.h
  +bs2login.o: $(INCDIR)/buff.h
  +bs2login.o: $(INCDIR)/ap.h
  +bs2login.o: ebcdic.h
  +bs2login.o: $(INCDIR)/util_uri.h
  +bs2login.o: $(INCDIR)/http_config.h
  +bs2login.o: $(INCDIR)/http_log.h
  +ebcdic.o: ebcdic.c
  +ebcdic.o: $(INCDIR)/ap_config.h
  +ebcdic.o: $(INCDIR)/ap_mmn.h
  +ebcdic.o: $(INCDIR)/ap_config_auto.h
  +ebcdic.o: os.h
  +ebcdic.o: $(INCDIR)/ap_ctype.h
  +ebcdic.o: $(INCDIR)/hsregex.h
  +ebcdic.o: ebcdic.h
  +os-inline.o: os-inline.c
  +os-inline.o: $(INCDIR)/ap_config.h
  +os-inline.o: $(INCDIR)/ap_mmn.h
  +os-inline.o: $(INCDIR)/ap_config_auto.h
  +os-inline.o: os.h
  +os-inline.o: $(INCDIR)/ap_ctype.h
  +os-inline.o: $(INCDIR)/hsregex.h
  +os.o: os.c
  +os.o: $(INCDIR)/httpd.h
  +os.o: $(INCDIR)/ap_config.h
  +os.o: $(INCDIR)/ap_mmn.h
  +os.o: $(INCDIR)/ap_config_auto.h
  +os.o: os.h
  +os.o: $(INCDIR)/ap_ctype.h
  +os.o: $(INCDIR)/hsregex.h
  +os.o: $(INCDIR)/alloc.h
  +os.o: $(INCDIR)/buff.h
  +os.o: $(INCDIR)/ap.h
  +os.o: ebcdic.h
  +os.o: $(INCDIR)/util_uri.h
  +os.o: $(INCDIR)/http_core.h
  
  
  
  1.2       +13 -1     apache-2.0/mpm/src/os/bs2000/bs2login.c
  
  Index: bs2login.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/mpm/src/os/bs2000/bs2login.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- bs2login.c	1999/06/18 18:39:40	1.1
  +++ bs2login.c	1999/08/06 00:55:17	1.2
  @@ -255,6 +255,7 @@
   pid_t os_fork(const char *user)
   {
       pid_t pid;
  +    char  username[USER_LEN+1];
   
       switch (os_forktype()) {
         case bs2_FORK:
  @@ -267,7 +268,18 @@
   	break;
   
         case bs2_UFORK:
  -	pid = ufork(user);
  +	ap_cpystrn(username, user, sizeof username);
  +
  +	/* Make user name all upper case - for some versions of ufork() */
  +	ap_str_toupper(username);
  +
  +	pid = ufork(username);
  +	if (pid == -1 && errno == EPERM) {
  +	    ap_log_error(APLOG_MARK, APLOG_EMERG,
  +			 NULL, "ufork: Possible mis-configuration "
  +			 "for user %s - Aborting.", user);
  +	    exit(1);
  +	}
   	break;
   
         default:
  
  
  
  1.2       +10 -2     apache-2.0/mpm/src/os/bs2000/os.h
  
  Index: os.h
  ===================================================================
  RCS file: /home/cvs/apache-2.0/mpm/src/os/bs2000/os.h,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- os.h	1999/06/18 18:39:41	1.1
  +++ os.h	1999/08/06 00:55:18	1.2
  @@ -9,8 +9,6 @@
    * and prototypes of OS specific functions defined in os.c or os-inline.c
    */
   
  -#include "ap_config.h"
  -
   #if !defined(INLINE) && defined(USE_GNU_INLINE)
   /* Compiler supports inline, so include the inlineable functions as
    * part of the header
  @@ -33,6 +31,16 @@
   
   #define ap_os_is_filename_valid(f)          (1)
   #define ap_os_kill(pid, sig)                kill(pid, sig)
  +
  +#if !defined(_POSIX_SOURCE) && !defined(_XOPEN_SOURCE)
  +typedef struct {           
  +    char    *username;     
  +    char    *account;      
  +    char    *processor_name;
  +}  _rini_struct;           
  +
  +extern int _rini(_rini_struct *);
  +#endif /* !defined(_POSIX_SOURCE) && !defined(_XOPEN_SOURCE) */
   
   /* Sorry if this is ugly, but the include order doesn't allow me
    * to use request_rec here... */
  
  
  
  1.2       +7 -0      apache-2.0/mpm/src/os/tpf/os.c
  
  Index: os.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/mpm/src/os/tpf/os.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- os.c	1999/06/18 18:39:41	1.1
  +++ os.c	1999/08/06 00:55:24	1.2
  @@ -161,6 +161,13 @@
       return rv;
   }
      
  +/* the getpass function is not usable on TPF */
  +char *getpass(const char* prompt)
  +{
  +    errno = EIO;
  +    return((char *)NULL);
  +}
  +
   #ifndef __PIPE_
   int pipe(int fildes[2])
   {
  
  
  
  1.2       +1 -0      apache-2.0/mpm/src/os/tpf/os.h
  
  Index: os.h
  ===================================================================
  RCS file: /home/cvs/apache-2.0/mpm/src/os/tpf/os.h,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- os.h	1999/06/18 18:39:41	1.1
  +++ os.h	1999/08/06 00:55:25	1.2
  @@ -95,6 +95,7 @@
   struct server_rec;
   pid_t os_fork(struct server_rec *s, int slot);
   int os_check_server(char *server);
  +char *getpass(const char *prompt);
   extern char *ap_server_argv0;
   extern int scoreboard_fd;
   #include <signal.h>
  
  
  
  1.2       +2 -2      apache-2.0/mpm/src/os/unix/unixd.c
  
  Index: unixd.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/mpm/src/os/unix/unixd.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- unixd.c	1999/06/20 22:59:52	1.1
  +++ unixd.c	1999/08/06 00:55:28	1.2
  @@ -198,7 +198,7 @@
   	if (setuid(unixd_config.user_id) == -1) {
   	    GETUSERMODE();
   	    ap_log_error(APLOG_MARK, APLOG_ALERT, NULL,
  -			"setuid: unable to change uid");
  +			"setuid: unable to change to uid: %d", unixd_config.user_id);
   	    exit(1);
   	}
   	GETUSERMODE();
  @@ -211,7 +211,7 @@
   #endif
   	setuid(unixd_config.user_id) == -1)) {
   	ap_log_error(APLOG_MARK, APLOG_ALERT, NULL,
  -		    "setuid: unable to change uid");
  +		    "setuid: unable to change to uid: %d", unixd_config.user_id);
   	return -1;
       }
   #endif
  
  
  
  1.2       +4 -4      apache-2.0/mpm/src/os/win32/ApacheModuleRewrite.dsp
  
  Index: ApacheModuleRewrite.dsp
  ===================================================================
  RCS file: /home/cvs/apache-2.0/mpm/src/os/win32/ApacheModuleRewrite.dsp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ApacheModuleRewrite.dsp	1999/06/18 18:39:50	1.1
  +++ ApacheModuleRewrite.dsp	1999/08/06 00:55:34	1.2
  @@ -45,7 +45,7 @@
   # PROP Ignore_Export_Lib 0
   # PROP Target_Dir ""
   # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
  -# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "NO_DBM_REWRITEMAP" /D "SHARED_MODULE" /YX /FD /c
  +# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "NO_DBM_REWRITEMAP" /D "SHARED_MODULE" /D "WIN32_LEAN_AND_MEAN" /YX /FD /c
   # ADD BASE MTL /nologo /D "NDEBUG" /win32
   # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
   # ADD BASE RSC /l 0x809 /d "NDEBUG"
  @@ -55,7 +55,7 @@
   # 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 /dll /machine:I386
  -# ADD LINK32 ..\..\CoreR\ApacheCore.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib wsock32.lib /nologo /subsystem:windows /dll /machine:I386
  +# ADD LINK32 ..\..\CoreR\ApacheCore.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ws2_32.lib /nologo /subsystem:windows /dll /machine:I386
   
   !ELSEIF  "$(CFG)" == "ApacheModuleRewrite - Win32 Debug"
   
  @@ -71,7 +71,7 @@
   # PROP Ignore_Export_Lib 0
   # PROP Target_Dir ""
   # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c
  -# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "NO_DBM_REWRITEMAP" /D "SHARED_MODULE" /YX /FD /c
  +# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "NO_DBM_REWRITEMAP" /D "SHARED_MODULE" /D "WIN32_LEAN_AND_MEAN" /YX /FD /c
   # ADD BASE MTL /nologo /D "_DEBUG" /win32
   # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
   # ADD BASE RSC /l 0x809 /d "_DEBUG"
  @@ -81,7 +81,7 @@
   # 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 /dll /debug /machine:I386
  -# ADD LINK32 ..\..\CoreD\ApacheCore.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib wsock32.lib /nologo /subsystem:windows /dll /debug /machine:I386
  +# ADD LINK32 ..\..\CoreD\ApacheCore.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ws2_32.lib /nologo /subsystem:windows /dll /debug /machine:I386
   
   !ENDIF 
   
  
  
  
  1.2       +14 -9     apache-2.0/mpm/src/os/win32/ApacheModuleRewrite.mak
  
  Index: ApacheModuleRewrite.mak
  ===================================================================
  RCS file: /home/cvs/apache-2.0/mpm/src/os/win32/ApacheModuleRewrite.mak,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ApacheModuleRewrite.mak	1999/06/18 18:39:51	1.1
  +++ ApacheModuleRewrite.mak	1999/08/06 00:55:35	1.2
  @@ -64,7 +64,7 @@
       if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
   
   CPP_PROJ=/nologo /MD /W3 /GX /O2 /I "..\..\include" /D "NDEBUG" /D "WIN32" /D\
  - "_WINDOWS" /D "NO_DBM_REWRITEMAP" /D "SHARED_MODULE"\
  + "_WINDOWS" /D "NO_DBM_REWRITEMAP" /D "SHARED_MODULE" /D "WIN32_LEAN_AND_MEAN"\
    /Fp"$(INTDIR)\ApacheModuleRewrite.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\"\
    /FD /c 
   CPP_OBJS=.\ApacheModuleRewriteR/
  @@ -76,7 +76,7 @@
   	
   LINK32=link.exe
   LINK32_FLAGS=..\..\CoreR\ApacheCore.lib kernel32.lib user32.lib gdi32.lib\
  - winspool.lib comdlg32.lib advapi32.lib shell32.lib wsock32.lib /nologo\
  + winspool.lib comdlg32.lib advapi32.lib shell32.lib ws2_32.lib /nologo\
    /subsystem:windows /dll /incremental:no\
    /pdb:"$(OUTDIR)\ApacheModuleRewrite.pdb" /machine:I386\
    /out:"$(OUTDIR)\ApacheModuleRewrite.dll"\
  @@ -123,9 +123,9 @@
       if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
   
   CPP_PROJ=/nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\include" /D "_DEBUG" /D\
  - "WIN32" /D "_WINDOWS" /D "NO_DBM_REWRITEMAP" /D "SHARED_MODULE"\
  - /Fp"$(INTDIR)\ApacheModuleRewrite.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\"\
  - /FD /c 
  + "WIN32" /D "_WINDOWS" /D "NO_DBM_REWRITEMAP" /D "SHARED_MODULE" /D\
  + "WIN32_LEAN_AND_MEAN" /Fp"$(INTDIR)\ApacheModuleRewrite.pch" /YX\
  + /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c 
   CPP_OBJS=.\ApacheModuleRewriteD/
   CPP_SBRS=.
   MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
  @@ -135,7 +135,7 @@
   	
   LINK32=link.exe
   LINK32_FLAGS=..\..\CoreD\ApacheCore.lib kernel32.lib user32.lib gdi32.lib\
  - winspool.lib comdlg32.lib advapi32.lib shell32.lib wsock32.lib /nologo\
  + winspool.lib comdlg32.lib advapi32.lib shell32.lib ws2_32.lib /nologo\
    /subsystem:windows /dll /incremental:yes\
    /pdb:"$(OUTDIR)\ApacheModuleRewrite.pdb" /debug /machine:I386\
    /out:"$(OUTDIR)\ApacheModuleRewrite.dll"\
  @@ -191,18 +191,21 @@
   DEP_CPP_MOD_R=\
   	"..\..\include\alloc.h"\
   	"..\..\include\ap.h"\
  +	"..\..\include\ap_config.h"\
  +	"..\..\include\ap_ctype.h"\
   	"..\..\include\ap_mmn.h"\
   	"..\..\include\buff.h"\
  -	"..\..\include\conf.h"\
   	"..\..\include\hsregex.h"\
  +	"..\..\include\http_conf_globals.h"\
   	"..\..\include\http_config.h"\
   	"..\..\include\http_core.h"\
   	"..\..\include\http_log.h"\
   	"..\..\include\http_request.h"\
  +	"..\..\include\http_vhost.h"\
   	"..\..\include\httpd.h"\
  +	"..\..\include\util_uri.h"\
   	"..\..\modules\standard\mod_rewrite.h"\
   	".\os.h"\
  -	".\passwd.h"\
   	".\readdir.h"\
   	
   
  @@ -215,10 +218,12 @@
   DEP_CPP_MOD_R=\
   	"..\..\include\alloc.h"\
   	"..\..\include\ap.h"\
  +	"..\..\include\ap_config.h"\
  +	"..\..\include\ap_ctype.h"\
   	"..\..\include\ap_mmn.h"\
   	"..\..\include\buff.h"\
  -	"..\..\include\conf.h"\
   	"..\..\include\hsregex.h"\
  +	"..\..\include\http_conf_globals.h"\
   	"..\..\include\http_config.h"\
   	"..\..\include\http_core.h"\
   	"..\..\include\http_log.h"\
  
  
  
  1.2       +1 -1      apache-2.0/mpm/src/os/win32/os.h
  
  Index: os.h
  ===================================================================
  RCS file: /home/cvs/apache-2.0/mpm/src/os/win32/os.h,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- os.h	1999/06/18 18:39:53	1.1
  +++ os.h	1999/08/06 00:55:36	1.2
  @@ -21,7 +21,7 @@
   #include <direct.h>
   
   #define STATUS
  -#define WIN32_LEAN_AND_MEAN
  +/*#define WIN32_LEAN_AND_MEAN Now defined in project files */
   #ifndef STRICT
    #define STRICT
   #endif
  
  
  
  1.2       +1 -1      apache-2.0/mpm/src/os/win32/registry.c
  
  Index: registry.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/mpm/src/os/win32/registry.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- registry.c	1999/06/18 18:39:54	1.1
  +++ registry.c	1999/08/06 00:55:37	1.2
  @@ -38,7 +38,7 @@
   
   #define VENDOR   "Apache Group"
   #define SOFTWARE "Apache"
  -#define VERSION  "1.3.7 dev"
  +#define VERSION  "1.3.8 dev"
   
   #define REGKEY "SOFTWARE\\" VENDOR "\\" SOFTWARE "\\" VERSION
   
  
  
  
  1.2       +1 -0      apache-2.0/mpm/src/regex/debug.c
  
  Index: debug.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/mpm/src/regex/debug.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- debug.c	1999/06/18 18:39:57	1.1
  +++ debug.c	1999/08/06 00:55:40	1.2
  @@ -6,6 +6,7 @@
   #include <sys/types.h>
   
   #include "hsregex.h"
  +#include "ap_ctype.h"
   #include "utils.h"
   #include "regex2.h"
   #include "debug.ih"
  
  
  
  1.2       +2 -2      apache-2.0/mpm/src/regex/main.c
  
  Index: main.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/mpm/src/regex/main.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- main.c	1999/06/18 18:39:57	1.1
  +++ main.c	1999/08/06 00:55:41	1.2
  @@ -20,6 +20,8 @@
   
   extern int split();
   extern void regprint();
  +extern int optind;
  +extern char *optarg;
   
   /*
    - main - do the simple case, hand off to regress() for regression
  @@ -37,8 +39,6 @@
   	int c;
   	int errflg = 0;
   	register int i;
  -	extern int optind;
  -	extern char *optarg;
   
   	progname = argv[0];
   
  
  
  
  1.2       +2 -0      apache-2.0/mpm/src/regex/split.c
  
  Index: split.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/mpm/src/regex/split.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- split.c	1999/06/18 18:39:57	1.1
  +++ split.c	1999/08/06 00:55:42	1.2
  @@ -1,6 +1,8 @@
   #include <stdio.h>
   #include <string.h>
   
  +extern int split(char *, char *[], int, char *);
  +
   /*
    - split - divide a string into fields, like awk split()
    = int split(char *string, char *fields[], int nfields, char *sep);
  
  
  
  1.2       +1 -1      apache-2.0/mpm/src/support/Makefile.tmpl
  
  Index: Makefile.tmpl
  ===================================================================
  RCS file: /home/cvs/apache-2.0/mpm/src/support/Makefile.tmpl,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Makefile.tmpl	1999/06/18 18:39:57	1.1
  +++ Makefile.tmpl	1999/08/06 00:55:45	1.2
  @@ -35,7 +35,7 @@
   	    -e 's%@CFLAGS@%$(CFLAGS)%g' \
   	    -e 's%@CFLAGS_SHLIB@%$(CFLAGS_SHLIB)%g' \
   	    -e 's%@LD_SHLIB@%$(LD_SHLIB)%g' \
  -	    -e 's%@LDFLAGS_SHLIB@%$(LDFLAGS_SHLIB)%g' \
  +	    -e 's%@LDFLAGS_MOD_SHLIB@%$(LDFLAGS_MOD_SHLIB)%g' \
   	    -e 's%@LIBS_SHLIB@%$(LIBS_SHLIB)%g' && chmod a+x apxs
   
   suexec: suexec.o
  
  
  
  1.2       +5 -0      apache-2.0/mpm/src/support/README
  
  Index: README
  ===================================================================
  RCS file: /home/cvs/apache-2.0/mpm/src/support/README,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- README	1999/06/18 18:39:57	1.1
  +++ README	1999/08/06 00:55:46	1.2
  @@ -55,3 +55,8 @@
           see  the  document  `Apache  suEXEC  Support'
   	under http://www.apache.org/docs/suexec.html .
   
  +SHA1
  +	This directory includes some utilities to allow Apache 1.3.6 to 
  +	recognize passwords in SHA1 format, as used by Netscape web 
  +	servers. It is not installed by default.
  +
  
  
  
  1.2       +32 -28    apache-2.0/mpm/src/support/ab.c
  
  Index: ab.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/mpm/src/support/ab.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ab.c	1999/06/18 18:39:58	1.1
  +++ ab.c	1999/08/06 00:55:47	1.2
  @@ -97,7 +97,7 @@
    *   only an issue for loopback usage
    */
   
  -#define VERSION "1.3"
  +#define VERSION "1.3a"
   
   /*  -------------------------------------------------------------------- */
   
  @@ -413,13 +413,15 @@
   	    totalcon += s.ctime;
   	    total += s.time;
   	}
  -	printf("\nConnnection Times (ms)\n");
  -	printf("              min   avg   max\n");
  -	printf("Connect:    %5d %5d %5d\n", mincon, totalcon / requests, maxcon);
  -	printf("Processing: %5d %5d %5d\n",
  -	       mintot - mincon, (total / requests) - (totalcon / requests),
  -	       maxtot - maxcon);
  -	printf("Total:      %5d %5d %5d\n", mintot, total / requests, maxtot);
  +	if (requests > 0) { /* avoid division by zero (if 0 requests) */
  +	    printf("\nConnnection Times (ms)\n");
  +	    printf("              min   avg   max\n");
  +	    printf("Connect:    %5d %5d %5d\n", mincon, totalcon / requests, maxcon);
  +	    printf("Processing: %5d %5d %5d\n",
  +		   mintot - mincon, (total / requests) - (totalcon / requests),
  +		   maxtot - maxcon);
  +	    printf("Total:      %5d %5d %5d\n", mintot, total / requests, maxtot);
  +	}
       }
   }
   
  @@ -521,26 +523,28 @@
   	    total += s.time;
   	}
   
  -	printf("<tr %s><th %s colspan=4>Connnection Times (ms)</th></tr>\n",
  -	       trstring, tdstring);
  -	printf("<tr %s><th %s>&nbsp;</th> <th %s>min</th>   <th %s>avg</th>   <th %s>max</th></tr>\n",
  -	       trstring, tdstring, tdstring, tdstring, tdstring);
  -	printf("<tr %s><th %s>Connect:</th>"
  -	       "<td %s>%5d</td>"
  -	       "<td %s>%5d</td>"
  -	       "<td %s>%5d</td></tr>\n",
  -	       trstring, tdstring, tdstring, mincon, tdstring, totalcon / requests, tdstring, maxcon);
  -	printf("<tr %s><th %s>Processing:</th>"
  -	       "<td %s>%5d</td>"
  -	       "<td %s>%5d</td>"
  -	       "<td %s>%5d</td></tr>\n",
  -	       trstring, tdstring, tdstring, mintot - mincon, tdstring,
  -	       (total / requests) - (totalcon / requests), tdstring, maxtot - maxcon);
  -	printf("<tr %s><th %s>Total:</th>"
  -	       "<td %s>%5d</td>"
  -	       "<td %s>%5d</td>"
  -	       "<td %s>%5d</td></tr>\n",
  -	       trstring, tdstring, tdstring, mintot, tdstring, total / requests, tdstring, maxtot);
  +	if (requests > 0) { /* avoid division by zero (if 0 requests) */
  +	    printf("<tr %s><th %s colspan=4>Connnection Times (ms)</th></tr>\n",
  +		   trstring, tdstring);
  +	    printf("<tr %s><th %s>&nbsp;</th> <th %s>min</th>   <th %s>avg</th>   <th %s>max</th></tr>\n",
  +		   trstring, tdstring, tdstring, tdstring, tdstring);
  +	    printf("<tr %s><th %s>Connect:</th>"
  +		   "<td %s>%5d</td>"
  +		   "<td %s>%5d</td>"
  +		   "<td %s>%5d</td></tr>\n",
  +		   trstring, tdstring, tdstring, mincon, tdstring, totalcon / requests, tdstring, maxcon);
  +	    printf("<tr %s><th %s>Processing:</th>"
  +		   "<td %s>%5d</td>"
  +		   "<td %s>%5d</td>"
  +		   "<td %s>%5d</td></tr>\n",
  +		   trstring, tdstring, tdstring, mintot - mincon, tdstring,
  +		   (total / requests) - (totalcon / requests), tdstring, maxtot - maxcon);
  +	    printf("<tr %s><th %s>Total:</th>"
  +		   "<td %s>%5d</td>"
  +		   "<td %s>%5d</td>"
  +		   "<td %s>%5d</td></tr>\n",
  +		   trstring, tdstring, tdstring, mintot, tdstring, total / requests, tdstring, maxtot);
  +	}
   	printf("</table>\n");
       }
   }
  
  
  
  1.2       +48 -6     apache-2.0/mpm/src/support/apxs.8
  
  Index: apxs.8
  ===================================================================
  RCS file: /home/cvs/apache-2.0/mpm/src/support/apxs.8,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- apxs.8	1999/06/18 18:39:58	1.1
  +++ apxs.8	1999/08/06 00:55:48	1.2
  @@ -56,15 +56,24 @@
   .SH SYNOPSIS
   .B apxs
   .B \-g
  +[
  +.BI \-S " name=value
  +]
   .BI \-n " modname"
   
   .B apxs
   .B \-q
  +[
  +.BI \-S " name=value
  +]
   .IR query " ..."
   
   .B apxs
   .B \-c
   [
  +.BI \-S " name=value
  +]
  +[
   .BI \-o " dsofile"
   ]
   [
  @@ -90,6 +99,25 @@
   .B apxs
   .B \-i
   [
  +.BI \-S " name=value
  +]
  +[
  +.BI \-n " modname"
  +]
  +[
  +.B \-a
  +]
  +[
  +.B \-A
  +]
  +.IR dsofile " ..."
  +
  +.B apxs
  +.B \-e
  +[
  +.BI \-S " name=value
  +]
  +[
   .BI \-n " modname"
   ]
   [
  @@ -219,6 +247,11 @@
   inside your own Makefiles if you need manual access
   to Apache's C header files.
   .PP
  +Configuration options:
  +.TP 12
  +.BI \-S " name=value"
  +This option changes the apxs settings described above.
  +.PP
   Template Generation options:
   .TP 12
   .B \-g
  @@ -289,7 +322,7 @@
   as additional flags to the linker command.
   Use this to add local linker-specific options.
   .PP
  -DSO installation options:
  +DSO installation and configuration options:
   .TP 12
   .B \-i
   This indicates the installation operation and installs one or more
  @@ -299,21 +332,30 @@
   directory.
   .TP 12
   .B \-a
  -This additionally activates the module 
  -by automatically adding a corresponding
  +This activates the module by automatically adding a corresponding
   .B LoadModule
   line to Apache's
   .B httpd.conf
  -configuration file (only if no such entry exists yet).
  +configuration file, or by enabling it if it already exists.
   .TP 12
   .B \-A
   Same as option
   .B \-a
   but the created 
   .B LoadModule
  -directive is
  -prefixed with a hash sign (#), i.e. the module is
  +directive is prefixed with a hash sign (#), i.e. the module is
   just prepared for later activation but initially disabled. 
  +.TP 12
  +.B \-e
  +This indicates the editing operation, which can be used with the
  +.B \-a
  +and
  +.B \-A
  +options similarly to the
  +.B \-i
  +operation to edit Apache's
  +.B httpd.conf
  +configuration file without attempting to install the module.
   .PD
   .SH EXAMPLES
   Assume you have an Apache module named mod_foo.c available which should extend
  
  
  
  1.2       +65 -36    apache-2.0/mpm/src/support/apxs.pl
  
  Index: apxs.pl
  ===================================================================
  RCS file: /home/cvs/apache-2.0/mpm/src/support/apxs.pl,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- apxs.pl	1999/06/18 18:39:58	1.1
  +++ apxs.pl	1999/08/06 00:55:50	1.2
  @@ -68,18 +68,18 @@
   ##  Configuration
   ##
   
  -my $CFG_TARGET        = '@TARGET@';        # substituted via Makefile.tmpl 
  -my $CFG_CC            = '@CC@';            # substituted via Makefile.tmpl
  -my $CFG_CFLAGS        = '@CFLAGS@';        # substituted via Makefile.tmpl
  -my $CFG_CFLAGS_SHLIB  = '@CFLAGS_SHLIB@';  # substituted via Makefile.tmpl
  -my $CFG_LD_SHLIB      = '@LD_SHLIB@';      # substituted via Makefile.tmpl
  -my $CFG_LDFLAGS_SHLIB = '@LDFLAGS_SHLIB@'; # substituted via Makefile.tmpl 
  -my $CFG_LIBS_SHLIB    = '@LIBS_SHLIB@';    # substituted via Makefile.tmpl 
  -my $CFG_PREFIX        = '@prefix@';        # substituted via APACI install
  -my $CFG_SBINDIR       = '@sbindir@';       # substituted via APACI install
  -my $CFG_INCLUDEDIR    = '@includedir@';    # substituted via APACI install
  -my $CFG_LIBEXECDIR    = '@libexecdir@';    # substituted via APACI install
  -my $CFG_SYSCONFDIR    = '@sysconfdir@';    # substituted via APACI install
  +my $CFG_TARGET        = '@TARGET@';            # substituted via Makefile.tmpl 
  +my $CFG_CC            = '@CC@';                # substituted via Makefile.tmpl
  +my $CFG_CFLAGS        = '@CFLAGS@';            # substituted via Makefile.tmpl
  +my $CFG_CFLAGS_SHLIB  = '@CFLAGS_SHLIB@';      # substituted via Makefile.tmpl
  +my $CFG_LD_SHLIB      = '@LD_SHLIB@';          # substituted via Makefile.tmpl
  +my $CFG_LDFLAGS_SHLIB = '@LDFLAGS_MOD_SHLIB@'; # substituted via Makefile.tmpl 
  +my $CFG_LIBS_SHLIB    = '@LIBS_SHLIB@';        # substituted via Makefile.tmpl 
  +my $CFG_PREFIX        = '@prefix@';            # substituted via APACI install
  +my $CFG_SBINDIR       = '@sbindir@';           # substituted via APACI install
  +my $CFG_INCLUDEDIR    = '@includedir@';        # substituted via APACI install
  +my $CFG_LIBEXECDIR    = '@libexecdir@';        # substituted via APACI install
  +my $CFG_SYSCONFDIR    = '@sysconfdir@';        # substituted via APACI install
   
   ##
   ##  Cleanup the above stuff
  @@ -117,6 +117,8 @@
   my @opt_L = ();
   my @opt_l = ();
   my @opt_W = ();
  +my @opt_S = ();
  +my $opt_e = 0;
   my $opt_i = 0;
   my $opt_a = 0;
   my $opt_A = 0;
  @@ -188,27 +190,49 @@
   }
   
   sub usage {
  -    print STDERR "Usage: apxs -g -n <modname>\n";
  -    print STDERR "       apxs -q <query> ...\n";
  -    print STDERR "       apxs -c [-o <dsofile>] [-D <name>[=<value>]] [-I <incdir>]\n";
  -    print STDERR "               [-L <libdir>] [-l <libname>] [-Wc,<flags>] [-Wl,<flags>]\n";
  -    print STDERR "               <files> ...\n";
  -    print STDERR "       apxs -i [-a] [-A] [-n <modname>] <dsofile> ...\n";
  +    print STDERR "Usage: apxs -g [-S <var>=<val>] -n <modname>\n";
  +    print STDERR "       apxs -q [-S <var>=<val>] <query> ...\n";
  +    print STDERR "       apxs -c [-S <var>=<val>] [-o <dsofile>] [-D <name>[=<value>]]\n";
  +    print STDERR "               [-I <incdir>] [-L <libdir>] [-l <libname>] [-Wc,<flags>]\n";
  +    print STDERR "               [-Wl,<flags>] <files> ...\n";
  +    print STDERR "       apxs -i [-S <var>=<val>] [-a] [-A] [-n <modname>] <dsofile> ...\n";
  +    print STDERR "       apxs -e [-S <var>=<val>] [-a] [-A] [-n <modname>] <dsofile> ...\n";
       exit(1);
   }
   
   #   option handling
   my $rc;
  -($rc, @ARGV) = &Getopts("qn:gco:I+D+L+l+W+iaA", @ARGV);
  +($rc, @ARGV) = &Getopts("qn:gco:I+D+L+l+W+S+eiaA", @ARGV);
   &usage if ($rc == 0);
   &usage if ($#ARGV == -1 and not $opt_g);
  -&usage if (not $opt_q and not ($opt_g and $opt_n) and not $opt_i and not $opt_c);
  +&usage if (not $opt_q and not ($opt_g and $opt_n) and not $opt_i and not $opt_c and not $opt_e);
   
   #   argument handling
   my @args = @ARGV;
   my $name = 'unknown';
   $name = $opt_n if ($opt_n ne '');
   
  +if (@opt_S) {
  +    my ($opt_S);
  +    foreach $opt_S (@opt_S) {
  +	if ($opt_S =~ m/^([^=]+)=(.*)$/) {
  +	    my ($var) = $1;
  +	    my ($val) = $2;
  +	    my $oldval = eval "\$CFG_$var";
  +
  +	    unless ($var and $oldval) {
  +		print STDERR "apxs:Error: no config variable $var\n";
  +		&usage;
  +	    }
  +
  +	    eval "\$CFG_${var}=\"${val}\"";
  +	} else {
  +	    print STDERR "apxs:Error: malformatted -S option\n";
  +	    &usage;
  +	}	
  +    }
  +}
  +
   ##
   ##  Operation
   ##
  @@ -358,7 +382,11 @@
       $opt = '';
       my ($opt_Wl, $opt_L, $opt_l);
       foreach $opt_Wl (@opt_W) {
  -        $opt .= " $1" if ($opt_Wl =~ m|^\s*l,(.*)$|);
  +		if($CFG_LD_SHLIB ne "gcc") {
  +	        $opt .= " $1" if ($opt_Wl =~ m|^\s*l,(.*)$|);
  +		} else {
  +	        $opt .= " -W$opt_Wl";
  +		}
       }
       foreach $opt_L (@opt_L) {
           $opt .= " -L$opt_L";
  @@ -374,12 +402,12 @@
       &execute_cmds(@cmds);
   
       #   allow one-step compilation and installation
  -    if ($opt_i) {
  +    if ($opt_i or $opt_e) {
           @args = ( $dso_file );
       }
   }
   
  -if ($opt_i) {
  +if ($opt_i or $opt_e) {
       ##
       ##  SHARED OBJECT INSTALLATION
       ##
  @@ -397,8 +425,10 @@
           }
           my $t = $f;
           $t =~ s|^.+/([^/]+)$|$1|;
  -        push(@cmds, "cp $f $CFG_LIBEXECDIR/$t");
  -        push(@cmds, "chmod 755 $CFG_LIBEXECDIR/$t");
  +        if ($opt_i) {
  +	    push(@cmds, "cp $f $CFG_LIBEXECDIR/$t");
  +	    push(@cmds, "chmod 755 $CFG_LIBEXECDIR/$t");
  +        }
   
           #   determine module symbolname and filename
           my $filename = '';
  @@ -459,29 +489,28 @@
               exit(1);
           }
   
  -        my $update = 0;
           my $lmd;
  +        my $c = '';
  +        $c = '#' if ($opt_A);
           foreach $lmd (@lmd) {
  +            my $what = $opt_A ? "preparing" : "activating";
               if ($content !~ m|\n#?\s*$lmd|) {
  -                 my $c = '';
  -                 $c = '#' if ($opt_A);
                    $content =~ s|^(.*\n#?\s*LoadModule\s+[^\n]+\n)|$1$c$lmd\n|sg;
  -                 $update = 1;
  -                 $lmd =~ m|LoadModule\s+(.+?)_module.*|;
  -                 my $what = $opt_A ? "preparing" : "activating";
  -                 print STDERR "[$what module `$1' in $CFG_SYSCONFDIR/$CFG_TARGET.conf]\n";
  +            } else {
  +                 $content =~ s|^(.*\n)#?\s*$lmd[^\n]*\n|$1$c$lmd\n|sg;
               }
  +            $lmd =~ m|LoadModule\s+(.+?)_module.*|;
  +            print STDERR "[$what module `$1' in $CFG_SYSCONFDIR/$CFG_TARGET.conf]\n";
           }
           my $amd;
           foreach $amd (@amd) {
               if ($content !~ m|\n#?\s*$amd|) {
  -                 my $c = '';
  -                 $c = '#' if ($opt_A);
                    $content =~ s|^(.*\n#?\s*AddModule\s+[^\n]+\n)|$1$c$amd\n|sg;
  -                 $update = 1;
  +            } else {
  +                 $content =~ s|^(.*\n)#?\s*$amd[^\n]*\n|$1$c$amd\n|sg;
               }
           }
  -        if ($update) {
  +        if (@lmd or @amd) {
               open(FP, ">$CFG_SYSCONFDIR/$CFG_TARGET.conf.new") || die;
               print FP $content;
               close(FP);
  
  
  
  1.2       +1 -1      apache-2.0/mpm/src/support/htdigest.c
  
  Index: htdigest.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/mpm/src/support/htdigest.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- htdigest.c	1999/06/18 18:39:58	1.1
  +++ htdigest.c	1999/08/06 00:55:52	1.2
  @@ -70,7 +70,7 @@
   #include <sys/types.h>
   #include "ap.h"
   #include "ap_md5.h"
  -#if defined(MPE) || defined(QNX) || defined(WIN32)
  +#if defined(MPE) || defined(QNX) || defined(WIN32) || defined(__TANDEM)
   #include <signal.h>
   #else
   #include <sys/signal.h>
  
  
  
  1.2       +21 -2     apache-2.0/mpm/src/support/htpasswd.1
  
  Index: htpasswd.1
  ===================================================================
  RCS file: /home/cvs/apache-2.0/mpm/src/support/htpasswd.1,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- htpasswd.1	1999/06/18 18:39:58	1.1
  +++ htpasswd.1	1999/08/06 00:55:52	1.2
  @@ -72,6 +72,9 @@
   ] 
   [
   .B \-m
  +.B \-d
  +.B \-p
  +.B \-s
   ] 
   .I passwdfile
   .I username
  @@ -120,8 +123,23 @@
   Create the \fIpasswdfile\fP. If \fIpasswdfile\fP already exists, it
   is rewritten and truncated.
   .IP \-m 
  -Use MD5 encryption for passwords.  On Windows, this is the only format 
  -supported.
  +Use MD5 encryption for passwords. On Windows and TPF, this is the default.
  +.IP \-d
  +Use crypt() encryption for passwords. The default on all platforms but
  +Windows and TPF. Though possibly supported by
  +.B htpasswd
  +onm all platforms, it is not supported by the
  +.B httpd
  +server on Windows and TPF.
  +.IP \-s
  +Use SHA encryption for passwords. Faciliates migration from/to Netscape
  +servers using the LDAP Directory Interchange Format (ldif).
  +.IP \-p
  +Use plaintext passwords. Though 
  +.B htpasswd
  +will support creation on all platofrms, the
  +.B httpd
  +deamon will only accept plain text passwords on Windows and TPF.
   .IP \fB\fIpasswdfile\fP
   Name of the file to contain the user name and password. If \-c
   is given, this file is created if it does not already exist,
  @@ -192,3 +210,4 @@
   Usernames are limited to 255 bytes and may not include the character ':'.
   .SH SEE ALSO
   .BR httpd(8)
  +and the scripts in support/SHA1 which come with the distribution.
  
  
  
  1.2       +59 -23    apache-2.0/mpm/src/support/htpasswd.c
  
  Index: htpasswd.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/mpm/src/support/htpasswd.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- htpasswd.c	1999/06/18 18:39:58	1.1
  +++ htpasswd.c	1999/08/06 00:55:53	1.2
  @@ -84,6 +84,7 @@
   #include <errno.h>
   #include "ap.h"
   #include "ap_md5.h"
  +#include "ap_sha1.h"
   
   #ifdef WIN32
   #include <conio.h>
  @@ -100,8 +101,10 @@
   #endif /*CHARSET_EBCDIC*/
   
   #define MAX_STRING_LEN 256
  +#define ALG_PLAIN 0
   #define ALG_CRYPT 1
   #define ALG_APMD5 2
  +#define ALG_APSHA 3 
   
   #define ERR_FILEPERM 1
   #define ERR_SYNTAX 2
  @@ -149,19 +152,6 @@
       fputc('\n', f);
   }
   
  -
  -/* From local_passwd.c (C) Regents of Univ. of California blah blah */
  -static unsigned char itoa64[] =	/* 0 ... 63 => ascii - 64 */
  -    "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
  -
  -static void to64(register char *s, register long v, register int n)
  -{
  -    while (--n >= 0) {
  -	*s++ = itoa64[v & 0x3f];
  -	v >>= 6;
  -    }
  -}
  -
   /*
    * Make a password record from the given information.  A zero return
    * indicates success; failure means that the output buffer contains an
  @@ -172,9 +162,9 @@
   {
       char *pw;
       char cpw[120];
  -    char salt[9];
       char pwin[MAX_STRING_LEN];
       char pwv[MAX_STRING_LEN];
  +    char salt[9];
   
       if (passwd != NULL) {
   	pw = passwd;
  @@ -191,20 +181,39 @@
   	    return ERR_PWMISMATCH;
   	}
   	pw = pwin;
  +        bzero(pwv,sizeof(pwin));
       }
  -    (void) srand((int) time((time_t *) NULL));
  -    to64(&salt[0], rand(), 8);
  -    salt[8] = '\0';
  -
       switch (alg) {
  -    case ALG_APMD5:
  +
  +    case ALG_APSHA:
  +	/* XXX cpw >= 28 + strlen(sha1) chars - fixed len SHA */
  + 	ap_sha1_base64(pw,strlen(pw),cpw);
  +	break;
  +
  +    case ALG_APMD5: 
  +        (void) srand((int) time((time_t *) NULL));
  +        ap_to64(&salt[0], rand(), 8);
  +        salt[8] = '\0';
  +
   	ap_MD5Encode((const unsigned char *)pw, (const unsigned char *)salt,
   		     cpw, sizeof(cpw));
   	break;
  +
  +    case ALG_PLAIN:
  +	/* XXX this len limitation is not in sync with any HTTPd len. */
  +	ap_cpystrn(cpw,pw,sizeof(cpw));
  +	break;
  +
       case ALG_CRYPT:
  +    default:
  +        (void) srand((int) time((time_t *) NULL));
  +        ap_to64(&salt[0], rand(), 8);
  +        salt[8] = '\0';
  +
   	ap_cpystrn(cpw, (char *)crypt(pw, salt), sizeof(cpw) - 1);
   	break;
       }
  +    bzero(pw,strlen(pw));
   
       /*
        * Check to see if the buffer is large enough to hold the username,
  @@ -223,13 +232,25 @@
   static int usage(void)
   {
       fprintf(stderr, "Usage:\n");
  -    fprintf(stderr, "\thtpasswd [-cm] passwordfile username\n");
  -    fprintf(stderr, "\thtpasswd -b[cm] passwordfile username password\n\n");
  +    fprintf(stderr, "\thtpasswd [-cmdps] passwordfile username\n");
  +    fprintf(stderr, "\thtpasswd -b[cmdps] passwordfile username password\n\n");
       fprintf(stderr, " -c  Create a new file.\n");
  -    fprintf(stderr, " -m  Force MD5 encryption of the password.\n");
  +    fprintf(stderr, " -m  Force MD5 encryption of the password"
  +#if defined(WIN32) || defined(TPF)
  +	" (default)"
  +#endif
  +	".\n");
  +    fprintf(stderr, " -d  Force CRYPT encryption of the password"
  +#if (!(defined(WIN32) || defined(TPF)))
  +	" (default)"
  +#endif
  +	".\n");
  +    fprintf(stderr, " -p  Force NO encryption of the password.\n");
  +    fprintf(stderr, " -s  Force SHA encryption of the password.\n");
       fprintf(stderr, " -b  Use the password from the command line rather ");
       fprintf(stderr, "than prompting for it.\n");
  -    fprintf(stderr, "On Windows systems the -m flag is used by default.\n");
  +    fprintf(stderr, "On Windows and TPF systems the '-m' flag is used by default.\n");
  +    fprintf(stderr, "On all other systems, the '-p' will propably not work.\n");
       return ERR_SYNTAX;
   }
   
  @@ -356,6 +377,15 @@
   	    else if (*arg == 'm') {
   		alg = ALG_APMD5;
   	    }
  +	    else if (*arg == 's') {
  +		alg = ALG_APSHA;
  +	    }
  +	    else if (*arg == 'p') {
  +		alg = ALG_PLAIN;
  +	    }
  +	    else if (*arg == 'd') {
  +		alg = ALG_CRYPT;
  +	    }
   	    else if (*arg == 'b') {
   		noninteractive++;
   		args_left++;
  @@ -406,6 +436,12 @@
       }
   #endif
   
  +#if (!(defined(WIN32) || defined(TPF)))
  +    if (alg == ALG_PLAIN) {
  +	fprintf(stderr,"Warning: storing passwords as plain text might "
  +		"just not work on this platform.\n");
  +    }
  +#endif
       /*
        * Verify that the file exists if -c was omitted.  We give a special
        * message if it doesn't.
  
  
  
  1.2       +1 -1      apache-2.0/mpm/src/support/httpd.8
  
  Index: httpd.8
  ===================================================================
  RCS file: /home/cvs/apache-2.0/mpm/src/support/httpd.8,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- httpd.8	1999/06/18 18:39:58	1.1
  +++ httpd.8	1999/08/06 00:55:54	1.2
  @@ -97,7 +97,7 @@
   .B httpd
   is the Apache HyperText Transfer Protocol (HTTP) server program. It is
   designed to be run as a standalone daemon process. When used like this
  -is will create a pool of child processes to handle requests. To stop
  +it will create a pool of child processes to handle requests. To stop
   it, send a TERM signal to the initial (parent) process. The PID of
   this process is written to a file as given in the configuration file.
   Alternatively 
  
  
  
  1.2       +35 -2     apache-2.0/mpm/src/support/httpd.exp
  
  Index: httpd.exp
  ===================================================================
  RCS file: /home/cvs/apache-2.0/mpm/src/support/httpd.exp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- httpd.exp	1999/06/18 18:39:58	1.1
  +++ httpd.exp	1999/08/06 00:55:54	1.2
  @@ -101,6 +101,7 @@
   ap_exists_config_define
   ap_exists_scoreboard_image
   ap_extended_status
  +ap_field_noparam
   ap_finalize_request_protocol
   ap_finalize_sub_req_protocol
   ap_find_command
  @@ -205,7 +206,6 @@
   ap_open_logs
   ap_open_piped_log
   ap_os_escape_path
  -ap_os_is_filename_valid
   ap_os_is_path_absolute
   ap_overlay_tables
   ap_overlap_tables
  @@ -312,7 +312,6 @@
   ap_show_modules
   ap_signal
   ap_single_module_configure
  -ap_single_module_init
   ap_size_list_item
   ap_slack
   ap_snprintf
  @@ -364,3 +363,37 @@
   ap_vsnprintf
   core_module
   top_module
  +XML_DefaultCurrent
  +XML_ErrorString
  +XML_ExternalEntityParserCreate
  +XML_GetBase
  +XML_GetBuffer
  +XML_GetCurrentByteCount
  +XML_GetCurrentByteIndex
  +XML_GetCurrentColumnNumber
  +XML_GetCurrentLineNumber
  +XML_GetErrorCode
  +XML_GetSpecifiedAttributeCount
  +XML_Parse
  +XML_ParseBuffer
  +XML_ParserCreate
  +XML_ParserCreateNS
  +XML_ParserFree
  +XML_SetBase
  +XML_SetCdataSectionHandler
  +XML_SetCharacterDataHandler
  +XML_SetCommentHandler
  +XML_SetDefaultHandler
  +XML_SetDefaultHandlerExpand
  +XML_SetElementHandler
  +XML_SetEncoding
  +XML_SetExternalEntityRefHandler
  +XML_SetExternalEntityRefHandlerArg
  +XML_SetNamespaceDeclHandler
  +XML_SetNotStandaloneHandler
  +XML_SetNotationDeclHandler
  +XML_SetProcessingInstructionHandler
  +XML_SetUnknownEncodingHandler
  +XML_SetUnparsedEntityDeclHandler
  +XML_SetUserData
  +XML_UseParserAsHandlerArg
  
  
  
  1.2       +1 -0      apache-2.0/mpm/src/support/suexec.c
  
  Index: suexec.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/mpm/src/support/suexec.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- suexec.c	1999/06/18 18:39:58	1.1
  +++ suexec.c	1999/08/06 00:55:55	1.2
  @@ -145,6 +145,7 @@
       "SCRIPT_URL",
       "SERVER_ADMIN",
       "SERVER_NAME",
  +    "SERVER_ADDR",
       "SERVER_PORT",
       "SERVER_PROTOCOL",
       "SERVER_SOFTWARE",
  
  
  
  1.1                  apache-2.0/mpm/src/support/SHA1/README.sha1
  
  Index: README.sha1
  ===================================================================
  This directory includes some utilities to allow Apache 1.3.6 to 
  recognize passwords in SHA1 format, as used by Netscape web servers.  
  
  From Netscape's admin interface, export the password database to an 
  ldif file and then use convert.pl in this distribution to generate 
  apache style password files.  
  
  Note: SHA1 support is useful for migration purposes, but is less
        secure than Apache's password format, since Apache's (MD5)
        password format uses a random eight character salt to generate
        one of many possible hashes for the same password.  Netscape
        uses plain SHA1 without a salt, so the same password
        will always generate the same hash, making it easier
        to break since the search space is smaller.
  
  This code was contributed by Clinton Wong <cl...@netcom.com>.
  
  README.sha1 
  	this file
  
  convert-sha1.pl 
  	takes an ldif dump from Netscape's web server on
          standard in, outputs apache htpasswd format on standard out.
  
          Usage: convert.pl < ldif > passwords
  
  htpasswd-sha1.pl
  	perl script to generate entries in apache htpasswd format.
  
         	Usage: htpasswd-sha1.pl some_user some_password
  
  ldif-sha1.example
  	sample ldif dump with one sha1 password and one crypt password.
  
  
  
  
  1.1                  apache-2.0/mpm/src/support/SHA1/convert-sha1.pl
  
  Index: convert-sha1.pl
  ===================================================================
  #!/usr/bin/perl -w
  use strict;
  
  # This is public domain code.  Do whatever you want with it.
  # It was originally included in Clinton Wong's Apache 1.3.6 SHA1/ldif
  # patch distribution as sample code for converting accounts from
  # ldif format (as used by Netscape web servers) to Apache password format.
  
  my $uid='';
  my $passwd='';
  
  while (my $line = <>) {
    chomp $line;
    if ( $line =~ /uid:\s*(.+)/) { $uid = $1 }
    if ( $line =~ /userpassword:\s*(\{\w+\}.+)/) {
      $passwd = $1;
      $passwd =~ s/^\{crypt\}//i;  # Apache stores crypt without a magic string
    }
  
    if (length($line)==0) {
  
      if (length $uid and length $passwd) {
        print $uid, ':', $passwd, "\n";
      } # output if we have something to print
  
      $uid = '';
      $passwd = '';
  
    } # if newline
  } # while something to read
  
  # handle last entry if there isn't a newline before EOF
      if (length $uid and length $passwd) {
    print $uid, ':', $passwd, "\n";
  }
  
  
  
  
  1.1                  apache-2.0/mpm/src/support/SHA1/htpasswd-sha1.pl
  
  Index: htpasswd-sha1.pl
  ===================================================================
  #!/usr/bin/perl -w
  use strict;
  #
  # Utility which takes a username and password
  # on the command line and generates a username
  # sha1-encrytped password on the stdout.
  # 
  # Typical useage:
  # 	./htpasswd-sha1.pl dirkx MySecret >> sha1-passwd
  #
  # This is public domain code.  Do whatever you want with it.
  # It was originally included in Clinton Wong's Apache 1.3.6 SHA1/ldif
  # patch distribution as sample code for generating entries for
  # Apache password files using SHA1.
  
  use MIME::Base64;  # http://www.cpan.org/modules/by-module/MIME/
  use Digest::SHA1;  # http://www.cpan.org/modules/by-module/MD5/
  
  if ($#ARGV!=1) { die "Usage $0: user password\n" }
  
  print $ARGV[0], ':{SHA}', encode_base64( Digest::SHA1::sha1($ARGV[1]) );
  
  
  
  
  1.1                  apache-2.0/mpm/src/support/SHA1/ldif-sha1.example
  
  Index: ldif-sha1.example
  ===================================================================
  dn: cn=someuser
  cn: someuser
  sn: someuser
  objectclass: top
  objectclass: person
  objectclass: organizationalPerson
  objectclass: inetOrgPerson
  uid: someuser
  userpassword: {SHA}GvF+c3IdvgxAARuC7Uuxp9vjzik=
  
  dn: cn=anotheruser
  cn: anotheruser
  sn: anotheruser
  objectclass: top
  objectclass: person
  objectclass: organizationalPerson
  objectclass: inetOrgPerson
  uid: anotheruser
  userpassword: {crypt}eFnp.4sz5XnH6