2013-06-17 Miguel de Dios <miguel.dedios@artica.es>
* include/functions.php: fixed in the function "get_snmpwalk" the lost global $config var. Fixes: #2295 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8335 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
ad7c4c8760
commit
cd25df8283
|
@ -1,3 +1,10 @@
|
|||
2013-06-17 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* include/functions.php: fixed in the function "get_snmpwalk" the
|
||||
lost global $config var.
|
||||
|
||||
Fixes: #2295
|
||||
|
||||
2013-06-14 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* extensions/plugin_registration.php: fixed the url of module
|
||||
|
|
|
@ -1271,10 +1271,12 @@ function get_snmpwalk($ip_target, $snmp_version, $snmp_community = '', $snmp3_au
|
|||
$snmp3_security_level = '', $snmp3_auth_method = '', $snmp3_auth_pass = '',
|
||||
$snmp3_privacy_method = '', $snmp3_privacy_pass = '', $quick_print = 0, $base_oid = "", $snmp_port = '') {
|
||||
|
||||
global $config;
|
||||
|
||||
// Note: quick_print is ignored
|
||||
|
||||
// Fix for snmp port
|
||||
if (!empty($snmp_port)){
|
||||
if (!empty($snmp_port)) {
|
||||
$ip_target = $ip_target.':'.$snmp_port;
|
||||
}
|
||||
|
||||
|
@ -1282,8 +1284,8 @@ function get_snmpwalk($ip_target, $snmp_version, $snmp_community = '', $snmp3_au
|
|||
if ($base_oid != "") {
|
||||
$base_oid = escapeshellarg ($base_oid);
|
||||
}
|
||||
|
||||
if ($config['snmpwalk'] == '') {
|
||||
|
||||
if (empty($config['snmpwalk'])) {
|
||||
switch (PHP_OS) {
|
||||
case "FreeBSD":
|
||||
$snmpwalk_bin = '/usr/local/bin/snmpwalk';
|
||||
|
@ -1312,7 +1314,7 @@ function get_snmpwalk($ip_target, $snmp_version, $snmp_community = '', $snmp3_au
|
|||
exec ($snmpwalk_bin . ' -m ALL -v ' . escapeshellarg($snmp_version) . ' -c ' . escapeshellarg($snmp_community) . ' ' . escapeshellarg($ip_target) . ' ' . $base_oid . ' 2>/dev/null', $output, $rc);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
// Parse the output of snmpwalk
|
||||
foreach ($output as $line) {
|
||||
|
||||
|
@ -1322,7 +1324,7 @@ function get_snmpwalk($ip_target, $snmp_version, $snmp_community = '', $snmp3_au
|
|||
$snmpwalk[$full_oid[0]] = $full_oid[1];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return $snmpwalk;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue