Software Package:       
        squid

Release/Version:
        1.0.5

Retrieved from:
        ftp://www.nlanr.net/Software/Squid/squid-1.0.5-src.tar.gz
		http://www.nlanr.net/Squid/1.0.5/icp.c.patch

Bug reports:
        This software package is maintained by the software authors,
        not BSDI.  Please send any bug reports to both support@BSDI.COM
        and squid-bugs@nlanr.net

Comments:

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Modifications to this version made by BSDI:

diff -c -r squid-1.0.5.orig/CONTRIBUTORS squid-1.0.5/CONTRIBUTORS
*** squid-1.0.5.orig/CONTRIBUTORS	Fri Jul  5 16:22:52 1996
--- squid-1.0.5/CONTRIBUTORS	Fri Aug  2 11:18:32 1996
***************
*** 15,21 ****
  	Ansgar Hockmann <Ansgar.Hockmann@hrz.uni-dortmund.de>
  	Joe Ramey <ramey@jello.csc.ti.com>
  	Kolics Bertold <bertold@tohotom.vein.hu>
! 	Doug Urner <dlu@wobble.albatross.com>
  	Markus Gyger <mgyger@itr.ch>
  	Richard Huveneers <Richard.Huveneers@hekkihek.hacom.nl>
  	Markus Stumpf <maex@Space.NET>
--- 15,21 ----
  	Ansgar Hockmann <Ansgar.Hockmann@hrz.uni-dortmund.de>
  	Joe Ramey <ramey@jello.csc.ti.com>
  	Kolics Bertold <bertold@tohotom.vein.hu>
! 	Doug Urner <dlu@bsdi.com>
  	Markus Gyger <mgyger@itr.ch>
  	Richard Huveneers <Richard.Huveneers@hekkihek.hacom.nl>
  	Markus Stumpf <maex@Space.NET>
diff -c -r squid-1.0.5.orig/Makefile squid-1.0.5/Makefile
*** squid-1.0.5.orig/Makefile	Wed May  1 16:46:32 1996
--- squid-1.0.5/Makefile	Mon Aug  5 09:27:05 1996
***************
*** 3,10 ****
  # $Id: Makefile,v 1.4.2.1 1996/05/01 23:46:32 wessels Exp $
  #
  
! prefix		= /usr/local/squid
! exec_prefix     = '$${prefix}'
  
  SHELL		= /bin/sh
  
--- 3,10 ----
  # $Id: Makefile,v 1.4.2.1 1996/05/01 23:46:32 wessels Exp $
  #
  
! prefix		= /var/www/squid
! exec_prefix     = /usr/contrib
  
  SHELL		= /bin/sh
  
***************
*** 22,26 ****
  
  makefile: makefile.in Makefile
  	@echo Running configure script to generate makefile
! 	./configure --prefix=${prefix} --exec_prefix=${exec_prefix}
  # DO NOT DELETE
--- 22,32 ----
  
  makefile: makefile.in Makefile
  	@echo Running configure script to generate makefile
! 	CC=shlicc2 ./configure                 \
! 		--prefix=${prefix}                 \
! 		--exec_prefix=${exec_prefix}       \
! 		--localstatedir=/var/log/squid     \
! 		--sysconfdir=/var/www/conf         \
! 		--libexecdir=${prefix}/bin
! 
  # DO NOT DELETE
diff -c -r squid-1.0.5.orig/configure squid-1.0.5/configure
*** squid-1.0.5.orig/configure	Wed Jul 24 10:04:37 1996
--- squid-1.0.5/configure	Sat Aug  3 11:57:32 1996
***************
*** 569,575 ****
  
  if test "$libexecdir" = '${exec_prefix}/libexec'; then
  	libexecdir='${bindir}'
! 	localstatedir='${prefix}'
  
  fi
  
--- 569,575 ----
  
  if test "$libexecdir" = '${exec_prefix}/libexec'; then
  	libexecdir='${bindir}'
! 	localstatedir='${prefix}/logs'
  
  fi
  
***************
*** 675,681 ****
  
  
  XXXCC=`echo $CC | awk '{print $1}'`
! if test "`basename $XXXCC`" != "gcc"; then
          echo '**************************************************************';
          echo '**************************************************************';
          echo '**';
