aboutsummaryrefslogtreecommitdiffstats
path: root/config/snort-dev
diff options
context:
space:
mode:
authorrobiscool <robrob2626@yahoo.com>2011-07-20 12:59:18 -0700
committerrobiscool <robrob2626@yahoo.com>2011-07-20 12:59:18 -0700
commit8eebe3f81f19f27c2dd955813bc4bb8661b61103 (patch)
treedb3f4f94e75862f4099b1a8af98c08c55d91088d /config/snort-dev
parent80abed3392104169a83d7e8234a7614725f43d01 (diff)
downloadpfsense-packages-8eebe3f81f19f27c2dd955813bc4bb8661b61103.tar.gz
pfsense-packages-8eebe3f81f19f27c2dd955813bc4bb8661b61103.tar.bz2
pfsense-packages-8eebe3f81f19f27c2dd955813bc4bb8661b61103.zip
snort-dev, add create snortDBtemp to inc files
Diffstat (limited to 'config/snort-dev')
-rw-r--r--config/snort-dev/snort_download_rules.inc11
-rw-r--r--config/snort-dev/snort_new.inc10
2 files changed, 21 insertions, 0 deletions
diff --git a/config/snort-dev/snort_download_rules.inc b/config/snort-dev/snort_download_rules.inc
index 09770c4f..df292a94 100644
--- a/config/snort-dev/snort_download_rules.inc
+++ b/config/snort-dev/snort_download_rules.inc
@@ -43,6 +43,17 @@
*
*/
+
+// create and cp to tmp db dir
+if (!file_exists('/var/snort/')) {
+ exec('/bin/mkdir -p /var/snort/');
+}
+
+if (file_exists('/usr/local/pkg/snort/snortDBtemp')) {
+ exec('/bin/cp /usr/local/pkg/snort/snortDBtemp /var/snort/snortDBtemp');
+}
+
+
// fetch db Settings NONE Json
function snortSql_fetchAllSettings2($dbname, $table, $type, $id_uuid)
{
diff --git a/config/snort-dev/snort_new.inc b/config/snort-dev/snort_new.inc
index 073319ca..ffc88348 100644
--- a/config/snort-dev/snort_new.inc
+++ b/config/snort-dev/snort_new.inc
@@ -51,6 +51,16 @@ if(isset($_POST['__csrf_magic'])) {
require_once("config.inc");
require_once("functions.inc");
+
+// create and cp to tmp db dir
+if (!file_exists('/var/snort/')) {
+ exec('/bin/mkdir -p /var/snort/');
+}
+
+if (file_exists('/usr/local/pkg/snort/snortDBtemp')) {
+ exec('/bin/cp /usr/local/pkg/snort/snortDBtemp /var/snort/snortDBtemp');
+}
+
// Wites selected sig to file
function snortSidStringRuleEditGUI()
{