回复: is it possible to rename a dfs referral target from client?

James Pan jmpret at yahoo.cn
Wed Nov 21 19:27:22 MST 2012


I captured the samba requests and responds and the result reveals that:
 
If the referal target is on a different host of the referral link, the client will issue CREATE_ANDX request with create options = 0x00200044 (i.e. try to open the path as a regular file) but as"abc" is a directory the server responds with STATUS_FILE_IS_A_DIRECTORY. that's why the rename request to \\10.0.0.13\dfsroot\link2 will fail.

But if the referral target is on the same host as the referral link, the CREATE_ANDX request options will be 0x0200000 and this request will succeed and then in trun the rename of \\10.0.0.13\dfsroot\link1 will succeed.
 
Does anyone know why the client will issue CREATE_ANDX with options = 0x00200044 for the first case?
 

Best regards,

James Pan

--- 12年11月22日,周四, James Pan <jmpret at yahoo.cn> 写道:


发件人: James Pan <jmpret at yahoo.cn>
主题: is it possible to rename a dfs referral target from client?
收件人: samba-technical at lists.samba.org
日期: 2012年11月22日,周四,上午9:28


Hi everyone,
Sorry for bothering.
I have two servers (10.0.0.13, 10.0.0.14) running samba.
10.0.0.13 is configured as dfs root, the smb.conf file is as below:
 
[dfsroot]
path = /mnt/dfsroot
msdfs root = yes
....
 
then under /mnt/dfsroot on 10.0.0.13 I created a dir "abc" and two links:
link1 --> msdfs:\\10.0.0.13\dfsroot\abc
link2 --> msdfs:\\10.0.0.14\dfsroot\abc
 
I also created the same dir "abc" on 10.0.0.14
 
So if I visit \\10.0.0.13\dfsroot\link1 or \\10.0.0.13\dfsroot\link2 it will be refered to \\10.0.0.13\dfsroot\abc and \\10.0.0.14\dfsroot\abc respectively.
 
Now I find I can successfully change the name of dir "abc" on 10.0.0.13 by renaming \\10.0.0.13\dfsroot\link1, after rename the dir "abc" will have the new name. But if I tried to rename \\10.0.0.13\dfsroot\link2, the request will be refused.
 
My question is: is it possible to rename the dir "abc" on 10.0.0.14 through \\10.0.0.13\dfsroot\link2 ?
 
many thanks in advance!
Best regards,

James Pan


More information about the samba-technical mailing list