# HG changeset patch # User carl # Date 1089957701 25200 # Node ID a84752107aca0d1003bc7c0ed4b9aeaf9d0b9d41 # Parent 9f2971c692d0aa41790fd209367de7ec4ab3515a host names cannot have consecutive periods. diff -r 9f2971c692d0 -r a84752107aca ChangeLog --- a/ChangeLog Tue Jul 13 08:54:03 2004 -0700 +++ b/ChangeLog Thu Jul 15 23:01:41 2004 -0700 @@ -1,5 +1,12 @@ $Id$ +3.4 2004-07-15 + Tokens with two consecutive periods cannot be ip addresses + or host names. + + Updated dnsbl.spec file for building rpms from John Gunkel. + + 3.3 2004-07-09 Drop root priviledges properly, including the group id. diff -r 9f2971c692d0 -r a84752107aca dnsbl.spec.in --- a/dnsbl.spec.in Tue Jul 13 08:54:03 2004 -0700 +++ b/dnsbl.spec.in Thu Jul 15 23:01:41 2004 -0700 @@ -1,11 +1,10 @@ Summary: DNSBL Sendmail Milter Name: dnsbl -Version: 3.3 +Version: 3.4 Release: 2 Copyright: GPL Group: System Environment/Daemons Source: http://www.five-ten-sg.com/util/dnsbl.tar.gz -Patch0: dnsbl.rc.patch BuildRoot: %{_tmppath}/%{name}-%{version} Requires(pre): /usr/sbin/groupadd @@ -29,7 +28,6 @@ %prep %setup -%patch0 -p1 %build pwd @@ -49,12 +47,13 @@ install -m 644 dnsbl.conf %{buildroot}/etc/dnsbl/dnsbl.conf install -m 644 html-tags.conf %{buildroot}/etc/dnsbl/html-tags.conf install -m 644 tld.conf %{buildroot}/etc/dnsbl/tld.conf +install -m 644 sample.conf %{buildroot}/etc/dnsbl/sample.conf mkdir -p %{buildroot}/usr/sbin install -m 755 dnsbl %{buildroot}/usr/sbin/dnsbl -mkdir -p %{buildroot}/etc/init.d -install -m 755 dnsbl.rc %{buildroot}/etc/init.d/dnsbl +mkdir -p %{buildroot}/etc/rc.d/init.d +install -m 755 dnsbl.rc %{buildroot}/etc/rc.d/init.d/dnsbl mkdir -p %{buildroot}/var/run/dnsbl @@ -82,7 +81,7 @@ /sbin/service dnsbl start echo Remember to edit /etc/dnsbl.conf and add the following line to your sendmail.mc: -echo "INPUT_MAIL_FILTER(\`dnsbl\', \`S=local:/var/run/dnsbl/dnsbl.sock, F=T, T=C:30s;S:2m;R:2m;E:5m\')" +echo "INPUT_MAIL_FILTER(\`dnsbl\', \`S=local:/var/run/dnsbl/dnsbl.sock, F=T, T=C:30s;S:5m;R:5m;E:5m\')" echo @@ -99,12 +98,17 @@ %files %defattr(-,root,root) -%config /etc/dnsbl/ -/etc/init.d/dnsbl +%config(noreplace) /etc/dnsbl/ +%doc RELEASE_NOTES LICENSE sample.conf test.cpp +/etc/rc.d/init.d/dnsbl /usr/sbin/dnsbl %dir %attr(0750,dnsbl,root) /var/run/dnsbl %changelog +* Thu Jul 15 2004 John Gunkel 1.3 +- patch to rc file no longer needed +- see RELEASE_NOTES + * Mon Jul 05 2004 John Gunkel 1.2 - Fixed some typos - removed patch into separate file diff -r 9f2971c692d0 -r a84752107aca package.bash --- a/package.bash Tue Jul 13 08:54:03 2004 -0700 +++ b/package.bash Thu Jul 15 23:01:41 2004 -0700 @@ -1,6 +1,6 @@ #!/bin/bash -VER=dnsbl-3.3 +VER=dnsbl-3.4 mkdir $VER target1=/home/httpd/html/510sg/util/dnsbl.tar.gz target2=/home/httpd/html/510sg/dnsbl.conf diff -r 9f2971c692d0 -r a84752107aca src/scanner.cpp --- a/src/scanner.cpp Tue Jul 13 08:54:03 2004 -0700 +++ b/src/scanner.cpp Thu Jul 15 23:01:41 2004 -0700 @@ -957,8 +957,9 @@ // not an email address or message id char *p1 = strchr((const char *)pending, '.'); char *p2 = strrchr((const char *)pending, '.'); - if (p1 && (p1 != p2)) { - // have two periods, so three components + char *p3 = strstr((const char *)pending, ".."); + if (p1 && (p1 != p2) & !p3) { + // have two periods, so at least three components, and no empty components for (int i=0; itlds->find(p2+1); @@ -1012,6 +1013,7 @@ char *p = strrchr((const char *)pending, '/'); if (p && // have a leading / strchr(p, '.') && // require at least one . in a dns name + !strstr(p, "..") && // no empty components in the dns name (strncasecmp((const char *)pending, "http", 4) == 0)) { // must start with protocol // we seem to have a host name p++; // skip the last /