Bug 113852 - [smbfs] smbfs does not properly implement DFS referrals
Summary: [smbfs] smbfs does not properly implement DFS referrals
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: Unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-19 10:40 UTC by Julian Noble
Modified: 2018-01-03 05:16 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Julian Noble 2007-06-19 10:40:00 UTC
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)

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.
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@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.
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2009-05-18 05:20:53 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-fs

Over to maintainer(s).
Comment 2 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 07:59:30 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped