Jan 27, 2007, 1:56 AM
Post #1 of 3
i have a perlscript that is executed by procmail (as the result of processing a .procmailrc file via qmail), and on my system, this causes the perlscript to be run with setuid (in this case, "setuid popuser").
setuid causes "use" and "require" to fail, why? how to work around this?
the problem is that when a perl script is run with setuid, apparently the security prevents the perlscript from including packages that are not in standard locations (using the "use" and "require" directives).
for example, i try to use the package AAA.pm located in /home/bbb/perl . if i put the following lines in my perlscript:
use lib ("/home/bbb/perl");
then i get:
Can't locate AAA.pm in @INC (@INC contains: /home/bbb/perl ...)
i ONLY get this error when the perlscript is run with setuid.
(even using the TAINT mode will not cause this problem - only setuid causes this error)
i spent hours with google looking for any hint, but found nothing.
how can i resolve this?
what are the restrictions for "use" and "require" when a perlscript is run in setuid?
how can i work around those restrictions?
PS: using perl v5.8.8 on Linux 184.108.40.206-060907a
(This post was edited by tristan on Jan 27, 2007, 2:01 AM)