misc/113852: smbfs does not properly implement DFS referrals

Julian Noble julian at precisium.com.au
Tue Jun 19 09:40:01 UTC 2007


>Number:         113852
>Category:       misc
>Synopsis:       smbfs does not properly implement DFS referrals
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jun 19 09:40:00 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator:     Julian Noble
>Release:        6.2
>Organization:
Precisium
>Environment:
FreeBSD nplex.precisium.net 6.2-RELEASE-p2 FreeBSD 6.2-RELEASE-p2 #0: Sun Mar 11 05:11:37 UTC 2007     root at nplex.precisium.net:/usr/obj/usr/src/sys/SMP  i386

>Description:
It occurs when you have a Microsoft Distributed File System
Tree where the msdfs links are to subfolders of the destination share.

smbfs only properly follows 'simple' msdfs links e.g:
ln -s msdfs:resourceserver/shareA mystuff

In practice - dfs links are likely to point to folders below the share, eg:
ln -s msdfs:resourceserver/shareA/thestuff  mystuff

Such links are browseable by Microsoft clients but not by FreeBSD's smbfs (or pre samba 3.025 versions of smbclient)


>How-To-Repeat:
Create an msdfs link on a dfs server pointing to a folder below a share on some resource server.
e.g

relevant parts of dfsserver's smb.conf:
-------------------
[global]
netbios name = dfsserver
host msdfs = yes

[dfs]
path = /export/dfsroot
msdfs root = yes
-------------------

add DFS referral link on dfsserver:
-------------------
root# cd /export/dfsroot
root# ln -s msdfs:resourceserver/shareA/thestuff mystuff
-------------------


fstab e.g:
-------------------
//someuser at dfsserver/dfs /mount/mydfs smbfs rw,noauto-I=dfsserver,-T=2,-W=somedomain 0 0
-------------------

now try to access it:
-------------------
root# mount /mount/mydfs
root# cd /mount/mydfs; ls

(listing shows contents of the dfsserver's /export/dfsroot ok, including 'mystuff'. Standard subfolders can be browsed.)

root# cd mystuff
mystuff: No such file or directory.






>Fix:
samba 3.0.25a has updated DFS code that fixes this issue for the 'smbclient' utility.
smbclient used to have the same trouble as smbfs in following deep DFS referrals so perhaps the updated smbclient code may be of some use in updating smbfs.




>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list