# HG changeset patch # User carl # Date 1089386185 25200 # Node ID 66c66a6ee65f5b7a37da6a2418bc684c36a6dffa # Parent 2eef08791e110cbde548b727f6bc85b884687eba changes for 3.2 diff -r 2eef08791e11 -r 66c66a6ee65f install.bash --- a/install.bash Fri Jul 09 08:04:25 2004 -0700 +++ b/install.bash Fri Jul 09 08:16:25 2004 -0700 @@ -44,6 +44,13 @@ if [ ! -f $DST/tld.conf ]; then cp tld.conf $DST fi + +# make the directory for the socket +mkdir -p /var/run/dnsbl +chown dnsbl:dnsbl /var/run/dnsbl +chmod 700 /var/run/dnsbl + +# install the binaries mv -f dnsbl /usr/sbin/dnsbl cp dnsbl.rc /etc/rc.d/init.d/dnsbl chmod 755 /etc/rc.d/init.d/dnsbl diff -r 2eef08791e11 -r 66c66a6ee65f src/dnsbl.cpp --- a/src/dnsbl.cpp Fri Jul 09 08:04:25 2004 -0700 +++ b/src/dnsbl.cpp Fri Jul 09 08:16:25 2004 -0700 @@ -906,11 +906,11 @@ if (dc.content_suffix) { fprintf(stdout, "\ncontent filtering enabled with %s %s\n", dc.content_suffix, dc.content_message); } - if (dc.host_limit) { - fprintf(stdout, "\ncontent filtering for host names enabled with limit %d %s\n", dc.host_limit, dc.host_limit_message); + if (dc.host_limit && !dc.host_random) { + fprintf(stdout, "\ncontent filtering for host names hard limit %d %s\n", dc.host_limit, dc.host_limit_message); } - if (dc.host_random) { - fprintf(stdout, "\nrandom selection of host names, host limit message is not used\n"); + if (dc.host_limit && dc.host_random) { + fprintf(stdout, "\ncontent filtering for host names soft limit %d\n", dc.host_limit); } if (dc.tag_limit) { fprintf(stdout, "\ncontent filtering for excessive html tags enabled with limit %d %s\n", dc.tag_limit, dc.tag_limit_message); @@ -1024,11 +1024,11 @@ } dc.config_files.push_back(fn); map commands; - enum {dummy, tld, content, hostlimit, hostrandom, htmllimit, htmltag, dnsbl, dnsbll, envfrom, envto, include, includedcc}; + enum {dummy, tld, content, hostlimit, hostslimit, htmllimit, htmltag, dnsbl, dnsbll, envfrom, envto, include, includedcc}; commands["tld" ] = tld; commands["content" ] = content; commands["host_limit" ] = hostlimit; - commands["host_random"] = hostrandom; + commands["host_soft_limit"] = hostslimit; commands["html_limit" ] = htmllimit; commands["html_tag" ] = htmltag; commands["dnsbl" ] = dnsbl; @@ -1091,10 +1091,14 @@ *last = '\0'; // make it a null terminator dc.host_limit = atoi(limit); dc.host_limit_message = register_string(msg); + dc.host_random = false; processed = true; } break; - case hostrandom: { + case hostslimit: { + char *limit = next_token(delim); + if (!limit) break; // no integer limit + dc.host_limit = atoi(limit); dc.host_random = true; processed = true; } break;