Handle hostnames with upper-case letters
[webmin.git] / bind8 / conf_keys.cgi
1 #!/usr/local/bin/perl
2 # conf_keys.cgi
3 # Display options for other DNS servers
4
5 require './bind8-lib.pl';
6 $access{'defaults'} || &error($text{'keys_ecannot'});
7 &ui_print_header(undef, $text{'keys_title'}, "",
8                  undef, undef, undef, undef, &restart_links());
9
10 $conf = &get_config();
11 @keys = ( &find("key", $conf), { } );
12
13 # Build table of keys
14 @table = ( );
15 for($i=0; $i<@keys; $i++) {
16         $k = $keys[$i];
17         @algs = ( "hmac-md5" );
18         $alg = &find_value("algorithm", $k->{'members'});
19         $secret = &find_value("secret", $k->{'members'});
20         push(@table, [ &ui_textbox("id_$i", $k->{'value'}, 15),
21                        &ui_select("alg_$i", $alg, \@algs, 1, 0, $alg ? 1 : 0),
22                        &ui_textbox("secret_$i", $secret, 65) ]);
23         }
24
25 # Show the table
26 print &ui_form_columns_table(
27         "save_keys.cgi",
28         [ [ undef, $text{'save'} ] ],
29         0,
30         undef,
31         undef,
32         [ $text{'keys_id'}, $text{'keys_alg'}, $text{'keys_secret'} ],
33         undef,
34         \@table,
35         undef,
36         1);
37
38 &ui_print_footer("", $text{'index_return'});
39