summaryrefslogtreecommitdiffstats
path: root/lib/network/shorewall.pm
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2008-04-03 08:14:06 +0000
committerOlivier Blin <oblin@mandriva.com>2008-04-03 08:14:06 +0000
commit4ad10b70bba8570520e3fa19b858aae19c755eb6 (patch)
tree0a4fac9f1b1b35b5b719361bd3d0b51987c7d884 /lib/network/shorewall.pm
parent844526c6a45a5a02edcd3f46d46d98dd054d695b (diff)
downloaddrakx-net-4ad10b70bba8570520e3fa19b858aae19c755eb6.tar
drakx-net-4ad10b70bba8570520e3fa19b858aae19c755eb6.tar.gz
drakx-net-4ad10b70bba8570520e3fa19b858aae19c755eb6.tar.bz2
drakx-net-4ad10b70bba8570520e3fa19b858aae19c755eb6.tar.xz
drakx-net-4ad10b70bba8570520e3fa19b858aae19c755eb6.zip
allow to accept multiple users for the same port
Diffstat (limited to 'lib/network/shorewall.pm')
-rw-r--r--lib/network/shorewall.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/network/shorewall.pm b/lib/network/shorewall.pm
index 1068609..0361eb8 100644
--- a/lib/network/shorewall.pm
+++ b/lib/network/shorewall.pm
@@ -94,7 +94,7 @@ sub read {
map { "$_/$e->[3]" } split(',', $e->[4]);
} grep { $_->[0] eq 'ACCEPT' && $_->[1] eq 'net' } @rules),
);
- $conf{accept_local_user}{$_->[4]} = $_->[8] foreach grep { $_->[0] eq 'ACCEPT+' } @rules;
+ push @{$conf{accept_local_users}{$_->[4]}}, $_->[8] foreach grep { $_->[0] eq 'ACCEPT+' } @rules;
$conf{redirects}{$_->[3]}{$_->[4]} = $_->[2] foreach grep { $_->[0] eq 'REDIRECT' } @rules;
if (my ($e) = get_config_file('masq')) {
@@ -186,8 +186,8 @@ What do you want to do?"),
if_($use_pptp, [ 'ACCEPT', 'fw', 'loc:10.0.0.138', 'gre' ]),
(map_each { [ 'ACCEPT', 'net', 'fw', $::a, join(',', @$::b), '-' ] } %$ports_by_proto),
(map_each {
- if_($::b, [ 'ACCEPT+', 'fw', 'net', 'tcp', $::a, '-', '-', '-', $::b ]);
- } %{$conf->{accept_local_user}}),
+ if_($::b, map { [ 'ACCEPT+', 'fw', 'net', 'tcp', $::a, '-', '-', '-', $_ ] } @{$::b});
+ } %{$conf->{accept_local_users}}),
(map {
my $proto = $_;
#- WARNING: won't redirect ports from the firewall system if a local zone exists