1 # display args for pam_unix.so
3 # display_args(&service, &module, &args)
4 sub display_module_args
6 print &ui_table_row($text{'pwdb_shadow'},
7 &ui_yesno_radio("shadow", defined($_[2]->{'shadow'}) ? 1 : 0));
9 print &ui_table_row($text{'pwdb_md5'},
10 &ui_yesno_radio("md5", defined($_[2]->{'md5'}) ? 1 : 0));
12 print &ui_table_row($text{'pwdb_nullok'},
13 &ui_yesno_radio("nullok", defined($_[2]->{'nullok'}) ? 1 : 0));
15 print &ui_table_row($text{'unix_nullok_secure'},
16 &ui_yesno_radio("nullok_secure",
17 defined($_[2]->{'nullok_secure'}) ? 1 : 0));
19 if ($_[1]->{'type'} eq 'password') {
20 # Password-change specific options
21 print &ui_table_row($text{'unix_min'},
22 &ui_opt_textbox("min", $_[2]->{'min'}, 5, $text{'unix_nomin'}));
24 print &ui_table_row($text{'unix_max'},
25 &ui_opt_textbox("max", $_[2]->{'max'}, 5, $text{'unix_nomax'}));
27 print &ui_table_row($text{'unix_obscure'},
28 &ui_yesno_radio("obscure",defined($_[2]->{'obscure'}) ? 1 : 0));
32 # parse_module_args(&service, &module, &args)
35 if ($in{'nullok'}) { $_[2]->{'nullok'} = ""; }
36 else { delete($_[2]->{'nullok'}); }
38 if ($in{'nullok_secure'}) { $_[2]->{'nullok_secure'} = ""; }
39 else { delete($_[2]->{'nullok_secure'}); }
41 if ($in{'shadow'}) { $_[2]->{'shadow'} = ""; }
42 else { delete($_[2]->{'shadow'}); }
44 if ($in{'md5'}) { $_[2]->{'md5'} = ""; }
45 else { delete($_[2]->{'md5'}); }
47 if ($_[1]->{'type'} eq 'password') {
49 delete($_[2]->{'min'});
52 $in{'min'} =~ /^\d+$/ || &error($text{'unix_emin'});
53 $_[2]->{'min'} = $in{'min'};
57 delete($_[2]->{'max'});
60 $in{'max'} =~ /^\d+$/ || &error($text{'unix_emax'});
61 $_[2]->{'max'} = $in{'max'};
64 if ($in{'obscure'}) { $_[2]->{'obscure'} = ""; }
65 else { delete($_[2]->{'obscure'}); }