diff --git a/bind8/check_zone.cgi b/bind8/check_zone.cgi index 896d2c85e..2eba2b407 100755 --- a/bind8/check_zone.cgi +++ b/bind8/check_zone.cgi @@ -1,18 +1,23 @@ #!/usr/local/bin/perl # Check a zone's records and report problems +use strict; +use warnings; require './bind8-lib.pl'; +# Globals from bind8-lib.pl +our (%access, %text, %in); + &ReadParse(); $access{'apply'} || &error($text{'check_ecannot'}); -$zone = &get_zone_name_or_error($in{'zone'}, $in{'view'}); +my $zone = &get_zone_name_or_error($in{'zone'}, $in{'view'}); &can_edit_zone($zone) || &error($text{'master_ecannot'}); -$desc = &ip6int_to_net(&arpa_to_ip($dom)); +my $desc = &ip6int_to_net(&arpa_to_ip($dom)); &ui_print_header($desc, $text{'check_title'}, "", undef, undef, undef, undef, &restart_links($zone)); -$file = &make_chroot($zone->{'file'}); -@errs = &check_zone_records($zone); +my $file = &make_chroot($zone->{'file'}); +my @errs = &check_zone_records($zone); if (@errs) { # Show list of errors print "",&text('check_errs', "$file"),"
\n"; diff --git a/bind8/close.cgi b/bind8/close.cgi index cc9317ec0..5ad24431c 100755 --- a/bind8/close.cgi +++ b/bind8/close.cgi @@ -1,9 +1,13 @@ #!/usr/local/bin/perl # Remove some zone from the open list +use strict; +use warnings; +# Globals +our (%in); require './bind8-lib.pl'; &ReadParse(); -@heiropen = &get_heiropen(); +my @heiropen = &get_heiropen(); @heiropen = grep { $_ ne $in{'what'} } @heiropen; &save_heiropen(\@heiropen); &redirect("index.cgi#$in{'what'}"); diff --git a/bind8/conf_acls.cgi b/bind8/conf_acls.cgi index e9778ddfe..37d4c0865 100755 --- a/bind8/conf_acls.cgi +++ b/bind8/conf_acls.cgi @@ -1,21 +1,25 @@ #!/usr/local/bin/perl # conf_acls.cgi # Display global ACLs +use strict; +use warnings; +# Globals +our (%text, %access); require './bind8-lib.pl'; $access{'defaults'} || &error($text{'acls_ecannot'}); &ui_print_header(undef, $text{'acls_title'}, "", undef, undef, undef, undef, &restart_links()); -$conf = &get_config(); -@acls = ( &find("acl", $conf), { } ); +my $conf = &get_config(); +my @acls = ( &find("acl", $conf), { } ); print &ui_form_start("save_acls.cgi", "post"); print &ui_columns_start([ $text{'acls_name'}, $text{'acls_values'} ]); -for($i=0; $i<@acls; $i++) { - @cols = ( ); +for(my $i=0; $i<@acls; $i++) { + my @cols = ( ); push(@cols, &ui_textbox("name_$i", $acls[$i]->{'value'}, 15)); - @vals = map { join(" ", $_->{'name'}, @{$_->{'values'}}) } + my @vals = map { join(" ", $_->{'name'}, @{$_->{'values'}}) } @{$acls[$i]->{'members'}}; push(@cols, &ui_textarea("values_$i", join("\n", @vals), 5, 60, "off")); print &ui_columns_row(\@cols, [ "valign=top" ]); diff --git a/bind8/conf_controls.cgi b/bind8/conf_controls.cgi index 3b8eff07a..afed61e5d 100755 --- a/bind8/conf_controls.cgi +++ b/bind8/conf_controls.cgi @@ -1,25 +1,31 @@ #!/usr/local/bin/perl # Display NDC control interface options +use strict; +use warnings; +# Globals +our (%text, %access); require './bind8-lib.pl'; $access{'defaults'} || &error($text{'controls_ecannot'}); &ui_print_header(undef, $text{'controls_title'}, "", undef, undef, undef, undef, &restart_links()); -$conf = &get_config(); -$controls = &find("controls", $conf); -$inet = &find("inet", $controls->{'members'}); -$unix = &find("unix", $controls->{'members'}); +my $conf = &get_config(); +my $controls = &find("controls", $conf); +my $inet = &find("inet", $controls->{'members'}); +my $unix = &find("unix", $controls->{'members'}); print &ui_form_start("save_controls.cgi", "post"); print &ui_table_start($text{'controls_header'}, undef, 2); # Show options for inet control +my $ip; +my $port; if ($inet) { - @v = @{$inet->{'values'}}; + my @v = @{$inet->{'values'}}; $ip = shift(@v); while(@v) { - $n = shift(@v); + my $n = shift(@v); if ($n eq "port") { $port = shift(@v); } } } @@ -44,12 +50,13 @@ print &ui_table_row($text{'controls_keys'}, print &ui_table_hr(); -# Show options for local socket control +# Show options for local, socket control +my ($path, $perm, $owner, $group); if ($unix) { - @v = @{$unix->{'values'}}; + my @v = @{$unix->{'values'}}; $path = shift(@v); while(@v) { - $n = shift(@v); + my $n = shift(@v); if ($n eq "perm") { $perm = shift(@v); } elsif ($n eq "owner") { $owner = getpwuid(shift(@v)); } elsif ($n eq "group") { $group = getgrgid(shift(@v)); }