summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVlad Glagolev2012-01-19 17:41:18 +0400
committerVlad Glagolev2012-01-19 17:41:18 +0400
commit8954c73b2da81d8d3c0f2daa44a2361a9647388d (patch)
treeb106aafe2c992e526bf649f44142dd9ee52266d6
parent3020b288d7ce3c855c1c7e4fcf66149a4b1b815b (diff)
cacti: => 0.8.7i (security)
-rwxr-xr-xnet/cacti/DETAILS18
-rw-r--r--net/cacti/HISTORY5
-rwxr-xr-xnet/cacti/INSTALL7
-rwxr-xr-xnet/cacti/PREPARE4
-rwxr-xr-xnet/cacti/PRE_BUILD14
-rw-r--r--net/cacti/patches/settings_checkbox.patch56
6 files changed, 68 insertions, 36 deletions
diff --git a/net/cacti/DETAILS b/net/cacti/DETAILS
index 4971f4d770..6b878bebae 100755
--- a/net/cacti/DETAILS
+++ b/net/cacti/DETAILS
@@ -1,16 +1,10 @@
SPELL=cacti
- VERSION=0.8.7h
- SECURITY_PATCH=2
- SOURCE=$SPELL-$VERSION.tar.gz
- SOURCE_HASH=sha512:cbd96e8d0fd0fe49249fa4b85174dbdf27d79b42a7934a6466995585f748ddc8b771cd7903199fe4e53d54b1bcfd3c271bbdc93477904cece00520b65c806ebf
-if [[ $CACTI_PA == y ]]; then
- VERSION_PA=3.0
- SOURCE2=$SPELL-plugin-$VERSION-PA-v${VERSION_PA}.tar.gz
- SOURCE2_URL[0]=http://www.cacti.net/downloads/pia/$SOURCE2
- SOURCE2_HASH=sha512:2d6d45b2095ec1c09e504516f5c0ebee8734c351a25750565ec09fe5d2a98ccc6e74e0bed12e005d4157f4ec85a3fe3941bf0e538621011c36ba79f0f764c224
-SOURCE_DIRECTORY2="$BUILD_DIRECTORY/$SPELL-PA-${VERSION_PA}"
-fi
-SOURCE_DIRECTORY="$BUILD_DIRECTORY/$SPELL-$VERSION"
+ VERSION=0.8.7i
+ VERSION_PIA=3.1
+ SECURITY_PATCH=3
+ SOURCE=$SPELL-$VERSION-PIA-${VERSION_PIA}.tar.gz
+ SOURCE_HASH=sha512:239e5e4f8697029b6075cd194937aefd95bba961388c98591a867d2ad83d3284d9960bf1ca9241e167f100697fd91b532d311d842a91d63220d6b678eec3699c
+SOURCE_DIRECTORY="$BUILD_DIRECTORY/$SPELL-$VERSION-PIA-${VERSION_PIA}"
SOURCE_URL[0]=http://www.cacti.net/downloads/$SOURCE
LICENSE[0]=GPL
WEB_SITE=http://www.cacti.net/
diff --git a/net/cacti/HISTORY b/net/cacti/HISTORY
index 92862c42ca..f688dd0435 100644
--- a/net/cacti/HISTORY
+++ b/net/cacti/HISTORY
@@ -1,3 +1,8 @@
+2012-01-19 Vlad Glagolev <stealth@sourcemage.org>
+ * DETAILS: updated spell to 0.8.7i; SECURITY_PATCH++; PA is now bundled
+ * PREPARE: removed
+ * patches: added official patch (http://cacti.net/download_patches.php)
+
2011-10-12 Vlad Glagolev <stealth@sourcemage.org>
* DETAILS: updated spell to 0.8.7h; SECURITY_PATCH++; updated plugin
arch to 3.0; updated PA source url
diff --git a/net/cacti/INSTALL b/net/cacti/INSTALL
index cd7fd5849c..3ab09b7aac 100755
--- a/net/cacti/INSTALL
+++ b/net/cacti/INSTALL
@@ -1,6 +1 @@
-cd ${SOURCE_DIRECTORY} &&
-install_www_files &&
-
-if [[ $CACTI_PA == y ]]; then
- rm_source_dir "$SOURCE_DIRECTORY2"
-fi
+install_www_files
diff --git a/net/cacti/PREPARE b/net/cacti/PREPARE
deleted file mode 100755
index 521ab6dc0d..0000000000
--- a/net/cacti/PREPARE
+++ /dev/null
@@ -1,4 +0,0 @@
-message "Plugin Architecture provides users with the ability to write or use\n" \
- "plugins with Cacti" &&
-
-config_query CACTI_PA "Install Plugin Architecture?" n
diff --git a/net/cacti/PRE_BUILD b/net/cacti/PRE_BUILD
index 5d34bebf90..4f1cd3fcdb 100755
--- a/net/cacti/PRE_BUILD
+++ b/net/cacti/PRE_BUILD
@@ -5,18 +5,4 @@ if [[ -d "$SPELL_DIRECTORY/patches" ]]; then
for patch in "$SPELL_DIRECTORY/patches"/*.patch; do
patch -p1 < $patch
done
-fi &&
-
-if [[ $CACTI_PA == y ]]; then
- mk_source_dir "$SOURCE_DIRECTORY2"
- cd "$SOURCE_DIRECTORY2" &&
- unpack_file 2 &&
-
- cd "$SOURCE_DIRECTORY" &&
-
- cat "$SOURCE_DIRECTORY2/cacti-plugin-arch/pa.sql" >> cacti.sql &&
- patch -p1 < "$SOURCE_DIRECTORY2/cacti-plugin-arch/$SPELL-plugin-$VERSION-PA-v${VERSION_PA}.diff" &&
-
- # cleaning up post-patching
- rm -f *.orig
fi
diff --git a/net/cacti/patches/settings_checkbox.patch b/net/cacti/patches/settings_checkbox.patch
new file mode 100644
index 0000000000..2226df2632
--- /dev/null
+++ b/net/cacti/patches/settings_checkbox.patch
@@ -0,0 +1,56 @@
+--- 0.8.7i/graph_settings.php 2011-10-12 15:43:42.356672000 -0400
++++ 0.8.7i-patched/graph_settings.php 2011-12-21 11:34:38.000000000 -0500
+@@ -54,7 +54,29 @@
+
+ while (list($tab_short_name, $tab_fields) = each($settings_graphs)) {
+ while (list($field_name, $field_array) = each($tab_fields)) {
+- if ((isset($field_array["items"])) && (is_array($field_array["items"]))) {
++ if ($field_array["method"] == "checkbox") {
++ if (isset($_POST[$field_name])) {
++ db_execute("REPLACE INTO settings_graphs (user_id,name,value) VALUES (" . $_SESSION["sess_user_id"] . ",'$field_name', 'on')");
++ }else{
++ db_execute("REPLACE INTO settings_graphs (user_id,name,value) VALUES (" . $_SESSION["sess_user_id"] . ",'$field_name', '')");
++ }
++ }elseif ($field_array["method"] == "checkbox_group") {
++ while (list($sub_field_name, $sub_field_array) = each($field_array["items"])) {
++ if (isset($_POST[$sub_field_name])) {
++ db_execute("REPLACE INTO settings_graphs (user_id,name,value) VALUES (" . $_SESSION["sess_user_id"] . ",'$sub_field_name', 'on')");
++ }else{
++ db_execute("REPLACE INTO settings_graphs (user_id,name,value) VALUES (" . $_SESSION["sess_user_id"] . ",'$sub_field_name', '')");
++ }
++ }
++ }elseif ($field_array["method"] == "textbox_password") {
++ if ($_POST[$field_name] != $_POST[$field_name."_confirm"]) {
++ raise_message(4);
++ break;
++ }elseif (isset($_POST[$field_name])) {
++ $value = $cnn_id->qstr(get_request_var_post($field_name));
++ db_execute("REPLACE INTO settings_graphs (user_id,name,value) VALUES (" . $_SESSION["sess_user_id"] . ",'$field_name', $value)");
++ }
++ }elseif ((isset($field_array["items"])) && (is_array($field_array["items"]))) {
+ while (list($sub_field_name, $sub_field_array) = each($field_array["items"])) {
+ if (isset($_POST[$sub_field_name])) {
+ $value = $cnn_id->qstr(get_request_var_post($sub_field_name));
+--- 0.8.7i/settings.php 2011-10-12 15:43:42.356672000 -0400
++++ 0.8.7i-patched/settings.php 2011-12-21 13:50:23.868244800 -0500
+@@ -32,6 +31,20 @@
+ while (list($field_name, $field_array) = each($settings{$_POST["tab"]})) {
+ if (($field_array["method"] == "header") || ($field_array["method"] == "spacer" )){
+ /* do nothing */
++ }elseif ($field_array["method"] == "checkbox") {
++ if (isset($_POST[$field_name])) {
++ db_execute("replace into settings (name,value) values ('$field_name', 'on')");
++ }else{
++ db_execute("replace into settings (name,value) values ('$field_name', '')");
++ }
++ }elseif ($field_array["method"] == "checkbox_group") {
++ while (list($sub_field_name, $sub_field_array) = each($field_array["items"])) {
++ if (isset($_POST[$sub_field_name])) {
++ db_execute("replace into settings (name,value) values ('$sub_field_name', 'on')");
++ }else{
++ db_execute("replace into settings (name,value) values ('$sub_field_name', '')");
++ }
++ }
+ }elseif ($field_array["method"] == "textbox_password") {
+ if ($_POST[$field_name] != $_POST[$field_name."_confirm"]) {
+ raise_message(4);