[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cgi-list
Subject:    Re: [CGI] setuid scripts
From:       Daniel Macks <dmacks () netspace ! org>
Date:       1998-12-09 19:41:12
[Download RAW message or body]

Abraham J. Stephens said:
: 
: Question: I have a script that must use setuid. When ever it is
: executed, the script crashes saying that it can't find some specific
: modules, (even when the modules are in the same directory as the script
: and have universal read permissions.) I attempted to use the -I switch and
: was informed that -I can't be used with setuid scripts... 

One of the effects of setuid is that perl does taint-checking (-T). As a
result, things like @INC might be different. Try doing 'perl -TV' and see
what @INC it is using. While @INC usually has the /usr/lib/perl5 parts and
. and stuff from $ENV{PERL5LIB}, taintperl probably only has the
/usr/lib/perl5 stuff. Solution: 'use lib' to fix @INC as necessary.
 
dan

-- 
Daniel Macks
dmacks@a.chem.upenn.edu
dmacks@netspace.org
http://www.netspace.org/~dmacks

-----------------------------------------------------------------
To unsubscribe, send mail to "majordomo@jann.com" with "unsubscribe cgi-list"
in the body.

The CGI Tips & Tricks website (and archive of the list) is located
at http://www.jann.com/Perl/

cgi-list is hosted by Summit Communication Design (http://www.summitdesign.net).

Summit Communication Design is a full-service web hosting firm
providing web design, cgi programming and inter/intra-net support.
-----------------------------------------------------------------

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic