Changeset 837 for trunk/mergerecs
- Timestamp:
- 04/21/22 13:16:29 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/mergerecs
r797 r837 3 3 ## 4 4 # $Id$ 5 # Copyright 2014 ,2016,2018,2020Kris Deugau <kdeugau@deepnet.cx>5 # Copyright 2014-2022 Kris Deugau <kdeugau@deepnet.cx> 6 6 # 7 7 # This program is free software: you can redistribute it and/or modify … … 27 27 use Data::Dumper; 28 28 29 # push "the directory the script is in" into @INC 30 use FindBin; 31 use lib "$FindBin::RealBin/"; 29 # Taint-safe (ish) voodoo to push "the directory the script is in" into @INC. 30 # See https://secure.deepnet.cx/trac/dnsadmin/ticket/80 for more gory details on how we got here. 31 use File::Spec (); 32 use File::Basename (); 33 my $path; 34 BEGIN { 35 $path = File::Basename::dirname(File::Spec->rel2abs($0)); 36 if ($path =~ /(.*)/) { 37 $path = $1; 38 } 39 } 40 use lib $path; 32 41 33 42 use DNSDB; … … 67 76 $dnsdb->{loguserid} = 0; # not worth setting up a pseudouser the way the RPC system does 68 77 $dnsdb->{logusername} = $dnsdb->{logusername}."/mergerecs"; 69 $dnsdb->{logfullname} = $dnsdb->{logusername} if !$dnsdb->{logfullname};78 $dnsdb->{logfullname} = ($dnsdb->{logfullname} ? $dnsdb->{logfullname}."/mergerecs" : $dnsdb->{logusername}); 70 79 71 80 # and now the meat … … 86 95 } 87 96 die "$pzone is not a valid reverse zone specification\n" if !$npzone; 88 $zid = $dnsdb->revID($npzone, ' ');97 $zid = $dnsdb->revID($npzone, ':ANY:'); 89 98 } else { 90 99 $rev = 'n'; 91 $zid = $dnsdb->domainID($pzone, ' ');100 $zid = $dnsdb->domainID($pzone, ':ANY:'); 92 101 } 93 102 die "$pzone is not a zone in the database (".$dnsdb->errstr.")\n" if !$zid;
Note:
See TracChangeset
for help on using the changeset viewer.