aboutsummaryrefslogtreecommitdiffstats
path: root/config/snort/snort_interfaces.php
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2013-06-03 00:02:30 -0700
committerErmal Luçi <eri@pfsense.org>2013-06-03 00:02:30 -0700
commit6e7c1adafe9b7a2518ce020b8a86c8f5276b6c7b (patch)
tree06c98d6ac6dba0fc9f78ee6f8eb932528f312685 /config/snort/snort_interfaces.php
parentdcccb98d5d9dfbf3f3e9a8a2272324dbc3e67ed8 (diff)
parentf6f9238c81a70f4a9f093b0695153bd92baeac78 (diff)
downloadpfsense-packages-6e7c1adafe9b7a2518ce020b8a86c8f5276b6c7b.tar.gz
pfsense-packages-6e7c1adafe9b7a2518ce020b8a86c8f5276b6c7b.tar.bz2
pfsense-packages-6e7c1adafe9b7a2518ce020b8a86c8f5276b6c7b.zip
Merge pull request #454 from bmeeks8/master
Snort Pkg 2.5.8 Update to incorporate Ermal's comments and fix a few bugs
Diffstat (limited to 'config/snort/snort_interfaces.php')
-rwxr-xr-xconfig/snort/snort_interfaces.php16
1 files changed, 10 insertions, 6 deletions
diff --git a/config/snort/snort_interfaces.php b/config/snort/snort_interfaces.php
index ad492df2..390b83eb 100755
--- a/config/snort/snort_interfaces.php
+++ b/config/snort/snort_interfaces.php
@@ -35,6 +35,7 @@ require_once("/usr/local/pkg/snort/snort.inc");
global $g, $rebuild_rules;
$snortdir = SNORTDIR;
+$rcdir = RCFILEPREFIX;
$id = $_GET['id'];
if (isset($_POST['id']))
@@ -60,11 +61,14 @@ if (isset($_POST['del_x'])) {
// If interface had auto-generated Suppress List, then
// delete that along with the interface
$autolist = "{$a_nat[$rulei]['interface']}" . "suppress";
- $a_suppress = &$config['installedpackages']['snortglobal']['suppress']['item'];
- foreach ($a_suppress as $k => $i) {
- if ($i['name'] == $autolist) {
- unset($config['installedpackages']['snortglobal']['suppress']['item'][$k]);
- break;
+ if (is_array($config['installedpackages']['snortglobal']['suppress']) &&
+ is_array($config['installedpackages']['snortglobal']['suppress']['item'])) {
+ $a_suppress = &$config['installedpackages']['snortglobal']['suppress']['item'];
+ foreach ($a_suppress as $k => $i) {
+ if ($i['name'] == $autolist) {
+ unset($config['installedpackages']['snortglobal']['suppress']['item'][$k]);
+ break;
+ }
}
}
@@ -85,7 +89,7 @@ if (isset($_POST['del_x'])) {
snort_create_rc();
else {
conf_mount_rw();
- @unlink('/usr/local/etc/rc.d/snort.sh');
+ @unlink("{$rcdir}/snort.sh");
conf_mount_ro();
}