Using a VFS module to affect MSDFS root shares
gepardcv at gmail.com
Wed Aug 12 15:38:05 MDT 2009
Is it possible to write a VFS module which affects Samba MSDFS root
shares? I essentially want to provide "virtual" msdfs-format symlinks
from a VFS module, rather than storing them on the path of the share.
It seems that I have to write a VFS module which provides virtual
symlinks in the share. I can easily create a virtual directory listing
by providing opendir(), readdir(), closedir(), seekdir(), rewinddir(),
and telldir() callbacks. I have done this before for non-DFS based VFS
modules. For DFS, though, I'm not entirely sure how to proceed from
there. First of all, is this at all possible?
Second, to do this, I think I need to provide callbacks for stat(),
lstat(), and readlink(). So for example, if I see that stat() is getting
called on "dfs/abc123", where "dfs" is the (empty) DFS root share and
abc123 is the symlink I need to provide, I can fill struct stat
accordingly, with st_mode set to S_IFLNK. I can also make sure
readlink(/export/dfs/abc123) gets set to, e.g.,
What about "dfs/abc123/file.txt", though? I'm not sure how to translate
that. Hints very much appreciated.
More information about the samba-technical