Hi,
I'm using Sys::Syslog for program logging and I have just started using the taint flag (we are trying to tighten up
our code). With this combination Syslog will not work. I'm thinking that it's a perl bug, but I wanted to check
before I sent off a bug report. I'm also wondering if there is a way around the problem.
The following is the more detailed info:
I'm running perl 5.00503
This is my test script:
#!/usr/bin/perl -wT
use Sys::Syslog;
$SCRIPT_ID = "testMod.cgi(000)";
print "Content-Type: text/html\n\n";
&openlog($ProcName,"pid,cons,nowait", "local0");
&syslog('local3.info', "$SCRIPT_ID-1 Execution begun.");
&closelog();
print "HELLO";
When I run this script I get the 'document contained no data error' and the following message in the error log:
'Cannot get host name of local machine at /usr/lib/perl5/5.00503/Sys/Syslog.pm
line 248'
I tracked this down and found that the error is actually being generated from Sys::Hostname.
Everything works fine if I remove the -T flag.
Thanks in advance,
Shane Corgatelli
shane@icserv.net
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.