Bug 499259 - SMB msdfs only show "No shared folder found" instead of following the link
Summary: SMB msdfs only show "No shared folder found" instead of following the link
Status: RESOLVED UPSTREAM
Alias: None
Product: kio-extras
Classification: Frameworks and Libraries
Component: Samba (other bugs)
Version First Reported In: unspecified
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-01-28 23:19 UTC by os
Modified: 2025-01-30 18:30 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
example program showing the problem (10.00 KB, application/x-tar)
2025-01-29 15:39 UTC, Harald Sitter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description os 2025-01-28 23:19:34 UTC
SUMMARY
When I try to open network share that is a "SMB msdfs path", all KDE apps show only an empty folder with the message "No shared folder found".

STEPS TO REPRODUCE
1. For example open dolphin
2. open a msdfs path: "smb://server.example/sharename/msdfs_link"
3. 

OBSERVED RESULT
Instantly opens an empty folder, displays in the middle "No shared folder found"

EXPECTED RESULT
It should show me the contents of the msdfs link target directory.

This is confirmed to be working on: Windows systems, smbclient,kernel mount, gnome systems and it has worked in past on KDE. Unfortunately I can't tell when it has stopped following those links on KDE

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.2.5
KDE Frameworks Version: 6.10.0
Qt Version: 6.8.1
Kernel Version: 6.12.10-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 24 × AMD Ryzen 9 3900X 12-Core Processor
Memory: 62.7 GiB of RAM
Graphics Processor: Mesa Intel® Arc


ADDITIONAL INFORMATION
How it is setup on the server.

in the smb.conf
[group]
    path = /srv/fsdb/dfsgroup
    msdfs root = yes

then simply a symlink has to be crated within the path:
ln -s msdfs:server.example\\sharename linkname
Comment 1 Harald Sitter 2025-01-29 15:39:08 UTC
Created attachment 177788 [details]
example program showing the problem

I can reproduce the issue. I do think it's a bug in libsmbclient though.

What happens is that we issue a stat/smbc_readdir call on the original share. When we then try to stat/smbc_readdir the link we fall flat on the nose with 

> session setup failed: NT_STATUS_LOGON_FAILURE
> Couldn't resolve \linkname

This does however only happens iff we first stat the original share. If we directly stat the link everything seems to work fine.

I am attaching an example program that shows the issue. Probably best to report this issue upstream at samba.
Comment 2 os 2025-01-29 21:33:28 UTC
I have installed nautilus, gvfs and gvfs-smb and can confirm that is is also broken there with the latest versions...
Thanks for verifying and helping to troubleshoot! I will open a bug with the samba people :)