how can i untain $ARGV from a perl script extending snmp?



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.


.



Relevant Pages

  • Re: Getting MAC adress
    ... > I'm looking for a way to retrieve the number of interfaces and their MAC ... > adresses under HP-UX, AIX and Solaris. ... I would look into a perl script using snmp. ...
    (comp.sys.hp.hpux)
  • Re: Compiling daily network usage statistics
    ... > you might try mrtg? ... > ethernet useage on any interface a box has via snmp. ... perl script and maintaining a little state someplace would've been a better ...
    (comp.os.linux.security)
  • Cant get form to work properly!
    ... Please excuse me for posting this whole page of html. ... to the perl script world so In don't know what anyone would need to ... DHTML textbox character counter script. ... var taObj=event.srcElement; ...
    (perl.beginners)
  • Re: reg exp question
    ... > I have the following logic in a perl script: ... > digits excluding leading 0's and set the var to "000" else the value ... Use the negated binding ...
    (comp.lang.perl.misc)
  • Re: shell script problem in HPUX
    ... the following also failed in perl script: ... > Look at what you have ENV set to in your environment with the 'env' command. ... > if you dont want to preserve existing paths in the PATH var. ...
    (comp.sys.hp.hpux)