From 45674c0bd23989a9e50eb574a1efedbbe11a67bf Mon Sep 17 00:00:00 2001 From: Xin LI Date: Tue, 23 Jun 2015 18:07:00 +0000 Subject: MFH: r384620 (partially). There were some patches that was changed and/or removed and this also applies for 0.8.8d. PR: 200963 Approved by: ports-secteam --- net-mgmt/cacti/files/patch-include__global.php | 4 +-- .../cacti/files/patch-include__global_settings.php | 11 +++---- net-mgmt/cacti/files/patch-install__index.php | 4 +-- net-mgmt/cacti/files/patch-lib__rrd.php | 35 ---------------------- net-mgmt/cacti/files/pkg-message.in | 3 ++ 5 files changed, 11 insertions(+), 46 deletions(-) delete mode 100644 net-mgmt/cacti/files/patch-lib__rrd.php diff --git a/net-mgmt/cacti/files/patch-include__global.php b/net-mgmt/cacti/files/patch-include__global.php index 5e04fdcae7db..7c094a4d3778 100644 --- a/net-mgmt/cacti/files/patch-include__global.php +++ b/net-mgmt/cacti/files/patch-include__global.php @@ -1,5 +1,5 @@ ---- ./include/global.php.orig 2013-08-06 19:31:19.000000000 -0700 -+++ ./include/global.php 2014-08-11 18:37:08.000000000 -0700 +--- include/global.php.bak 2015-03-12 03:07:05.768314249 -0700 ++++ include/global.php 2015-03-12 03:08:04.171320391 -0700 @@ -113,7 +113,7 @@ $config["library_path"] = preg_replace("/(.*[\/])include/", "\\1lib", dirname(__FILE__)); } diff --git a/net-mgmt/cacti/files/patch-include__global_settings.php b/net-mgmt/cacti/files/patch-include__global_settings.php index fdbe9e527235..c365a805c9cd 100644 --- a/net-mgmt/cacti/files/patch-include__global_settings.php +++ b/net-mgmt/cacti/files/patch-include__global_settings.php @@ -1,14 +1,11 @@ ---- ./include/global_settings.php.orig 2013-08-06 19:31:19.000000000 -0700 -+++ ./include/global_settings.php 2014-08-11 18:37:08.000000000 -0700 -@@ -96,9 +96,9 @@ +--- include/global_settings.php.bak 2015-03-12 03:08:59.333297709 -0700 ++++ include/global_settings.php 2015-03-12 03:10:47.532302704 -0700 +@@ -96,7 +96,7 @@ ), "path_cactilog" => array( "friendly_name" => "Cacti Log File Path", - "description" => "The path to your Cacti log file (if blank, defaults to /log/cacti.log)", + "description" => "The path to your Cacti log file (if blank, defaults to /var/log/cacti/log)", "method" => "filepath", -- "default" => $config["base_path"] . "/log/cacti.log", -+ "default" => "/var/log/cacti/log", + "default" => $config["base_path"] . "/log/cacti.log", "max_length" => "255" - ), - "pollerpaths_header" => array( diff --git a/net-mgmt/cacti/files/patch-install__index.php b/net-mgmt/cacti/files/patch-install__index.php index d0f9c7ff974b..2f3db764e397 100644 --- a/net-mgmt/cacti/files/patch-install__index.php +++ b/net-mgmt/cacti/files/patch-install__index.php @@ -1,5 +1,5 @@ ---- ./install/index.php.orig 2013-08-06 19:31:19.000000000 -0700 -+++ ./install/index.php 2014-08-11 18:45:19.000000000 -0700 +--- install/index.php.bak 2015-03-12 03:12:05.409276443 -0700 ++++ install/index.php 2015-03-12 03:14:17.596295374 -0700 @@ -267,7 +267,7 @@ if (config_value_exists("path_cactilog")) { $input["path_cactilog"]["default"] = read_config_option("path_cactilog"); diff --git a/net-mgmt/cacti/files/patch-lib__rrd.php b/net-mgmt/cacti/files/patch-lib__rrd.php deleted file mode 100644 index 52a81c3ba6a0..000000000000 --- a/net-mgmt/cacti/files/patch-lib__rrd.php +++ /dev/null @@ -1,35 +0,0 @@ ---- ./lib/rrd.php.orig 2014-08-11 17:34:23.000000000 -0700 -+++ ./lib/rrd.php 2014-08-11 17:34:23.000000000 -0700 -@@ -1343,20 +1343,20 @@ - $need_rrd_nl = TRUE; - - if ($graph_item_types{$graph_item["graph_type_id"]} == "COMMENT") { -+ # perform variable substitution first (in case this will yield an empty results or brings command injection problems) -+ $comment_arg = rrd_substitute_host_query_data($graph_variables["text_format"][$graph_item_id], $graph, $graph_item); -+ # next, compute the argument of the COMMENT statement and perform injection counter measures -+ if (trim($comment_arg) == '') { # an empty COMMENT must be treated with care -+ $comment_arg = cacti_escapeshellarg(' ' . $hardreturn[$graph_item_id]); -+ } else { -+ $comment_arg = cacti_escapeshellarg($comment_arg . $hardreturn[$graph_item_id]); -+ } -+ -+ # create rrdtool specific command line - if (read_config_option("rrdtool_version") != "rrd-1.0.x") { -- $comment_string = $graph_item_types{$graph_item["graph_type_id"]} . ":" . str_replace(":", "\:", cacti_escapeshellarg($graph_variables["text_format"][$graph_item_id] . $hardreturn[$graph_item_id])) . " "; -- if (trim($comment_string) == 'COMMENT:"\n"') { -- $txt_graph_items .= 'COMMENT:" \n"'; # rrdtool will skip a COMMENT that holds a NL only; so add a blank to make NL work -- } else if (trim($comment_string) != "COMMENT:\"\"") { -- $txt_graph_items .= rrd_substitute_host_query_data($comment_string, $graph, $graph_item); -- } -+ $txt_graph_items .= $graph_item_types{$graph_item["graph_type_id"]} . ":" . str_replace(":", "\:", $comment_arg) . " "; - }else { -- $comment_string = $graph_item_types{$graph_item["graph_type_id"]} . ":" . cacti_escapeshellarg($graph_variables["text_format"][$graph_item_id] . $hardreturn[$graph_item_id]) . " "; -- if (trim($comment_string) == 'COMMENT:"\n"') { -- $txt_graph_items .= 'COMMENT:" \n"'; # rrdtool will skip a COMMENT that holds a NL only; so add a blank to make NL work -- } else if (trim($comment_string) != "COMMENT:\"\"") { -- $txt_graph_items .= rrd_substitute_host_query_data($comment_string, $graph, $graph_item); -- } -+ $txt_graph_items .= $graph_item_types{$graph_item["graph_type_id"]} . ":" . $comment_arg . " "; - } - }elseif (($graph_item_types{$graph_item["graph_type_id"]} == "GPRINT") && (!isset($graph_data_array["graph_nolegend"]))) { - $graph_variables["text_format"][$graph_item_id] = str_replace(":", "\:", $graph_variables["text_format"][$graph_item_id]); /* escape colons */ diff --git a/net-mgmt/cacti/files/pkg-message.in b/net-mgmt/cacti/files/pkg-message.in index 6628eeccb8ec..6b877149c0d6 100644 --- a/net-mgmt/cacti/files/pkg-message.in +++ b/net-mgmt/cacti/files/pkg-message.in @@ -81,4 +81,7 @@ NOTEs as of 10Aug2014: 2) The PERL paths in the Cacti PERL scripts have been updated to /usr/local/bin. +Other Erratas: +Mount linprocfs in /compat/linux/proc will alow most scripts to work. + ======================================================================= -- cgit v1.2.3