VFS problem

Alexander Bokovoy a.bokovoy at sam-solutions.net
Sun Jun 2 02:37:01 GMT 2002


On Sat, Jun 01, 2002 at 09:25:10AM -0700, Jim Myers wrote:
> I'm trying to write a VFS module that uses the conn->vfs_private problem.
> It appears this field is never referenced in existing Samba code and is NOT
> initialized in vfs.c:vfs_init_custom.
> 
> It appears to me that this function needs the following line added:
>       conn->vfs_private = NULL;
> 
> However there is a further design problem. There is no way for a custom VFS
> to properly initialize and cleanup as there is no first-time call that
> allows access to the conn structure, nor is there a cleanup call to free
> any memory pointed to by vfs_private.
> 
> I would think it would be could to add the conn structure as a parameter to
> the custom VFS init function: vfs_init and and a new cleanup call as well
> so the associated memory could be freed.
I did that in stackable VFS where each module could have their own
vfs_private information. This is against Samba 3.0 (HEAD of a couple weeks
ago).

Look in examples/VFS/*.c to see details of how to use this with stackable
VFS (attached).

-- 
/ Alexander Bokovoy
Software architect and analyst             // SaM-Solutions Ltd.
---
The little pieces of my life I give to you, with love, to make a quilt
to keep away the cold.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: samba-3.0-cascaded-vfs.1.1.patch.bz2
Type: application/x-bzip2
Size: 10632 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20020602/b0b24aa9/samba-3.0-cascaded-vfs.1.1.patch.bin


More information about the samba-technical mailing list