VFS modules / MSDFS tweaking

Michael Gerdts Michael.Gerdts at usa.alcatel.com
Mon Jul 23 16:32:52 GMT 2001

On Mon, Jul 23, 2001 at 11:08:11AM -0500, Gerald Carter wrote:
> Well....Looks like 'vfs options' exists in param/loadparm.c
> but it not used anywhere in the code.  I can't think of a good
> use for it.  What kind of options were you thinking about?
> To me...a VFS module should not need other options.  These should be
> gotten from the environment if at all.

In general, VFS layers seem to support options that are specific to the
particular VFS.  For example, on solaris, see mount(1m).  Then take a look
at mount_ufs(1m), mount_pcfs(1m), etc.  The file systems have different
intrinsic properties, and as such they need more specific mount options.

In the context of the module I was talking about, I would like to do the

	comment = Project directories
	msdfs root = yes
	vfs object = /opt/samba/lib/vfs_msdfs-automount.so
	vfs options = map=auto.projects

	comment = Project directories
	msdfs root = yes
	vfs object = /opt/samba/lib/vfs_msdfs-automount.so
	vfs options = map=auto.apps

This would allow me to use the same VFS module to perform slightly
different things by telling it to use a different automount map.

The following are some other random ideas as to how it could be used.

	; connect to the FTP
	vfs object = /opt/samba/lib/vfs_ftprelay.so
	; everyone gets the same password
 	vfs options = username=foo password=secret

Or perhaps one that made a particular branch of CVS available:

	vfs object = /opt/samba/lib/vfs_cvs.so
	vfs options = username=foo pass=bar \
		cvsroot=:pserver:cvs at pserver.samba.org:/cvsroot \

	vfs object = /opt/samba/lib/vfs_cvs.so
	vfs options = username=anonymous pass= \
		cvsroot=:pserver:anonymous at anoncvs.gnome.org:/cvs/gnome \

Maybe it would be nice to see a database as a file system:

	vfs object = /opt/samba/lib/vfs_postgres.so
	vfs options = dbhost=darkstar dbport=5432 database=orders

More information about the samba-technical mailing list