2 require 'syslog-lib.pl';
4 # acl_security_form(&options)
5 # Output HTML for editing security options for the syslog module
8 # Can edit syslog settings
9 print &ui_table_row($text{'acl_noedit'},
10 &ui_yesno_radio("noedit", int($_[0]->{'noedit'})));
12 # Can enter arbitrary filename
13 print &ui_table_row($text{'acl_any'},
14 &ui_yesno_radio("any", int($_[0]->{'any'})));
16 # Can view syslog logs and logs from other modules
17 print &ui_table_row($text{'acl_syslog'},
18 &ui_yesno_radio("syslog", int($_[0]->{'syslog'})));
19 print &ui_table_row($text{'acl_others'},
20 &ui_yesno_radio("others", int($_[0]->{'others'})));
23 print &ui_table_row($text{'acl_logs'},
24 &ui_radio("logs_def", $_[0]->{'logs'} ? 0 : 1,
25 [ [ 1, $text{'acl_all'} ], [ 0, $text{'acl_sel'} ] ]).
27 &ui_textarea("logs", join("\n", split(/\t+/, $_[0]->{'logs'})),
30 # Extra per-user log files
31 print &ui_table_row($text{'acl_extra'},
32 &ui_textarea("extras", join("\n", split(/\t+/, $_[0]->{'extras'})),
37 # acl_security_save(&options)
38 # Parse the form for security options for the syslog module
41 $_[0]->{'noedit'} = $in{'noedit'};
42 $_[0]->{'any'} = $in{'any'};
43 $_[0]->{'syslog'} = $in{'syslog'};
44 $_[0]->{'others'} = $in{'others'};
45 $in{'logs'} =~ s/\r//g;
46 $_[0]->{'logs'} = $in{'logs_def'} ? undef :
47 join("\t", split(/\n/, $in{'logs'}));
48 $_[0]->{'extras'} = join("\t", split(/\n/, $in{'extras'}));