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

Jeremy Allison jra at samba.org
Wed Apr 23 19:11:50 GMT 2008


On Wed, Apr 23, 2008 at 06:28:39PM +0400, Igor Mammedov wrote:
> 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.

Thanks. I'm going to fix Samba 3.2 (not sure if this will make
final release) to return directory not symlink on QPATHINFO
if the requested path is a DFS path and it's a DFS link.

Can you test the patch once it's complete please ?

Jeremy.


More information about the linux-cifs-client mailing list