This file is indexed.

/usr/share/pandorafms/agent/pandora_agent_exec is in pandorafms-agent 4.0.1-1.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/usr/bin/perl
##########################################################################
# pandora_agent_exec
#
# Executes the given command and prints its output to stdout. If the
# execution times out or the command does not exist nothing is printed
# to stdout. This is part of Pandora FMS Plugin server, do not delete!.
#
# Usage: pandora_agent_exec <timeout in seconds> <command>
##########################################################################
# Copyright (c) 2008-2010 Ramon Novoa, rnovoa@gmail.com
#           (c) 2008-2010 Artica Soluciones Tecnologicas S.L
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; version 2.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
##########################################################################

use strict;
use warnings;

# Check command line parameters 
if ($#ARGV < 1) {
	exit 1;	
}

my @opts = @ARGV;
my $timeout = shift(@opts);
my $command = join(' ', @opts);
my $output = '';
my $ReturnCode = 0;

# Execute the command
eval {
	local $SIG{ALRM} = sub { die "alarm\n" };
	alarm $timeout;

	$output = `$command`;
	$ReturnCode = ($? >> 8) & 0xff;
	alarm 0;
};

# Timeout
if ($@ eq "alarm\n") {
	exit 3;
}

print $output;

exit $ReturnCode;