Using a VFS module to affect MSDFS root shares

Matthieu Patou mat at matws.net
Wed Sep 2 07:02:35 MDT 2009


Hi Constantine,


> 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.,
> "msdfs:other-server/actual-share".
>
Do you plan to work on this module ? because in fact it turns out that 
for supporting domain base dfs samba might need this module as dfs 
namespace, dfs root and dfs links are stored into the AD.

Matthieu.


More information about the samba-technical mailing list