VFS Module Docs & Examples

korydraughn.renci at gmail.com korydraughn.renci at gmail.com
Tue Jul 31 16:56:58 UTC 2018

Will do. Thanks!

Sent from Yahoo Mail on Android 
  On Tue, Jul 31, 2018 at 12:55 PM, Richard Sharpe<realrichardsharpe at gmail.com> wrote:   On Tue, Jul 31, 2018 at 9:52 AM, Kory Draughn
<korydraughn.renci at gmail.com> wrote:
> I've been using those links as well as the vfs_default.c as a reference, but
> I feel I am still missing something.
> The software I'm trying to make work with samba manages lots of files.  The
> files managed by this software can only be accessed through the interface
> provided.  Even if I know the physical location of the files, I'm not
> allowed to access them that way.  I can only use the logical path.
> Does samba expect a file to actually reside under the share?
> Is the path with the share required?
> Am I wrong in thinking that the files do NOT have to exist under the share
> at all?
> It appears that samba is trying to lookup the file on the local filesystem.
> After module_realpath() is called, I get a message saying:
>  check_reduced_name: Bad access attempt: . is a symlink outside the share
> path
> This is understandable because the file does not exist locally.  Hopefully
> that makes sense.

Yes, it makes sense. If the files are not in a local file system then
you have to implement every VFS function and provide the correct steps
for your file system. In some cases you may need to return ENOSYS.

As Jeremy says, look at the module for CEPH or GlusterFS.

> Thanks,
> On Tue, Jul 31, 2018 at 12:36 PM Richard Sharpe
> <realrichardsharpe at gmail.com> wrote:
>> On Tue, Jul 31, 2018 at 9:23 AM, Kory Draughn via samba-technical
>> <samba-technical at lists.samba.org> wrote:
>> > Hi,
>> >
>> > Is there any documentation describing each VFS function?
>> > Are there any example VFS modules that present data that does not reside
>> > on
>> > the filesystem (e.g. the data is managed by another process within a
>> > different network)?
>> There are some details on the Wiki:
>> https://wiki.samba.org/index.php/Writing_a_Samba_VFS_Module
>> Also, an older version of this here for Samba 3.6:
>> https://wiki.samba.org/index.php/The_new_version_of_Writing_a_Samba_VFS
>> The Wiki could do with some updating, but you should be able to get an
>> idea of what to do.
>> You can also read the code of various modules or
>> source3/modules/vfs_default.c to figure out what each function does.
>> --
>> Regards,
>> Richard Sharpe
>> (何以解憂?唯有杜康。--曹操)(传说杜康是酒的发明者)

Richard Sharpe

More information about the samba-technical mailing list