forked from webmin/webmin
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconf_acls.cgi
More file actions
executable file
·31 lines (26 loc) · 942 Bytes
/
conf_acls.cgi
File metadata and controls
executable file
·31 lines (26 loc) · 942 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/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());
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(my $i=0; $i<@acls; $i++) {
my @cols = ( );
push(@cols, &ui_textbox("name_$i", $acls[$i]->{'value'}, 15));
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" ]);
}
print &ui_columns_end();
print &ui_form_end([ [ undef, $text{'save'} ] ]);
&ui_print_footer("", $text{'index_return'});