On Thu, Nov 07, 2002 at 10:47:10PM -0800, Vincent Chen wrote: > Hi, all > > I wrote a perl script to destroy gif interface. It has > a line looks like this: > > system("ifconfig","gif0","destroy"); > > yes, this script is running suidperl and has suid bit > set. > > The problem is this script work fine if called under > shell prompt but not working if called by a suidperl > CGI.
This, I suspect, is down to one of two causes. The first is simply that the environment that CGI scripts run under is different to what you get under your user account. Make sure that $ENV{PATH} is set appropriately and so forth. As a matter of good programming practice, you should really be using the absolute path "/sbin/ifconfig" in your system call anyway. The second possible cause is the perl taint checking mechanism saving you from yourself. If that is the case, you'll see an "Insecure dependency" error message either in your browser or in /var/log/httpd-error.log See the perlsec(1) man page for details. Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-questions" in the body of the message