sancho.lerena@artica.es>

git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2495 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2010-03-09 12:34:09 +00:00
parent b4519a08ed
commit 185acf8c84
94 changed files with 197 additions and 137 deletions

View File

@ -1,3 +1,66 @@
2010-03-09 Miguel de Dios <miguel.dedios@artica.es>
* 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 <miguel.dedios@artica.es> 2010-03-09 Miguel de Dios <miguel.dedios@artica.es>
* operation/search_results.php: fixed the result when call a function db * operation/search_results.php: fixed the result when call a function db

View File

@ -51,7 +51,7 @@ function dbmgr_extension_main () {
global $config; global $config;
if (! give_acl ($config['id_user'], 0, "PM") && ! is_user_admin ($config['id_user'])) { 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"); require ("general/noaccess.php");
return; return;
} }

View File

@ -38,7 +38,7 @@ function pandoralogs_extension_main () {
global $config; global $config;
if (! give_acl ($config['id_user'], 0, "PM") && ! is_user_admin ($config['id_user'])) { 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"); require ("general/noaccess.php");
return; return;
} }

View File

@ -16,7 +16,7 @@
function pluginreg_extension_main () { function pluginreg_extension_main () {
global $config; global $config;
if (! give_acl ($config['id_user'], 0, "PM") && ! is_user_admin ($config['id_user'])) { 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"); require ("general/noaccess.php");
return; return;
} }

View File

@ -17,7 +17,7 @@ global $config;
check_login (); check_login ();
if (! give_acl ($config['id_user'], 0, 'PM')) { 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"); include ("general/noaccess.php");
return; return;
} }

View File

@ -29,5 +29,5 @@
</td></tr> </td></tr>
</table> </table>
</div> </div>
<div id="ip"><?php echo 'IP: <b class="f10">'.$REMOTE_ADDR.'</b>'; ?></div> <div id="ip"><?php echo 'IP: <b class="f10">'.$_SERVER['REMOTE_ADDR'].'</b>'; ?></div>
</div> </div>

View File

@ -23,7 +23,7 @@ if ($config['flash_charts']) {
check_login (); check_login ();
if (! give_acl ($config['id_user'], 0, "PM")) { 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"); "Trying to access event viewer");
require ("general/noaccess.php"); require ("general/noaccess.php");
exit; exit;

View File

@ -28,7 +28,7 @@ if ($id_agente)
$group = get_agent_group ($id_agente); $group = get_agent_group ($id_agente);
if (! give_acl ($config["id_user"], $group, "AW")) { 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"); "Trying to access agent manager");
require ("general/noaccess.php"); require ("general/noaccess.php");
return; return;
@ -154,7 +154,7 @@ if ($create_agent) {
$agent_created_ok = true; $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"); "Created agent $nombre_agente");
// Create special module agent_keepalive // Create special module agent_keepalive
@ -373,7 +373,7 @@ if (isset($_POST["update_agent"])) { // if modified some agent paramenter
} else { } else {
enterprise_hook ('update_agent', array ($id_agente)); enterprise_hook ('update_agent', array ($id_agente));
print_success_message (__('Successfully updated')); 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"); "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 //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); $id_grupo = get_agent_group ($id_agente);
if (give_acl ($config["id_user"], $id_grupo, "AW") != 1) { 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"); require ("general/noaccess.php");
exit; exit;
} }
@ -424,7 +424,7 @@ if ($update_module || $create_module) {
$id_grupo = get_agent_group ($id_agente); $id_grupo = get_agent_group ($id_agente);
if (! give_acl ($config["id_user"], $id_grupo, "AW")) { 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"); "Trying to create a module without admin rights");
require ("general/noaccess.php"); require ("general/noaccess.php");
exit; exit;
@ -552,7 +552,7 @@ if ($update_module) {
$agent = get_db_row ('tagente', 'id_agente', $id_agente); $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"]); "Updated module '$name' for agent ".$agent["nombre"]);
} }
} }
@ -615,7 +615,7 @@ if ($create_module) {
$edit_module = false; $edit_module = false;
$agent = get_db_row ('tagente', 'id_agente', $id_agente); $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"]); "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); $id_grupo = (int) dame_id_grupo ($id_agente);
if (! give_acl ($config["id_user"], $id_grupo, "AW")) { 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"); "Trying to delete a module without admin rights");
require ("general/noaccess.php"); require ("general/noaccess.php");
exit; exit;
} }
if ($id_borrar_modulo < 1) { 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"); "Expected variable from form is not correct");
require ("general/noaccess.php"); require ("general/noaccess.php");
exit; exit;
@ -671,7 +671,7 @@ if (isset ($_GET["delete_module"])){ // DELETE agent module !
print_success_message (__('Module deleted succesfully')); print_success_message (__('Module deleted succesfully'));
$agent = get_db_row ('tagente', 'id_agente', $id_agente); $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"]); "Deleted module '".$module_data["nombre"]."' for agent ".$agent["nombre"]);
} }
} }

View File

