mirror of
https://github.com/webmin/webmin.git
synced 2025-07-23 00:30:33 +00:00
Log port openings properly
This commit is contained in:
@ -20,6 +20,9 @@ elsif ($type eq "chain") {
|
||||
elsif ($type eq "host" || $type eq "group") {
|
||||
return &text("log_${action}_${type}", "<tt>$object</tt>");
|
||||
}
|
||||
elsif ($action eq "openports") {
|
||||
return &text('log_openports', join(" ", split(/\0/, $p->{'ports'})));
|
||||
}
|
||||
else {
|
||||
return $text{"log_$action"};
|
||||
}
|
||||
|
@ -114,9 +114,9 @@ PORT: foreach $p (@ARGV) {
|
||||
if (@added) {
|
||||
# Added some rules .. save them
|
||||
&run_before_command();
|
||||
&unlock_file($iptables_save_file);
|
||||
&save_table($filter);
|
||||
&lock_file($iptables_save_file);
|
||||
&save_table($filter);
|
||||
&unlock_file($iptables_save_file);
|
||||
&run_after_command();
|
||||
©_to_cluster();
|
||||
print STDERR "Opened ports ",join(" ", @added),"\n";
|
||||
@ -133,10 +133,10 @@ if (@added) {
|
||||
print "Applied configuration successfully\n";
|
||||
}
|
||||
}
|
||||
&webmin_log("openports");
|
||||
&webmin_log("openports", undef, undef, { 'ports' => \@added });
|
||||
exit($ex);
|
||||
}
|
||||
else {
|
||||
print STDERR "Add ports are already open\n";
|
||||
print STDERR "All ports are already open\n";
|
||||
exit(0);
|
||||
}
|
||||
|
Reference in New Issue
Block a user