On 2/15/06, Mohammed Shameer <[EMAIL PROTECTED]> wrote:

>  Can there be a setuid perl script which when executed, runs with the
> privileges of owner of the file
> ie:-
> I am root
> chown root:root /bin/myscript.pl
> chmod +s /bin/myscript.pl
>
> Now I am a local user
> /bin/myscript.pl
>
> and myscript.pl contains some code which need root privileges to run.

Yes; this can be done with perl, depending upon OS and configuration.
Some systems don't support secure set-id scripts, but you can use a
"wrapper" to make your program run set-id. See the perlsec
documentation for the details, and be careful about security issues.
Hope this helps!

--Tom Phoenix
Stonehenge Perl Training

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to