From 34f248eeebe180e56da780d1c5aa4c662ee652a6 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Wed, 16 Feb 2005 13:28:33 +0000 Subject: handle Whitelist signal --- perl-install/standalone/drakids | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'perl-install') 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); -- cgit v1.2.1