[linux-cifs-client] Re: dfs path construction fixup for / character in \\server\share component of dfs path

Jeremy Allison jra at samba.org
Sat May 24 00:46:06 GMT 2008


On Wed, May 21, 2008 at 05:57:48PM +0400, Igor Mammedov wrote:
> 
> Magic is really sucks. Because of DFS junction point
> is symlink in samba, when unix ext. is on, we had to do
> that magic thing in the kernel code.
> Now we have following behavior:
> 1.  when client makes 'ls' for the first time on the 
>     directory with DFS links, 'ls' shows them as symlinks.
> 2.  when we follow through a such 'symlink', it finely
>     becomes a directory.
> That magic!!!
> Of cause it is possible to rewrite such 'symlink' in readdir
> syscall handler, but is it the best way? 
> 
> IMHO:
>   For a client the way better to see a directory from the start.
>   (common code for handling this case for MS and Samba servers)
>   and no magic at all.

I can easily do this in the server, the problem is
how we define what is "correct" from the client 
view with the UNIX extensions turned on.

Because we are overloading the filesystem to
store DFS links as symlinks, it's arguable
which way they should be seen. If a symlink
with the corrcet contents is "magically" seen
as a directory, then a client can write a
symlink which is then no longer seen as a
symlink, but turns into a directory when
queried.

The problem is the Samba implementation
is bleeding out onto the wire here. As we're
stuck with it for the time being we have to
make the best of it. Trouble is, I'm not
sure what exactly the right decision is
here..

Jeremy.


More information about the linux-cifs-client mailing list