Re: [9fans] import/export -B

2010-10-25 Thread erik quanstrom
 The only bit I don't get is why you have to supply a mountpoint to import.
 Surely import will always be running from listen and as such it will not
 be in any useful namespace so why mount anything?

would it make more sense if it instead said root of tree to be mounted?

- erik



[9fans] import/export -B

2010-10-22 Thread Steve Simon
I am a little confused by import/export -B (backwards).

The only bit I don't get is why you have to supply a mountpoint to import.
Surely import will always be running from listen and as such it will not
be in any useful namespace so why mount anything?

from the manpage:

  Suppose that the machine moscvax has access to a private
  file server containing public web pages that need to be
  served by the less-trusted server webvax.  Webvax runs the
  following listener (see listen(8)) on TCP port 999:

   #!/bin/rc
   import -B -s rowebfs /usr/web /bin/restarthttpd

  When moscvax boots, it runs

   exportfs -R -r /usr/web -B tcp!webvax!999

  to serve a read-only copy of /usr/web to webvax.  When
  webvax gets the call, import mounts the served tree onto its
  own /usr/web and then runs /bin/restarthttpd to restart
  httpd(8).

It seems to me that my restarthpptd script will be 
'unmount /usr/web; chmod 600 /srv/rowebfs'

I find it strange that the mountpoint is not optional (as long as -s srv names 
exists).

perhaps I am missing somthing? or maybe its just a quirk?

-Steve