From owner-freebsd-questions Thu Jan 3 9:27:14 2002 Delivered-To: freebsd-questions@freebsd.org Received: from chaos.evolve.za.net (chaos.evolve.za.net [196.34.172.107]) by hub.freebsd.org (Postfix) with ESMTP id 455DD37B41B for ; Thu, 3 Jan 2002 09:27:07 -0800 (PST) Received: from DAVE ([192.168.0.56]) by chaos.evolve.za.net (8.11.6/1.1.3) with SMTP id g03HQiI35489; Thu, 3 Jan 2002 19:26:48 +0200 (SAST) (envelope-from dave@raven.za.net) Message-ID: <004d01c1947b$68185d40$3800a8c0@DAVE> From: "Dave Raven" To: Cc: References: <002f01c19479$3d688c20$3800a8c0@DAVE> <20020103122243.A14995@tharmas.rintrah.org> Subject: Re: Setuid. Date: Thu, 3 Jan 2002 19:23:42 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 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 Yes. I think so. Lemme give you some more details. the perl program basically revolves around this: @lines=`/usr/utils/prog -v`; while ($line = shift(@lines)) { if ($opt_v) {print ("Received : $line\n");} print $line; } prog -v spews out the version This all works if I run my perl program as root. should I change prog to suid root? Why am I getting?: su-2.05$ /usr/optec/bwutil.pl Can't do setuid Any ideas? And what should I do to set it as suid. chmod 4755 prog chown root.wheel prog ???? Thanks. ----- Original Message ----- From: To: "Dave Raven" Cc: Sent: Thursday, January 03, 2002 7:22 PM Subject: Re: Setuid. > On Thu, Jan 03, 2002 at 07:08:16PM +0200, Dave Raven wrote: > > Yes, but the perl program needs to run another program as root. > > No variables are passed or anything. > > Can you run that *other* program suid, then? At least that way the suid > program won't be directly exposed to the web. > > > What it does is get a version number for a program (from kernel) > > Later I will need to add rules (bandwidth manager) and this HAS to be done > > from > > the web and as root. > > > > Is there a better way, or how do I do it this way? > > > > --devin > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message