--- 675,684 ----
  
  
  XXXCC=`echo $CC | awk '{print $1}'`
! if test "`basename $XXXCC`" != "gcc" -a    \
! 	    "`basename $XXXCC`" != "shlicc" -a \
! 	    "`basename $XXXCC`" != "shlicc2"
! then
          echo '**************************************************************';
          echo '**************************************************************';
          echo '**';
diff -c -r squid-1.0.5.orig/include/config.h.in squid-1.0.5/include/config.h.in
*** squid-1.0.5.orig/include/config.h.in	Mon Jul  8 12:03:10 1996
--- squid-1.0.5/include/config.h.in	Fri Aug  2 11:24:08 1996
***************
*** 87,92 ****
--- 87,94 ----
  #define _SQUID_NEXT_
  #elif defined(__bsdi__)
  #define _SQUID_BSDI_                          /* BSD/OS */
+ #undef  SQUID_FD_SETSIZE
+ #define SQUID_FD_SETSIZE 4096
  #endif
  
  #if !defined(CACHE_HTTP_PORT)
diff -c -r squid-1.0.5.orig/lib/log.c squid-1.0.5/lib/log.c
*** squid-1.0.5.orig/lib/log.c	Mon Jul  8 11:37:58 1996
--- squid-1.0.5/lib/log.c	Fri Aug  2 11:25:50 1996
***************
*** 108,113 ****
--- 108,116 ----
  #if HAVE_STDIO_H
  #include <stdio.h>
  #endif
+ #if HAVE_STDLIB_H
+ #include <stdlib.h>
+ #endif
  #if HAVE_STRING_H
  #include <string.h>
  #endif
diff -c -r squid-1.0.5.orig/makefile.in squid-1.0.5/makefile.in
*** squid-1.0.5.orig/makefile.in	Tue May  7 09:51:16 1996
--- squid-1.0.5/makefile.in	Mon Aug  5 11:00:25 1996
***************
*** 14,29 ****
  prefix		= @prefix@
  exec_prefix	= @exec_prefix@
  
! SUBDIRS		= lib scripts src
  
  noargs: all
  
! all install clean: 
  	@for dir in $(SUBDIRS); do \
  		echo "Making $@ in $$dir..."; \
  		(cd $$dir ; $(MAKE) $(MFLAGS) prefix="$(prefix)" $@); \
  	done
  
  
  realclean: clean
  	rm -f config.status config.cache config.log makefile
--- 14,41 ----
  prefix		= @prefix@
  exec_prefix	= @exec_prefix@
  
! SUBDIRS		= lib src
  
  noargs: all
  
! all clean: 
  	@for dir in $(SUBDIRS); do \
  		echo "Making $@ in $$dir..."; \
  		(cd $$dir ; $(MAKE) $(MFLAGS) prefix="$(prefix)" $@); \
  	done
  
+ install: 
+ 	@for dir in $(SUBDIRS); do \
+ 		echo "Making $@ in $$dir..."; \
+ 		(cd $$dir ; $(MAKE) $(MFLAGS) prefix="$(prefix)" $@); \
+ 	done
+ 	nroff -mdoc man/cachemgr.cgi.8 > /usr/share/man/cat8/cachemgr.cgi.0
+ 	chown bin.bin /usr/share/man/cat8/cachemgr.cgi.0
+ 	chmod 444 /usr/share/man/cat8/cachemgr.cgi.0
+ 	nroff -mdoc man/squid.8 > /usr/share/man/cat8/squid.0
+ 	chown bin.bin /usr/share/man/cat8/squid.0
+ 	chmod 444 /usr/share/man/cat8/squid.0
+ 	chown -R www.www @prefix@ @localstatedir@
  
  realclean: clean
  	rm -f config.status config.cache config.log makefile
***************
*** 33,35 ****
--- 45,48 ----
  		(cd $$dir; $(MAKE) $(MFLAGS) prefix="$(prefix)" $@); \
  	done
  
