[ale] starting binaries as insignificant users
John Wells
jb at sourceillustrated.com
Mon Mar 10 09:10:51 EST 2003
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
More information about the Ale
mailing list