summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2005-02-15 18:52:00 +0000
committerOlivier Blin <oblin@mandriva.org>2005-02-15 18:52:00 +0000
commit6bc143d880fe9fef836bc5783bf78e917d02fc77 (patch)
treef40272954ad3450830360066d5eacccd2f60f1de /perl-install/standalone
parente463d4aa06089587dc3b277669b037e0e3353054 (diff)
downloaddrakx-6bc143d880fe9fef836bc5783bf78e917d02fc77.tar
drakx-6bc143d880fe9fef836bc5783bf78e917d02fc77.tar.gz
drakx-6bc143d880fe9fef836bc5783bf78e917d02fc77.tar.bz2
drakx-6bc143d880fe9fef836bc5783bf78e917d02fc77.tar.xz
drakx-6bc143d880fe9fef836bc5783bf78e917d02fc77.zip
handle Init signal (look again for daemon if received)
Diffstat (limited to 'perl-install/standalone')
-rw-r--r--perl-install/standalone/drakids31
1 files changed, 20 insertions, 11 deletions
diff --git a/perl-install/standalone/drakids b/perl-install/standalone/drakids
index e13c57c55..f6ce3c00e 100644
--- a/perl-install/standalone/drakids
+++ b/perl-install/standalone/drakids
@@ -13,6 +13,16 @@ use Gtk2::SimpleList;
use ugtk2 qw(:create :helpers :wrappers);
+my $blacklist = Gtk2::SimpleList->new(addr => 'hidden',
+ N("Date") => 'text',
+ N("Attacker") => 'text',
+ N("Attack type") => 'text',
+ N("Service") => 'text',
+ N("Network interface") => 'text',
+ N("Protocol") => 'text',
+ );
+$blacklist->get_selection->set_mode ('multiple');
+
my $activefw = activefw->new(sub {
my ($con, $msg) = @_;
handle_blacklist($msg->get_args_list) if
@@ -24,17 +34,13 @@ my $activefw = activefw->new(sub {
$msg->get_interface eq "com.mandrakesoft.activefirewall" &&
$msg->get_path eq "/com/mandrakesoft/activefirewall" &&
$msg->get_member eq "Clear";
-});
-my $blacklist = Gtk2::SimpleList->new(addr => 'hidden',
- N("Date") => 'text',
- N("Attacker") => 'text',
- N("Attack type") => 'text',
- N("Service") => 'text',
- N("Network interface") => 'text',
- N("Protocol") => 'text',
- );
-$blacklist->get_selection->set_mode ('multiple');
+ handle_init() if
+ $msg->get_interface eq "com.mandrakesoft.activefirewall" &&
+ $msg->get_path eq "/com/mandrakesoft/activefirewall" &&
+ $msg->get_member eq "Init";
+});
+init_blacklist();
my $w = ugtk2->new(N("Active Firewall : Blacklist"));
gtkpack($w->{window},
@@ -49,12 +55,15 @@ gtkpack($w->{window},
])
]),
]));
-init_blacklist();
$w->show;
Gtk2->main;
ugtk2::exit(0);
+sub handle_init {
+ $activefw->find_daemon;
+ init_blacklist();
+}
sub init_blacklist {
my @packets = $activefw->get_blacklist;