Bug 15843 - macOS Finder client DFS broken on 4.22.0
Summary: macOS Finder client DFS broken on 4.22.0
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: File services (show other bugs)
Version: 4.22.0
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Jule Anger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-04-03 20:47 UTC by Harry Youd
Modified: 2025-11-11 12:30 UTC (History)
1 user (show)

See Also:


Attachments
Screenshot of macOS finder view of DFS root on samba server 4.22.0 (346.07 KB, image/png)
2025-04-03 20:47 UTC, Harry Youd
no flags Details
Screenshot of macOS finder view of DFS root on samba server 4.21.4 (175.20 KB, image/png)
2025-04-03 20:48 UTC, Harry Youd
no flags Details
Patch for 4.21, 4.22 and 4.23 cherry-picked from master (9.79 KB, patch)
2025-08-25 08:41 UTC, Ralph Böhme
vl: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Harry Youd 2025-04-03 20:47:20 UTC
Created attachment 18626 [details]
Screenshot of macOS finder view of DFS root on samba server 4.22.0

I run Arch Linux on my home server that uses samba for a SMB share. I use a DFS root using the "msdfs:..." symlinks, which is configured in smb.conf. This has been working up until version 4.22.0.

Starting in version 4.22.0, I am unable to access the DFS shares from macOS finder (15.3.2). It successfully enumerates the contents of the DFS root, but shows broken "shortcut" icons against the subdirectories. When attempting to enter a share from the DFS root, an error popup says "The operation can't be completed because the original item for "Downloads" can't be found". smbclient on Linux successfully navigates the DFS shares without change.
 
I have bisected and it appears to be due to this commit https://github.com/samba-team/samba/commit/4a46c6a88273ea765b142299d6cf33d5ec93588. I'm not sure how to proceed from here. I felt a merge request reverting this would be premature as I'm not super sure on the details of what this change is doing. I should have mentioned that the client in question is macOS 15.3.2 finder, but the DFS seems to still work using smbclient on linux.
 
DFS setup:
$ ls -alh /mnt/media/samba/shares/
total 40K
drwxr-xr-x 1 root root 188 Mar 27 21:26  .
drwxr-xr-x 1 root root  12 Jul 26  2022  ..
lrwxrwxrwx 1 root root  45 Jul 26  2022  Audiobooks -> 'msdfs:fqdn\audiobooks$'
lrwxrwxrwx 1 root root  44 Jul 26  2022  Downloads -> 'msdfs:fqdn\downloads$'
 
Relevant parts of smb.conf:

[global]
    workgroup = WORKGROUP
    server string = File Server
    server role = standalone server
    hosts allow = 10.113.210. 10.113.211. 10.26.26.
    host msdfs = yes
    map to guest = Bad User
    guest account = nobody
    logging = systemd
    log level = 2
    ntlm auth = true
    allow insecure wide links = yes
[shares]
    comment = Shares
    msdfs root = yes
    path = /mnt/media/samba/shares
    guest ok = yes
    public = yes
    writable = no
    printable = no
[downloads$]
    comment = Downloads in-progress or seeding
    path = /mnt/media/downloads
    force group = media
    writable = no
    printable = no
    valid users = harry
    force directory mode = 2770
    force create mode = 0770
[audiobooks$]
    comment = Audiobook library
    path = /mnt/media/audiobooks
    force group = media
    writable = no
    printable = no
    valid users = harry
    force directory mode = 2770
    force create mode = 0770

Example of smbclient working:

$ smbclient //fqdn.of.server/shares
Password for [WORKGROUP\harry]:
Try "help" to get a list of possible commands.
smb: \> cd Downloads\
smb: \Downloads\> ls
  .                                   D        0  Fri Mar 28 00:26:34 2025
  ..                                  D        0  Fri Mar 28 00:26:34 2025
  dropzone                            D        0  Fri Mar 28 00:05:00 2025
  temp                                D        0  Fri Mar 28 00:25:38 2025


macOS smbutil dfs
$ smbutil dfs smb://fqdn.of.server/shares/Downloads

No server entries found

------------- Entry 1  -------------
Referral requested : /fqdn.of.server/shares/Downloads
     list item 1 : Path: /fqdn.of.server/shares/Downloads
     list item 1 : Network Address: /fqdn.of.server/downloads$
     list item 1 : New Referral: /fqdn.of.server/downloads$
Comment 1 Harry Youd 2025-04-03 20:48:04 UTC
Created attachment 18627 [details]
Screenshot of macOS finder view of DFS root on samba server 4.21.4
Comment 2 Samba QA Contact 2025-08-15 15:38:03 UTC
This bug was referenced in samba master:

