[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:19:06 GMT 2008


On Wed, Apr 23, 2008 at 12:11:50PM -0700, Jeremy Allison wrote:
> 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

Hmmmmm. Looking carefully that's the wrong thing to do.

I think the client is doing the wrong thing here when it
gets the STATUS_PATH_NOT_COVERED error. Shouldn't it then
call TRANS2_GET_DFS_REFERRAL instead of doing a QPATHINFO ?

Jeremy.


More information about the linux-cifs-client mailing list