diff options
author | bmeeks8 <bmeeks8@bellsouth.net> | 2014-09-20 17:10:48 -0400 |
---|---|---|
committer | bmeeks8 <bmeeks8@bellsouth.net> | 2014-12-15 12:04:34 -0500 |
commit | 4a315fccaffe7139d586507f48fb6eed62927192 (patch) | |
tree | daeb9b858caab40d60258e13063e16dfdaeb6a47 /config | |
parent | d2600c88e6720a1f6f2dad74bbe8dac60b435d97 (diff) | |
download | pfsense-packages-4a315fccaffe7139d586507f48fb6eed62927192.tar.gz pfsense-packages-4a315fccaffe7139d586507f48fb6eed62927192.tar.bz2 pfsense-packages-4a315fccaffe7139d586507f48fb6eed62927192.zip |
Use system globals instead of hard-coded paths.
Diffstat (limited to 'config')
-rw-r--r-- | config/suricata/suricata.inc | 6 | ||||
-rw-r--r-- | config/suricata/suricata_alerts.php | 5 |
2 files changed, 6 insertions, 5 deletions
diff --git a/config/suricata/suricata.inc b/config/suricata/suricata.inc index f0e3a2ff..5fde5e3d 100644 --- a/config/suricata/suricata.inc +++ b/config/suricata/suricata.inc @@ -69,12 +69,12 @@ if ($pf_version >= 2.2) else define('SURICATADIR', '/usr/pbi/suricata-' . php_uname("m") . '/etc/suricata/'); -define('SURICATALOGDIR', '/var/log/suricata/'); +define('SURICATALOGDIR', "{$g['varlog_path']}/suricata/"); define('SURICATA_RULES_UPD_LOGFILE', SURICATALOGDIR . 'suricata_rules_update.log'); define('SURICATA_ENFORCING_RULES_FILENAME', 'suricata.rules'); define('FLOWBITS_FILENAME', 'flowbit-required.rules'); -define('SURICATA_SID_MODS_PATH', '/var/db/suricata/sidmods/'); -define('SURICATA_IPREP_PATH', '/var/db/suricata/iprep/'); +define('SURICATA_SID_MODS_PATH', "{$g['vardb_path']}/suricata/sidmods/"); +define('SURICATA_IPREP_PATH', "{$g['vardb_path']}/suricata/iprep/"); // Rule set download filenames and prefixes define('ET_DNLD_FILENAME', 'emerging.rules.tar.gz'); diff --git a/config/suricata/suricata_alerts.php b/config/suricata/suricata_alerts.php index 57ccbe27..3c244e82 100644 --- a/config/suricata/suricata_alerts.php +++ b/config/suricata/suricata_alerts.php @@ -43,6 +43,7 @@ require_once("guiconfig.inc"); require_once("/usr/local/pkg/suricata/suricata.inc"); +global $g, $config; $supplist = array(); $suri_pf_table = SURICATA_PF_TABLE; $filterlogentries = FALSE; @@ -622,8 +623,8 @@ if ($savemsg) { <?php /* make sure alert file exists */ -if (file_exists("/var/log/suricata/suricata_{$if_real}{$suricata_uuid}/alerts.log")) { - exec("tail -{$anentries} -r /var/log/suricata/suricata_{$if_real}{$suricata_uuid}/alerts.log > /tmp/alerts_suricata{$suricata_uuid}"); +if (file_exists("{$g['varlog_path']}/suricata/suricata_{$if_real}{$suricata_uuid}/alerts.log")) { + exec("tail -{$anentries} -r {$g['varlog_path']}/suricata/suricata_{$if_real}{$suricata_uuid}/alerts.log > /tmp/alerts_suricata{$suricata_uuid}"); if (file_exists("/tmp/alerts_suricata{$suricata_uuid}")) { $tmpblocked = array_flip(suricata_get_blocked_ips()); $counter = 0; |