diff options
-rw-r--r-- | perl-install/standalone/drakids | 10 |
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); |