DFS mounting wrong path

Luiz Angelo Daros de Luca luizluca at gmail.com
Thu Apr 13 19:41:20 UTC 2023


Hello,

I have a strange situation with the kernel following DFS directories
to the wrong location.
In a share with a couple of DFS entries, sometimes the kernel follows
the wrong path. Something like this:

server: /share/dir/subdir1 -> msdfs:server\share1$
server: /share/dir/subdir2 -> msdfs:server\share2$
...
server: /share/dir/subdir11 -> msdfs:server\share11$
server: /share/dir/subdir12 -> msdfs:server\share12$

And in the client, we have:

client: //server/dir/subdir1 on /mnt/share/dir/subdir1
client: //server/dir/subdir2 on /mnt/share/dir/subdir2
...
client: //server/dir/subdir11 on /mnt/share/dir/subdir11
client: //server/dir/subdir12 on /mnt/share/dir/subdir11 <<< (should
be subdir12!)

It always happens with older kernels (5.14 from opensuse/sles 15.4),
where the first DFS is always used everywhere. However it still
randomly happens with newer kernels like 6.2.9-1-default from opensuse
tumbleweed. I can always reproduce it if I do a "ls subdir*" but it
does not happen if I first "ls subdir12" and then "ls subdir*". It
looks like a race condition, but it might be an off-by-one case as I
only observed that with the last DFS in the directory (12th in my real
case).

Has anyone seen this behavior?

Regards.

---
     Luiz Angelo Daros de Luca
            luizluca at gmail.com



More information about the samba-technical mailing list