how can i untain $ARGV from a perl script extending snmp?
- From: jordi@xxxxxxxxx (Jordi Moles Blanco)
- Date: Mon, 06 Oct 2008 13:51:39 +0200
hi,
I'm really struggling with this and i would very pleased if you could help me.
I'm using a perl script to extend snmp functionality.
As you already now, when snmp "passes" the control to the perl script, it enables the flag "-T" . Therefore, the problem is that i can't use any tainted var inside the script.
so... i want to do things like this:
***********
my $path = $ARGV[3];
chown 0, 0, "/tmp/$path";
***********
and perl complains that the var is "tainted".
I perfectly understand that... and all the security reasons to work like that... but....
1. how can i "untain" that var?
2. can i modify the way that snmp works to disable that "-T" flag when it passes the control to the perl script?
i've tried to untain the var with any means i've found, like this one:
*********
$path =~ s/;//g;
*********
but none has worked so far.
do you have any ideas?
Thank you very much.
.
- Follow-Ups:
- Re: how can i untain $ARGV from a perl script extending snmp?
- From: Dr.Ruud
- Re: how can i untain $ARGV from a perl script extending snmp?
- From: Raymond Wan
- Re: how can i untain $ARGV from a perl script extending snmp?
- Prev by Date: Regular expression question
- Next by Date: Cache::FastMmap
- Previous by thread: Regular expression question
- Next by thread: Re: how can i untain $ARGV from a perl script extending snmp?
- Index(es):
Relevant Pages
|