summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2005-02-16 13:28:33 +0000
committerOlivier Blin <oblin@mandriva.org>2005-02-16 13:28:33 +0000
commit34f248eeebe180e56da780d1c5aa4c662ee652a6 (patch)
treeefdd420ff430408c2f1d994b4c33d1a398d541d2
parent30ca447c67d29595fc235f95e13874c1b0992f4c (diff)
downloaddrakx-34f248eeebe180e56da780d1c5aa4c662ee652a6.tar
drakx-34f248eeebe180e56da780d1c5aa4c662ee652a6.tar.gz
drakx-34f248eeebe180e56da780d1c5aa4c662ee652a6.tar.bz2
drakx-34f248eeebe180e56da780d1c5aa4c662ee652a6.tar.xz
drakx-34f248eeebe180e56da780d1c5aa4c662ee652a6.zip
handle Whitelist signal
-rw-r--r--perl-install/standalone/drakids10
1 files changed, 10 insertions, 0 deletions
diff --git a/perl-install/standalone/drakids b/perl-install/standalone/drakids
index 880ea5911..0a5447c11 100644
--- a/perl-install/standalone/drakids
+++ b/perl-install/standalone/drakids
@@ -46,6 +46,11 @@ my $activefw = activefw->new(sub {
$msg->get_path eq "/com/mandrakesoft/activefirewall" &&
$msg->get_member eq "Blacklist";
+ handle_whitelist($msg->get_args_list) if
+ $msg->get_interface eq "com.mandrakesoft.activefirewall" &&
+ $msg->get_path eq "/com/mandrakesoft/activefirewall" &&
+ $msg->get_member eq "Whitelist";
+
clear_blacklist() if
$msg->get_interface eq "com.mandrakesoft.activefirewall" &&
$msg->get_path eq "/com/mandrakesoft/activefirewall" &&
@@ -142,6 +147,11 @@ sub init_whitelist {
@{$whitelist->{data}} = map { [ $_ ] } $activefw->get_whitelist;
}
+sub handle_whitelist {
+ my ($addr) = @_;
+ push @{$whitelist->{data}}, [ $addr ];
+}
+
sub whitelist {
my @addr = @_;
unblacklist(@addr);