From b15adb7762b6caaecaa83637abfcf5fdb4802092 Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Mon, 2 Sep 2013 13:16:24 +0200 Subject: Remove "contrib" plugins These days, sites such as "Nagios Exchange" are a much better place for publishing plugins not maintained by the Plugins Development Team. --- contrib/restrict.pl | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100755 contrib/restrict.pl (limited to 'contrib/restrict.pl') diff --git a/contrib/restrict.pl b/contrib/restrict.pl deleted file mode 100755 index 75ea5698..00000000 --- a/contrib/restrict.pl +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/perl - -eval 'exec /usr/bin/perl -S $0 ${1+"$@"}' - if 0; - -# Set this to your local Nagios plugin path -my $pluginpath = "/usr/libexec/nagios/plugins/"; - -# Put all the legal commands (i.e. the commands that are -# not Nagios checks but are allowed to be executed anyway) -# in the following associative array. -my %legal_cmds = ("nc" => "/usr/sbin/nc"); - -# This will not work on OpenSSH -# It does work on ssh-1.2.27-1i -@arg = split ' ',$ENV{'SSH_ORIGINAL_COMMAND'}; - -$arg[0] =~ s/.*\///; # strip leading path -$arg[0] =~ tr/-_.a-zA-Z0-9/X/c; # change atypical chars to X - -if (!defined ($cmd = $legal_cmds{$arg[0]})) -{ - $cmd = $pluginpath . $arg[0]; -} - -exec { $cmd } @arg or die "Can't exec $cmd: $!"; -- cgit v1.2.3-74-g34f1