in reply to Running Perl Suid
To get rid of this message, you need to set your path explicitely in your script, and set it so that no directory in that path is writable by others than it's owner and group. The easiest way to do this is to simply clear PATH ($ENV{'PATH'}='';) and call all external commands with their full path specified. A quick example:
A couple of disclaimers with this code:$ perl -Te 'system("/bin/echo", "Camels have fleas");' Insecure $ENV{PATH} while running with -T switch at -e line 1. $ perl -Te '$ENV{PATH}="";system("/bin/echo", "Camels have fleas");' Camels have fleas
For more information on this, see perlsec. This is required reading if you are going to be running Perl scrips SUID root.
CU
Robartes-
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Running Perl Suid
by bart (Canon) on Mar 14, 2003 at 09:39 UTC |