+ depend:
Only in squid-1.0.5: man
diff -c -r squid-1.0.5.orig/src/Makefile.in squid-1.0.5/src/Makefile.in
*** squid-1.0.5.orig/src/Makefile.in	Fri Jun 21 08:14:44 1996
--- squid-1.0.5/src/Makefile.in	Mon Aug  5 10:58:59 1996
***************
*** 21,31 ****
  DEFAULT_CONFIG_FILE     = $(sysconfdir)/squid.conf
  DEFAULT_FTPGET          = $(libexecdir)/ftpget
  DEFAULT_DNSSERVER       = $(libexecdir)/dnsserver
! DEFAULT_CACHE_LOG       = $(localstatedir)/logs/cache.log
! DEFAULT_ACCESS_LOG      = $(localstatedir)/logs/access.log
! DEFAULT_HIERARCHY_LOG   = $(localstatedir)/logs/hierarchy.log
! DEFAULT_STORE_LOG       = $(localstatedir)/logs/store.log
! DEFAULT_SWAP_DIR        = $(localstatedir)/cache
  
  CC		= @CC@
  INSTALL		= @INSTALL@
--- 21,31 ----
  DEFAULT_CONFIG_FILE     = $(sysconfdir)/squid.conf
  DEFAULT_FTPGET          = $(libexecdir)/ftpget
  DEFAULT_DNSSERVER       = $(libexecdir)/dnsserver
! DEFAULT_CACHE_LOG       = $(localstatedir)/cache.log
! DEFAULT_ACCESS_LOG      = $(localstatedir)/access.log
! DEFAULT_HIERARCHY_LOG   = $(localstatedir)/hierarchy.log
! DEFAULT_STORE_LOG       = $(localstatedir)/store.log
! DEFAULT_SWAP_DIR        = @prefix@/cache
  
  CC		= @CC@
  INSTALL		= @INSTALL@
***************
*** 49,56 ****
  LIBS		= -L../lib -lregex -lmiscutil $(XTRA_LIBS)
  CLIENT_LIBS	= -L../lib -lmiscutil $(XTRA_LIBS)
  
! PROGS           = squid client
! UTILS           = dnsserver ftpget
  CGIPROGS	= cachemgr.cgi
  OBJS	 	= acl.o background.o cache_cf.o errorpage.o comm.o \
  		debug.o disk.o dynamic_array.o \
--- 49,56 ----
  LIBS		= -L../lib -lregex -lmiscutil $(XTRA_LIBS)
  CLIENT_LIBS	= -L../lib -lmiscutil $(XTRA_LIBS)
  
! PROGS           = squid
! UTILS           = client dnsserver ftpget
  CGIPROGS	= cachemgr.cgi
  OBJS	 	= acl.o background.o cache_cf.o errorpage.o comm.o \
  		debug.o disk.o dynamic_array.o \
***************
*** 76,82 ****
  squid:	$(OBJS)
  	$(CC) -o $@ $(LDFLAGS) $(OBJS) $(CRYPT_LIB) $(LIBS)
  
! cache_cf.o: cache_cf.c
  	$(CC) -c $< $(CFLAGS) $(DEFAULTS)
  
  client:	client.o
--- 76,82 ----
  squid:	$(OBJS)
  	$(CC) -o $@ $(LDFLAGS) $(OBJS) $(CRYPT_LIB) $(LIBS)
  
! cache_cf.o: cache_cf.c Makefile
  	$(CC) -c $< $(CFLAGS) $(DEFAULTS)
  
  client:	client.o
***************
*** 91,97 ****
  ftpget: ftpget.o
  	$(CC) -o $@ $(LDFLAGS) ftpget.o $(LIBS)
  
! squid.conf: squid.conf.pre
  	sed "\
  	s%@DEFAULT_CONFIG_FILE@%$(DEFAULT_CONFIG_FILE)%g;\
  	s%@DEFAULT_FTPGET@%$(DEFAULT_FTPGET)%g;\
--- 91,97 ----
  ftpget: ftpget.o
  	$(CC) -o $@ $(LDFLAGS) ftpget.o $(LIBS)
  
