]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Adding blocklist patch
authorwessels <>
Wed, 27 Mar 1996 04:58:40 +0000 (04:58 +0000)
committerwessels <>
Wed, 27 Mar 1996 04:58:40 +0000 (04:58 +0000)
src/Makefile.in
src/cache_cf.cc
src/errorpage.cc

index b2b945c283239b2e11d92242c83979d5d97f8519..e2bed3b336e30b93ad742c9e2490e8e429b929c8 100644 (file)
@@ -1,7 +1,7 @@
 #
 #  Makefile for the Harvest Object Cache server
 #
-#  $Id: Makefile.in,v 1.8 1996/03/25 19:01:04 wessels Exp $
+#  $Id: Makefile.in,v 1.9 1996/03/26 21:58:40 wessels Exp $
 #
 #  Uncomment and customize the following to suit your needs:
 #
@@ -58,7 +58,7 @@ CLIENT_LIBS   = -L../lib -lutil $(XTRA_LIBS)
 PROGS          = cached 
 UTILS          = client dnsserver ftpget
 CGIPROGS       = cachemgr.cgi
-OBJS           = cached_error.o \
+OBJS           = blocklist.o cached_error.o \
                  comm.o cache_cf.o debug.o disk.o dynamic_array.o \
                  fdstat.o filemap.o ftp.o gopher.o hash.o \
                  http.o icp.o ipcache.o mime.o neighbors.o objcache.o \
index c6374426f14be7fe5c9b5d798598bee898e32297..0624fff92844b56c9f5ae1bc3a3017a9a39b78b3 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: cache_cf.cc,v 1.3 1996/03/26 05:14:46 wessels Exp $ */
+/* $Id: cache_cf.cc,v 1.4 1996/03/26 21:58:41 wessels Exp $ */
 
 #include "config.h"
 #include <stdio.h>
@@ -895,6 +895,16 @@ void parseBindAddressLine(line_in)
     addToStopList(&bind_addr_list, token);
 }
 
+void parseBlockListLine(line_in)
+     char *line_in;
+{
+    char *token;
+    token = strtok(NULL, w_space);
+    if (token == (char *) NULL)
+       return;
+    blockAddToList(token);
+}
+
 void parseLocalDomainLine(line_in)
      char *line_in;
 {
@@ -1168,6 +1178,10 @@ int parseConfigFile(file_name)
        else if (!strcmp(token, "ttl_pattern"))
            parseTTLPattern(line_in);
 
+       /* Parse a blocklist line */
+       else if (!strcmp(token, "blocklist"))
+           parseBlockListLine(line_in);
+
        /* Parse a negative_ttl line */
        else if (!strcmp(token, "negative_ttl"))
            parseNegativeLine(line_in);
index e81bbd3875a037a2a9372ffb11489ca36de286b9..8c023ff59090890973c7a80298116658bc80613d 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: errorpage.cc,v 1.1 1996/03/26 05:20:47 wessels Exp $ */
+/* $Id: errorpage.cc,v 1.2 1996/03/26 21:58:42 wessels Exp $ */
 
 #include "config.h"
 #include <strings.h>
@@ -91,6 +91,9 @@ error_data ErrorData[] =
     {"ERR_DISK_IO",
        "Cache Disk I/O Failure",
        "The system disk is out of space or failing."},
+    {"ERR_URL_BLOCKED",
+       "Access Denied",
+       "You are not allowed to access this URL."},
     {"ERR_MAX"
        "",
        ""}