diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 54021078ee..54d7152b86 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,10 @@ +2014-06-06 Alejandro Gallardo + + * include/functions_snmp_browser.php: Fixed an error. + + * index.php: Modified the config.php permission check + on Windows systems. + 2014-06-06 Hirofumi Kosaka * godmode/massive/massive_delete_agents.php, diff --git a/pandora_console/include/functions_snmp_browser.php b/pandora_console/include/functions_snmp_browser.php index f9eceb7246..6888d58ac7 100644 --- a/pandora_console/include/functions_snmp_browser.php +++ b/pandora_console/include/functions_snmp_browser.php @@ -179,7 +179,7 @@ function snmp_browser_get_tree ($target_ip, $community, $starting_oid = '.', $ve exec ($snmpwalk_bin . ' -m ALL -v 3 -u ' . escapeshellarg($snmp3_auth_user) . ' -A ' . escapeshellarg($snmp3_auth_pass) . ' -l ' . escapeshellarg($snmp3_security_level) . ' -a ' . escapeshellarg($snmp3_auth_method) . ' -x ' . escapeshellarg($snmp3_privacy_method) . ' -X ' . escapeshellarg($snmp3_privacy_pass) . ' ' . escapeshellarg($target_ip) . ' ' . escapeshellarg($starting_oid) . ' 2> ' . $error_redir_dir, $output, $rc); } else { - exec ($snmpwalk_bin . ' -m ALL -M +' . escapeshellarg($config['homedir'] . '/attachment/mibs') . ' -Cc -c ' . escapeshellarg($community) . ' -v ' . escapeshellarg($version) . ' ' . escapeshellarg($target_ip) . ' ' . escapeshellarg($starting_oid) . ' 2> ' . $error_redirection, $output, $rc); + exec ($snmpwalk_bin . ' -m ALL -M +' . escapeshellarg($config['homedir'] . '/attachment/mibs') . ' -Cc -c ' . escapeshellarg($community) . ' -v ' . escapeshellarg($version) . ' ' . escapeshellarg($target_ip) . ' ' . escapeshellarg($starting_oid) . ' 2> ' . $error_redir_dir, $output, $rc); } //if ($rc != 0) { // return __('No data'); diff --git a/pandora_console/index.php b/pandora_console/index.php index a4dda309dd..ac4d11bdec 100644 --- a/pandora_console/index.php +++ b/pandora_console/index.php @@ -48,12 +48,14 @@ if ($develop_bypass != 1) { exit; } // Check perms for config.php - if ((substr (sprintf ('%o', fileperms('include/config.php')), -4) != "0600") && - (substr (sprintf ('%o', fileperms('include/config.php')), -4) != "0660") && - (substr (sprintf ('%o', fileperms('include/config.php')), -4) != "0640")) { - $login_screen = 'error_perms'; - require('general/error_screen.php'); - exit; + if (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') { + if ((substr (sprintf ('%o', fileperms('include/config.php')), -4) != "0600") && + (substr (sprintf ('%o', fileperms('include/config.php')), -4) != "0660") && + (substr (sprintf ('%o', fileperms('include/config.php')), -4) != "0640")) { + $login_screen = 'error_perms'; + require('general/error_screen.php'); + exit; + } } }