[Secondary groups] Added secondary groups to linux agent and server

This commit is contained in:
fermin831 2018-04-04 16:05:18 +02:00
parent c024fec509
commit d0c34e2ce7
2 changed files with 8 additions and 1 deletions

View File

@ -3065,7 +3065,11 @@ while (1) {
if (defined ($Conf{'parent_agent_name'})) {
$xml_header .= "' parent_agent_name='" .$Conf{'parent_agent_name'};
}
if (defined ($Conf{'secondary_groups'})) {
$xml_header .= "' secondary_groups='" .$Conf{'secondary_groups'};
}
if (defined ($Conf{'agent_mode'})) {
if ($Conf{'agent_mode'} =~ m/no.?learn/ig) {
$xml_header .= "' agent_mode='0";

View File

@ -369,6 +369,9 @@ sub process_xml_data ($$$$$) {
if (! defined ($agent_id)) {
return;
}
# Update the secondary groups
enterprise_hook('add_secondary_groups_name', [$pa_config, $dbh, $agent_id, $data->{'secondary_groups'}]);
# This agent is new.
$new_agent = 1;