Handle hostnames with upper-case letters
[webmin.git] / bind8 / resign_zone.cgi
1 #!/usr/local/bin/perl
2 # Re-generate the zone key and re-sign a zone
3
4 require './bind8-lib.pl';
5 &error_setup($text{'resign_err'});
6 &ReadParse();
7 $zone = &get_zone_name($in{'index'}, $in{'view'});
8 $dom = $zone->{'name'};
9 &can_edit_zone($zone) ||
10         &error($text{'master_ecannot'});
11
12 # Do the signing
13 &lock_file(&make_chroot(&absolute_path($zone->{'file'})));
14 $err = &resign_dnssec_key($zone);
15 &error($err) if ($err);
16 &unlock_file(&make_chroot(&absolute_path($zone->{'file'})));
17
18 # Return to master page
19 &webmin_log("resign", undef, $dom);
20 &redirect("edit_master.cgi?index=$in{'index'}&view=$in{'view'}");
21