Handle hostnames with upper-case letters
[webmin.git] / pam / pam_securetty.so.pl
1 # display args for pam_securetty.so.pl
2
3 # display_args(&service, &module, &args)
4 sub display_module_args
5 {
6 local $file = "/etc/securetty";
7 print &ui_table_row($text{'securetty_ttys'},
8         &ui_textarea("ttys", &read_file_contents($file), 5, 40), 3);
9 }
10
11 # parse_module_args(&service, &module, &args)
12 sub parse_module_args
13 {
14 local $file = "/etc/securetty";
15 &lock_file($file);
16 &open_tempfile(FILE, ">$file");
17 $in{'ttys'} =~ s/\r//g;
18 $in{'ttys'} =~ s/\s*$/\n/;
19 &print_tempfile(FILE, $in{'ttys'});
20 &close_tempfile(FILE);
21 &unlock_file($file);
22 }