Handle hostnames with upper-case letters
[webmin.git] / apache / mod_authn_dbm.pl
1 # mod_authn_dbm.pl
2 # Defines editors for user text-file authentication directives
3
4 sub mod_authn_dbm_directives
5 {
6 local($rv);
7 $rv = [ [ 'AuthDBMUserFile', 0, 4, 'directory htaccess' ],
8         [ 'AuthDBMType', 0, 4, 'directory htaccess', 2.030, -1 ] ];
9 return &make_directives($rv, $_[0], "mod_authn_dbm");
10 }
11
12 sub edit_AuthDBMUserFile
13 {
14 return (2, $text{'mod_auth_dbm_ufile'},
15        &opt_input($_[0]->{'value'}, "AuthDBMUserFile", $text{'default'}, 45).
16        &file_chooser_button("AuthDBMUserFile", 0));
17 }
18 sub save_AuthDBMUserFile
19 {
20 $in{'AuthDBMUserFile_def'} || &allowed_auth_file($in{'AuthDBMUserFile'}) ||
21         &error($text{'mod_auth_eudir'});
22 return &parse_opt("AuthDBMUserFile", '^\S+$', $text{'mod_auth_dbm_eufile'});
23 }
24
25 sub edit_AuthDBMType
26 {
27 return (1, $text{'mod_auth_dbm_type'},
28         &select_input($_[0]->{'value'}, "AuthDBMType", "",
29                       "$text{'default'},", "GDBM,GDBM", "SDBM,SDBM",
30                                            "NDBM,NDBM", "DB,DB",
31                       "$text{'mod_auth_dbm_default'},default"));
32 }
33 sub save_AuthDBMType
34 {
35 return &parse_select("AuthDBMType", "");
36 }
37
38