From a8b113a6fc16128c4eda3bf0aeae155d1bab5dd8 Mon Sep 17 00:00:00 2001 From: Ramon Novoa Date: Fri, 25 Nov 2016 12:41:48 +0100 Subject: [PATCH] Added group password support. --- pandora_server/lib/PandoraFMS/DataServer.pm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pandora_server/lib/PandoraFMS/DataServer.pm b/pandora_server/lib/PandoraFMS/DataServer.pm index 75dd17a46c..1be9492de1 100644 --- a/pandora_server/lib/PandoraFMS/DataServer.pm +++ b/pandora_server/lib/PandoraFMS/DataServer.pm @@ -358,6 +358,13 @@ sub process_xml_data ($$$$$) { } } + # Check the group password. + my $rc = enterprise_hook('check_group_password', [$dbh, $group_id, $data->{'group_password'}]); + if (defined($rc) && $rc != 1) { + logger($pa_config, "Agent $agent_name did not send a valid password for group id $group_id.", 10); + return; + } + my $description = ''; $description = $data->{'description'} if (defined ($data->{'description'}));