centreon-plugins/contrib
qgarnier bc45db33fc
clean(plugin): some mode missing + update check_plugins script (#3337)
2021-12-22 13:10:14 +01:00
..
README.md doc(sec): deprecate cwrapper_perl (#2678) 2021-03-26 14:16:56 +01:00
check_plugins.pl clean(plugin): some mode missing + update check_plugins script (#3337) 2021-12-22 13:10:14 +01:00
cwrapper_perl.c fix exit status 2017-08-11 16:44:20 +02:00

README.md

HOWTO Centos

⚠️ cwrapper_perl is deprecated because of security issue. Prefer usage of a sudoers file or use it at your own risk.

Install dependencies:

# yum install perl-devel 'perl(ExtUtils::Embed)'

Compile the wrapper:

# gcc -o cwrapper_perl cwrapper_perl.c `perl -MExtUtils::Embed -e ccopts -e ldopts`

Create a fatpack: https://github.com/centreon/centreon-plugins/blob/master/doc/en/user/guide.rst#can-i-have-one-standalone-perl-file-

Comment following lines in the end of fatpack file:

use strict;
use warnings;
# Not perl embedded compliant at all
#use FindBin;
#use lib "$FindBin::Bin";
# use lib '/usr/lib/nagios/plugins/';

use centreon::plugins::script;

centreon::plugins::script->new()->run();

Set setuid right:

# chown root:root cwrapper_perl
# chmod 4775 cwrapper_perl

Test it:

$ cwrapper_perl centreon_protocol_udp.pl --plugin --mode=connection --hostname=10.30.2.65 --port=161