[linux-cifs-client] Re: dfs path construction fixup for / character in \\server\share component of dfs path

Igor Mammedov niallain at gmail.com
Wed Apr 23 14:28:39 GMT 2008


Steve French wrote:
> Attached is dfs path construction fixup for / character in
> \\server\share component of dfs path.  Let me know if you see any
> problem - but it gets Samba past the problem with not returning
> STATUS_PATH_NOT_COVERED
> 
> similar change will have to be made to build_full_dfs_path_from_dentry
> in cifs_dfs_ref.c
> 
> This makes it easier for me to test the remainder of the changes
> needed to the SMB GetDFSReferral function(s).  Has anyone checked on
> the answer to Al's question on submount expiry from a few days ago?


I've just tested it and the patch fixed a problem with the lack of 
STATUS_PATH_NOT_COVERED with unix-ext enabled on samba server.
1. samba with unix-ext enabled returns (5th packet) dfs link as a symbolic link,
but for dfs code it should be the directory type so we could fix it in the time 
of creating inode and get the server generated inode number.

No.     Time        Source                Destination           Protocol Info
      1 0.000000    192.168.133.129       192.168.133.1         SMB      Trans2 Request, QUERY_PATH_INFO, Query File Unix Basic, Path: //192.168.133.1/dfs/dfs2
      2 0.000385    192.168.133.1         192.168.133.129       SMB      Trans2 Response, QUERY_PATH_INFO, Error: STATUS_PATH_NOT_COVERED
      3 0.000670    192.168.133.129       192.168.133.1         TCP      46662 > microsoft-ds [ACK] Seq=127 Ack=40 Win=1728 Len=0 TSV=509648098 TSER=3625842022

      4 0.006911    192.168.133.129       192.168.133.1         SMB      Trans2 Request, QUERY_PATH_INFO, Query File Unix Basic, Path: /dfs2
      5 0.007110    192.168.133.1         192.168.133.129       SMB      Trans2 Response, QUERY_PATH_INFO

                                                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - here our chance to get it working

      6 0.016002    192.168.133.129       192.168.133.1         SMB      Trans2 Request, QUERY_PATH_INFO, Query File Unix Link, Path: /dfs2
      7 0.016219    192.168.133.1         192.168.133.129       SMB      Trans2 Response, QUERY_PATH_INFO
      8 0.049621    192.168.133.129       192.168.133.1         SMB      Trans2 Request, QUERY_PATH_INFO, Query File Unix Basic, Path: //192.168.133.1/dfs/msdfs:\172.16.61.1\dfs2
      9 0.050706    192.168.133.1         192.168.133.129       SMB      Trans2 Response, QUERY_PATH_INFO, Error: STATUS_OBJECT_NAME_NOT_FOUND

Patches that make dfs working in this case are attached.



2. samba with unix-ext disabled returns STATUS_OBJECT_NAME_NOT_FOUND on the second
query (5th packet). Replacing '\' with '/' doesn't help. It looks we will not be 
able to make this case work unless we disable server generated inode numbers and fill
up junction point inode with fake values. Another way to make it working is to fix
samba code so that it would return inode info (with directory type) on the second call
as win2k does.

No.     Time        Source                Destination           Protocol Info
      1 0.000000    192.168.133.129       192.168.133.1         SMB      Trans2 Request, QUERY_PATH_INFO, Query File All Info, Path: \\192.168.133.1\dfs\dfs2
      2 0.000576    192.168.133.1         192.168.133.129       SMB      Trans2 Response, QUERY_PATH_INFO, Error: STATUS_PATH_NOT_COVERED
      3 0.000746    192.168.133.129       192.168.133.1         TCP      37925 > microsoft-ds [ACK] Seq=127 Ack=40 Win=1728 Len=0 TSV=510792731 TSER=3626976733

      4 0.004212    192.168.133.129       192.168.133.1         SMB      Trans2 Request, QUERY_PATH_INFO, Query File All Info, Path: \dfs2
      5 0.004606    192.168.133.1         192.168.133.129       SMB      Trans2 Response, QUERY_PATH_INFO, Error: STATUS_OBJECT_NAME_NOT_FOUND

-- 

Best regards,

-------------------------
Igor Mammedov,
niallain "at" gmail.com




-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Adds-to-dns_resolver-checking-if-the-server-name-is.patch
Type: text/x-patch
Size: 2721 bytes
Desc: not available
Url : http://lists.samba.org/archive/linux-cifs-client/attachments/20080423/cef542e9/0001-Adds-to-dns_resolver-checking-if-the-server-name-is.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-fixed-compatibility-issue-with-samba-a-refferal-req.patch
Type: text/x-patch
Size: 2244 bytes
Desc: not available
Url : http://lists.samba.org/archive/linux-cifs-client/attachments/20080423/cef542e9/0002-fixed-compatibility-issue-with-samba-a-refferal-req.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-Workaround-for-working-with-samba-unix-extentions-m.patch
Type: text/x-patch
Size: 1406 bytes
Desc: not available
Url : http://lists.samba.org/archive/linux-cifs-client/attachments/20080423/cef542e9/0003-Workaround-for-working-with-samba-unix-extentions-m.bin


More information about the linux-cifs-client mailing list