diff --git a/cacti.spec b/cacti.spec index 4e2a4fd..3377bc8 100644 --- a/cacti.spec +++ b/cacti.spec @@ -1,6 +1,6 @@ Name: cacti Version: 0.8.6i -Release: 4%{?dist} +Release: 5%{?dist} Summary: An rrd based graphing tool Group: Applications/System @@ -12,6 +12,10 @@ Source2: cacti.logrotate Source3: cacti.README.Fedora Patch1: cacti-0.8.6h-dbcfg.patch +Patch2: http://www.cacti.net/downloads/patches/0.8.6i/import_template_argument_space_removal.patch +Patch3: http://www.cacti.net/downloads/patches/0.8.6i/dec06-vulnerability-scripts-0.8.6i.patch +Patch4: http://www.cacti.net/downloads/patches/0.8.6i/dec06-vulnerability-poller-0.8.6i.patch +Patch5: http://www.cacti.net/downloads/patches/0.8.6i/poller_output_remainder.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -32,6 +36,10 @@ used to creating traffic graphs with MRTG. %prep %setup -q %patch1 -p0 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 +%patch5 -p1 echo "#*/5 * * * * cacti %{_bindir}/php %{_datadir}/%{name}/poller.php > /dev/null 2>&1" >cacti.cron @@ -103,6 +111,10 @@ fi %attr(0644,root,root) %{_localstatedir}/lib/%{name}/lib %changelog +* Fri Jan 12 2007 Mike McGrath - 0.8.6i-5 +- Added 4 upstream patches +- Fix for BZ 222410 + * Thu Nov 09 2006 Mike McGrath - 0.8.6i-4 - Patch now includes This script is only meant to run at the command line."); + } + +@@ -70,6 +71,10 @@ + $print_data_to_stdout = false; + if ($_SERVER["argc"] == "3") { + if ($_SERVER["argv"][1] <= $_SERVER["argv"][2]) { ++ /* address potential exploits */ ++ input_validate_input_number($_SERVER["argv"][1]); ++ input_validate_input_number($_SERVER["argv"][2]); ++ + $hosts = db_fetch_assoc("select * from host where (disabled = '' and " . + "id >= " . + $_SERVER["argv"][1] . +diff -ruBbd cacti-0.8.6i/copy_cacti_user.php cacti-0.8.6i-patch/copy_cacti_user.php +--- cacti-0.8.6i/copy_cacti_user.php 2006-10-09 00:06:00.000000000 -0400 ++++ cacti-0.8.6i-patch/copy_cacti_user.php 2007-01-01 12:27:15.312500000 -0500 +@@ -25,9 +25,10 @@ + */ + + /* do NOT run this script through a web browser */ +-if (! isset($_SERVER["argv"][0])) { +- die("This script is only meant to run at the command line.\n"); ++if (!isset($_SERVER["argv"][0]) || isset($_SERVER['REQUEST_METHOD']) || isset($_SERVER['REMOTE_ADDR'])) { ++ die("
This script is only meant to run at the command line."); + } ++ + if (empty($_SERVER["argv"][2])) { + die("\nSyntax:\n php copy_cacti_user.php