Re: dfs path construction fixup for / character in \\server\share component of dfs path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jeremy Allison wrote:
> 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

Can try to do it, have 'v3-2-test' branch checked out already.

> 
> 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 ?

I'm doing the second call with a short path to get inode info
including server generated inode number. If not for the last 
then second call could be omitted and inode be filled with fake
values and locally generated ino.

PS:
Windows server does not object against the second call and returns
info on the dfs junction point (as directory). 
More uniform behavior between different implementations would be
better for all.


-- 

Best regards,

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




--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux