VFS stuff (was Re: need undelete function)

Andy Bakun abakun at reac.com
Thu Jun 17 14:17:07 GMT 1999


I am in total agreement on the scripting VFS module.  I've been getting requests
to implement a bunch of things similar to my 'close command' patch
(http://www.reac.com/samba/samba-closecmd.README), but I'm holding out until the
VFS layer that was talked about a few months ago goes gold, because this is a more
'correct' way to do it, in my mind.  I'll use this post as a sounding board for
some of my ideas. :)  I havn't heard much about the VFS layer in a while; is it
already in the 2.1 series?  Did the developer give up on it?  Who was working on
it anyway?  I'd be willing to implement it if I wasn't duplicating work.  Tim,
your post seems to indicate that VFS stuff is already written -- am I completely
out of the loop?  Is there documentation for what's already written?

I'd think that the VFS layer can be bound on a per-share basis, thusly:

[share]
  path = /whatever
  comment = my share
  vfs link against = /usr/local/samba/lib/my-samba-vfs-layer.so

A 'execute script' shared lib could be provided for with the samba distribution.
In terms of giving the bound vfs layer configuration parameters, the conf file
parsing code could be modified to take things of the form:
  vfs link against = /path/to/so
  {
     vfs option one = x
     vfs option two = x
  }

I believe this would be easy to implement because the conf file parsing code could
just skip over, and not process, things in braces; keeping the things in braces as
plain text to pass to the so's init routine.  If no vfs link against parameter is
specified, just dump whatever is in braces.  That would be the easy method.  The
hard method would be to have all the parameters specified to the share available
to the VFS also. Unfortunately, the conf file code ignores parameters it doesn't
recognize, so those would have to kept around, taking up memory and such, and
which makes parameter name typo hard to detect.

Andy.

Tim Potter wrote:

> Majid Tajamolian writes:
>
> > > ps: my little suggestion: if we add some parameters at smb.conf like
> > >        protected dir = /home/share, /home/user1 ;
> > >        trashcan dir = /smbtrash ;
> >
> > It seems that implementation of such parameter has some difficulties and
> > eventuates reduction on performance (e.g. handling "protected dir"s and
> > "trash dir" on the different devices like /dev/hda1 & /dev/hdb1).
> > I suggest a service specific parameter in smb.conf like the followings:
> >
> >       remove utility = /etc/scripts/saferm
>
> It seems to me that a lot of these "do X when Y happens" improvements
> could be handled with some sort of scripting vfs module.  It shouldn't
> be too hard to write, although there is currently no process for defining
> new entries in smb.conf.
>
> Tim.
>
> --
> Tim Potter, System Admin/Programmer, Head Bee Guy
> Advanced Computational Systems CRC, RSISE Bldg Australian National University,
> Canberra 0200, AUSTRALIA Ph: +61 2 62798813 Fax: +61 2 62798602



More information about the samba-technical mailing list