diff options
author | robiscool <robrob2626@yahoo.com> | 2011-06-18 12:27:42 -0700 |
---|---|---|
committer | robiscool <robrob2626@yahoo.com> | 2011-06-18 12:27:42 -0700 |
commit | 67f143897926c41b870cc087227ab769f203a421 (patch) | |
tree | c436f240a4df188a716a2b0be80ded36948112e9 /config/snort-dev/snort_new.inc | |
parent | 279622d26de69b35e1e0e3f6d3aea877dd7e9a07 (diff) | |
download | pfsense-packages-67f143897926c41b870cc087227ab769f203a421.tar.gz pfsense-packages-67f143897926c41b870cc087227ab769f203a421.tar.bz2 pfsense-packages-67f143897926c41b870cc087227ab769f203a421.zip |
snort-dev, update snort_new.inc, finish update script
Diffstat (limited to 'config/snort-dev/snort_new.inc')
-rw-r--r-- | config/snort-dev/snort_new.inc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/config/snort-dev/snort_new.inc b/config/snort-dev/snort_new.inc index 1f2c807b..1f387370 100644 --- a/config/snort-dev/snort_new.inc +++ b/config/snort-dev/snort_new.inc @@ -243,6 +243,7 @@ function snortSql_updateRuleSigList() $dbname = $_SESSION['snort']['tmp']['snort_rules']['dbName']; $table = $_SESSION['snort']['tmp']['snort_rules']['dbTable']; $rdbuuid = $_SESSION['snort']['tmp']['snort_rules']['rdbuuid']; + $rulefile = $_SESSION['snort']['tmp']['snort_rules']['rulefile']; $addDate = date(U); // dont let user pick the DB path @@ -252,7 +253,7 @@ function snortSql_updateRuleSigList() { $resultid = sqlite_query($db, - "SELECT id FROM {$table} WHERE signatureid = '{$mDEanbled}'; + "SELECT id FROM {$table} WHERE signatureid = '{$mDEanbled}' AND signaturefilename = '{$rulefile}'; "); $chktable = sqlite_fetch_all($resultid, SQLITE_ASSOC); @@ -260,13 +261,13 @@ function snortSql_updateRuleSigList() if (empty($chktable)) { $query_ck = sqlite_query($db, // @ supress warnings usonly in production - "INSERT INTO {$table} (date, rdbuuid, signatureid, enable) VALUES ('{$addDate}', '{$rdbuuid}', '{$mDEanbled}', '{$OnOff}'); + "INSERT INTO {$table} (date, rdbuuid, signatureid, signaturefilename, enable) VALUES ('{$addDate}', '{$rdbuuid}', '{$mDEanbled}', '{$rulefile}', '{$OnOff}'); "); }else{ if ($chktable[0]['enable'] != $OnOff) { $query_ck = sqlite_query($db, // @ supress warnings usonly in production - "UPDATE {$table} SET date = {$addDate}, enable = '{$OnOff}' WHERE signatureid = '{$mDEanbled}'; + "UPDATE {$table} SET date = {$addDate}, enable = '{$OnOff}' WHERE signatureid = '{$mDEanbled}' AND signaturefilename = '{$rulefile}'; "); } |