[ale] starting binaries as insignificant users
Christopher Fowler
cfowler at outpostsentinel.com
Mon Mar 10 10:35:43 EST 2003
I think sudo will execute a command as a user and not try to do it via a
shell.
On Mon, 2003-03-10 at 09:10, John Wells wrote:
> Chris,
>
> Thanks. That would definitely work. However, my customer requires that
> startup routines be scripts.
>
> Hmmm...wonder if Perl exposes setgid and setuid?
>
> /me off to look in the camel book...
>
> Thanks!
> John
>
> Christopher Fowler said:
> > SU in that manner uses "sh -c" to execution a login shell.
> >
> >
> > Here is what you do.
> >
> > setgid(<group id here>);
> > setuid(<user id here>);
> >
> > execl(arg[0], arg[1], ... arg[N[);
> >
> >
> > You are done. You do not need a shell to execute a program, su was just
> > written that way.
>
>
>
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://www.ale.org/mailman/listinfo/ale
_______________________________________________
Ale mailing list
Ale at ale.org
http://www.ale.org/mailman/listinfo/ale
More information about the Ale
mailing list