! squid.conf: squid.conf.pre Makefile
  	sed "\
  	s%@DEFAULT_CONFIG_FILE@%$(DEFAULT_CONFIG_FILE)%g;\
  	s%@DEFAULT_FTPGET@%$(DEFAULT_FTPGET)%g;\
***************
*** 100,106 ****
  	s%@DEFAULT_ACCESS_LOG@%$(DEFAULT_ACCESS_LOG)%g;\
  	s%@DEFAULT_HIERARCHY_LOG@%$(DEFAULT_HIERARCHY_LOG)%g;\
  	s%@DEFAULT_STORE_LOG@%$(DEFAULT_STORE_LOG)%g;\
! 	s%@DEFAULT_SWAP_DIR@%$(DEFAULT_SWAP_DIR)%g" <$? >$@
  
  install-mkdirs:
  	-@if test ! -d $(prefix); then \
--- 100,106 ----
  	s%@DEFAULT_ACCESS_LOG@%$(DEFAULT_ACCESS_LOG)%g;\
  	s%@DEFAULT_HIERARCHY_LOG@%$(DEFAULT_HIERARCHY_LOG)%g;\
  	s%@DEFAULT_STORE_LOG@%$(DEFAULT_STORE_LOG)%g;\
! 	s%@DEFAULT_SWAP_DIR@%$(DEFAULT_SWAP_DIR)%g" < squid.conf.pre >$@
  
  install-mkdirs:
  	-@if test ! -d $(prefix); then \
***************
*** 126,135 ****
  	-@if test ! -d $(localstatedir); then \
  		echo "mkdir $(localstatedir)"; \
  		mkdir $(localstatedir); \
- 	fi
- 	-@if test ! -d $(localstatedir)/logs; then \
- 		echo "mkdir $(localstatedir)/logs"; \
- 		mkdir $(localstatedir)/logs; \
  	fi
  
  install: all install-mkdirs
--- 126,131 ----
diff -c -r squid-1.0.5.orig/src/debug.c squid-1.0.5/src/debug.c
*** squid-1.0.5.orig/src/debug.c	Mon Jul  8 11:30:52 1996
--- squid-1.0.5/src/debug.c	Fri Aug  2 12:13:42 1996
***************
*** 108,114 ****
  char *_db_file = __FILE__;
  int _db_line = 0;
  
! int syslog_enable = 0;
  FILE *debug_log = NULL;
  static char *debug_log_file = NULL;
  static time_t last_squid_curtime = 0;
--- 108,114 ----
  char *_db_file = __FILE__;
  int _db_line = 0;
  
! int syslog_enable = 0;			/* Disable logging via syslog() by default. */
  FILE *debug_log = NULL;
  static char *debug_log_file = NULL;
  static time_t last_squid_curtime = 0;
diff -c -r squid-1.0.5.orig/src/icp.c squid-1.0.5/src/icp.c
*** squid-1.0.5.orig/src/icp.c	Fri Aug  2 10:55:42 1996
--- squid-1.0.5/src/icp.c	Fri Aug  2 14:38:11 1996
***************
*** 1597,1603 ****
  		inet_ntoa(icpState->me.sin_addr),
  		getAccelPort(),
  		request);
! 	    debug(12, 0, "VHOST REWRITE: '%s'\n", icpState->url);
  	}
  	BIT_SET(icpState->flags, REQ_ACCEL);
      } else {
--- 1597,1603 ----
  		inet_ntoa(icpState->me.sin_addr),
  		getAccelPort(),
  		request);