2cb2991ccdd5d4f63e4c5b3ccc4454a6b39d6afe
2e88ba4b4de146327c19682d59bbe34d68158bf7
698a0195f72a091e9ed6b0448160c79e37761840
5f7b31927733b0ff3e1207be242f1ddb2cb699bd
43ee86c0c757e95712ed52bd336d2085485498ba
0be53d7ac0a39d6a48c6c5e2144f342c0d406781
Comment 3 Ralph Böhme 2025-08-25 08:41:19 UTC
Created attachment 18693 [details]
Patch for 4.21, 4.22 and 4.23 cherry-picked from master
Comment 4 Jule Anger 2025-08-28 08:13:55 UTC
Pushed to autobuild-v4-{23,22,21}-test.
Comment 5 Samba QA Contact 2025-08-28 10:40:04 UTC
This bug was referenced in samba v4-23-test:

8619973d9783857c03d2c0ca439835fdc63576f8
d22c428c1da8c65895de2a87994ee55ac3eb0f74
d0fa3266ad8b38e4fa8a611f52c5b6534bdec597
24ba677d1272d7f12b84179652249a4a804b2672
607d7ad27c4b1aec26f793a83956debb8306a64b
2788551866a1569648cb38ca9aab744bd38994d6
Comment 6 Samba QA Contact 2025-08-29 12:15:20 UTC
This bug was referenced in samba v4-23-stable (Release samba-4.23.0rc3):

8619973d9783857c03d2c0ca439835fdc63576f8
d22c428c1da8c65895de2a87994ee55ac3eb0f74
d0fa3266ad8b38e4fa8a611f52c5b6534bdec597
24ba677d1272d7f12b84179652249a4a804b2672
607d7ad27c4b1aec26f793a83956debb8306a64b
2788551866a1569648cb38ca9aab744bd38994d6
Comment 7 Samba QA Contact 2025-09-11 11:07:03 UTC
This bug was referenced in samba v4-22-test:

15ab604ef1cbcd2c342a0ffd746cb1ff74d716f7
0ec18e6bc39595af2b25fe566c1ee140e02a6592
51fa56ad96c4240699fa2108af05df86c6a024ea
cced6a07d877e6a9c47cc3deeda69195c6b20f87
4f959e0dc36709e0a4679c4d326390eb828b85ab
91031b7214945b7df7e4d6872c3742828118074e
Comment 8 Jule Anger 2025-09-12 06:11:41 UTC
Autobuild for 4.21 failed serveral times with:

UNEXPECTED(error): samba.tests.dcerpc.dfs.samba.tests.dcerpc.dfs.DfsTests.test_dfs_reparse_tag(fileserver)
REASON: Exception: Exception: Traceback (most recent call last):
  File "/m/janger/a421/b2206732/samba-without-smb1-build/bin/python/samba/tests/dcerpc/dfs.py", line 44, in test_dfs_reparse_tag
    self.dfs.Add('\\\\%s\\msdfs-share\\dfslink' % self.server, self.server, 'tmp', 'comment', 0)
samba.WERRORError: (2669, 'WERR_NERR_DFSCANTCREATEJUNCTIONPOINT')

Reassigning to Ralph.
Comment 9 Ralph Böhme 2025-09-15 18:23:46 UTC
(In reply to Jule Anger from comment #8)
Ah, crap, as per the bug subject: this is 4.22 only bug anyway.... Reassigning to Jule.
Comment 10 Jule Anger 2025-09-17 07:39:45 UTC
Okay :)

Closing out bug report.

Thanks!
Comment 11 Samba QA Contact 2025-10-15 13:20:57 UTC
This bug was referenced in samba v4-21-test:

a2ad8f49cfe0039b67300243e6033613b5301df5
2de3b8ec09cf3dcd6d17ccf5b025477b338f51cc
3c7b596f1bbf26f5378446391e1c1f6dcd4bc912
327fd68521380aa55b7407ad1189612024756384
c9f671230717754912cbdc77ee262bb5afa5ffc6
a200d4720ee4dd8f26753436a63ccb58c7c1f0f0
Comment 12 Jule Anger 2025-10-15 13:34:38 UTC
Pushed incorrectly. Will be reverted. Sorry.
Comment 13 Samba QA Contact 2025-10-16 14:37:16 UTC
This bug was referenced in samba v4-22-stable (Release samba-4.22.6):

15ab604ef1cbcd2c342a0ffd746cb1ff74d716f7
0ec18e6bc39595af2b25fe566c1ee140e02a6592
51fa56ad96c4240699fa2108af05df86c6a024ea
cced6a07d877e6a9c47cc3deeda69195c6b20f87
4f959e0dc36709e0a4679c4d326390eb828b85ab
91031b7214945b7df7e4d6872c3742828118074e
Comment 14 Samba QA Contact 2025-11-11 12:30:45 UTC
This bug was referenced in samba v4-21-stable (Release samba-4.21.10):

a2ad8f49cfe0039b67300243e6033613b5301df5
2de3b8ec09cf3dcd6d17ccf5b025477b338f51cc
3c7b596f1bbf26f5378446391e1c1f6dcd4bc912
327fd68521380aa55b7407ad1189612024756384
c9f671230717754912cbdc77ee262bb5afa5ffc6
a200d4720ee4dd8f26753436a63ccb58c7c1f0f0