Handle hostnames with upper-case letters
[webmin.git] / proftpd / mod_unixpw.pl
1 # mod_unixpw.pl
2
3 sub mod_unixpw_directives
4 {
5 local $rv = [
6         [ 'AuthUserFile', 0, 6, 'virtual global', 1.11 ],
7         [ 'AuthGroupFile', 0, 6, 'virtual global', 1.11 ],
8         [ 'AuthPAMAuthoritative', 0, 6, 'virtual global', 1.20 ],
9         [ 'PersistentPasswd', 0, 6, 'root', 1.15 ]
10         ];
11 return &make_directives($rv, $_[0], "mod_unixpw");
12 }
13
14 sub edit_AuthUserFile
15 {
16 return (2, $text{'mod_unixpw_ufile'},
17         &opt_input($_[0]->{'value'}, "AuthUserFile", $text{'mod_unixpw_none'},
18                    50, &file_chooser_button("AuthUserFile")));
19 }
20 sub save_AuthUserFile
21 {
22 $in{'AuthUserFile_def'} || -r $in{'AuthUserFile'} ||
23         &error($text{'mod_unixpw_eufile'});
24 return &parse_opt("AuthUserFile");
25 }
26
27 sub edit_AuthGroupFile
28 {
29 return (2, $text{'mod_unixpw_gfile'},
30         &opt_input($_[0]->{'value'}, "AuthGroupFile", $text{'mod_unixpw_none'},
31                    50, &file_chooser_button("AuthGroupFile")));
32 }
33 sub save_AuthGroupFile
34 {
35 $in{'AuthGroupFile_def'} || -r $in{'AuthGroupFile'} ||
36         &error($text{'mod_unixpw_egfile'});
37 return &parse_opt("AuthGroupFile");
38 }
39
40 sub edit_AuthPAMAuthoritative
41 {
42 return (1, $text{'mod_unixpw_pam'},
43         &choice_input($_[0]->{'value'}, "AuthPAMAuthoritative", "",
44                       "$text{'yes'},on", "$text{'no'},off",
45                       "$text{'default'},"));
46 }
47 sub save_AuthPAMAuthoritative
48 {
49 return &parse_choice("AuthPAMAuthoritative", "");
50 }
51
52 sub edit_PersistentPasswd
53 {
54 return (1, $text{'mod_unixpw_persist'},
55         &choice_input($_[0]->{'value'}, "PersistentPasswd", "",
56                       "$text{'yes'},on", "$text{'no'},off",
57                       "$text{'default'},"));
58 }
59 sub save_PersistentPasswd
60 {
61 return &parse_choice("PersistentPasswd", "");
62 }
63