! 	    debug(12, 5, "VHOST REWRITE: '%s'\n", icpState->url);
  	}
  	BIT_SET(icpState->flags, REQ_ACCEL);
      } else {
diff -c -r squid-1.0.5.orig/src/main.c squid-1.0.5/src/main.c
*** squid-1.0.5.orig/src/main.c	Thu Jul 25 09:18:34 1996
--- squid-1.0.5/src/main.c	Sat Aug  3 12:17:17 1996
***************
*** 141,152 ****
  {
      fprintf(stderr, "\
  Usage: %s [-hsvzCDFRUVY] [-f config-file] [-[au] port]\n\
!        -a port   Specify ASCII port number (default: %d).\n\
         -f file   Use given config-file instead of\n\
                   %s\n\
         -h        Print help message.\n\
         -s        Enable logging to syslog.\n\
!        -u port   Specify UDP port number (default: %d), disable with 0.\n\
         -v        Print version.\n\
         -z        Zap disk storage -- deletes all objects in disk cache.\n\
         -C        Do not catch fatal signals.\n\
--- 141,152 ----
  {
      fprintf(stderr, "\
  Usage: %s [-hsvzCDFRUVY] [-f config-file] [-[au] port]\n\
!        -a port   Specify HTTP port number (default: %d).\n\
         -f file   Use given config-file instead of\n\
                   %s\n\
         -h        Print help message.\n\
         -s        Enable logging to syslog.\n\
!        -u port   Specify ICP port number (default: %d), disable with 0.\n\
         -v        Print version.\n\
         -z        Zap disk storage -- deletes all objects in disk cache.\n\
         -C        Do not catch fatal signals.\n\
***************
*** 211,217 ****
  	    fatal("Need to add -DMALLOC_DBG when compiling to use -m option");
  #endif
  	case 's':
! 	    syslog_enable = 0;
  	    break;
  	case 'u':
  	    icpPortNumOverride = atoi(optarg);
--- 211,217 ----
  	    fatal("Need to add -DMALLOC_DBG when compiling to use -m option");
  #endif
  	case 's':
! 	    syslog_enable = 1;
  	    break;
  	case 'u':
  	    icpPortNumOverride = atoi(optarg);
***************
*** 263,268 ****
--- 263,272 ----
      debug(21, 1, "Waiting %d seconds for active connections to finish\n",
  	getShutdownLifetime());
      shutdown_pending = 1;
+ #if SA_RESETHAND == 0
+     signal(SIGTERM, SIG_DFL);
+     signal(SIGINT, SIG_DFL);
+ #endif
  }
  
  void serverConnectionsOpen()
***************
*** 505,513 ****
      fd_note(0, "STDIN");
      fd_note(1, "STDOUT");
      fd_note(2, "STDERR");
- 
-     /* enable syslog by default */
-     syslog_enable = 0;
  
      /* preinit for debug module */
      debug_log = stderr;
--- 509,514 ----
diff -c -r squid-1.0.5.orig/src/objcache.c squid-1.0.5/src/objcache.c
*** squid-1.0.5.orig/src/objcache.c	Mon Jul  8 11:31:03 1996
--- squid-1.0.5/src/objcache.c	Mon Aug  5 09:54:03 1996
***************
*** 119,125 ****
  } ObjectCacheData;
  
  /* user name for shutdown password in /etc/passwd */
! char *username = "cache";
  
  
  /* Parse a object_cache url into components.  By Anawat. */
--- 119,125 ----
  } ObjectCacheData;
  
  /* user name for shutdown password in /etc/passwd */
! char *username = "squid";
  
  
  /* Parse a object_cache url into components.  By Anawat. */
diff -c -r squid-1.0.5.orig/src/squid.conf.pre.in squid-1.0.5/src/squid.conf.pre.in
*** squid-1.0.5.orig/src/squid.conf.pre.in	Mon Jul  1 13:54:04 1996
--- squid-1.0.5/src/squid.conf.pre.in	Sat Aug  3 13:21:22 1996
***************
*** 305,311 ****
  
  #  TAG: pid_filename
  #	A pathname to write the process-id to.  There is no default.
! #pid_filename /tmp/squid.pid
  
  #  TAG: debug_options
  #	Logging options are set as section,level where each source file
--- 305,311 ----
  
  #  TAG: pid_filename
  #	A pathname to write the process-id to.  There is no default.
! pid_filename /var/run/squid.pid
  
  #  TAG: debug_options
  #	Logging options are set as section,level where each source file
***************
*** 452,461 ****
  #	        Regular Expression      TTL in        the object's age
  #	        matching URLs           minutes       %age   Max (minutes)
  # ---------     ---------------------   -----------   ------ ------------
! #ttl_pattern    ^http://                    1440        20%      43200
! #ttl_pattern    ^ftp://                    10080        20%      43200
! #ttl_pattern    \.gif$                      2880        50%      43200
! #ttl_pattern    /cgi-bin/                      0         0%      43200
  
  
  #  TAG: quick_abort
--- 452,461 ----
  #	        Regular Expression      TTL in        the object's age
  #	        matching URLs           minutes       %age   Max (minutes)
  # ---------     ---------------------   -----------   ------ ------------
! ttl_pattern    ^http://                    1440        20%      43200
! ttl_pattern    ^ftp://                    10080        20%      43200
! ttl_pattern    \.gif$                      2880        50%      43200
! ttl_pattern    /cgi-bin/                      0         0%      43200
  
  
  #  TAG: quick_abort
***************
*** 622,628 ****
  #	UID/GID to the UID/GID specified below.  The default is not to
  #	change UID/GID.
  #
! #cache_effective_user nobody nogroup
  
  #  TAG: visible_hostname
  #	If you want to present a special hostname in error messages, etc,
--- 622,628 ----
  #	UID/GID to the UID/GID specified below.  The default is not to
  #	change UID/GID.
  #
! cache_effective_user www www
  
  #  TAG: visible_hostname
  #	If you want to present a special hostname in error messages, etc,
***************
*** 687,692 ****
--- 687,695 ----
  #	If you want to run cached as an httpd accelerator, define the
  #	host name and port number where the real HTTP server is.
  #httpd_accel your.real.httpd.host your.real.httpd.port
+ #	In virtual host mode all of the real HTTP servers must be local
+ #	to this machine and running on the same port.
+ #httpd_accel * your.real.httpd.port
  
  #  TAG: httpd_accel_with_proxy
  #	If you want to use cached as both a local httpd accelerator
diff -c -r squid-1.0.5.orig/src/squid.h squid-1.0.5/src/squid.h
*** squid-1.0.5.orig/src/squid.h	Thu Jul 25 14:43:45 1996
--- squid-1.0.5/src/squid.h	Sat Aug  3 14:09:34 1996
***************
*** 161,181 ****
  #define BUFSIZ  4096		/* make reasonable guess */
  #endif
  
  #ifndef SA_RESTART
  #define SA_RESTART 0
  #endif
  #ifndef SA_NODEFER
  #define SA_NODEFER 0
  #endif
- 
  #ifndef SA_RESETHAND
! #ifdef SA_ONESHOT
! #define SA_RESETHAND SA_ONESHOT
! #else
! #define SA_RESETHAND 0
! #define HAVE_SIGACTION 0
! #endif /* SA_ONESHOT */
  #endif /* SA_RESETHAND */
  
  typedef struct sentry StoreEntry;
  typedef struct mem_hdr *mem_ptr;
--- 161,183 ----
  #define BUFSIZ  4096		/* make reasonable guess */
  #endif
  
+ #ifdef HAVE_SIGACTION
+ 
  #ifndef SA_RESTART
  #define SA_RESTART 0
  #endif
  #ifndef SA_NODEFER
  #define SA_NODEFER 0
  #endif
  #ifndef SA_RESETHAND
! # ifdef SA_ONESHOT
! #  define SA_RESETHAND SA_ONESHOT
! # else
! #  define SA_RESETHAND 0
! # endif /* SA_ONESHOT */
  #endif /* SA_RESETHAND */
+ 
+ #endif /* HAVE_SIGACTION */
  
  typedef struct sentry StoreEntry;
  typedef struct mem_hdr *mem_ptr;
diff -c -r squid-1.0.5.orig/src/tools.c squid-1.0.5/src/tools.c
*** squid-1.0.5.orig/src/tools.c	Mon Jul 15 09:04:37 1996
--- squid-1.0.5/src/tools.c	Sat Aug  3 12:05:59 1996
***************
*** 235,241 ****
  	fprintf(debug_log, "FATAL: Received bus error...dying.\n");
      else
  	fprintf(debug_log, "FATAL: Received signal %d...dying.\n", sig);
! #if !HAVE_SIGACTION
      signal(SIGSEGV, SIG_DFL);
      signal(SIGBUS, SIG_DFL);
      signal(sig, SIG_DFL);
--- 235,241 ----
  	fprintf(debug_log, "FATAL: Received bus error...dying.\n");
      else
  	fprintf(debug_log, "FATAL: Received signal %d...dying.\n", sig);
! #if SA_RESETHAND == 0
      signal(SIGSEGV, SIG_DFL);
      signal(SIGBUS, SIG_DFL);
      signal(sig, SIG_DFL);
