[RFC] Teaching mount(8) to use nmount()

Craig Rodrigues rodrigc at crodrigues.org
Sun Oct 9 08:05:02 PDT 2005


On Sun, Oct 09, 2005 at 03:12:53PM +0200, Pawel Jakub Dawidek wrote:
> Can't we just check if there is an external binary in _PATH_SYSPATH?
> It'll be easier to add new file system then (there will be no need to
> change this function).

We could do that.  I had some thoughts on this: 
-> In the future, we want to make it difficult for people to add new
   external mount programs and force them to put the majority
   of their argument parsing inside the FS, so that it works
   nicely with nmount() and mount -t.
   Only in exceptional circumstances should we have an external
   mount program that works with mount -t....NFS and SMBFS are two
   special cases I could think of, and in these special cases
   (and new special cases), we could modify mount(8).

-> Could there be security implications of unconditionally
   checking for a mount_foo binary and invoking it?  What if
   the FS doesn't need an external mount binary and can use nmount()?
   The security implication isn't too much worse than the existing
   state of mount(8) today, but I thought I would throw it out there
   to think about.

In this model, people could still write their own external
mount programs....they would just be forced to make sure
that for every option (-C, -q, -r), there is a corresponding
(-o filesystemoption=foo1) option, so that it works
with mount -t, because mount isn't going automatically fork() the new
external mount program.  Also, this would make certain these
options would be settable from /etc/fstab.

-- 
Craig Rodrigues        
rodrigc at crodrigues.org


More information about the freebsd-arch mailing list