CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Advanced:
Sys::Syslog and taint

 



corg
Deleted

May 11, 2000, 12:41 PM

Post #1 of 2 (2369 views)
Sys::Syslog and taint Can't Post

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


corg
Deleted

May 16, 2000, 6:06 AM

Post #2 of 2 (2369 views)
Re: Sys::Syslog and taint [In reply to] Can't Post

By the way,

I found an answer to this problem. I'm now using Unix::Syslog rather than Sys::Syslog.
Unix::Syslog works almost the same as Sys::Syslog, so it's easy to make the move.

Thanks,
Shane Corgatelli

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives