aboutsummaryrefslogtreecommitdiffstats
path: root/config/snort/snort_sid_mgmt.php
diff options
context:
space:
mode:
authorbmeeks8 <bmeeks8@bellsouth.net>2014-10-05 22:03:26 -0400
committerbmeeks8 <bmeeks8@bellsouth.net>2014-10-05 22:03:26 -0400
commit80fd6990e1d33f7ec824d1d532bd479d9bd01eba (patch)
tree4b5098c7dc42611f921da3b803e3fddebb96a560 /config/snort/snort_sid_mgmt.php
parentb17fa842c602a82047bb357a81b013454935a047 (diff)
downloadpfsense-packages-80fd6990e1d33f7ec824d1d532bd479d9bd01eba.tar.gz
pfsense-packages-80fd6990e1d33f7ec824d1d532bd479d9bd01eba.tar.bz2
pfsense-packages-80fd6990e1d33f7ec824d1d532bd479d9bd01eba.zip
Replace more hard-coded paths with system globals where possible.
Diffstat (limited to 'config/snort/snort_sid_mgmt.php')
-rw-r--r--config/snort/snort_sid_mgmt.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/config/snort/snort_sid_mgmt.php b/config/snort/snort_sid_mgmt.php
index 2ca8dba9..ea1a5b99 100644
--- a/config/snort/snort_sid_mgmt.php
+++ b/config/snort/snort_sid_mgmt.php
@@ -215,9 +215,9 @@ if (isset($_POST['sidlist_dnload']) && isset($_POST['sidlist_fname'])) {
if (isset($_POST['sidlist_dnload_all_x'])) {
$save_date = date("Y-m-d-H-i-s");
$file_name = "snort_sid_conf_files_{$save_date}.tar.gz";
- exec("cd {$sidmods_path} && /usr/bin/tar -czf /tmp/{$file_name} *");
+ exec("cd {$sidmods_path} && /usr/bin/tar -czf {$g['tmp_path']}/{$file_name} *");
- if (file_exists("/tmp/{$file_name}")) {
+ if (file_exists("{$g['tmp_path']}/{$file_name}")) {
ob_start(); //important or other posts will fail
if (isset($_SERVER['HTTPS'])) {
header('Pragma: ');
@@ -227,13 +227,13 @@ if (isset($_POST['sidlist_dnload_all_x'])) {
header("Cache-Control: private, must-revalidate");
}
header("Content-Type: application/octet-stream");
- header("Content-length: " . filesize("/tmp/{$file_name}"));
+ header("Content-length: " . filesize("{$g['tmp_path']}/{$file_name}"));
header("Content-disposition: attachment; filename = {$file_name}");
ob_end_clean(); //important or other post will fail
- readfile("/tmp/{$file_name}");
+ readfile("{$g['tmp_path']}/{$file_name}");
// Clean up the temp file
- unlink_if_exists("/tmp/{$file_name}");
+ unlink_if_exists("{$g['tmp_path']}/{$file_name}");
}
else
$savemsg = gettext("An error occurred while creating the gzip archive!");