Bug 12379 - Manjaro 16.06: STATUS_PATH_NOT_COVERED from a Windows Domain Controller with DFS
Summary: Manjaro 16.06: STATUS_PATH_NOT_COVERED from a Windows Domain Controller with DFS
Status: NEW
Alias: None
Product: CifsVFS
Classification: Unclassified
Component: kernel fs (show other bugs)
Version: 3.x
Hardware: x64 Linux
: P5 normal
Target Milestone: ---
Assignee: Steve French
QA Contact: cifs QA contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-13 18:17 UTC by v17564
Modified: 2022-07-25 23:02 UTC (History)
2 users (show)

See Also:


Attachments
plain text capture only for SMB protocol (210.72 KB, text/plain)
2016-10-13 18:17 UTC, v17564
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description v17564 2016-10-13 18:17:48 UTC
Created attachment 12573 [details]
plain text capture only for SMB protocol

Hello.

I use Manjaro 16.06 x86_64 Xfce OpenRC with this packages: cifs-utils 6.5-1 and Samba 4.5.0-2.

I have a problem when i try to mount shared folders from a Windows domain controller with DFS. The access to shared folders in linux machines with Samba work correctly.


Description
-----------
In the job there are a Windows Domain controller (WDC): Windows Server (R) 2008 Enterprise 6002 Service Pack 2, with a DFS for shared folders that I mount with CIFS.

The folders mount without problem but are void (blank), without files. There are more details in this link: https://forum.manjaro.org/t/cifs-mount-windows-domain-controler-shared-folders-are-empty/10062


I define in the /etc/fstab:

//example.com/dir1/dir2/dir3 /media/dir3 cifs noauto,noexec,username=netbiosname,uid=myuser,iocharset=utf8       0       0

I exec:
	sudo mount //example.com/dir1/dir2/dir3
	password for sudo
	password for WDC
and the mount process is ok but the folder is void in Manjaro.

I test this in Linux Mint 17.03 x64 (based in Ubuntu 14.04) with this packages: cifs-utils 2:6.0-1, Samba 2:4.3.11 and kernel 3.19, and work without problem, mount and get access to files and subdirs. Also work in Ubunbtu 16.04 x64 with this package: cifs-utils 2:6.4-1,  samba-common-bin 2:4.3.11 and kernel 4.4.


I made a different network captures in Manjaro with this kernels: 3.18 LTS, 4.4 LTS and 4.7, and the problem persist, i think that this discard the kernel.

I found some incoherent interchange of SMB packets like the Manjaro client don't understand the response from WDC.


Complete explain
================
The WDC is composed by three machines, for redundancy and load balance, and anothers machines to store the data files (DFS).

- 10.3.11.47	WDC1
- 10.3.11.49	WDC2
- 10.3.11.50	WDC3
- 10.3.15.157	DFS2


I compare the network capture between Mint and Manjaro and i found the error.

Capture details:

- Conect and autentication to one of the tree WDC, for example WDC3.
- SMB: Tree Connect AndX Request, Path: \\example.com\dir1
- SMB: Tree Connect AndX Response
- SMB: Trans2 Request, QUERY_FS_INFO, Query FS Device Info
- SMB: Trans2 Response, QUERY_FS_INFO
- SMB: Trans2 Request, QUERY_FS_INFO, Query FS Attribute Info
- SMB: Trans2 Response, QUERY_FS_INFO
- SMB: Tree Connect AndX Request, Path: \\10.3.11.50\IPC$
- SMB: Tree Connect AndX Response
- SMB: Trans2 Request, GET_DFS_REFERRAL, File: \example.com\dir1
- SMB: Trans2 Response, GET_DFS_REFERRAL
- SMB: Tree Disconnect Request
- SMB: Tree Disconnect Response
- SMB: Logoff AndX Request
- SMB: Logoff AndX Response

- Connect and autentication to another WDC, for example WDC2
- SMB: Tree Connect AndX Request, Path: \\WDC2\dir1
- SMB: Tree Connect AndX Response
- SMB: Trans2 Request, QUERY_FS_INFO, Query FS Device Info
- SMB: Trans2 Response, QUERY_FS_INFO
- SMB: Trans2 Request, QUERY_FS_INFO, Query FS Attribute Info
- SMB: Trans2 Response, QUERY_FS_INFO
- SMB: Trans2 Request, QUERY_PATH_INFO, Query File All Info, Path: \\WDC2\dir1\\dir2\dir3
- SMB: Trans2 Response, QUERY_PATH_INFO, Error: STATUS_PATH_NOT_COVERED
       This last response put in Flags2 the bit 12 with a value of zero: "Dfs: Don't resolve pathnames with Dfs".


