From 185acf8c8478dd6a62ebb1175d0849194f73f8a4 Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Tue, 9 Mar 2010 12:34:09 +0000 Subject: [PATCH] sancho.lerena@artica.es> git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2495 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 63 +++++++++++++++++++ pandora_console/extensions/dbmanager.php | 2 +- pandora_console/extensions/pandora_logs.php | 2 +- .../extensions/plugin_registration.php | 2 +- .../extensions/update_manager/settings.php | 2 +- pandora_console/general/logoff.php | 2 +- pandora_console/godmode/admin_access_logs.php | 2 +- .../godmode/agentes/configurar_agente.php | 20 +++--- .../godmode/agentes/manage_config_remote.php | 6 +- .../godmode/agentes/massive_config.php | 2 +- .../godmode/agentes/massive_delete_agents.php | 2 +- .../godmode/agentes/massive_delete_alerts.php | 2 +- .../agentes/massive_delete_modules.php | 2 +- .../godmode/agentes/massive_edit_modules.php | 2 +- .../godmode/agentes/massive_operations.php | 2 +- .../godmode/agentes/modificar_agente.php | 4 +- .../godmode/agentes/module_manager.php | 4 +- .../godmode/agentes/planned_downtime.php | 2 +- .../godmode/alerts/alert_actions.php | 2 +- .../godmode/alerts/alert_commands.php | 6 +- .../godmode/alerts/alert_compounds.php | 2 +- pandora_console/godmode/alerts/alert_list.php | 8 +-- .../godmode/alerts/alert_templates.php | 2 +- .../godmode/alerts/configure_alert_action.php | 2 +- .../alerts/configure_alert_command.php | 2 +- .../alerts/configure_alert_compound.php | 4 +- .../alerts/configure_alert_template.php | 2 +- pandora_console/godmode/db/db_audit.php | 2 +- pandora_console/godmode/db/db_event.php | 2 +- pandora_console/godmode/db/db_info.php | 2 +- pandora_console/godmode/db/db_main.php | 2 +- pandora_console/godmode/db/db_purge.php | 2 +- pandora_console/godmode/db/db_refine.php | 2 +- pandora_console/godmode/db/db_sanity.php | 2 +- pandora_console/godmode/extensions.php | 2 +- .../godmode/gis_maps/configure_gis_map.php | 2 +- pandora_console/godmode/gis_maps/index.php | 2 +- .../godmode/groups/configure_group.php | 2 +- pandora_console/godmode/groups/group_list.php | 6 +- .../godmode/modules/manage_nc_groups.php | 2 +- .../godmode/modules/manage_nc_groups_form.php | 2 +- .../modules/manage_network_components.php | 2 +- .../manage_network_components_form.php | 2 +- .../manage_network_components_form_common.php | 2 +- ...manage_network_components_form_network.php | 2 +- .../manage_network_components_form_wmi.php | 2 +- .../modules/manage_network_templates.php | 2 +- .../modules/manage_network_templates_form.php | 2 +- .../godmode/modules/module_list.php | 2 +- .../godmode/profiles/profile_list.php | 2 +- .../godmode/reporting/graph_builder.php | 2 +- pandora_console/godmode/reporting/graphs.php | 4 +- .../godmode/reporting/map_builder.php | 2 +- .../godmode/reporting/map_builder_wizard.php | 4 +- .../godmode/reporting/reporting_builder.php | 4 +- .../godmode/servers/manage_export.php | 2 +- .../godmode/servers/manage_export_form.php | 2 +- .../godmode/servers/manage_recontask.php | 2 +- .../godmode/servers/manage_recontask_form.php | 2 +- .../godmode/servers/modificar_server.php | 2 +- pandora_console/godmode/servers/plugin.php | 2 +- .../godmode/setup/file_manager.php | 2 +- pandora_console/godmode/setup/gis.php | 2 +- pandora_console/godmode/setup/gis_step_2.php | 2 +- pandora_console/godmode/setup/links.php | 2 +- pandora_console/godmode/setup/news.php | 2 +- pandora_console/godmode/setup/performance.php | 2 +- pandora_console/godmode/setup/setup.php | 2 +- .../godmode/setup/setup_visuals.php | 2 +- .../godmode/snmpconsole/snmp_alert.php | 2 +- .../godmode/users/configure_user.php | 10 +-- pandora_console/godmode/users/user_list.php | 4 +- pandora_console/include/config_process.php | 3 - .../operation/agentes/datos_agente.php | 2 +- .../operation/agentes/estado_agente.php | 4 +- .../agentes/estado_generalagente.php | 2 +- .../operation/agentes/export_csv.php | 2 +- .../operation/agentes/gis_view.php | 2 +- .../operation/agentes/group_view.php | 4 +- .../operation/agentes/networkmap.php | 2 +- .../operation/agentes/sla_view.php | 2 +- .../operation/agentes/status_monitor.php | 2 +- .../operation/agentes/tactical.php | 2 +- .../operation/agentes/ver_agente.php | 2 +- .../operation/events/event_statistics.php | 2 +- pandora_console/operation/events/events.php | 2 +- pandora_console/operation/extensions.php | 2 +- .../operation/reporting/graph_viewer.php | 4 +- .../operation/reporting/reporting_viewer.php | 4 +- .../operation/reporting/reporting_xml.php | 8 +-- .../operation/servers/view_server.php | 2 +- .../operation/servers/view_server_detail.php | 2 +- .../operation/snmpconsole/snmp_view.php | 10 +-- .../operation/visual_console/render_view.php | 6 +- 94 files changed, 197 insertions(+), 137 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index e3a3033fb1..0c084074ea 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,66 @@ +2010-03-09 Miguel de Dios + + * include/config_process.php, extensions/dbmanager.php, + extensions/update_manager/settings.php, extensions/pandora_logs.php, + extensions/plugin_registration.php, operation/snmpconsole/snmp_view.php, + operation/events/event_statistics.php, operation/events/events.php, + operation/extensions.php, operation/visual_console/render_view.php, + operation/agentes/status_monitor.php, operation/agentes/export_csv.php, + operation/agentes/datos_agente.php, + operation/agentes/estado_generalagente.php, + operation/agentes/estado_agente.php, operation/agentes/sla_view.php, + operation/agentes/gis_view.php, operation/agentes/ver_agente.php, + operation/agentes/tactical.php, operation/agentes/group_view.php, + operation/agentes/networkmap.php, operation/reporting/reporting_xml.php, + operation/reporting/reporting_viewer.php, + operation/reporting/graph_viewer.php, operation/servers/view_server.php, + operation/servers/view_server_detail.php, general/logoff.php, + godmode/groups/configure_group.php, godmode/groups/group_list.php, + godmode/profiles/profile_list.php, godmode/admin_access_logs.php, + godmode/extensions.php, godmode/db/db_main.php, godmode/db/db_audit.php, + godmode/db/db_sanity.php, godmode/db/db_refine.php, godmode/db/db_info.php, + godmode/db/db_event.php, godmode/db/db_purge.php, + godmode/agentes/massive_delete_agents.php, + godmode/agentes/massive_config.php, + godmode/agentes/massive_delete_alerts.php, + godmode/agentes/massive_edit_modules.php, + godmode/agentes/massive_operations.php, + godmode/agentes/module_manager.php, godmode/agentes/modificar_agente.php, + godmode/agentes/massive_delete_modules.php, + godmode/agentes/configurar_agente.php, godmode/agentes/planned_downtime.php, + godmode/agentes/manage_config_remote.php, godmode/servers/manage_export.php, + godmode/servers/manage_export_form.php, godmode/servers/plugin.php, + godmode/servers/manage_recontask.php, godmode/servers/modificar_server.php, + godmode/servers/manage_recontask_form.php, + godmode/alerts/configure_alert_compound.php, + godmode/alerts/alert_compounds.php, godmode/alerts/alert_list.php, + godmode/alerts/configure_alert_template.php, + godmode/alerts/alert_templates.php, + godmode/alerts/configure_alert_action.php, + godmode/alerts/configure_alert_command.php, + godmode/alerts/alert_actions.php, godmode/alerts/alert_commands.php, + godmode/snmpconsole/snmp_alert.php, godmode/setup/file_manager.php, + godmode/setup/news.php, godmode/setup/gis_step_2.php, + godmode/setup/links.php, godmode/setup/setup.php, + godmode/setup/performance.php, godmode/setup/gis.php, + godmode/setup/setup_visuals.php, godmode/users/user_list.php, + godmode/users/configure_user.php, godmode/gis_maps/configure_gis_map.php, + godmode/gis_maps/index.php, + godmode/modules/manage_network_components_form.php, + godmode/modules/manage_nc_groups_form.php, + godmode/modules/manage_network_templates.php, + godmode/modules/module_list.php, + godmode/modules/manage_network_components_form_common.php, + godmode/modules/manage_network_components_form_network.php, + godmode/modules/manage_network_templates_form.php, + godmode/modules/manage_network_components_form_wmi.php, + godmode/modules/manage_network_components.php, + godmode/modules/manage_nc_groups.php, + godmode/reporting/reporting_builder.php, godmode/reporting/map_builder.php, + godmode/reporting/map_builder_wizard.php, godmode/reporting/graphs.php, + godmode/reporting/graph_builder.php: changed the deprecated var + $REMOTE_ADDR for standar $_SERVER['REMOTE_ADDR']. + 2010-03-09 Miguel de Dios * operation/search_results.php: fixed the result when call a function db diff --git a/pandora_console/extensions/dbmanager.php b/pandora_console/extensions/dbmanager.php index 478f844a61..8ea7219c69 100644 --- a/pandora_console/extensions/dbmanager.php +++ b/pandora_console/extensions/dbmanager.php @@ -51,7 +51,7 @@ function dbmgr_extension_main () { global $config; if (! give_acl ($config['id_user'], 0, "PM") && ! is_user_admin ($config['id_user'])) { - audit_db ($config['id_user'], $REMOTE_ADDR, "ACL Violation", "Trying to access Setup Management"); + audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "ACL Violation", "Trying to access Setup Management"); require ("general/noaccess.php"); return; } diff --git a/pandora_console/extensions/pandora_logs.php b/pandora_console/extensions/pandora_logs.php index b8e3155b26..1c76a30bed 100644 --- a/pandora_console/extensions/pandora_logs.php +++ b/pandora_console/extensions/pandora_logs.php @@ -38,7 +38,7 @@ function pandoralogs_extension_main () { global $config; if (! give_acl ($config['id_user'], 0, "PM") && ! is_user_admin ($config['id_user'])) { - audit_db ($config['id_user'], $REMOTE_ADDR, "ACL Violation", "Trying to access Setup Management"); + audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "ACL Violation", "Trying to access Setup Management"); require ("general/noaccess.php"); return; } diff --git a/pandora_console/extensions/plugin_registration.php b/pandora_console/extensions/plugin_registration.php index c27a079158..f2a86f9c64 100644 --- a/pandora_console/extensions/plugin_registration.php +++ b/pandora_console/extensions/plugin_registration.php @@ -16,7 +16,7 @@ function pluginreg_extension_main () { global $config; if (! give_acl ($config['id_user'], 0, "PM") && ! is_user_admin ($config['id_user'])) { - audit_db ($config['id_user'], $REMOTE_ADDR, "ACL Violation", "Trying to access Setup Management"); + audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "ACL Violation", "Trying to access Setup Management"); require ("general/noaccess.php"); return; } diff --git a/pandora_console/extensions/update_manager/settings.php b/pandora_console/extensions/update_manager/settings.php index fd8018d2f1..23866710aa 100644 --- a/pandora_console/extensions/update_manager/settings.php +++ b/pandora_console/extensions/update_manager/settings.php @@ -17,7 +17,7 @@ global $config; check_login (); if (! give_acl ($config['id_user'], 0, 'PM')) { - audit_db ($config['id_user'], $REMOTE_ADDR, "ACL Violation", "Trying to use Open Update Manager extension"); + audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "ACL Violation", "Trying to use Open Update Manager extension"); include ("general/noaccess.php"); return; } diff --git a/pandora_console/general/logoff.php b/pandora_console/general/logoff.php index c8263e6791..a0bbb9476f 100644 --- a/pandora_console/general/logoff.php +++ b/pandora_console/general/logoff.php @@ -29,5 +29,5 @@ -
'.$REMOTE_ADDR.''; ?>
+
'.$_SERVER['REMOTE_ADDR'].''; ?>
diff --git a/pandora_console/godmode/admin_access_logs.php b/pandora_console/godmode/admin_access_logs.php index 954a61c933..cfd5162c6d 100644 --- a/pandora_console/godmode/admin_access_logs.php +++ b/pandora_console/godmode/admin_access_logs.php @@ -23,7 +23,7 @@ if ($config['flash_charts']) { check_login (); if (! give_acl ($config['id_user'], 0, "PM")) { - audit_db($config['id_user'], $REMOTE_ADDR, "ACL Violation", + audit_db($config['id_user'], $_SERVER['REMOTE_ADDR'], "ACL Violation", "Trying to access event viewer"); require ("general/noaccess.php"); exit; diff --git a/pandora_console/godmode/agentes/configurar_agente.php b/pandora_console/godmode/agentes/configurar_agente.php index a7159bad3f..13e0b7519b 100644 --- a/pandora_console/godmode/agentes/configurar_agente.php +++ b/pandora_console/godmode/agentes/configurar_agente.php @@ -28,7 +28,7 @@ if ($id_agente) $group = get_agent_group ($id_agente); if (! give_acl ($config["id_user"], $group, "AW")) { - audit_db ($config['id_user'], $REMOTE_ADDR, "ACL Violation", + audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "ACL Violation", "Trying to access agent manager"); require ("general/noaccess.php"); return; @@ -154,7 +154,7 @@ if ($create_agent) { $agent_created_ok = true; - audit_db ($config['id_user'], $REMOTE_ADDR, "Agent management", + audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "Agent management", "Created agent $nombre_agente"); // Create special module agent_keepalive @@ -373,7 +373,7 @@ if (isset($_POST["update_agent"])) { // if modified some agent paramenter } else { enterprise_hook ('update_agent', array ($id_agente)); print_success_message (__('Successfully updated')); - audit_db ($config['id_user'], $REMOTE_ADDR, "Agent management", + audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "Agent management", "Updated agent $nombre_agente"); } @@ -386,7 +386,7 @@ if ($id_agente) { //This has been done in the beginning of the page, but if an agent was created, this id might change $id_grupo = get_agent_group ($id_agente); if (give_acl ($config["id_user"], $id_grupo, "AW") != 1) { - audit_db($config["id_user"],$REMOTE_ADDR, "ACL Violation","Trying to admin an agent without access"); + audit_db($config["id_user"],$_SERVER['REMOTE_ADDR'], "ACL Violation","Trying to admin an agent without access"); require ("general/noaccess.php"); exit; } @@ -424,7 +424,7 @@ if ($update_module || $create_module) { $id_grupo = get_agent_group ($id_agente); if (! give_acl ($config["id_user"], $id_grupo, "AW")) { - audit_db ($config["id_user"], $REMOTE_ADDR, "ACL Violation", + audit_db ($config["id_user"], $_SERVER['REMOTE_ADDR'], "ACL Violation", "Trying to create a module without admin rights"); require ("general/noaccess.php"); exit; @@ -552,7 +552,7 @@ if ($update_module) { $agent = get_db_row ('tagente', 'id_agente', $id_agente); - audit_db ($config['id_user'], $REMOTE_ADDR, "Agent management", + audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "Agent management", "Updated module '$name' for agent ".$agent["nombre"]); } } @@ -615,7 +615,7 @@ if ($create_module) { $edit_module = false; $agent = get_db_row ('tagente', 'id_agente', $id_agente); - audit_db ($config['id_user'], $REMOTE_ADDR, "Agent management", + audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "Agent management", "Added module '$name' for agent ".$agent["nombre"]); } } @@ -628,14 +628,14 @@ if (isset ($_GET["delete_module"])){ // DELETE agent module ! $id_grupo = (int) dame_id_grupo ($id_agente); if (! give_acl ($config["id_user"], $id_grupo, "AW")) { - audit_db($config["id_user"],$REMOTE_ADDR, "ACL Violation", + audit_db($config["id_user"],$_SERVER['REMOTE_ADDR'], "ACL Violation", "Trying to delete a module without admin rights"); require ("general/noaccess.php"); exit; } if ($id_borrar_modulo < 1) { - audit_db ($config["id_user"],$REMOTE_ADDR, "HACK Attempt", + audit_db ($config["id_user"],$_SERVER['REMOTE_ADDR'], "HACK Attempt", "Expected variable from form is not correct"); require ("general/noaccess.php"); exit; @@ -671,7 +671,7 @@ if (isset ($_GET["delete_module"])){ // DELETE agent module ! print_success_message (__('Module deleted succesfully')); $agent = get_db_row ('tagente', 'id_agente', $id_agente); - audit_db ($config['id_user'], $REMOTE_ADDR, "Agent management", + audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "Agent management", "Deleted module '".$module_data["nombre"]."' for agent ".$agent["nombre"]); } } diff --git a/pandora_console/godmode/agentes/manage_config_remote.php b/pandora_console/godmode/agentes/manage_config_remote.php index f842a5c761..782323fe29 100644 --- a/pandora_console/godmode/agentes/manage_config_remote.php +++ b/pandora_console/godmode/agentes/manage_config_remote.php @@ -24,7 +24,7 @@ $update_agent = get_parameter ("update_agent", -1); $update_group = get_parameter ("update_group", -1); if (! give_acl ($config['id_user'], 0, "AW")) { - audit_db ($config['id_user'], $REMOTE_ADDR, "ACL Violation", + audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "ACL Violation", "Trying to access remote config copy tool"); require ("general/noaccess.php"); exit; @@ -55,7 +55,7 @@ if ((isset($_GET["operacion"])) AND ($update_group == -1) ) { // Security check here if (!user_access_to_agent ($id_origen)) { - audit_db ($config['id_user'], $REMOTE_ADDR, "ACL Violation", "Trying to forge a source agent in remote config tool"); + audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "ACL Violation", "Trying to forge a source agent in remote config tool"); require ("general/noaccess.php"); exit; } @@ -69,7 +69,7 @@ if ((isset($_GET["operacion"])) AND ($update_group == -1) ) { // Security check here if (!user_access_to_agent ($id_agente)){ - audit_db ($config['id_user'], $REMOTE_ADDR, "ACL Violation", "Trying to forge a source agent in remote config tool"); + audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "ACL Violation", "Trying to forge a source agent in remote config tool"); require ("general/noaccess.php"); exit; } diff --git a/pandora_console/godmode/agentes/massive_config.php b/pandora_console/godmode/agentes/massive_config.php index f3a3b2acc2..faa3fc60d8 100644 --- a/pandora_console/godmode/agentes/massive_config.php +++ b/pandora_console/godmode/agentes/massive_config.php @@ -18,7 +18,7 @@ check_login (); if (! give_acl ($config['id_user'], 0, "AW")) { - audit_db ($config['id_user'], $REMOTE_ADDR, "ACL Violation", + audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "ACL Violation", "Trying to access Agent Config Management Admin section"); require ("general/noaccess.php"); return; diff --git a/pandora_console/godmode/agentes/massive_delete_agents.php b/pandora_console/godmode/agentes/massive_delete_agents.php index e003f30a20..e1021c83ed 100644 --- a/pandora_console/godmode/agentes/massive_delete_agents.php +++ b/pandora_console/godmode/agentes/massive_delete_agents.php @@ -17,7 +17,7 @@ check_login (); if (! give_acl ($config['id_user'], 0, "AW")) { - audit_db ($config['id_user'], $REMOTE_ADDR, "ACL Violation", + audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "ACL Violation", "Trying to access massive agent deletion section"); require ("general/noaccess.php"); return; diff --git a/pandora_console/godmode/agentes/massive_delete_alerts.php b/pandora_console/godmode/agentes/massive_delete_alerts.php index 04107ecfd9..53516bb87d 100644 --- a/pandora_console/godmode/agentes/massive_delete_alerts.php +++ b/pandora_console/godmode/agentes/massive_delete_alerts.php @@ -18,7 +18,7 @@ check_login (); if (! give_acl ($config['id_user'], 0, "AW")) { - audit_db ($config['id_user'], $REMOTE_ADDR, "ACL Violation", + audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "ACL Violation", "Trying to access massive alert deletion"); require ("general/noaccess.php"); return; diff --git a/pandora_console/godmode/agentes/massive_delete_modules.php b/pandora_console/godmode/agentes/massive_delete_modules.php index 63d2b933ae..e3bff6f51e 100644 --- a/pandora_console/godmode/agentes/massive_delete_modules.php +++ b/pandora_console/godmode/agentes/massive_delete_modules.php @@ -18,7 +18,7 @@ check_login (); if (! give_acl ($config['id_user'], 0, "AW")) { - audit_db ($config['id_user'], $REMOTE_ADDR, "ACL Violation", + audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "ACL Violation", "Trying to access agent massive deletion"); require ("general/noaccess.php"); return; diff --git a/pandora_console/godmode/agentes/massive_edit_modules.php b/pandora_console/godmode/agentes/massive_edit_modules.php index 49a23d5261..a372e71846 100644 --- a/pandora_console/godmode/agentes/massive_edit_modules.php +++ b/pandora_console/godmode/agentes/massive_edit_modules.php @@ -18,7 +18,7 @@ check_login (); if (! give_acl ($config['id_user'], 0, "PM")) { - audit_db ($config['id_user'], $REMOTE_ADDR, "ACL Violation", + audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "ACL Violation", "Trying to access massive module update"); require ("general/noaccess.php"); return; diff --git a/pandora_console/godmode/agentes/massive_operations.php b/pandora_console/godmode/agentes/massive_operations.php index bfb0c180fd..8906034b8f 100644 --- a/pandora_console/godmode/agentes/massive_operations.php +++ b/pandora_console/godmode/agentes/massive_operations.php @@ -17,7 +17,7 @@ check_login (); if (! give_acl ($config['id_user'], 0, "AW")) { - audit_db ($config['id_user'], $REMOTE_ADDR, "ACL Violation", + audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "ACL Violation", "Trying to access massive operation section"); require ("general/noaccess.php"); return; diff --git a/pandora_console/godmode/agentes/modificar_agente.php b/pandora_console/godmode/agentes/modificar_agente.php index 0fe7bd9e19..53b300d6ec 100644 --- a/pandora_console/godmode/agentes/modificar_agente.php +++ b/pandora_console/godmode/agentes/modificar_agente.php @@ -28,7 +28,7 @@ if (($ag_group == -1) && ($group_id != 0)) $ag_group = $group_id; if (! give_acl ($config["id_user"], 0, "AW")) { - audit_db ($config['id_user'], $REMOTE_ADDR, "ACL Violation", + audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "ACL Violation", "Trying to access agent manager"); require ("general/noaccess.php"); exit; @@ -44,7 +44,7 @@ if (isset ($_GET["borrar_agente"])) { // if delete agent $id_agentes[0] = $id_agente; delete_agent ($id_agentes); } else { // NO permissions. - audit_db ($config["id_user"],$REMOTE_ADDR, "ACL Violation", + audit_db ($config["id_user"],$_SERVER['REMOTE_ADDR'], "ACL Violation", "Trying to delete agent \'$agent_name\'"); require ("general/noaccess.php"); exit; diff --git a/pandora_console/godmode/agentes/module_manager.php b/pandora_console/godmode/agentes/module_manager.php index 9eeaea138d..71abd9daad 100644 --- a/pandora_console/godmode/agentes/module_manager.php +++ b/pandora_console/godmode/agentes/module_manager.php @@ -76,14 +76,14 @@ if ($multiple_delete) { $id_grupo = (int) dame_id_grupo ($id_agente); if (! give_acl ($config["id_user"], $id_grupo, "AW")) { - audit_db($config["id_user"],$REMOTE_ADDR, "ACL Violation", + audit_db($config["id_user"],$_SERVER['REMOTE_ADDR'], "ACL Violation", "Trying to delete a module without admin rights"); require ("general/noaccess.php"); exit; } if ($id_agent_module_del < 1) { - audit_db ($config["id_user"],$REMOTE_ADDR, "HACK Attempt", + audit_db ($config["id_user"],$_SERVER['REMOTE_ADDR'], "HACK Attempt", "Expected variable from form is not correct"); die ("Nice try buddy"); exit; diff --git a/pandora_console/godmode/agentes/planned_downtime.php b/pandora_console/godmode/agentes/planned_downtime.php index fe39d0dc3c..5a7dad5ca4 100644 --- a/pandora_console/godmode/agentes/planned_downtime.php +++ b/pandora_console/godmode/agentes/planned_downtime.php @@ -19,7 +19,7 @@ global $config; check_login(); if (! give_acl ($config['id_user'], 0, "AW")) { - audit_db ($config['id_user'], $REMOTE_ADDR, "ACL Violation", + audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "ACL Violation", "Trying to access downtime scheduler"); require ("general/noaccess.php"); return; diff --git a/pandora_console/godmode/alerts/alert_actions.php b/pandora_console/godmode/alerts/alert_actions.php index 1511ec454e..7ed1fa9b7e 100644 --- a/pandora_console/godmode/alerts/alert_actions.php +++ b/pandora_console/godmode/alerts/alert_actions.php @@ -21,7 +21,7 @@ require_once ("include/functions_alerts.php"); check_login (); if (! give_acl ($config['id_user'], 0, "LM")) { - audit_db ($config['id_user'], $REMOTE_ADDR, "ACL Violation", + audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "ACL Violation", "Trying to access Alert actions"); require ("general/noaccess.php"); exit; diff --git a/pandora_console/godmode/alerts/alert_commands.php b/pandora_console/godmode/alerts/alert_commands.php index 0dea4d8309..fbcc044c06 100644 --- a/pandora_console/godmode/alerts/alert_commands.php +++ b/pandora_console/godmode/alerts/alert_commands.php @@ -22,7 +22,7 @@ require_once ("include/functions_alerts.php"); check_login (); if (! give_acl ($config['id_user'], 0, "LM")) { - audit_db ($config['id_user'], $REMOTE_ADDR, "ACL Violation", + audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "ACL Violation", "Trying to access Alert Management"); require ("general/noaccess.php"); exit; @@ -62,7 +62,7 @@ if ($update_command) { $id = (int) get_parameter ('id'); $alert = get_alert_command ($id); if ($alert['internal']) { - audit_db ($config['id_user'], $REMOTE_ADDR, "ACL Violation", "Trying to access Alert Management"); + audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "ACL Violation", "Trying to access Alert Management"); require ("general/noaccess.php"); exit; } @@ -86,7 +86,7 @@ if ($delete_command) { // Internal commands cannot be deleted if (get_alert_command_internal ($id)) { - audit_db ($config['id_user'], $REMOTE_ADDR, "ACL Violation", + audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "ACL Violation", "Trying to access Alert Management"); require ("general/noaccess.php"); return; diff --git a/pandora_console/godmode/alerts/alert_compounds.php b/pandora_console/godmode/alerts/alert_compounds.php index bcf67d08f2..b741e38e04 100644 --- a/pandora_console/godmode/alerts/alert_compounds.php +++ b/pandora_console/godmode/alerts/alert_compounds.php @@ -16,7 +16,7 @@ check_login (); if (! give_acl ($config['id_user'], 0, "LM")) { - audit_db ($config['id_user'], $REMOTE_ADDR, "ACL Violation", + audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "ACL Violation", "Trying to access Alert Management"); require ("general/noaccess.php"); exit; diff --git a/pandora_console/godmode/alerts/alert_list.php b/pandora_console/godmode/alerts/alert_list.php index fe2ffd1e1e..cd4ab4ff5d 100644 --- a/pandora_console/godmode/alerts/alert_list.php +++ b/pandora_console/godmode/alerts/alert_list.php @@ -29,7 +29,7 @@ if (is_ajax ()) { $id_group = get_agent_group ($id_agent); if (! give_acl ($config['id_user'], $id_group, "AR")) { - audit_db ($config['id_user'], $REMOTE_ADDR, "ACL Violation", + audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "ACL Violation", "Trying to access Alert Management"); echo json_encode (false); return; @@ -89,7 +89,7 @@ if (isset ($id_agente)) { } if (! give_acl ($config['id_user'], 0, "LW")) { - audit_db ($config['id_user'], $REMOTE_ADDR, "ACL Violation", + audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "ACL Violation", "Trying to access Alert Management"); require ("general/noaccess.php"); exit; @@ -134,7 +134,7 @@ if ($create_alert) { $module_name = get_db_value ("nombre", "tagente_modulo","id_agente_modulo", $id_agent_module); $agent_name = get_agent_name (get_db_value ("id_agente", "tagente_modulo","id_agente_modulo", $id_agent_module)); - audit_db ($config["id_user"],$REMOTE_ADDR, "Alert management", + audit_db ($config["id_user"],$_SERVER['REMOTE_ADDR'], "Alert management", "Added alert '$alert_template_name' for module '$module_name' in agent '$agent_name'"); print_result_message ($id, @@ -164,7 +164,7 @@ if ($delete_alert) { $module_name = get_db_value ("nombre", "tagente_modulo","id_agente_modulo", $id_agent_module); $agent_name = get_agent_name (get_db_value ("id_agente", "tagente_modulo","id_agente_modulo", $id_agent_module)); - audit_db ($config["id_user"],$REMOTE_ADDR, "Alert management", + audit_db ($config["id_user"],$_SERVER['REMOTE_ADDR'], "Alert management", "Deleted alert '$alert_template_name' for module '$module_name' in agent '$agent_name'"); $result = delete_alert_agent_module ($id_alert_agent_module); diff --git a/pandora_console/godmode/alerts/alert_templates.php b/pandora_console/godmode/alerts/alert_templates.php index 04f9c19a43..bf73a4b39f 100644 --- a/pandora_console/godmode/alerts/alert_templates.php +++ b/pandora_console/godmode/alerts/alert_templates.php @@ -100,7 +100,7 @@ if (is_ajax ()) { } if (! give_acl ($config['id_user'], 0, "LM")) { - audit_db ($config['id_user'], $REMOTE_ADDR, "ACL Violation", + audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "ACL Violation", "Trying to access Alert Management"); require ("general/noaccess.php"); exit; diff --git a/pandora_console/godmode/alerts/configure_alert_action.php b/pandora_console/godmode/alerts/configure_alert_action.php index 1ccb0fbfab..07a55b7897 100644 --- a/pandora_console/godmode/alerts/configure_alert_action.php +++ b/pandora_console/godmode/alerts/configure_alert_action.php @@ -21,7 +21,7 @@ require_once ('include/functions_alerts.php'); check_login (); if (! give_acl ($config['id_user'], 0, "LM")) { - audit_db ($config['id_user'], $REMOTE_ADDR, "ACL Violation", + audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "ACL Violation", "Trying to access Alert Management"); require ("general/noaccess.php"); exit; diff --git a/pandora_console/godmode/alerts/configure_alert_command.php b/pandora_console/godmode/alerts/configure_alert_command.php index 0d7c029490..70876290ac 100644 --- a/pandora_console/godmode/alerts/configure_alert_command.php +++ b/pandora_console/godmode/alerts/configure_alert_command.php @@ -20,7 +20,7 @@ require_once ("include/functions_alerts.php"); check_login (); if (! give_acl ($config['id_user'], 0, "LM")) { - audit_db ($config['id_user'], $REMOTE_ADDR, "ACL Violation", + audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "ACL Violation", "Trying to access Alert Management"); require ("general/noaccess.php"); exit; diff --git a/pandora_console/godmode/alerts/configure_alert_compound.php b/pandora_console/godmode/alerts/configure_alert_compound.php index cbba037d41..70702be340 100644 --- a/pandora_console/godmode/alerts/configure_alert_compound.php +++ b/pandora_console/godmode/alerts/configure_alert_compound.php @@ -18,7 +18,7 @@ global $config; check_login (); if (! give_acl ($config['id_user'], 0, "AW")) { - audit_db ($config['id_user'], $REMOTE_ADDR, "ACL Violation", + audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "ACL Violation", "Trying to access Alert Management"); require ("general/noaccess.php"); return; @@ -228,7 +228,7 @@ if ($id && ! $create_compound) { $id_agent = $compound['id_agent']; $id_group = get_agent_group ($id_agent); if (! give_acl ($config['id_user'], $id_group, "AW")) { - audit_db ($config['id_user'], $REMOTE_ADDR, "ACL Violation", + audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "ACL Violation", "Trying to access Alert Management"); require ("general/noaccess.php"); return; diff --git a/pandora_console/godmode/alerts/configure_alert_template.php b/pandora_console/godmode/alerts/configure_alert_template.php index 566e2c85a6..2db9910894 100644 --- a/pandora_console/godmode/alerts/configure_alert_template.php +++ b/pandora_console/godmode/alerts/configure_alert_template.php @@ -20,7 +20,7 @@ require_once ('include/functions_alerts.php'); check_login (); if (! give_acl ($config['id_user'], 0, "LM")) { - audit_db ($config['id_user'], $REMOTE_ADDR, "ACL Violation", + audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "ACL Violation", "Trying to access Alert Management"); require ("general/noaccess.php"); exit; diff --git a/pandora_console/godmode/db/db_audit.php b/pandora_console/godmode/db/db_audit.php index ac7ce8bb6d..0b4a2b7b2f 100644 --- a/pandora_console/godmode/db/db_audit.php +++ b/pandora_console/godmode/db/db_audit.php @@ -21,7 +21,7 @@ print_page_header (__('Database audit purge'), "", false, "", true); check_login (); if (! give_acl ($config['id_user'], 0, "DM")) { - audit_db ($config['id_user'],$REMOTE_ADDR, "ACL Violation", + audit_db ($config['id_user'],$_SERVER['REMOTE_ADDR'], "ACL Violation", "Trying to access Database Management Audit"); require ("general/noaccess.php"); return; diff --git a/pandora_console/godmode/db/db_event.php b/pandora_console/godmode/db/db_event.php index ae98602d90..4c89466193 100644 --- a/pandora_console/godmode/db/db_event.php +++ b/pandora_console/godmode/db/db_event.php @@ -21,7 +21,7 @@ check_login (); print_page_header (__('Event database cleanup'), "", false, "", true); if (! give_acl ($config['id_user'], 0, "DM")) { - audit_db ($config['id_user'], $REMOTE_ADDR, "ACL Violation", "Trying to access Database Management Event"); + audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "ACL Violation", "Trying to access Database Management Event"); require ("general/noaccess.php"); exit; } diff --git a/pandora_console/godmode/db/db_info.php b/pandora_console/godmode/db/db_info.php index 1a2b86ca5f..c2aa2f7f7e 100644 --- a/pandora_console/godmode/db/db_info.php +++ b/pandora_console/godmode/db/db_info.php @@ -27,7 +27,7 @@ print_page_header (__('Database information'), "", false, "", true); check_login (); if (! give_acl ($config['id_user'], 0, "DM")) { - audit_db ($config['id_user'], $REMOTE_ADDR, "ACL Violation", + audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "ACL Violation", "Trying to access Database Management Info"); require ("general/noaccess.php"); return; diff --git a/pandora_console/godmode/db/db_main.php b/pandora_console/godmode/db/db_main.php index 255c38a492..5dcb09d464 100644 --- a/pandora_console/godmode/db/db_main.php +++ b/pandora_console/godmode/db/db_main.php @@ -24,7 +24,7 @@ if ($config['flash_charts']) { check_login (); if (! give_acl ($config['id_user'], 0, "DM")) { - audit_db ($config['id_user'], $REMOTE_ADDR, "ACL Violation", + audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "ACL Violation", "Trying to access Database Management"); require ("general/noaccess.php"); return; diff --git a/pandora_console/godmode/db/db_purge.php b/pandora_console/godmode/db/db_purge.php index f032be57c9..d6c58be1dc 100644 --- a/pandora_console/godmode/db/db_purge.php +++ b/pandora_console/godmode/db/db_purge.php @@ -25,7 +25,7 @@ if ($config['flash_charts']) { check_login (); if (! give_acl ($config['id_user'], 0, "DM")) { - audit_db($config['id_user'], $REMOTE_ADDR, "ACL Violation", + audit_db($config['id_user'], $_SERVER['REMOTE_ADDR'], "ACL Violation", "Trying to access Database Purge Section"); include ("general/noaccess.php"); exit; diff --git a/pandora_console/godmode/db/db_refine.php b/pandora_console/godmode/db/db_refine.php index 2be6924907..da71addb49 100644 --- a/pandora_console/godmode/db/db_refine.php +++ b/pandora_console/godmode/db/db_refine.php @@ -21,7 +21,7 @@ global $config; check_login (); if (! give_acl ($config['id_user'], 0, "DM")) { - audit_db($config['id_user'],$REMOTE_ADDR, "ACL Violation","Trying to access Database Debug Admin section"); + audit_db($config['id_user'],$_SERVER['REMOTE_ADDR'], "ACL Violation","Trying to access Database Debug Admin section"); require ("general/noaccess.php"); exit; } diff --git a/pandora_console/godmode/db/db_sanity.php b/pandora_console/godmode/db/db_sanity.php index c8270eeb07..822113e942 100644 --- a/pandora_console/godmode/db/db_sanity.php +++ b/pandora_console/godmode/db/db_sanity.php @@ -20,7 +20,7 @@ global $config; check_login(); if (! give_acl ($config["id_user"], 0, "DM")) { - audit_db ($config['id_user'], $REMOTE_ADDR, "ACL Violation", + audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "ACL Violation", "Trying to access Database cure section"); require ("general/noaccess.php"); return; diff --git a/pandora_console/godmode/extensions.php b/pandora_console/godmode/extensions.php index 61cc79a00e..c13aa689b2 100644 --- a/pandora_console/godmode/extensions.php +++ b/pandora_console/godmode/extensions.php @@ -17,7 +17,7 @@ check_login (); if (! give_acl ($config['id_user'], 0, "PM")) { - audit_db ($config['id_user'], $REMOTE_ADDR, "ACL Violation", + audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "ACL Violation", "Trying to access extensions list"); include ("general/noaccess.php"); exit; diff --git a/pandora_console/godmode/gis_maps/configure_gis_map.php b/pandora_console/godmode/gis_maps/configure_gis_map.php index 0c50cdd8a5..cf1b6e3eb3 100644 --- a/pandora_console/godmode/gis_maps/configure_gis_map.php +++ b/pandora_console/godmode/gis_maps/configure_gis_map.php @@ -79,7 +79,7 @@ function updateArrowLayers() {