From owner-freebsd-questions Thu Jan 3 9:43:50 2002 Delivered-To: freebsd-questions@freebsd.org Received: from void.xpert.com (xpert.com [199.203.132.1]) by hub.freebsd.org (Postfix) with ESMTP id 341A037B61B for ; Thu, 3 Jan 2002 09:43:39 -0800 (PST) Received: from mailserv.xpert.com ([199.203.132.135]) by void.xpert.com with esmtp (Exim 3.22 #1) id 16MBo6-0002Zn-00; Thu, 03 Jan 2002 19:37:34 +0200 Received: by mailserv.xpert.com with Internet Mail Service (5.5.2650.21) id ; Thu, 3 Jan 2002 19:43:02 +0200 Message-ID: From: Yonatan Bokovza To: 'Dave Raven' , devin-freebsdquestions@rintrah.org Cc: freebsd-questions@freebsd.org Subject: RE: Setuid. Date: Thu, 3 Jan 2002 19:42:58 +0200 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: text/plain; charset="iso-8859-1" Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > -----Original Message----- > From: Dave Raven [mailto:dave@raven.za.net] > Sent: Thursday, January 03, 2002 19:30 > To: devin-freebsdquestions@rintrah.org > Cc: freebsd-questions@freebsd.org > Subject: Re: Setuid. > > > Sorry, another follow up on my previous post: > > I cannot run the other program suid because it (the > actuall program) > check what user is running it, > and that will never be root. so, it needs to be called by root. > > Also, this is a perl program, so it calls perl. Does perl > not need to > run as suid root, considering > I'm actually running perl -w myprog.pl ?? > > Thanks again. A solution that might suit you is to break this into two programs: The perl script that would run as root (not SUID-root, I mean real root) will write the output to a predetermined file that the web program can read, and the web program can disperse it to whoever request. Like: perl -w perlscript.pl > /usr/local/www/data/perltempfile and read /usr/local/www/data/perltempfile with your web program. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message