Well, up to this point, the network captures are exactly equal in Mint and Manjaro, but while Mint answers of correct form: https://download.samba.org/pub/samba/specs/draft-leach-cifs-v1-spec-01.txt, 3.5   DFS Pathnames: "On receiving this error, the DFS enabled client should ask the server for a referral (see TRANS2_GET_DFS_REFERRAL). The referral request should contain the full file name."

Mint:

- SMB: Tree Connect AndX Request, Path: \\10.3.11.49\IPC$
- SMB: Tree Connect AndX Response
- SMB: Trans2 Request, GET_DFS_REFERRAL, File: \WDC2\dir1\\dir2\dir3
- SMB: Trans2 Response, GET_DFS_REFERRAL
- SMB: Tree Disconnect Request
- SMB: Tree Disconnect Response
- SMB: Logoff AndX Request
- SMB: Logoff AndX Response
- Conect and autentication to DFS machine and get files without problem.


Manjaro don't understand the response and continue made request to last WDC, in the example WDC3, and there are many packets "out of order" trying get file info between WDC and DFS:

- SMB: Trans2 Request, QUERY_PATH_INFO, Query File All Info, Path:
- SMB: Trans2 Response, QUERY_PATH_INFO
- SMB: Trans2 Request, QUERY_PATH_INFO, Query File All Info, Path: \\WDC3
- SMB: Trans2 Response, QUERY_PATH_INFO
- SMB: Trans2 Request, QUERY_PATH_INFO, Query File All Info, Path: \\WDC3\dir1
- SMB: Trans2 Response, QUERY_PATH_INFO
- SMB: Trans2 Request, QUERY_PATH_INFO, Query File All Info, Path: \\WDC3\dir1\\dir2
- SMB: Trans2 Response, QUERY_PATH_INFO, Error: STATUS_PATH_NOT_COVERED
- SMB: Trans2 Request, QUERY_PATH_INFO, Query File All Info, Path: \dir2\dir3
- SMB: Trans2 Response, QUERY_PATH_INFO
- SMB: Trans2 Request, QUERY_PATH_INFO, Query File Internal Info, Path: \dir2\dir3
- SMB: Trans2 Response, QUERY_PATH_INFO
- SMB: Trans2 Request, QUERY_PATH_INFO, Query File All Info, Path: \\WDC3\dir1\dir2\dir3\.Trash
- SMB: Trans2 Response, QUERY_PATH_INFO, Error: STATUS_PATH_NOT_COVERED

In some moment Manjaro connect with DFS machine with a GET_DFS_REFERRAL but when made request for files or subdir, the responses always are: "Error: STATUS_FS_DRIVER_REQUIRED".


I add the plain text capture only for SMB protocol, also i have the original Wireshark files.

Thanks.
Comment 1 Stefan Metzmacher 2016-10-14 07:47:38 UTC
Typically the raw pcap files are much more useful for developers.
Comment 2 v17564 2016-10-14 08:04:20 UTC
I can send to you the files pcap original but these contain private information that although they are not relevant, I have no authorization to make them public.

I would be pleased of sending them to him but they cannot become public.

How can I proceed to send them to you?
Comment 3 Stefan Metzmacher 2016-10-14 08:11:17 UTC
(In reply to v17564 from comment #2)

Ok, I guess Steve will ask for the capture if it's required.
Comment 4 Steve French 2016-11-02 22:10:59 UTC
I just saw this bug (samba.org email doesn't get forwarded any more).

Can you tell whether the kernel you are running includes this fix:

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/fs/cifs?id=d171356ff11ab1825e456dfb979755e01b3c54a1

which is fairly recent
Comment 5 v17564 2016-11-08 10:53:52 UTC
(In reply to Steve French from comment #4)

I have realized the tests with the last versions of the kernels:

- 4.8.5-2 and 4.4.30-1 - now works but there are a issue with Thunar. The folders are mounted and i have access to the data but only from the terminal, Thunar has no access to the mounted folder, the icon appears in greyed tone and when i made ckick in the icon it show the message: "mount: only root user can mount //...".

- Thunar 1.6.10
- cifs-util 6.5-1
- gvfs-smb 1.30.1.1-1
- Samba 4.5.1-1

I think that the issue of Thunar is a problem of the distribution.

Many thanks.
Comment 6 Paulo Alcantara 2022-07-25 16:42:18 UTC
Does your mount still work with mainline kernel?

If not, please provide verbose logs and network captures.  For more information on how to provide those, see [1].  Thanks.

[1] https://wiki.samba.org/index.php/Cifs.ko-testing