On Tue, 20 Mar 2001, Edsel Mabilangan wrote:

> hi pluggers;
>  
> i have this problem with a script that i have written first in a shell
> script then rewrote in perl. but when i attached it to a cgi script it
> would not execute or would perform. but at command prompt it does execute
> i have chmod +s to give it SIUD or superuser properties but still no luck.
> i am using wvdial for dialup.   
>  



simply giving suid root to a perl script won't work. you have to use a
wrapper written in c that would call you perl script... this is the one
having suid root 

here's a simple code to do that

main(ac,av)
int *ac;
char **av;
{
        execv("/path/to/your/perl/script.pl",av);
}

compile this, rename it to .cgi then use as usual.

DISCLAIMER :
   cgi's with suid root are security hazards. take caution in using them.

hth,

-mark

_
Philippine Linux Users Group. Web site and archives at http://plug.linux.org.ph
To leave: send "unsubscribe" in the body to [EMAIL PROTECTED]

To subscribe to the Linux Newbies' List: send "subscribe" in the body to 
[EMAIL PROTECTED]

Reply via email to