$rv->{'algorithmid'} = $1;
$rv->{'keyid'} = $2;
local $config{'short_names'} = 0; # Force canonicalization
- local ($pub) = &read_zone_file("$dir/$f", $dom);
+ local ($pub) = &read_zone_file("$dir/$f", $dom, undef, 0, 1);
$pub || return "Public key file $dir/$f does not contain ".
"any records";
$pub->{'name'} eq $dom."." ||
# Functions for managing BIND 4 and 8/9 records files
-# read_zone_file(file, origin, [previous], [only-soa])
+# read_zone_file(file, origin, [previous], [only-soa], [no-chroot])
# Reads a DNS zone file and returns a data structure of records. The origin
# must be a domain without the trailing dot, or just .
sub read_zone_file
$origin =~ s/\.*$//;
}
$file = &absolute_path($_[0]);
-local $rootfile = &make_chroot($file);
+local $rootfile = $_[4] ? $file : &make_chroot($file);
open(FILE, $rootfile);
$lnum = 0;
local ($gotsoa, $aftersoa);