Date: Mon, 4 Aug 1997 13:36:27 -0600 (MDT) From: FreeBSD Mailing List <freebsd@atipa.com> To: "Jonathan A. Zdziarski" <jonz@netrail.net>, ports@FreeBSD.ORG, security@FreeBSD.ORG Subject: Re: SetUID Message-ID: <Pine.BSF.3.91.970804133131.9513A-100000@dot.ishiboo.com> In-Reply-To: <Pine.BSF.3.91.970804131806.8529A-100000@dot.ishiboo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 4 Aug 1997, FreeBSD Mailing List wrote: > > Johnathan, > > As far as I know, shell scripts can not bet setuid root. You would need > to setuid root all the binaries evoked from the shell, which is not a > great idea. > > You could instead write a setuid "wrapper" of some sort that runs a > shell script (or set of scripts), using c, c++, etc. > > Kevin Here is a simple "wrapper": -- cut here (wrapper.c) -- #include <stdlib.h> main() { execl("/etc/rc.WHATEVER","WHATEVER",NULL); } -- end-- The resulting binary can be setuid root and restricted to your appropriate /etc/group. Kevin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.91.970804133131.9513A-100000>