Cascaded VFS patch
abartlet at samba.org
Tue Jun 18 01:29:24 GMT 2002
Jean Francois Micouleau wrote:
> On 17 Jun 2002, Simo Sorce wrote:
> > I've just reviewed Alexander Cascaded VFS patch and found it ok,
> > now I'm attaching a new diff against current CVS to make it easy to test
> > before I commit it into the tree.
> > Unfortunately I have not much time to test it so I have a little request
> > for list attendees.
> Just a note about the VFS I wanted to discuss with alexander at sambaXP
> but didn't have the time.
> I don't like the idea that the vfs module see the vfs struct and muck with
> it at module's load time.
> I would prefer something along all the vfs internal tables hidden to the
> vfs modules and only some vfs functions exported to the vfs modules.
I'm certainly a fan of hiding structs - there is a lot less damage these
things can do when they don't have access to 'the wrong things'.
> What I'm thinking is the samba vfs core exports 2 functions:
> vfs_register_module() and vfs_register_function(). On module loading (in
> the dl_open() function or whatever), the module calls this functions like
> vfs_register_function("my_vfs_module", "open", my_module_open);
> vfs_register_function("my_vfs_module", "close", my_module_close);
> vfs_register_function("my_vfs_module", "read", my_module_read);
> vfs_register_function("my_vfs_module", "write", my_module_write);
> I thought of that while listening to the VFS presentation at sambaXP, I
> don't see why the vfs structs should be visible and more importantly it
> would allow modules to run even if samba vfs struct changes. Vfs modules
> maintainers wouldn't have to follow samba developement (and changes) as
> close as it's required now.
This sounds interesting, and would apply equally well for pdb and auth
It also works much better for the builtin-and-or-external case.
My only issue is with the complete loss of compile-time type checking.
How should that be addressed?
Andrew Bartlett abartlet at pcug.org.au
Manager, Authentication Subsystems, Samba Team abartlet at samba.org
Student Network Administrator, Hawker College abartlet at hawkerc.net
http://samba.org http://build.samba.org http://hawkerc.net
More information about the samba-technical