"Jain, Abhay K, ALABS" <[EMAIL PROTECTED]> writes:

[...]

> Scripts such as perl or ksh do not become root with setuid.
> They really do not get the same privilege. Setuid to root
> works ok with a compiled executable.

It's OS-specific, so that may or may not be true.  Some OS's, like
Solaris, implement this in a secure way; others provide suidperl.  It
looks like on my Fedora Core 2 Linux system, it simply doesn't work at
all.

Still, it's easy to write a small wrapper script:

    void main() { execl("/path/to/script.pl","script.pl"); }

Make sure you turn on taint checking in your script if you do this,
since Perl won't do it for you automatically.

----ScottG.

Reply via email to