From 08d9ecf5afcb5c462959f1eb4d3904500c220c1d Mon Sep 17 00:00:00 2001 From: Ermal Date: Tue, 2 Aug 2011 20:55:45 +0000 Subject: More corrections --- config/snort/snort.inc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'config') diff --git a/config/snort/snort.inc b/config/snort/snort.inc index 10e2f1f2..cf04d647 100644 --- a/config/snort/snort.inc +++ b/config/snort/snort.inc @@ -1168,7 +1168,6 @@ function sync_snort_package_config() /* Start of main config files */ /* create threshold file */ -/* TODO: other func should mirror this code */ function create_snort_suppress($id, $if_real) { global $config, $g; @@ -1176,6 +1175,9 @@ function create_snort_suppress($id, $if_real) { if (!is_dir('/usr/local/etc/snort/suppress')) exec('/bin/mkdir -p /usr/local/etc/snort/suppress'); + if (!is_array($config['installedpackages']['snortglobal']['rule'])) + return; + if ($config['installedpackages']['snortglobal']['rule'][$id]['suppresslistname'] != 'default') { if (preg_match('/([0-9]+)$/', $config['installedpackages']['snortglobal']['rule'][$id]['suppresslistname'], $slist_num_wrt)) { -- cgit v1.2.3