do 'firewall-lib.pl'; @acl_features = ("newchain", "delchain", "policy", "apply", "unapply", "bootup", "setup", "cluster"); # acl_security_form(&options) # Output HTML for editing security options for the acl module sub acl_security_form { # Show editable tables print " $text{'acl_tables'} \n"; local $t; foreach $t (@known_tables) { printf " %s
\n", $t, $_[0]->{$t} ? "checked" : "", $text{'index_table_'.$t}; } print " \n"; # Show allowed target types print " $text{'acl_jumps'}\n"; print "",&ui_opt_textbox("jumps", $_[0]->{'jumps'}, 40, $text{'acl_jall'})," \n"; # Show bootup/apply options local ($f, $i); foreach $f (@acl_features) { print "\n" if ($i%2 == 0); print "",$text{'acl_'.$f}," \n"; printf " %s\n", $f, $_[0]->{$f} ? "checked" : "", $text{'yes'}; printf " %s\n", $f, $_[0]->{$f} ? "" : "checked", $text{'no'}; print "\n" if ($i++%2 == 1); } } # acl_security_save(&options) # Parse the form for security options for the acl module sub acl_security_save { local $t; foreach $t (@known_tables) { $_[0]->{$t} = $in{$t}; } local $f; foreach $f (@acl_features) { $_[0]->{$f} = $in{$f}; } $_[0]->{'jumps'} = $in{'jumps_def'} ? undef : $in{'jumps'}; }