From: Jonathan McDowell Date: Wed, 15 Jun 2005 10:41:53 +0000 (+0000) Subject: cscvs to tla changeset 2 X-Git-Url: https://the.earth.li/gitweb/?a=commitdiff_plain;h=31b363d4355c1a7017d683c64dc271d76b4e14d4;p=autodns.git cscvs to tla changeset 2 Author: noodles Date: 2003/06/04 17:27:00 Add RFC2317 support (/ allowed in in-addr.arpa domains). Update docs for 0.0.6 release. git-archimport-id: noodles@earth.li--pie/autodns--mainline--1.0--patch-1 --- diff --git a/HISTORY b/HISTORY index f847116..2956f22 100644 --- a/HISTORY +++ b/HISTORY @@ -33,3 +33,7 @@ 0.0.5 - 10th November 2002 * Changed valid domain regex to allow 4 character TLDs (triggered by .info). + +0.0.6 - 4th June 2003 + +* Allow / characters in .in-addr.arpa zones as per RFC2317. (Simon Huggins) diff --git a/README b/README index e87cba5..b2988c6 100644 --- a/README +++ b/README @@ -1,5 +1,5 @@ -autodns 0.0.4 - A program to aid auto addition of secondary DNS. -Copyright 1999-2001 Jonathan McDowell for Project Purple. +autodns 0.0.6 - A program to aid auto addition of secondary DNS. +Copyright 1999-2003 Jonathan McDowell for Project Purple. http://www.earth.li/projectpurple/progs/autodns.html @@ -66,8 +66,7 @@ the tarball for an example. Contacting the author: -I can be reached as noodles@earth.li or on Fidonet as Jonathan McDowell -@ 2:443/21 +I can be reached as noodles@earth.li. All constructive criticism about autodns is welcome. diff --git a/autodns.pl b/autodns.pl index 9a739d0..afc6c5b 100755 --- a/autodns.pl +++ b/autodns.pl @@ -1,9 +1,12 @@ #!/usr/bin/perl -Tw -# autodns 0.0.5 -# Copyright 1999-2001 Project Purple. Written by Jonathan McDowell +# autodns 0.0.6 +# Copyright 1999-2003 Project Purple. Written by Jonathan McDowell # See ACKNOWLEDGEMENTS file for full details of contributors. # http://www.earth.li/projectpurple/progs/autodns.html # Released under the GPL. +# +# $Id: autodns.pl,v 1.2 2003/06/04 17:27:00 noodles Exp $ +# use strict; use IPC::Open3; @@ -16,7 +19,7 @@ my ($user, $server, $inprocess, $delcount, $addcount, $reload_command); my ($domain, @MAIL, @GPGERROR, @COMMANDS, %zones); my ($me, $ccreply, $conffile, $domainlistroot, @cfgfiles, $VERSION); -$VERSION="0.0.5"; +$VERSION="0.0.6"; # # Local configuration here (until it gets moved to a config file). @@ -84,13 +87,15 @@ sub getzones { # These are: a-z, 0-9, - or . # sub valid_domain { - my $domain = shift; - $domain = lc $domain; - if ($domain =~ /^(?:[a-z0-9-]+\.)+[a-z]{2,4}$/) { - return 1; - } else { - return 0; - } + my $domain = shift; + $domain = lc $domain; + if ($domain =~ /^(?:[a-z0-9-]+\.)+[a-z]{2,4}$/) { + return 1; + } elsif ($domain =~ /^(?:[0-9\/-]+\.)+in-addr.arpa$/) { + return 1; + } else { + return 0; + } } #