Pseudo file system with Samba
jra at samba.org
Thu Feb 10 18:17:10 MST 2011
On Thu, Feb 10, 2011 at 05:21:41PM -0500, Satish Chandra Kilaru wrote:
> I have some data (organized as folders/files) generated on the fly on many
> different unix variants. I need to share this data with windows clients. I
> do not want to write it to a disk and share it as this data changes
> dynamically based on who is accessing it.
> I can not write a file system driver because this should work on OSs like
> Linux, Solaris, HP, AIX, MAC etc... it is tedious to write FS drivers for
> each and every platform. FUSE is not an option either as FUSE is not
> available on some of the platforms that I need to support.
> Can this problem be solved by writing a module that Samba can use?
> This is what I am thinking. If a share is listed in smb.conf with some
> special property, Samba understands that it is a FS that is different from
> other FSs. This FS is handled by a library that I provide. Samba takes care
> of SMB protocol and this library takes care of file system calls.
> Is such a thing available in Samba? If not is it a good idea to develop it
> (I am volunteering to do it)?
What you are describing already exists, and is called a Samba VFS module.
Look into the sample VFS modules provided with your source code.
You should be able to adapt one of the existing samples
into something that does what you need.
More information about the samba-technical