summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2008-04-03 08:36:09 +0000
committerOlivier Blin <oblin@mandriva.com>2008-04-03 08:36:09 +0000
commitb5771d063265a3601610329d0d5bd31267d5de88 (patch)
treeaab1a71acf400f1960aacf4c1d1b94496cfff96d
parent5eae2321154ea61c05fa780599dac2b177692709 (diff)
downloaddrakguard-b5771d063265a3601610329d0d5bd31267d5de88.tar
drakguard-b5771d063265a3601610329d0d5bd31267d5de88.tar.gz
drakguard-b5771d063265a3601610329d0d5bd31267d5de88.tar.bz2
drakguard-b5771d063265a3601610329d0d5bd31267d5de88.tar.xz
drakguard-b5771d063265a3601610329d0d5bd31267d5de88.zip
load and save user whitelist
-rwxr-xr-xbin/drakguard3
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/drakguard b/bin/drakguard
index 517f72b..b28fd91 100755
--- a/bin/drakguard
+++ b/bin/drakguard
@@ -79,6 +79,7 @@ $allusers_list->get_selection->set_mode('multiple');
my $users_list = Gtk2::SimpleList->new(N("Allowed users") => 'text');
$users_list->get_selection->set_mode('multiple');
+@{$users_list->{data}} = difference2($shorewall->{accept_local_users}{http}, [ $proxy_user ]);
my @url_lists = (
{
@@ -254,7 +255,7 @@ sub save() {
if ($shorewall) {
$shorewall->{disabled} = 0 if $enable;
- @{$shorewall->{accept_local_users}{http}} = if_($enable, $proxy_user);
+ @{$shorewall->{accept_local_users}{http}} = if_($enable, uniq($proxy_user,map { $_->[0] } @{$users_list->{data}}));
@{$shorewall->{accept_local_users}{$proxy_port}} = if_($enable, $guardian_user);
network::shorewall::set_redirected_ports($shorewall, 'tcp', $guardian_port, if_($enable, 'http', $proxy_port));
network::shorewall::write($shorewall, $in);