No such thing as a small change | |
PerlMonks |
eval $fh while setuid...by PsychoSpunk (Hermit) |
on Aug 03, 2001 at 20:07 UTC ( [id://102022]=perlquestion: print w/replies, xml ) | Need Help?? |
PsychoSpunk has asked for the wisdom of the Perl Monks concerning the following question:
I have a script that needs to run with the setuid bit on
since it ends up writing to the file that eval can't
evaluate. The script is securely accessed, so immediate
security concerns regarding setuid should be allayed.
Further, I'm not giving it super user power, just simple
owner of the file power.
The script is run through a web browser and therefore starts life off with $< = getpwnam(nobody)[2] (not actually written but here for those of you needing a refresher on unix calls). Anyway, here's the code that fails and the error message:
The script itself is setuid, while my modules aren't. Would this be the cause of the adverse effect reported in my error_log file? Or is there something more insidious at play here? Of course, use strict and -w are in effect, and I did try placing the eval in a block with no strict; These efforts just moved the line numbers for the error. Thanks for any advice. /msg me if you have questions. ALL HAIL BRAK!!!
Back to
Seekers of Perl Wisdom
|
|