diff options
author | Bill Meeks <bmeeks8@bellsouth.net> | 2013-01-21 00:51:41 -0500 |
---|---|---|
committer | Bill Meeks <bmeeks8@bellsouth.net> | 2013-01-21 00:51:41 -0500 |
commit | 930f4b80241346069715f0d573dff7090ed1f650 (patch) | |
tree | 190d6ad3cf522b93a5ae6f3a49de33192706bbf5 | |
parent | 4d4b1fe8b0f7fd4c27ddef40d45bf4ba347dbce0 (diff) | |
download | pfsense-packages-930f4b80241346069715f0d573dff7090ed1f650.tar.gz pfsense-packages-930f4b80241346069715f0d573dff7090ed1f650.tar.bz2 pfsense-packages-930f4b80241346069715f0d573dff7090ed1f650.zip |
Fix it so Shared Object (SO) rules can be individually viewed in file viewer.
-rwxr-xr-x | config/snort/snort_rules.php | 3 | ||||
-rwxr-xr-x | config/snort/snort_rules_edit.php | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/config/snort/snort_rules.php b/config/snort/snort_rules.php index 63c1f851..f332a96d 100755 --- a/config/snort/snort_rules.php +++ b/config/snort/snort_rules.php @@ -384,6 +384,7 @@ function popup(url) foreach (array_keys($rules_map) as $k1) { foreach (array_keys($rules_map[$k1]) as $k2) { $sid = snort_get_sid($rules_map[$k1][$k2]['rule']); + $gid = snort_get_gid($rules_map[$k1][$k2]['rule']); if (isset($disablesid[$sid])) { $textss = "<span class=\"gray\">"; $textse = "</span>"; @@ -447,7 +448,7 @@ function popup(url) ?> <td width="3%" align="center" valign="middle" nowrap class="list"> <a href="javascript: void(0)" - onclick="popup('snort_rules_edit.php?id=<?=$id;?>&openruleset=<?=$currentruleset;?>&ids=<?=$sid;?>')"><img + onclick="popup('snort_rules_edit.php?id=<?=$id;?>&openruleset=<?=$currentruleset;?>&ids=<?=$sid;?>&gid=<?=$gid;?>')"><img src="../themes/<?= $g['theme']; ?>/images/icons/icon_right.gif" title="<?php echo gettext("Click to view rule"); ?>" width="17" height="17" border="0"></a> <!-- Codes by Quackit.com --> diff --git a/config/snort/snort_rules_edit.php b/config/snort/snort_rules_edit.php index 318df6f9..ab1a24b2 100755 --- a/config/snort/snort_rules_edit.php +++ b/config/snort/snort_rules_edit.php @@ -70,7 +70,7 @@ $contents = ''; if (substr($file, 0, 10) == "IPS Policy") { $rules_map = snort_load_vrt_policy($a_rule[$id]['ips_policy']); if (isset($_GET['ids'])) - $contents = $rules_map[1][trim($_GET['ids'])]['rule']; + $contents = $rules_map[$_GET['gid']][trim($_GET['ids'])]['rule']; else { $contents = "# Snort IPS Policy - " . ucfirst($a_rule[$id]['ips_policy']) . "\n\n"; foreach (array_keys($rules_map) as $k1) { @@ -85,7 +85,7 @@ if (substr($file, 0, 10) == "IPS Policy") { // Is it a SID to load the rule text from? elseif (isset($_GET['ids'])) { $rules_map = snort_load_rules_map("{$snortdir}/rules/{$file}"); - $contents = $rules_map[1][trim($_GET['ids'])]['rule']; + $contents = $rules_map[$_GET['gid']][trim($_GET['ids'])]['rule']; } // Is it our special flowbit rules file? elseif ($file == $flowbit_rules_file) |