Jeremy Allison
2023-Feb-09 17:26 UTC
[Samba] SMB1 Windows API FindFirstFile broken for DFS
On Thu, Feb 09, 2023 at 10:30:45AM -0600, Kenneth Hagin via samba wrote:>I have Samba on openSUSE Leap 15.4. I have a legacy Windows 2003 computer >(WHS v1) on my network. At some point in openSUSE updates (even before >15.4), my ability for WHS to browse DFS links on openSUSE broke. I also >have Windows 2008 and Windows 10 systems which continue to work as expected. >I recently discovered that the source of the problem is that the Windows API >FindFirstFile no longer works on a DFS link. It works fine when accessing >the target share directly. *ALSO*, I can access a file on the DFS link if I >use the filename directly, example "copy \\samson\dfs\data\test.txt ><file://samson/dfs/data/test.txt> .", avoiding usage of FindFirstFile. I >realize this is SMB1, which is deprecated, but I'd really like to fully use >my WHS system as long as possible (it's not open to the Internet) for >backups and such.To debug this needs wireshark traces to compare between a working and failing system. Also it's not clear what client and what server are being used in your examples.
I'm guessing it will take me a little time to learn to use wireshark. I'll come back with questions if I need guidance. Meanwhile... The server: uname-a Linux samson 5.14.21-150400.24.41-default #1 SMP PREEMPT_DYNAMIC Fri Jan 13 08:55:22 UTC 2023 (1d4442d) x86_64 x86_64 x86_64 GNU/Linux smbstatus Samba version 4.15.13-git.591.ab36624310c150400.3.19.1-SUSE-oS15.0-x86_64 The client: Windows Server 2003 for Small Business (Windows Home Server v1.1) 5.2.3790 Service Pack 2 Alternate server that works (this server is a minimal VM that references the shares from the principle server for its DFS): uname-a Linux felix 5.10.0-11-amd64 #1 SMP Debian 5.10.92-2 (2022-02-28) x86_64 GNU/Linux smbstatus Samba version 4.13.13-Debian Also, I have a Windows XP SP3 Virtual Machine under VirtualBox 7.0.6 that fails in the same way as the Windows Server 2003 (Both are limited to SMB1). It looks like to me the onset of the problem was between versions 4.13 and 4.15. -----Original Message----- From: Jeremy Allison <jra at samba.org> Sent: Thursday, February 9, 2023 11:26 AM To: kenhagin at comcast.net Cc: samba at lists.samba.org; Kenneth Hagin <kenhagin at pobox.com> Subject: Re: [Samba] SMB1 Windows API FindFirstFile broken for DFS On Thu, Feb 09, 2023 at 10:30:45AM -0600, Kenneth Hagin via samba wrote:>I have Samba on openSUSE Leap 15.4. I have a legacy Windows 2003 computer >(WHS v1) on my network. At some point in openSUSE updates (even before >15.4), my ability for WHS to browse DFS links on openSUSE broke. I also >have Windows 2008 and Windows 10 systems which continue to work asexpected.>I recently discovered that the source of the problem is that the WindowsAPI>FindFirstFile no longer works on a DFS link. It works fine when accessing >the target share directly. *ALSO*, I can access a file on the DFS link ifI>use the filename directly, example "copy \\samson\dfs\data\test.txt ><file://samson/dfs/data/test.txt> .", avoiding usage of FindFirstFile. I >realize this is SMB1, which is deprecated, but I'd really like to fully use >my WHS system as long as possible (it's not open to the Internet) for >backups and such.To debug this needs wireshark traces to compare between a working and failing system. Also it's not clear what client and what server are being used in your examples.