Perl plugin help, Thanks

Stanley Hopcroft Stanley.Hopcroft at IPAustralia.Gov.AU
Wed Jan 15 22:07:50 CET 2003


Dear Sir,

Here is what I see here on an ancient 5.005 Perl,

tsitc> cat > x
#! /usr/bin/perl -wT

use strict;
use Getopt::Long:
use vars qw($PROGNAME);
use lib "/usr/local/nagios/libexec";
use utils qw(%ERRORS &print_revision &support &usage);

$PROGNAME = "check_ca";

sub print_help();
sub print_usage();

$ENV{'PATH'}='';
$ENV{'BASH_ENV'}='';
$ENV{'ENV'}='';

print "testing...ca test\n";

exit $ERRORS{'OK'};
tsitc> perl -c x
Too late for "-T" option at x line 1.
tsitc> echo $?
255
tsitc> 

You are getting blown out of the water by -T, or the conjunction of 
taint checks with warnings.

(Why I don't know. Google ..).

You could 

1 Bad idea.    Remove 'use strict'.
2 Better idea. Remove -T
3 R&D.         Remove -w and apply it with the run time directive around 
the code.

Your plugin should only be receiving data from you (via your 
Nag config) and is not running suid, so -T shouldn't be required.

You could perhaps selectively enable taint checks around the 'critical 
sections'.

HTH.

Yours sincerely.

-- 
------------------------------------------------------------------------
Stanley Hopcroft
------------------------------------------------------------------------

'...No man is an island, entire of itself; every man is a piece of the
continent, a part of the main. If a clod be washed away by the sea,
Europe is the less, as well as if a promontory were, as well as if a
manor of thy friend's or of thine own were. Any man's death diminishes
me, because I am involved in mankind; and therefore never send to know
for whom the bell tolls; it tolls for thee...'

from Meditation 17, J Donne.


-------------------------------------------------------
This SF.NET email is sponsored by: A Thawte Code Signing Certificate 
is essential in establishing user confidence by providing assurance of 
authenticity and code integrity. Download our Free Code Signing guide:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0028en




More information about the Users mailing list