At 12:44 PM -0500 1/16/03, William H. Magill wrote:
On Thursday, January 16, 2003, at 04:07  AM, Rich Morin wrote:
 I also filed a bug, suggesting that Apple add a startup parameter (e.g.,
 RunAs) that would set the username; the default should be nobody.
Actually, Apple can't. It's a Unix thing... Startup scripts -- i.e.
daemons and their spawn... sorry about that:) -- are children of
init, process 1 and therefore ARE root. If a given script or daemon
wishes to run as other than root it either must do as others have
described -- change to some other UID on the fly, or NOT be started
by the init process.
I'm sorry, but this makes no sense to me at all.  Every process is
a descendent of init, but that doesn't meant that every process must
start out running as root.  I like Peter Lewis's suggestion:

  su peter -c '/usr/bin/perl /Users/peter/perl/check-services.pl' &

and see no reason why the rc infrastructure (or whatever) couldn't do
something like this for each StartupItem it handles.  It's just a big
pile of shell scripts, after all.

-r

P.S.  Note that I'm not talking about the inetd-style processes, which
      get respawned automagically.
--
email: [EMAIL PROTECTED]; phone: +1 650-873-7841
http://www.cfcl.com/rdm    - my home page, resume, etc.
http://www.cfcl.com/Meta   - The FreeBSD Browser, Meta Project, etc.
http://www.ptf.com/dossier - Prime Time Freeware's DOSSIER series
http://www.ptf.com/tdc     - Prime Time Freeware's Darwin Collection

Reply via email to