Handle hostnames with upper-case letters
[webmin.git] / bind8 / check_zone.cgi
1 #!/usr/local/bin/perl
2 # Check a zone's records and report problems
3
4 require './bind8-lib.pl';
5 &ReadParse();
6 $access{'apply'} || &error($text{'check_ecannot'});
7 $zone = &get_zone_name($in{'index'}, $in{'view'});
8 &can_edit_zone($zone) || &error($text{'master_ecannot'});
9 $desc = &ip6int_to_net(&arpa_to_ip($dom));
10
11 &ui_print_header($desc, $text{'check_title'}, "",
12                  undef, undef, undef, undef, &restart_links($zone));
13
14 $file = &make_chroot($zone->{'file'});
15 @errs = &check_zone_records($zone);
16 if (@errs) {
17         # Show list of errors
18         print "<b>",&text('check_errs', "<tt>$file</tt>"),"</b><p>\n";
19         print "<ul>\n";
20         foreach my $e (@errs) {
21                 print "<li>".&html_escape($e)."\n";
22                 }
23         print "</ul>\n";
24         }
25 else {
26         # All OK!
27         print "<b>",&text('check_allok', "<tt>$file</tt>"),"</b><p>\n";
28         }
29
30 &ui_print_footer("edit_master.cgi?index=$in{'index'}&view=$in{'view'}",
31                  $text{'master_return'});
32