Date: Thu, 3 Jan 2002 19:23:42 +0200 From: "Dave Raven" <dave@raven.za.net> To: <devin-freebsdquestions@rintrah.org> Cc: <freebsd-questions@freebsd.org> Subject: Re: Setuid. Message-ID: <004d01c1947b$68185d40$3800a8c0@DAVE> References: <EB513E68D3F5D41191CA000255588101B436D0@mailserv.xpert.com> <002f01c19479$3d688c20$3800a8c0@DAVE> <20020103122243.A14995@tharmas.rintrah.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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: <devin-freebsdquestions@rintrah.org> To: "Dave Raven" <dave@kill-9.za.net> Cc: <freebsd-questions@freebsd.org> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?004d01c1947b$68185d40$3800a8c0>