Skip to content

Commit

Permalink
Correct parsing of previous record
Browse files Browse the repository at this point in the history
  • Loading branch information
jcameron committed Apr 4, 2008
1 parent c548083 commit 3aa2f81
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 2 additions & 0 deletions bind8/CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,5 @@ BIND on Windows can now be configured using this module.
Mass record creation can now add records for the domain name (by entering @ as the name), as records that already exist.
---- Changes since 1.400 ----
Keys in ACL sections are no long mangled by Webmin. This means that each IP or key must be entered on a separate line in the Access Control Lists page.
---- Changes since 1.410 ----
Corrected parsing of records in zone files with no names, which inherit from the previous record.
4 changes: 2 additions & 2 deletions bind8/edit_slave.cgi
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ if ($zone->{'file'}) {
if ($config{'show_list'}) {
# display as list
$mid = int((@rcodes+1)/2);
print "<table width=100%> <tr><td width=50%>\n";
print "<table width=100%> <tr><td width=50% valign=top>\n";
&types_table(@rcodes[0..$mid-1]);
print "</td><td width=50%>\n";
print "</td><td width=50% valign=top>\n";
&types_table(@rcodes[$mid..$#rcodes]);
print "</td></tr> </table>\n";
}
Expand Down
7 changes: 6 additions & 1 deletion bind8/records-lib.pl
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,12 @@ sub read_zone_file
$i++;
}
if ($dir{'name'} eq '') {
local $prv = $#rv >= 0 ? $rv[$#rv] : $_[2];
# Name comes from previous record
for(my $p=$#rv; $p>=0; $p--) {
$prv = $rv[$p];
last if ($prv->{'name'});
}
$prv ||= $_[2];
$prv || &error(&text('efirst', $lnum[$i]+1, $file));
$dir{'name'} = $prv->{'name'};
$dir{'realname'} = $prv->{'realname'};
Expand Down

0 comments on commit 3aa2f81

Please sign in to comment.