Insecure $ENV{PATH} while running setuid at /dev/fd/4 line 2.
Posted in 1999
Hi,
Ok, I give up. I'm lame and I need help. My problem is that I have
the following script that I need to allow a user to run on my informix
database. This user needs to run this script as user "informix". When
I change the permissions on the script to "4755" and ran the scripts, I
get the following error: "Insecure $ENV{PATH} while running setuid at
/dev/fd/4 line 2.". Can anyone show me what line I need to add to get
rid of this error? Thanks in advance...
#!/usr/local/bin/perl
$mmddhhmmss = `date +%m%d%H%M%S`;
chop $mmddhhmmss;
if ($ARGV[0] eq "") {
print "Exiting, Bad Format...\\n";
}
$ENV{INFORMIXSERVER} = "n41_shm";
#################################################################
# if user uses the '-u' flag, just unload the trunk_grp_dim table
#################################################################
if ($ARGV[0] eq "-u") {
open DBACCESS, "| /usr/informix/bin/dbaccess" or die "Couldn't run
dbaccess:
$!; aborting";
print DBACCESS qq{
database pmrpt\\@n41_shm;
UNLOAD TO './trunk_grp_dim.$mmddhhmmss'
select * from trunk_grp_dim
}; close DBACCESS or die "Couldn't close dbaccess: $!; aborting";
exit;
}
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.