]> git.pld-linux.org Git - packages/cacti.git/blame - dec06-vulnerability-scripts-0.8.6i.patch
- do not reset config, inherit
[packages/cacti.git] / dec06-vulnerability-scripts-0.8.6i.patch
CommitLineData
6a573b99
AM
1diff -ruBbd cacti-0.8.6i/scripts/query_host_cpu.php cacti-0.8.6i-patch/scripts/query_host_cpu.php
2--- cacti-0.8.6i/scripts/query_host_cpu.php 2006-10-09 00:06:00.000000000 -0400
3+++ cacti-0.8.6i-patch/scripts/query_host_cpu.php 2007-01-01 12:50:55.781250000 -0500
4@@ -1,6 +1,12 @@
5 <?php
6
7+/* do NOT run this script through a web browser */
8+if (!isset($_SERVER["argv"][0]) || isset($_SERVER['REQUEST_METHOD']) || isset($_SERVER['REMOTE_ADDR'])) {
9+ die("<br><strong>This script is only meant to run at the command line.</strong>");
10+}
11+
12 $no_http_headers = true;
13+
14 include(dirname(__FILE__) . "/../include/config.php");
15 include(dirname(__FILE__) . "/../lib/snmp.php");
16
17diff -ruBbd cacti-0.8.6i/scripts/query_host_partitions.php cacti-0.8.6i-patch/scripts/query_host_partitions.php
18--- cacti-0.8.6i/scripts/query_host_partitions.php 2006-10-09 00:06:00.000000000 -0400
19+++ cacti-0.8.6i-patch/scripts/query_host_partitions.php 2007-01-01 12:50:55.781250000 -0500
20@@ -1,6 +1,12 @@
21 <?php
22
23+/* do NOT run this script through a web browser */
24+if (!isset($_SERVER["argv"][0]) || isset($_SERVER['REQUEST_METHOD']) || isset($_SERVER['REMOTE_ADDR'])) {
25+ die("<br><strong>This script is only meant to run at the command line.</strong>");
26+}
27+
28 $no_http_headers = true;
29+
30 include(dirname(__FILE__) . "/../include/config.php");
31 include(dirname(__FILE__) . "/../lib/snmp.php");
32
33diff -ruBbd cacti-0.8.6i/scripts/sql.php cacti-0.8.6i-patch/scripts/sql.php
34--- cacti-0.8.6i/scripts/sql.php 2006-10-09 00:06:00.000000000 -0400
35+++ cacti-0.8.6i-patch/scripts/sql.php 2007-01-01 12:50:55.781250000 -0500
36@@ -1,6 +1,12 @@
37 <?
38
39+/* do NOT run this script through a web browser */
40+if (!isset($_SERVER["argv"][0]) || isset($_SERVER['REQUEST_METHOD']) || isset($_SERVER['REMOTE_ADDR'])) {
41+ die("<br><strong>This script is only meant to run at the command line.</strong>");
42+}
43+
44 $no_http_headers = true;
45+
46 include(dirname(__FILE__) . "/../include/config.php");
47
48 if ($database_password == "") {
49diff -ruBbd cacti-0.8.6i/scripts/ss_fping.php cacti-0.8.6i-patch/scripts/ss_fping.php
50--- cacti-0.8.6i/scripts/ss_fping.php 2006-10-09 00:06:00.000000000 -0400
51+++ cacti-0.8.6i-patch/scripts/ss_fping.php 2007-01-01 12:50:55.796875000 -0500
52@@ -1,7 +1,11 @@
53 <?php
54 #!/usr/bin/php -q
55
56-//STANDARD SCRIPT SERVER HEADER!!!
57+/* do NOT run this script through a web browser */
58+if (!isset($_SERVER["argv"][0]) || isset($_SERVER['REQUEST_METHOD']) || isset($_SERVER['REMOTE_ADDR'])) {
59+ die("<br><strong>This script is only meant to run at the command line.</strong>");
60+}
61+
62 $no_http_headers = true;
63
64 /* display No errors */
65diff -ruBbd cacti-0.8.6i/scripts/ss_host_cpu.php cacti-0.8.6i-patch/scripts/ss_host_cpu.php
66--- cacti-0.8.6i/scripts/ss_host_cpu.php 2006-10-09 00:06:00.000000000 -0400
67+++ cacti-0.8.6i-patch/scripts/ss_host_cpu.php 2007-01-01 12:50:55.796875000 -0500
68@@ -1,4 +1,10 @@
69 <?php
70+
71+/* do NOT run this script through a web browser */
72+if (!isset($_SERVER["argv"][0]) || isset($_SERVER['REQUEST_METHOD']) || isset($_SERVER['REMOTE_ADDR'])) {
73+ die("<br><strong>This script is only meant to run at the command line.</strong>");
74+}
75+
76 $no_http_headers = true;
77
78 /* display No errors */
79diff -ruBbd cacti-0.8.6i/scripts/ss_host_disk.php cacti-0.8.6i-patch/scripts/ss_host_disk.php
80--- cacti-0.8.6i/scripts/ss_host_disk.php 2006-10-09 00:06:00.000000000 -0400
81+++ cacti-0.8.6i-patch/scripts/ss_host_disk.php 2007-01-01 12:50:55.796875000 -0500
82@@ -1,4 +1,10 @@
83 <?php
84+
85+/* do NOT run this script through a web browser */
86+if (!isset($_SERVER["argv"][0]) || isset($_SERVER['REQUEST_METHOD']) || isset($_SERVER['REMOTE_ADDR'])) {
87+ die("<br><strong>This script is only meant to run at the command line.</strong>");
88+}
89+
90 $no_http_headers = true;
91
92 /* display No errors */
93diff -ruBbd cacti-0.8.6i/scripts/ss_sql.php cacti-0.8.6i-patch/scripts/ss_sql.php
94--- cacti-0.8.6i/scripts/ss_sql.php 2006-10-09 00:06:00.000000000 -0400
95+++ cacti-0.8.6i-patch/scripts/ss_sql.php 2007-01-01 12:50:55.781250000 -0500
96@@ -1,5 +1,10 @@
97 <?php
98
99+/* do NOT run this script through a web browser */
100+if (!isset($_SERVER["argv"][0]) || isset($_SERVER['REQUEST_METHOD']) || isset($_SERVER['REMOTE_ADDR'])) {
101+ die("<br><strong>This script is only meant to run at the command line.</strong>");
102+}
103+
104 $no_http_headers = true;
105
106 /* display ALL errors */
This page took 0.050053 seconds and 4 git commands to generate.