HEX
Server: Apache/2.4.18 (Ubuntu)
System: Linux phubuntu06.apexhosting.com 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64
User: master06 (1000)
PHP: 7.0.33-0ubuntu0.16.04.16
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
Upload Files
File: //usr/share/webmin/firewall/acl_security.pl
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 "<tr> <td valign=top><b>$text{'acl_tables'}</b></td> <td colspan=3>\n";
local $t;
foreach $t (@known_tables) {
	printf "<input type=checkbox name=%s value=1 %s> %s<br>\n",
		$t, $_[0]->{$t} ? "checked" : "", $text{'index_table_'.$t};
	}
print "</td> </tr>\n";

# Show allowed target types
print "<tr> <td><b>$text{'acl_jumps'}</b></td>\n";
print "<td colspan=3>",&ui_opt_textbox("jumps", $_[0]->{'jumps'}, 40,
				       $text{'acl_jall'}),"</td> </tr>\n";

# Show bootup/apply options
local ($f, $i);
foreach $f (@acl_features) {
	print "<tr>\n" if ($i%2 == 0);
	print "<td><b>",$text{'acl_'.$f},"</b></td> <td>\n";
	printf "<input type=radio name=%s value=1 %s> %s\n",
		$f, $_[0]->{$f} ? "checked" : "", $text{'yes'};
	printf "<input type=radio name=%s value=0 %s> %s</td>\n",
		$f, $_[0]->{$f} ? "" : "checked", $text{'no'};
	print "</tr>\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'};
}