Handle hostnames with upper-case letters
[webmin.git] / apache / mod_authz_dbm.pl
1 # mod_authz_dbm.pl
2 # Defines editors for user text-file authentication directives
3
4 sub mod_authz_dbm_directives
5 {
6 local($rv);
7 $rv = [ [ 'AuthDBMGroupFile', 0, 4, 'directory htaccess' ],
8         [ 'AuthzDBMAuthoritative', 0, 4, 'directory htaccess' ],
9         [ 'AuthzDBMType', 0, 4, 'directory htaccess', 2.030, -1 ] ];
10 return &make_directives($rv, $_[0], "mod_authz_dbm");
11 }
12
13 sub edit_AuthDBMGroupFile
14 {
15 return (2, $text{'mod_auth_dbm_gfile'},
16        &opt_input($_[0]->{'value'}, "AuthDBMGroupFile", $text{'default'}, 45).
17        &file_chooser_button("AuthDBMGroupFile", 0));
18 }
19 sub save_AuthDBMGroupFile
20 {
21 $in{'AuthDBMGroupFile_def'} || &allowed_auth_file($in{'AuthDBMGroupFile'}) ||
22         &error($text{'mod_auth_egdir'});
23 return &parse_opt("AuthDBMGroupFile", '^\S+$', $text{'mod_auth_dbm_egfile'});
24 }
25
26 sub edit_AuthzDBMAuthoritative
27 {
28 return (2, $text{'mod_auth_dbm_gpass'},
29        &choice_input($_[2]->{'value'}, "AuthzDBMAuthoritative", "",
30        "$text{'yes'},off", "$text{'no'},on", "$text{'default'},"));
31 }
32 sub save_AuthzDBMAuthoritative
33 {
34 return &parse_choice("AuthzDBMAuthoritative", "");
35 }
36
37 sub edit_AuthzDBMType
38 {
39 return (1, $text{'mod_auth_dbm_gtype'},
40         &select_input($_[0]->{'value'}, "AuthzDBMType", "",
41                       "$text{'default'},", "GDBM,GDBM", "SDBM,SDBM",
42                                            "NDBM,NDBM", "DB,DB",
43                       "$text{'mod_auth_dbm_default'},default"));
44 }
45 sub save_AuthzDBMType
46 {
47 return &parse_select("AuthzDBMType", "");
48 }
49
50