aboutsummaryrefslogtreecommitdiffstats
path: root/config/snort-dev/snort_json_post.php
diff options
context:
space:
mode:
authorrobiscool <robrob2626@yahoo.com>2011-07-22 11:43:29 -0700
committerrobiscool <robrob2626@yahoo.com>2011-07-22 11:43:29 -0700
commite042d18d244832f0c6fa3ce44c175346eb5bef6b (patch)
tree5380ff77629c8d6a8a486c57e23d8ce5aa43971c /config/snort-dev/snort_json_post.php
parent34f159bb62fed61fefef59cd89c1a492545c8929 (diff)
downloadpfsense-packages-e042d18d244832f0c6fa3ce44c175346eb5bef6b.tar.gz
pfsense-packages-e042d18d244832f0c6fa3ce44c175346eb5bef6b.tar.bz2
pfsense-packages-e042d18d244832f0c6fa3ce44c175346eb5bef6b.zip
snort-dev, jQuery update call backs, update rule db tab
Diffstat (limited to 'config/snort-dev/snort_json_post.php')
-rw-r--r--config/snort-dev/snort_json_post.php35
1 files changed, 11 insertions, 24 deletions
diff --git a/config/snort-dev/snort_json_post.php b/config/snort-dev/snort_json_post.php
index 986493b5..359dd23a 100644
--- a/config/snort-dev/snort_json_post.php
+++ b/config/snort-dev/snort_json_post.php
@@ -54,7 +54,7 @@ if(isset($_POST['__csrf_magic'])) {
function snortJsonReturnCode($returnStatus)
{
if ($returnStatus == true) {
- echo '{"snortgeneralsettings":"success","snortUnhideTabs":"true"}';
+ echo '{"snortgeneralsettings":"success","snortMiscTabCall":"true"}';
return true;
}else{
echo '{"snortgeneralsettings":"fail"}';
@@ -250,29 +250,16 @@ if ($_POST['snortSaveSettings'] == 1) {
* make dir for the new iface, if iface exists or rule dir has changed redo soft link
* may need to move this as a func to new_snort.inc
*/
-
- $newSnortDir = 'sn_' . $_POST['uuid'];
- $pathToSnortDir = '/usr/local/etc/snort';
-
- // creat iface dir and ifcae rules dir
- if (!is_dir("{$pathToSnortDir}/{$newSnortDir}")) {
- createNewIfaceDir($pathToSnortDir, $newSnortDir);
- } //end of mkdir
-
- // change the rule path
- if (is_dir("{$pathToSnortDir}/{$newSnortDir}")) {
-
- $snortCurrentRuleDbName = snortSql_fetchAllSettings('snortDB', 'snortIfaces', 'uuid', $_POST['uuid']);
-
- if ($_POST['ruledbname'] !== $snortCurrentRuleDbName['ruledbname'] || !file_exists("{$pathToSnortDir}/{$newSnortDir}/rules")) {
-
- // NOTE: use full paths or link rm will not work, Freebsd love
- exec("/bin/rm {$pathToSnortDir}/{$newSnortDir}/rules");
- exec("/bin/ln -s /usr/local/etc/snort/snortDBrules/DB/{$_POST['ruledbname']}/rules {$pathToSnortDir}/{$newSnortDir}/rules");
-
- }
-
- }
+ $newSnortDir = 'sn_' . $_POST['uuid'];
+ $pathToSnortDir = '/usr/local/etc/snort';
+
+ // creat iface dir and ifcae rules dir
+ if (!is_dir("{$pathToSnortDir}/{$newSnortDir}")) {
+ createNewIfaceDir($pathToSnortDir, $newSnortDir);
+ } //end of mkdir
+
+ snortRulesCreateSoftlink();
+
}
SnortIfaces_Snort_Interfaces_edit();