mirror of
https://github.com/webmin/webmin.git
synced 2026-06-20 03:10:30 +01:00
Domain might not be found
This commit is contained in:
@@ -952,18 +952,20 @@ return $fn;
|
||||
sub get_dnskey_record
|
||||
{
|
||||
my ($z, $recs) = @_;
|
||||
my @rv;
|
||||
my $dom = $z->{'members'} ? $z->{'values'}->[0] : $z->{'name'};
|
||||
if (!$recs) {
|
||||
# Need to get zone file and thus records
|
||||
my $fn = &get_zone_file($z);
|
||||
$recs = [ &read_zone_file($fn, $dom) ];
|
||||
}
|
||||
# Find the record
|
||||
foreach my $r (@$recs) {
|
||||
if ($r->{'type'} eq 'DNSKEY' &&
|
||||
$r->{'name'} eq $dom.'.') {
|
||||
push(@rv, $r);
|
||||
my @rv;
|
||||
if ($dom) {
|
||||
if (!$recs) {
|
||||
# Need to get zone file and thus records
|
||||
my $fn = &get_zone_file($z);
|
||||
$recs = [ &read_zone_file($fn, $dom) ];
|
||||
}
|
||||
# Find the record
|
||||
foreach my $r (@$recs) {
|
||||
if ($r->{'type'} eq 'DNSKEY' &&
|
||||
$r->{'name'} eq $dom.'.') {
|
||||
push(@rv, $r);
|
||||
}
|
||||
}
|
||||
}
|
||||
return wantarray ? @rv : $rv[0];
|
||||
|
||||
Reference in New Issue
Block a user