@ -24,7 +24,7 @@ $update_agent = get_parameter ("update_agent", -1);
$update_group = get_parameter ("update_group", -1); $update_group = get_parameter ("update_group", -1);
if (! give_acl ($config['id_user'], 0, "AW")) { 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"); "Trying to access remote config copy tool");
require ("general/noaccess.php"); require ("general/noaccess.php");
exit; exit;
@ -55,7 +55,7 @@ if ((isset($_GET["operacion"])) AND ($update_group == -1) ) {
// Security check here // Security check here
if (!user_access_to_agent ($id_origen)) { 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"); require ("general/noaccess.php");
exit; exit;
} }
@ -69,7 +69,7 @@ if ((isset($_GET["operacion"])) AND ($update_group == -1) ) {
// Security check here // Security check here
if (!user_access_to_agent ($id_agente)){ 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"); require ("general/noaccess.php");
exit; exit;
} }

View File

@ -18,7 +18,7 @@
check_login (); check_login ();
if (! give_acl ($config['id_user'], 0, "AW")) { 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"); "Trying to access Agent Config Management Admin section");
require ("general/noaccess.php"); require ("general/noaccess.php");
return; return;

View File

@ -17,7 +17,7 @@
check_login (); check_login ();
if (! give_acl ($config['id_user'], 0, "AW")) { 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"); "Trying to access massive agent deletion section");
require ("general/noaccess.php"); require ("general/noaccess.php");
return; return;

View File

@ -18,7 +18,7 @@
check_login (); check_login ();
if (! give_acl ($config['id_user'], 0, "AW")) { 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"); "Trying to access massive alert deletion");
require ("general/noaccess.php"); require ("general/noaccess.php");
return; return;

View File

@ -18,7 +18,7 @@
check_login (); check_login ();
if (! give_acl ($config['id_user'], 0, "AW")) { 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"); "Trying to access agent massive deletion");
require ("general/noaccess.php"); require ("general/noaccess.php");
return; return;

View File

@ -18,7 +18,7 @@
check_login (); check_login ();
if (! give_acl ($config['id_user'], 0, "PM")) { 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"); "Trying to access massive module update");
require ("general/noaccess.php"); require ("general/noaccess.php");
return; return;

View File

@ -17,7 +17,7 @@
check_login (); check_login ();
if (! give_acl ($config['id_user'], 0, "AW")) { 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"); "Trying to access massive operation section");
require ("general/noaccess.php"); require ("general/noaccess.php");
return; return;

View File

@ -28,7 +28,7 @@ if (($ag_group == -1) && ($group_id != 0))
$ag_group = $group_id; $ag_group = $group_id;
if (! give_acl ($config["id_user"], 0, "AW")) { 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"); "Trying to access agent manager");
require ("general/noaccess.php"); require ("general/noaccess.php");
exit; exit;
@ -44,7 +44,7 @@ if (isset ($_GET["borrar_agente"])) { // if delete agent
$id_agentes[0] = $id_agente; $id_agentes[0] = $id_agente;
delete_agent ($id_agentes); delete_agent ($id_agentes);
} else { // NO permissions. } 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\'"); "Trying to delete agent \'$agent_name\'");
require ("general/noaccess.php"); require ("general/noaccess.php");
exit; exit;

View File

@ -76,14 +76,14 @@ if ($multiple_delete) {
$id_grupo = (int) dame_id_grupo ($id_agente); $id_grupo = (int) dame_id_grupo ($id_agente);
if (! give_acl ($config["id_user"], $id_grupo, "AW")) { 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"); "Trying to delete a module without admin rights");
require ("general/noaccess.php"); require ("general/noaccess.php");
exit; exit;
} }
if ($id_agent_module_del < 1) { 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"); "Expected variable from form is not correct");
die ("Nice try buddy"); die ("Nice try buddy");
exit; exit;

View File

@ -19,7 +19,7 @@ global $config;
check_login(); check_login();
if (! give_acl ($config['id_user'], 0, "AW")) { 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"); "Trying to access downtime scheduler");
require ("general/noaccess.php"); require ("general/noaccess.php");
return; return;

View File

@ -21,7 +21,7 @@ require_once ("include/functions_alerts.php");
check_login (); check_login ();
if (! give_acl ($config['id_user'], 0, "LM")) { 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"); "Trying to access Alert actions");
require ("general/noaccess.php"); require ("general/noaccess.php");
exit; exit;

View File

@ -22,7 +22,7 @@ require_once ("include/functions_alerts.php");
check_login (); check_login ();
if (! give_acl ($config['id_user'], 0, "LM")) { 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"); "Trying to access Alert Management");
require ("general/noaccess.php"); require ("general/noaccess.php");
exit; exit;
@ -62,7 +62,7 @@ if ($update_command) {
$id = (int) get_parameter ('id'); $id = (int) get_parameter ('id');
$alert = get_alert_command ($id); $alert = get_alert_command ($id);
if ($alert['internal']) { 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"); require ("general/noaccess.php");
exit; exit;
} }
@ -86,7 +86,7 @@ if ($delete_command) {
// Internal commands cannot be deleted // Internal commands cannot be deleted
if (get_alert_command_internal ($id)) { 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"); "Trying to access Alert Management");
require ("general/noaccess.php"); require ("general/noaccess.php");
return; return;

View File

@ -16,7 +16,7 @@
check_login (); check_login ();
if (! give_acl ($config['id_user'], 0, "LM")) { 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"); "Trying to access Alert Management");
require ("general/noaccess.php"); require ("general/noaccess.php");
exit; exit;

View File

@ -29,7 +29,7 @@ if (is_ajax ()) {
$id_group = get_agent_group ($id_agent); $id_group = get_agent_group ($id_agent);
if (! give_acl ($config['id_user'], $id_group, "AR")) { 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"); "Trying to access Alert Management");
echo json_encode (false); echo json_encode (false);
return; return;
@ -89,7 +89,7 @@ if (isset ($id_agente)) {
} }
if (! give_acl ($config['id_user'], 0, "LW")) { 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"); "Trying to access Alert Management");
require ("general/noaccess.php"); require ("general/noaccess.php");
exit; exit;
@ -134,7 +134,7 @@ if ($create_alert) {
$module_name = get_db_value ("nombre", "tagente_modulo","id_agente_modulo", $id_agent_module); $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)); $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'"); "Added alert '$alert_template_name' for module '$module_name' in agent '$agent_name'");
print_result_message ($id, 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); $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)); $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'"); "Deleted alert '$alert_template_name' for module '$module_name' in agent '$agent_name'");
$result = delete_alert_agent_module ($id_alert_agent_module); $result = delete_alert_agent_module ($id_alert_agent_module);

View File

@ -100,7 +100,7 @@ if (is_ajax ()) {
} }
if (! give_acl ($config['id_user'], 0, "LM")) { 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"); "Trying to access Alert Management");
require ("general/noaccess.php"); require ("general/noaccess.php");
exit; exit;

View File

@ -21,7 +21,7 @@ require_once ('include/functions_alerts.php');
check_login (); check_login ();
if (! give_acl ($config['id_user'], 0, "LM")) { 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"); "Trying to access Alert Management");
require ("general/noaccess.php"); require ("general/noaccess.php");
exit; exit;

View File

@ -20,7 +20,7 @@ require_once ("include/functions_alerts.php");
check_login (); check_login ();
if (! give_acl ($config['id_user'], 0, "LM")) { 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"); "Trying to access Alert Management");
require ("general/noaccess.php"); require ("general/noaccess.php");
exit; exit;

View File

@ -18,7 +18,7 @@ global $config;
check_login (); check_login ();
if (! give_acl ($config['id_user'], 0, "AW")) { 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"); "Trying to access Alert Management");
require ("general/noaccess.php"); require ("general/noaccess.php");
return; return;
@ -228,7 +228,7 @@ if ($id && ! $create_compound) {
$id_agent = $compound['id_agent']; $id_agent = $compound['id_agent'];
$id_group = get_agent_group ($id_agent); $id_group = get_agent_group ($id_agent);
if (! give_acl ($config['id_user'], $id_group, "AW")) { 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"); "Trying to access Alert Management");
require ("general/noaccess.php"); require ("general/noaccess.php");
return; return;

View File

@ -20,7 +20,7 @@ require_once ('include/functions_alerts.php');
check_login (); check_login ();
if (! give_acl ($config['id_user'], 0, "LM")) { 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"); "Trying to access Alert Management");
require ("general/noaccess.php"); require ("general/noaccess.php");
exit; exit;

View File

@ -21,7 +21,7 @@ print_page_header (__('Database audit purge'), "", false, "", true);
check_login (); check_login ();
if (! give_acl ($config['id_user'], 0, "DM")) { 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"); "Trying to access Database Management Audit");
require ("general/noaccess.php"); require ("general/noaccess.php");
return; return;

View File

@ -21,7 +21,7 @@ check_login ();
print_page_header (__('Event database cleanup'), "", false, "", true); print_page_header (__('Event database cleanup'), "", false, "", true);
if (! give_acl ($config['id_user'], 0, "DM")) { 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"); require ("general/noaccess.php");
exit; exit;
} }

View File

@ -27,7 +27,7 @@ print_page_header (__('Database information'), "", false, "", true);
check_login (); check_login ();
if (! give_acl ($config['id_user'], 0, "DM")) { 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"); "Trying to access Database Management Info");
require ("general/noaccess.php"); require ("general/noaccess.php");
return; return;

View File

@ -24,7 +24,7 @@ if ($config['flash_charts']) {
check_login (); check_login ();
if (! give_acl ($config['id_user'], 0, "DM")) { 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"); "Trying to access Database Management");
require ("general/noaccess.php"); require ("general/noaccess.php");
return; return;

View File

@ -25,7 +25,7 @@ if ($config['flash_charts']) {
check_login (); check_login ();
if (! give_acl ($config['id_user'], 0, "DM")) { 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"); "Trying to access Database Purge Section");
include ("general/noaccess.php"); include ("general/noaccess.php");
exit; exit;

View File

@ -21,7 +21,7 @@ global $config;
check_login (); check_login ();
if (! give_acl ($config['id_user'], 0, "DM")) { 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"); require ("general/noaccess.php");
exit; exit;
} }

View File

@ -20,7 +20,7 @@ global $config;
check_login(); check_login();
if (! give_acl ($config["id_user"], 0, "DM")) { 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"); "Trying to access Database cure section");
require ("general/noaccess.php"); require ("general/noaccess.php");
return; return;

View File

@ -17,7 +17,7 @@
check_login (); check_login ();
if (! give_acl ($config['id_user'], 0, "PM")) { 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"); "Trying to access extensions list");
include ("general/noaccess.php"); include ("general/noaccess.php");
exit; exit;

View File

@ -79,7 +79,7 @@ function updateArrowLayers() {
<?php <?php
if (! give_acl ($config['id_user'], 0, "IW")) { if (! give_acl ($config['id_user'], 0, "IW")) {
audit_db ($config['id_user'], $REMOTE_ADDR, "ACL Violation", "Trying to access map builder"); audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "ACL Violation", "Trying to access map builder");
require ("general/noaccess.php"); require ("general/noaccess.php");
return; return;
} }

View File

@ -22,7 +22,7 @@ require_once ('include/functions_gis.php');
require_javascript_file('openlayers.pandora'); require_javascript_file('openlayers.pandora');
if (! give_acl ($config['id_user'], 0, "IW")) { if (! give_acl ($config['id_user'], 0, "IW")) {
audit_db ($config['id_user'], $REMOTE_ADDR, "ACL Violation", "Trying to access map builder"); audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "ACL Violation", "Trying to access map builder");
require ("general/noaccess.php"); require ("general/noaccess.php");
return; return;
} }

View File

@ -19,7 +19,7 @@ global $config;
check_login (); check_login ();
if (! give_acl ($config['id_user'], 0, "PM")) { if (! give_acl ($config['id_user'], 0, "PM")) {
audit_db ($config['id_user'], $REMOTE_ADDR, "ACL Violation", "Trying to access Group Management2"); audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "ACL Violation", "Trying to access Group Management2");
require ("general/noaccess.php"); require ("general/noaccess.php");
return; return;
} }

View File

@ -20,7 +20,7 @@ global $config;
check_login(); check_login();
if (! give_acl($config['id_user'], 0, "PM")) { 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 Group Management"); "Trying to access Group Management");
require ("general/noaccess.php"); require ("general/noaccess.php");
return; return;
@ -34,7 +34,7 @@ if (is_ajax ()) {
$id_group = (int) get_parameter ('id_group'); $id_group = (int) get_parameter ('id_group');
if (! give_acl ($config['id_user'], $id_group, "AR")) { 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"); "Trying to access Alert Management");
echo json_encode (false); echo json_encode (false);
return; return;
@ -50,7 +50,7 @@ if (is_ajax ()) {
$id_group = (int) get_parameter ('id_group'); $id_group = (int) get_parameter ('id_group');
if (! give_acl ($config['id_user'], $id_group, "AR")) { 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"); "Trying to access Alert Management");
echo json_encode (false); echo json_encode (false);
return; return;

View File

@ -19,7 +19,7 @@ global $config;
check_login (); check_login ();
if (! give_acl ($config['id_user'], 0, "PM")) { 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 SNMP Group Management"); "Trying to access SNMP Group Management");
require ("general/noaccess.php"); require ("general/noaccess.php");
return; return;

View File

@ -19,7 +19,7 @@ global $config;
check_login (); check_login ();
if (! give_acl ($config['id_user'], 0, "PM")) { 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 SNMO Groups Management"); "Trying to access SNMO Groups Management");
require ("general/noaccess.php"); require ("general/noaccess.php");
exit; exit;

View File

@ -19,7 +19,7 @@ global $config;
check_login (); check_login ();
if (! give_acl ($config['id_user'], 0, "PM")) { 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 Agent Management"); "Trying to access Agent Management");
require ("general/noaccess.php"); require ("general/noaccess.php");
exit; exit;

View File

@ -19,7 +19,7 @@ global $config;
check_login (); check_login ();
if (! give_acl ($config['id_user'], 0, "PM")) { 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 Agent Management"); "Trying to access Agent Management");
require ("general/noaccess.php"); require ("general/noaccess.php");
exit; exit;

View File

@ -16,7 +16,7 @@
global $config; global $config;
if (! give_acl ($config['id_user'], 0, "PM")) { 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 Agent Management"); "Trying to access Agent Management");
require ("general/noaccess.php"); require ("general/noaccess.php");
return; return;

View File

@ -19,7 +19,7 @@ global $config;
check_login (); check_login ();
if (! give_acl ($config['id_user'], 0, "PM")) { 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 Agent Management"); "Trying to access Agent Management");
require ("general/noaccess.php"); require ("general/noaccess.php");
return; return;

View File

@ -20,7 +20,7 @@ global $config;
check_login (); check_login ();
if (! give_acl ($config['id_user'], 0, "PM")) { 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 Agent Management"); "Trying to access Agent Management");
require ("general/noaccess.php"); require ("general/noaccess.php");
return; return;

View File

@ -20,7 +20,7 @@ global $config;
check_login (); check_login ();
if (! give_acl ($config['id_user'], 0, "PM")) { 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 Network Profile Management"); "Trying to access Network Profile Management");
require ("general/noaccess.php"); require ("general/noaccess.php");
return; return;

View File

@ -20,7 +20,7 @@ check_login ();
if (! give_acl ($config['id_user'], 0, "PM")) { 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 Network Profile Management"); "Trying to access Network Profile Management");
require ("general/noaccess.php"); require ("general/noaccess.php");
exit; exit;

View File

@ -19,7 +19,7 @@ global $config;
check_login (); check_login ();
if (! give_acl ($config['id_user'], 0, "PM")) { if (! give_acl ($config['id_user'], 0, "PM")) {
audit_db ($config['id_user'], $REMOTE_ADDR, "ACL Violation","Trying to access module management"); audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "ACL Violation","Trying to access module management");
require ("general/noaccess.php"); require ("general/noaccess.php");
exit; exit;
} }

View File

@ -19,7 +19,7 @@ global $config;
check_login (); check_login ();
if (! give_acl ($config['id_user'], 0, "PM")) { 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 Profile Management"); "Trying to access Profile Management");
require ("general/noaccess.php"); require ("general/noaccess.php");
return; return;

View File

@ -51,7 +51,7 @@ if ($config['flash_charts']) {
check_login (); check_login ();
if (! give_acl ($config['id_user'], 0, "IW")) { if (! give_acl ($config['id_user'], 0, "IW")) {
audit_db ($config['id_user'], $REMOTE_ADDR, "ACL Violation", audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "ACL Violation",
"Trying to access graph builder"); "Trying to access graph builder");
include ("general/noaccess.php"); include ("general/noaccess.php");
exit; exit;

View File

@ -21,7 +21,7 @@ require_once ('include/functions_custom_graphs.php');
check_login (); check_login ();
if (! give_acl ($config['id_user'], 0, "IW")) { if (! give_acl ($config['id_user'], 0, "IW")) {
audit_db ($config['id_user'], $REMOTE_ADDR, "ACL Violation", audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "ACL Violation",
"Trying to access Inventory Module Management"); "Trying to access Inventory Module Management");
require ("general/noaccess.php"); require ("general/noaccess.php");
return; return;
@ -50,7 +50,7 @@ if ($delete_graph) {
echo $result; echo $result;
} }
else { else {
audit_db ($config['id_user'],$REMOTE_ADDR, "ACL Violation","Trying to delete a graph from access graph builder"); audit_db ($config['id_user'],$_SERVER['REMOTE_ADDR'], "ACL Violation","Trying to delete a graph from access graph builder");
include ("general/noaccess.php"); include ("general/noaccess.php");
exit; exit;
} }

View File

@ -43,7 +43,7 @@ if (is_ajax ()) {
check_login (); check_login ();
if (! give_acl ($config['id_user'], 0, "IW")) { if (! give_acl ($config['id_user'], 0, "IW")) {
audit_db ($config['id_user'], $REMOTE_ADDR, "ACL Violation", "Trying to access map builder"); audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "ACL Violation", "Trying to access map builder");
require ("general/noaccess.php"); require ("general/noaccess.php");
return; return;
} }

View File

@ -19,7 +19,7 @@ global $config;
check_login (); check_login ();
if (! give_acl ($config['id_user'], 0, "AW")) { if (! give_acl ($config['id_user'], 0, "AW")) {
audit_db ($config['id_user'], $REMOTE_ADDR, "ACL Violation", "Trying to access map builder wizard"); audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "ACL Violation", "Trying to access map builder wizard");
require ("general/noaccess.php"); require ("general/noaccess.php");
exit; exit;
} }
@ -38,7 +38,7 @@ if (empty ($layout)) {
$layout_group = $layout["id_group"]; $layout_group = $layout["id_group"];
if (! give_acl ($config['id_user'], $layout_group, "AW")) { if (! give_acl ($config['id_user'], $layout_group, "AW")) {
audit_db ($config['id_user'], $REMOTE_ADDR, "ACL Violation", "Trying to access map builder wizard (forget URL parameter)"); audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "ACL Violation", "Trying to access map builder wizard (forget URL parameter)");
require ("general/noaccess.php"); require ("general/noaccess.php");
exit; exit;
} }

View File

@ -20,7 +20,7 @@ global $config;
check_login (); check_login ();
if (! give_acl ($config['id_user'], 0, "IW")) { if (! give_acl ($config['id_user'], 0, "IW")) {
audit_db ($config['id_user'], $REMOTE_ADDR, "ACL Violation", audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "ACL Violation",
"Trying to access report builder"); "Trying to access report builder");
require ("general/noaccess.php"); require ("general/noaccess.php");
exit; exit;
@ -91,7 +91,7 @@ if ($delete_report) {
// Add module SQL code // Add module SQL code
if ($add_content) { if ($add_content) {
if (! $id_report) { if (! $id_report) {
audit_db ($config['id_user'], $REMOTE_ADDR, "Hack attempt", "Parameter trash in report builder"); audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "Hack attempt", "Parameter trash in report builder");
require ("general/noaccess.php"); require ("general/noaccess.php");
exit (); exit ();
} }

View File

@ -21,7 +21,7 @@ global $config;
check_login (); check_login ();
if (! give_acl ($config['id_user'], 0, "PM")) { 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 Export Server Management"); "Trying to access Export Server Management");
require ("general/noaccess.php"); require ("general/noaccess.php");
exit; exit;

View File

@ -19,7 +19,7 @@ global $config;
check_login (); check_login ();
if (! give_acl ($config['id_user'], 0, "PM")) { 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 Export Server Management"); "Trying to access Export Server Management");
require ("general/noaccess.php"); require ("general/noaccess.php");
return; return;

View File

@ -20,7 +20,7 @@ global $config;
check_login (); check_login ();
if (! give_acl ($config['id_user'], 0, "PM")) { 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 Recon Task Management"); "Trying to access Recon Task Management");
require ("general/noaccess.php"); require ("general/noaccess.php");
exit; exit;

View File

@ -20,7 +20,7 @@ global $config;
check_login (); check_login ();
if (! give_acl ($config['id_user'], 0, "PM")) { 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 Agent Management"); "Trying to access Agent Management");
require ("general/noaccess.php"); require ("general/noaccess.php");
return; return;

View File

@ -21,7 +21,7 @@ require_once ("include/functions_servers.php");
check_login(); check_login();
if (! give_acl ($config["id_user"], 0, "PM")) { 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 Server Management"); "Trying to access Server Management");
require ("general/noaccess.php"); require ("general/noaccess.php");
exit; exit;

View File

@ -21,7 +21,7 @@ global $config;
check_login (); check_login ();
if (! give_acl ($config['id_user'], 0, "LM")) { 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 Plugin Management"); "Trying to access Plugin Management");
require ("general/noaccess.php"); require ("general/noaccess.php");
return; return;

View File

@ -19,7 +19,7 @@ global $config;
check_login (); check_login ();
if (! give_acl ($config['id_user'], 0, "PM")) { if (! give_acl ($config['id_user'], 0, "PM")) {
audit_db ($config['id_user'], $REMOTE_ADDR, "ACL Violation", "Trying to access File manager"); audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "ACL Violation", "Trying to access File manager");
require ("general/noaccess.php"); require ("general/noaccess.php");
return; return;
} }

View File

@ -19,7 +19,7 @@ global $config;
check_login (); check_login ();
if (! give_acl ($config['id_user'], 0, "PM") && ! is_user_admin ($config['id_user'])) { 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 Visual Setup Management"); audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "ACL Violation", "Trying to access Visual Setup Management");
require ("general/noaccess.php"); require ("general/noaccess.php");
return; return;
} }

View File

@ -19,7 +19,7 @@ global $config;
check_login (); check_login ();
if (! give_acl ($config['id_user'], 0, "PM") && ! is_user_admin ($config['id_user'])) { 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 Visual Setup Management"); audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "ACL Violation", "Trying to access Visual Setup Management");
require ("general/noaccess.php"); require ("general/noaccess.php");
return; return;
} }

View File

@ -18,7 +18,7 @@ global $config;
check_login (); check_login ();
if (! give_acl ($config['id_user'], 0, "PM") && ! is_user_admin ($config['id_user'])) { 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 Link Management"); audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "ACL Violation", "Trying to access Link Management");
require ("general/noaccess.php"); require ("general/noaccess.php");
exit; exit;
} }

View File

@ -18,7 +18,7 @@ global $config;
check_login (); check_login ();
if (! give_acl ($config['id_user'], 0, "PM")) { 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 Link Management"); "Trying to access Link Management");
require ("general/noaccess.php"); require ("general/noaccess.php");
exit; exit;

View File

@ -19,7 +19,7 @@ global $config;
check_login (); check_login ();
if (! give_acl ($config['id_user'], 0, "PM") && ! is_user_admin ($config['id_user'])) { 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"); require ("general/noaccess.php");
return; return;
} }

View File

@ -32,7 +32,7 @@ if (is_ajax ()) {
if (! give_acl ($config['id_user'], 0, "PM") && ! is_user_admin ($config['id_user'])) { 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"); require ("general/noaccess.php");
return; return;
} }

View File

@ -19,7 +19,7 @@ global $config;
check_login (); check_login ();
if (! give_acl ($config['id_user'], 0, "PM") && ! is_user_admin ($config['id_user'])) { 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 Visual Setup Management"); audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "ACL Violation", "Trying to access Visual Setup Management");
require ("general/noaccess.php"); require ("general/noaccess.php");
return; return;
} }

View File

@ -17,7 +17,7 @@
// Load global vars // Load global vars
if (! give_acl ($config['id_user'], 0, "LW")) { 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 SNMP Alert Management"); "Trying to access SNMP Alert Management");
require ("general/noaccess.php"); require ("general/noaccess.php");
return; return;

View File

@ -25,7 +25,7 @@ if ($user_info["language"] == ""){
$id = $user_info['id_user']; $id = $user_info['id_user'];
if (! give_acl ($config['id_user'], 0, "UM")) { if (! give_acl ($config['id_user'], 0, "UM")) {
audit_db ($config['id_user'], $REMOTE_ADDR, "ACL Violation", audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "ACL Violation",
"Trying to access User Management"); "Trying to access User Management");
require ("general/noaccess.php"); require ("general/noaccess.php");
return; return;
@ -96,7 +96,7 @@ if ($create_user) {
else { else {
$result = create_user ($id, $password_new, $values); $result = create_user ($id, $password_new, $values);
audit_db ($config['id_user'], $REMOTE_ADDR, "User management", audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "User management",
"Created user ".safe_input($id)); "Created user ".safe_input($id));
print_result_message ($result, print_result_message ($result,
@ -136,7 +136,7 @@ if ($update_user) {
print_error_message (__('Passwords does not match')); print_error_message (__('Passwords does not match'));
} }
} else { } else {
audit_db ($config['id_user'], $REMOTE_ADDR, "User management", audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "User management",
"Updated user ".safe_input($id)); "Updated user ".safe_input($id));
print_result_message ($res1, print_result_message ($res1,
__('User info successfully updated'), __('User info successfully updated'),
@ -155,7 +155,7 @@ if ($add_profile) {
$id2 = (string) get_parameter ('id_user'); $id2 = (string) get_parameter ('id_user');
$group2 = (int) get_parameter ('assign_group'); $group2 = (int) get_parameter ('assign_group');
$profile2 = (int) get_parameter ('assign_profile'); $profile2 = (int) get_parameter ('assign_profile');
audit_db ($config['id_user'], $REMOTE_ADDR, "User management", audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "User management",
"Added profile for user ".safe_input($id2)); "Added profile for user ".safe_input($id2));
$return = create_user_profile ($id2, $profile2, $group2); $return = create_user_profile ($id2, $profile2, $group2);
print_result_message ($return, print_result_message ($return,
@ -167,7 +167,7 @@ if ($delete_profile) {
$id = (string) get_parameter ('id_user'); $id = (string) get_parameter ('id_user');
$id_up = (int) get_parameter ('id_user_profile'); $id_up = (int) get_parameter ('id_user_profile');
audit_db ($config['id_user'], $REMOTE_ADDR, "User management", audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "User management",
"Deleted profile for user ".safe_input($id)); "Deleted profile for user ".safe_input($id));
$return = delete_user_profile ($id, $id_up); $return = delete_user_profile ($id, $id_up);

View File

@ -19,7 +19,7 @@ global $config;
check_login (); check_login ();
if (! give_acl ($config['id_user'], 0, "UM")) { if (! give_acl ($config['id_user'], 0, "UM")) {
audit_db ($config['id_user'], $REMOTE_ADDR, "ACL Violation", audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "ACL Violation",
"Trying to access User Management"); "Trying to access User Management");
require ("general/noaccess.php"); require ("general/noaccess.php");
exit; exit;
@ -33,7 +33,7 @@ if (isset ($_GET["user_del"])) { //delete user
$id_user = get_parameter_post ("delete_user"); $id_user = get_parameter_post ("delete_user");
$result = delete_user ($id_user); $result = delete_user ($id_user);
audit_db ($config['id_user'], $REMOTE_ADDR, "User management", audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "User management",
"Deleted user ".safe_input($id_user)); "Deleted user ".safe_input($id_user));
print_result_message ($result, print_result_message ($result,

View File

@ -69,9 +69,6 @@ process_config ();
require_once ('streams.php'); require_once ('streams.php');
require_once ('gettext.php'); require_once ('gettext.php');
// Set IP address of user connected to Pandora console and store it in session array
global $REMOTE_ADDR;
$config["remote_addr"] = $_SERVER['REMOTE_ADDR']; $config["remote_addr"] = $_SERVER['REMOTE_ADDR'];
$config['user_language'] = $config["language"]; $config['user_language'] = $config["language"];

View File

@ -25,7 +25,7 @@ $period = get_parameter_get ("period", 86400);
$group = get_agentmodule_group ($module_id); $group = get_agentmodule_group ($module_id);
if (! give_acl ($config['id_user'], $group, "AR") || $module_id == 0) { if (! give_acl ($config['id_user'], $group, "AR") || $module_id == 0) {
audit_db ($config['id_user'], $REMOTE_ADDR, "ACL Violation", audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "ACL Violation",
"Trying to access Agent Data view"); "Trying to access Agent Data view");
require ("general/noaccess.php"); require ("general/noaccess.php");
return; return;

View File

@ -22,7 +22,7 @@ require_once ("include/functions_reporting.php");
check_login (); check_login ();
if (! give_acl ($config['id_user'], 0, "AR")) { if (! give_acl ($config['id_user'], 0, "AR")) {
audit_db ($config['id_user'], $REMOTE_ADDR, "ACL Violation", audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "ACL Violation",
"Trying to access agent main list view"); "Trying to access agent main list view");
require ("general/noaccess.php"); require ("general/noaccess.php");
return; return;
@ -55,7 +55,7 @@ if (is_ajax ()) {
$id_module = (int) get_parameter ('id_agent_module'); $id_module = (int) get_parameter ('id_agent_module');
if (! give_acl ($config['id_user'], get_agentmodule_group ($id_module), "AR")) { if (! give_acl ($config['id_user'], get_agentmodule_group ($id_module), "AR")) {
audit_db ($config['id_user'], $REMOTE_ADDR, "ACL Violation", audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "ACL Violation",
"Trying to access agent main list view"); "Trying to access agent main list view");
echo json_encode (false); echo json_encode (false);
return; return;

View File

@ -36,7 +36,7 @@ if ($agent === false) {
} }
if (! give_acl ($config["id_user"], $agent["id_grupo"], "AR")) { if (! give_acl ($config["id_user"], $agent["id_grupo"], "AR")) {
audit_db ($config["id_user"], $REMOTE_ADDR, "ACL Violation", audit_db ($config["id_user"], $_SERVER['REMOTE_ADDR'], "ACL Violation",
"Trying to access Agent General Information"); "Trying to access Agent General Information");
require_once ("general/noaccess.php"); require_once ("general/noaccess.php");
return; return;

View File

@ -30,7 +30,7 @@ if (isset ($_GET["agentmodule"]) && isset ($_GET["agent"]) ){
$id_agent = $_GET["agent"]; $id_agent = $_GET["agent"];
$agentmodule_name = get_agentmodule_name ($id_agentmodule); $agentmodule_name = get_agentmodule_name ($id_agentmodule);
if (! give_acl ($config['id_user'], dame_id_grupo ($id_agent), "AR")) { if (! give_acl ($config['id_user'], dame_id_grupo ($id_agent), "AR")) {
audit_db ($config['id_user'], $REMOTE_ADDR, "ACL Violation", audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "ACL Violation",
"Trying to access Agent Export Data"); "Trying to access Agent Export Data");
require ("../../general/noaccess.php"); require ("../../general/noaccess.php");
exit; exit;

View File

@ -19,7 +19,7 @@ global $config;
check_login (); check_login ();
if (! give_acl ($config['id_user'], 0, "PM") && ! is_user_admin ($config['id_user'])) { 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 Visual Setup Management"); audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "ACL Violation", "Trying to access Visual Setup Management");
require ("general/noaccess.php"); require ("general/noaccess.php");
return; return;
} }

View File

@ -19,7 +19,7 @@ require_once ("include/functions_reporting.php");
check_login (); check_login ();
// ACL Check // ACL Check
if (! give_acl ($config['id_user'], 0, "AR")) { if (! give_acl ($config['id_user'], 0, "AR")) {
audit_db ($config['id_user'], $REMOTE_ADDR, "ACL Violation", audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "ACL Violation",
"Trying to access Agent view (Grouped)"); "Trying to access Agent view (Grouped)");
require ("general/noaccess.php"); require ("general/noaccess.php");
exit; exit;
@ -34,7 +34,7 @@ if (isset ($_GET["update_netgroup"])) {
$sql = sprintf ("UPDATE tagente_modulo SET `flag` = 1 WHERE `id_agente` = ANY(SELECT id_agente FROM tagente WHERE `id_grupo` = %d)",$group); $sql = sprintf ("UPDATE tagente_modulo SET `flag` = 1 WHERE `id_agente` = ANY(SELECT id_agente FROM tagente WHERE `id_grupo` = %d)",$group);
process_sql ($sql); process_sql ($sql);
} else { } else {
audit_db ($config['id_user'], $REMOTE_ADDR, "ACL Violation", "Trying to set flag for groups"); audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "ACL Violation", "Trying to set flag for groups");
require ("general/noaccess.php"); require ("general/noaccess.php");
exit; exit;
} }

View File

@ -20,7 +20,7 @@ global $config;
check_login (); check_login ();
if (! give_acl ($config['id_user'], 0, "AR")) { if (! give_acl ($config['id_user'], 0, "AR")) {
audit_db ($config['id_user'], $REMOTE_ADDR, "ACL Violation", audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "ACL Violation",
"Trying to access node graph builder"); "Trying to access node graph builder");
include ("general/noaccess.php"); include ("general/noaccess.php");
exit; exit;

View File

@ -22,7 +22,7 @@ require_once ("include/functions_reporting.php");
check_login(); check_login();
if (! give_acl ($config['id_user'], 0, "AR") && ! give_acl ($config['id_user'], 0, "AW")) { if (! give_acl ($config['id_user'], 0, "AR") && ! 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 SLA View"); "Trying to access SLA View");
require ("general/noaccess.php"); require ("general/noaccess.php");
exit; exit;

View File

@ -22,7 +22,7 @@ global $config;
check_login(); check_login();
if (! give_acl ($config['id_user'], 0, "AR") && ! give_acl ($config['id_user'], 0, "AW")) { if (! give_acl ($config['id_user'], 0, "AR") && ! 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 Management"); "Trying to access Agent Management");
require ('general/noaccess.php'); require ('general/noaccess.php');
return; return;

View File

@ -24,7 +24,7 @@ require_once ("include/functions_reporting.php");
check_login (); check_login ();
if (! give_acl ($config['id_user'], 0, "AR")) { if (! give_acl ($config['id_user'], 0, "AR")) {
audit_db ($config['id_user'], $REMOTE_ADDR, "ACL Violation", audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "ACL Violation",
"Trying to access Agent view (Grouped)"); "Trying to access Agent view (Grouped)");
require ("general/noaccess.php"); require ("general/noaccess.php");
return; return;

View File

@ -175,7 +175,7 @@ $agent = get_db_row ('tagente', 'id_agente', $id_agente);
// get group for this id_agente // get group for this id_agente
$id_grupo = $agent['id_grupo']; $id_grupo = $agent['id_grupo'];
if (! give_acl ($config['id_user'], $id_grupo, "AR")) { if (! give_acl ($config['id_user'], $id_grupo, "AR")) {
audit_db ($config['id_user'], $REMOTE_ADDR, "ACL Violation", audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "ACL Violation",
"Trying to access (read) to agent ".get_agent_name($id_agente)); "Trying to access (read) to agent ".get_agent_name($id_agente));
include ("general/noaccess.php"); include ("general/noaccess.php");
return; return;

View File

@ -24,7 +24,7 @@ require_once ("include/fgraph.php");
check_login (); check_login ();
if (! give_acl ($config['id_user'], 0, "AR")) { if (! give_acl ($config['id_user'], 0, "AR")) {
audit_db ($config['id_user'],$REMOTE_ADDR, "ACL Violation","Trying to access event viewer"); audit_db ($config['id_user'],$_SERVER['REMOTE_ADDR'], "ACL Violation","Trying to access event viewer");
require ("general/noaccess.php"); require ("general/noaccess.php");
return; return;
} }

View File

@ -22,7 +22,7 @@ require_once ("include/functions_events.php"); //Event processing functions
check_login (); check_login ();
if (! give_acl ($config["id_user"], 0, "IR")) { if (! give_acl ($config["id_user"], 0, "IR")) {
audit_db ($config["id_user"], $REMOTE_ADDR, "ACL Violation", audit_db ($config["id_user"], $_SERVER['REMOTE_ADDR'], "ACL Violation",
"Trying to access event viewer"); "Trying to access event viewer");
require ("general/noaccess.php"); require ("general/noaccess.php");
return; return;

View File

@ -16,7 +16,7 @@
check_login (); check_login ();
if (! give_acl ($config['id_user'], 0, "AR")) { if (! give_acl ($config['id_user'], 0, "AR")) {
audit_db ($config['id_user'], $REMOTE_ADDR, "ACL Violation", audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "ACL Violation",
"Trying to access extensions list"); "Trying to access extensions list");
include ("general/noaccess.php"); include ("general/noaccess.php");
exit; exit;

View File

@ -41,7 +41,7 @@ if ($delete_graph) {
echo $result; echo $result;
} }
else { else {
audit_db ($config['id_user'],$REMOTE_ADDR, "ACL Violation","Trying to delete a graph from access graph builder"); audit_db ($config['id_user'],$_SERVER['REMOTE_ADDR'], "ACL Violation","Trying to delete a graph from access graph builder");
include ("general/noaccess.php"); include ("general/noaccess.php");
exit; exit;
} }
@ -85,7 +85,7 @@ if ($view_graph) {
$name = $graph["name"]; $name = $graph["name"];
if (($graph["private"]==1) && ($graph["id_user"] != $id_user)){ if (($graph["private"]==1) && ($graph["id_user"] != $id_user)){
audit_db($config['id_user'],$REMOTE_ADDR, "ACL Violation","Trying to access to a custom graph not allowed"); audit_db($config['id_user'],$_SERVER['REMOTE_ADDR'], "ACL Violation","Trying to access to a custom graph not allowed");
include ("general/noaccess.php"); include ("general/noaccess.php");
exit; exit;
} }

View File

@ -21,7 +21,7 @@ check_login();
$id_report = (int) get_parameter ('id'); $id_report = (int) get_parameter ('id');
if (! $id_report) { if (! $id_report) {
audit_db ($config['id_user'], $REMOTE_ADDR, "HACK Attempt", audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "HACK Attempt",
"Trying to access graph viewer withoud ID"); "Trying to access graph viewer withoud ID");
include ("general/noaccess.php"); include ("general/noaccess.php");
return; return;
@ -30,7 +30,7 @@ if (! $id_report) {
$report = get_db_row ('treport', 'id_report', $id_report); $report = get_db_row ('treport', 'id_report', $id_report);
if (! give_acl ($config['id_user'], $report['id_group'], "AR")) { if (! give_acl ($config['id_user'], $report['id_group'], "AR")) {
audit_db ($config['id_user'], $REMOTE_ADDR, "ACL Violation","Trying to access graph reader"); audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "ACL Violation","Trying to access graph reader");
include ("general/noaccess.php"); include ("general/noaccess.php");
exit; exit;
} }

View File

@ -85,7 +85,7 @@ if (isset ($_GET["direct"])) {
if ($nick !== false) { if ($nick !== false) {
unset ($_GET["sec2"]); unset ($_GET["sec2"]);
$_GET["sec"] = "general/logon_ok"; $_GET["sec"] = "general/logon_ok";
logon_db ($nick, $REMOTE_ADDR); logon_db ($nick, $_SERVER['REMOTE_ADDR']);
$_SESSION['id_usuario'] = $nick; $_SESSION['id_usuario'] = $nick;
$config['id_user'] = $nick; $config['id_user'] = $nick;
//Remove everything that might have to do with people's passwords or logins //Remove everything that might have to do with people's passwords or logins
@ -94,7 +94,7 @@ if (isset ($_GET["direct"])) {
// User not known // User not known
$login_failed = true; $login_failed = true;
require_once ('general/login_page.php'); require_once ('general/login_page.php');
audit_db ($nick, $REMOTE_ADDR, "Logon Failed", "Invalid login: ".$nick); audit_db ($nick, $_SERVER['REMOTE_ADDR'], "Logon Failed", "Invalid login: ".$nick);
exit; exit;
} }
} else { } else {
@ -113,7 +113,7 @@ check_login ();
$id_report = (int) get_parameter ('id'); $id_report = (int) get_parameter ('id');
if (! $id_report) { if (! $id_report) {
audit_db ($config['id_user'], $REMOTE_ADDR, "HACK Attempt", audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "HACK Attempt",
"Trying to access graph viewer without valid ID"); "Trying to access graph viewer without valid ID");
require ("general/noaccess.php"); require ("general/noaccess.php");
exit; exit;
@ -122,7 +122,7 @@ if (! $id_report) {
$report = get_db_row ('treport', 'id_report', $id_report); $report = get_db_row ('treport', 'id_report', $id_report);
if (! give_acl ($config['id_user'], $report['id_group'], "AR")) { if (! give_acl ($config['id_user'], $report['id_group'], "AR")) {
audit_db ($config['id_user'], $REMOTE_ADDR, "ACL Violation","Trying to access graph reader"); audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "ACL Violation","Trying to access graph reader");
include ("general/noaccess.php"); include ("general/noaccess.php");
exit; exit;
} }

View File

@ -22,7 +22,7 @@ require_once ("include/functions_servers.php");
check_login (); check_login ();
if (! give_acl ($config['id_user'], 0, "AR") && ! give_acl ($config['id_user'], 0, "AW")) { if (! give_acl ($config['id_user'], 0, "AR") && ! 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 Server view"); "Trying to access Server view");
require ("general/noaccess.php"); require ("general/noaccess.php");
return; return;

View File

@ -27,7 +27,7 @@ print_page_header (__('Pandora servers'), "images/server.png", false, "", false,
if (! give_acl ($config['id_user'], 0, "AR")) { if (! give_acl ($config['id_user'], 0, "AR")) {
audit_db ($config["id_user"], $REMOTE_ADDR, "ACL Violation", audit_db ($config["id_user"], $_SERVER['REMOTE_ADDR'], "ACL Violation",
"Trying to access recon task viewer"); "Trying to access recon task viewer");
require ("/general/noaccess.php"); require ("/general/noaccess.php");
return; return;

View File

@ -22,7 +22,7 @@ enterprise_include ("operation/snmpconsole/snmp_view.php");
check_login (); check_login ();
if (! give_acl ($config['id_user'], 0, "AR")) { if (! give_acl ($config['id_user'], 0, "AR")) {
audit_db ($config['id_user'], $REMOTE_ADDR, "ACL Violation", audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "ACL Violation",
"Trying to access SNMP Console"); "Trying to access SNMP Console");
require ("general/noaccess.php"); require ("general/noaccess.php");
exit; exit;
@ -51,7 +51,7 @@ if (isset ($_GET["delete"])){
__('Successfully deleted'), __('Successfully deleted'),
__('Could not be deleted')); __('Could not be deleted'));
} else { } else {
audit_db ($config['id_user'], $REMOTE_ADDR, "ACL Violation", audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "ACL Violation",
"Trying to delete SNMP event ID #".$id_trap); "Trying to delete SNMP event ID #".$id_trap);
} }
} }
@ -66,7 +66,7 @@ if (isset ($_GET["check"])) {
__('Successfully updated'), __('Successfully updated'),
__('Could not be updated')); __('Could not be updated'));
} else { } else {
audit_db ($config['id_user'], $REMOTE_ADDR, "ACL Violation", audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "ACL Violation",
"Trying to checkout SNMP Trap ID".$id_trap); "Trying to checkout SNMP Trap ID".$id_trap);
} }
} }
@ -80,7 +80,7 @@ if (isset ($_POST["deletebt"])) {
process_sql ($sql); process_sql ($sql);
} }
} else { } else {
audit_db ($config['id_user'], $REMOTE_ADDR, "ACL Violation", audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "ACL Violation",
"Trying to mass-delete SNMP Trap ID"); "Trying to mass-delete SNMP Trap ID");
} }
} }
@ -94,7 +94,7 @@ if (isset ($_POST["updatebt"])) {
process_sql ($sql); process_sql ($sql);
} }
} else { } else {
audit_db ($config['id_user'], $REMOTE_ADDR, "ACL Violation", audit_db ($config['id_user'], $_SERVER['REMOTE_ADDR'], "ACL Violation",
"Trying to mass-delete SNMP Trap ID"); "Trying to mass-delete SNMP Trap ID");
} }
} }

View File

@ -23,7 +23,7 @@ $id_layout = (int) get_parameter ('id');
// Get input parameter for layout id // Get input parameter for layout id
if (! $id_layout) { if (! $id_layout) {
audit_db ($config["id_user"],$REMOTE_ADDR, "ACL Violation","Trying to access visual console without id layout"); audit_db ($config["id_user"],$_SERVER['REMOTE_ADDR'], "ACL Violation","Trying to access visual console without id layout");
include ("general/noaccess.php"); include ("general/noaccess.php");
exit; exit;
} }
@ -31,7 +31,7 @@ if (! $id_layout) {
$layout = get_db_row ('tlayout', 'id', $id_layout); $layout = get_db_row ('tlayout', 'id', $id_layout);
if (! $layout) { if (! $layout) {
audit_db ($config["id_user"], $REMOTE_ADDR, "ACL Violation","Trying to access visual console without id layout"); audit_db ($config["id_user"], $_SERVER['REMOTE_ADDR'], "ACL Violation","Trying to access visual console without id layout");
include ("general/noaccess.php"); include ("general/noaccess.php");
exit; exit;
} }
@ -46,7 +46,7 @@ $bheight = $layout["height"];
$pure_url = "&pure=".$config["pure"]; $pure_url = "&pure=".$config["pure"];
if (! give_acl ($config["id_user"], $id_group, "AR")) { if (! give_acl ($config["id_user"], $id_group, "AR")) {
audit_db ($config["id_user"], $REMOTE_ADDR, "ACL Violation", "Trying to access visual console without group access"); audit_db ($config["id_user"], $_SERVER['REMOTE_ADDR'], "ACL Violation", "Trying to access visual console without group access");
require ("general/noaccess.php"); require ("general/noaccess.php");
exit; exit;
} }