mirror of
https://github.com/webmin/webmin.git
synced 2025-07-25 01:23:45 +00:00
Don't attempt to create validation records in non-master zones https://www.virtualmin.com/node/69928
This commit is contained in:
@ -21,6 +21,7 @@ $dname || die "Missing CERTBOT_DOMAIN environment variable";
|
||||
# Find the DNS domain and records
|
||||
my ($zone, $zname) = &get_bind_zone_for_domain($dname);
|
||||
$zone || die "No zone named $dname found";
|
||||
$zone->{'file'} || die "Zone $dname does not have a records file";
|
||||
&lock_file(&bind8::make_chroot(&bind8::absolute_path($zone->{'file'})));
|
||||
my @recs = &bind8::read_zone_file($zone->{'file'}, $zname);
|
||||
|
||||
|
@ -23,6 +23,7 @@ $val || die "Missing CERTBOT_VALIDATION environment variable";
|
||||
# Find the DNS domain and records
|
||||
my ($zone, $zname) = &get_bind_zone_for_domain($dname);
|
||||
$zone || die "No zone named $dname found";
|
||||
$zone->{'file'} || die "Zone $dname does not have a records file";
|
||||
&lock_file(&bind8::make_chroot(&bind8::absolute_path($zone->{'file'})));
|
||||
my @recs = &bind8::read_zone_file($zone->{'file'}, $zname);
|
||||
|
||||
|
@ -388,7 +388,7 @@ my ($d) = @_;
|
||||
my $bd = $d;
|
||||
while ($bd =~ /\./) {
|
||||
my $z = &bind8::get_zone_name($bd, "any");
|
||||
if ($z) {
|
||||
if ($z && $z->{'file'} && $z->{'type'} eq 'master') {
|
||||
return ($z, $bd);
|
||||
}
|
||||
$bd =~ s/^[^\.]+\.//;
|
||||
|
Reference in New Issue
Block a user