On Mon, Sep 27, 2010 at 06:16:04PM -0400, erik quanstrom wrote:
> > - Why is it that, when the namespace is changed in
> >   /cfg/$sysname/cpurc, it does not seem to be taken into account by
> >   the aux/listen in /rc/bin/cpurc?
> 
> dynamicly, or on reboot?

first reaction: I thought cpurc was only run when booting.

> > - Why can't a modified rc/bin/service.auth not be bound via
> >   /cfg/$sysname/namespace?
> 
> $sysname is not set when cpurc is started.

first reaction: It is not set before /rc/bin/cpurc is started, but
/rc/bin/cpurc sets sysname in the very beginning, then possibly
executes /rc/bin/cpurc.local, then possibly executes
/cfg/$sysname/cpurc and then finally, possibly /cfg/$sysname/cpustart.

reading and thinking it over:

Booting: init -> newns -> uses /lib/namespace which also sources
/cfg/$sysname/namespace -> /rc/bin/cpurc -> ...

As $sysname is not yet known at the time, /cfg/$sysname/namespace
cannot be resolved yet (cpurc is not yet involved). Now I also
understand why you asked about "dynamically versus reboot". The lines
containing $sysname in /lib/namespace are there for changes to the
namespace after booting.

The different handling for service.auth and service is due to the fact
that listening for normal services is done as user none and that a new
namespace is created (using /lib/namespace but now $sysname can be
resolved).

This explains why /cfg/$sysname/namespace worked for service and not
for service.auth (no new namespace is created). So, to summarize:

- trusted services: no new namespace is created so cannot be handled
  by a namespace file

- normal services: a new namespace is created so has to be handled by
  a namespace file

Thanks for thinking along with me, even though I didn't do it the
traditional way in the first place (how could I know?). Now that I
understand these things (or at least hope so;-)), it's time to convert
it to the traditional way of doing it.


Kind regards,

> - erik

-- 
Frank Lenaerts ---------------------------------------- fr...@inua.be


Reply via email to