Bug 3651 - Samba can't follow \\server\share\path DFS referrals
Summary: Samba can't follow \\server\share\path DFS referrals
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: libsmbclient (show other bugs)
Version: 3.0.21c
Hardware: All All
: P3 normal
Target Milestone: none
Assignee: Derrell Lipman
QA Contact: Samba QA Contact
URL: http://web.mit.edu/jmorzins/www/samba...
: 3853 (view as bug list)
Depends on:
Reported: 2006-03-31 16:41 UTC by Jacob Morzinski
Modified: 2007-02-09 11:38 UTC (History)
7 users (show)

See Also:

Sample patch to fix at least smbclient (2.43 KB, patch)
2006-08-26 15:12 UTC, Andrew Ferguson
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jacob Morzinski 2006-03-31 16:41:16 UTC
The fast summary of this problem is:

Samba has a bug in its handling of with Microsoft DFS shares.

Samba expects DFS referrals to be of the form
"file is not here, go to \\server\share".

This is incomplete, actual redirects can also include
"file is not here, go to \\server\share\path".

When Samba receives a reply that includes a \path, Samba
mis-parses the reply and fails to follow the referral.

I've verified this with samba-3.0.21a and samba-3.0.22,
on both Linux (x86) and Solaris (sparc) platforms.

I've put email with copious details (smbclient verbose mode,
gdb output demonstrating the issue, packet dumps) at:

I'd be happy to work with you, if you need more information
about the situation.

Thank you,
 -Jacob Morzinski
Comment 1 Jacob Morzinski 2006-03-31 16:44:30 UTC
(Correcting the URL to be consistent with the URL in the description.)
Comment 2 Derrell Lipman 2006-04-04 10:29:57 UTC
Jerry, do you want to look at this?  You know lots more about DFS than I do.  This appears to be a generic issue, not a libsmbclient-specific issue.  The OP is using smbclient.  (I'll assign it to you.  Assign back if necessary.)
Comment 3 Gerald (Jerry) Carter (dead mail address) 2006-04-06 05:56:37 UTC
Yeah.  I'll pick it up.  I know what the problem is.
Comment 4 Christian Peper 2006-06-07 06:19:52 UTC
Just an attempt to revitalize this bug as I'm still getting the same error and it's two months later.

In our environment, people's home dirs are located on a MS DFS share like //server/share/p/<user who's lastname ends with 'p'>. Example:

I can manually mount //server/share but nothing further.
Mounting in console or through nautilus also has no effect. Same result different error.

when I look at //server/share using 'ls -l', I do see a list of symbolinks to 26 directories (the letters of the alphabet - just to be clear), but the links don't go anywhere. I.e. they are not connected.

Hope this helps to get the bug fixed soon. ;)
Comment 5 Christian Peper 2006-06-07 06:25:27 UTC
I also found one additional mail on the samba archive that might help:

BTW, I am using SUSE 10.1, freshly installed: 
smbclient --version: "Version 3.0.22-11-SUSE-CODE10"
Comment 6 rajeev 2006-07-02 00:50:52 UTC
*** Bug 3853 has been marked as a duplicate of this bug. ***
Comment 7 rajeev 2006-07-02 00:53:11 UTC

Has any progress been made in this bug resolution effort ? We are running 3.0.22 and are having the same results. Except it our case, the samba server is our dfsroot with msdfs-style links to other CIFS shares. I can post test results if needed.

Comment 8 Albert-Jan Stevens 2006-07-25 04:39:16 UTC
Hi there, 

Also interested to know if their is any progress here on this bug?
I too am willing to report tests and results if needed
Comment 9 rajeev 2006-08-03 21:43:58 UTC
I have contacted the submittor of bug #3645 to see if he can share his code. He has not replied to both of my emails. 


Trying to see if we can find a workaround or someone who is able to fix it. I do not know if folks here are that curious about this bug. 
Comment 10 Jacob Morzinski 2006-08-03 23:15:12 UTC
Rajeev, thank you for the update.  I had not been aware of bug #3645.

I'll work on contacting the reporter of the other bug.  There is reasonable overlap between our two institutions, which gives me hope that I'll be able to get through.

(This is not a high priority for me, so it may be a few weeks before I report back.)
Comment 11 rajeev 2006-08-04 00:08:24 UTC
(In reply to comment #10)
> (This is not a high priority for me, so it may be a few weeks before I report
> back.)

Hi Jacob

Your help and interest is much appreciated. I am very keen on this bug resolution as this is a high priority item for us. I was/am volunteering to be a test bed and a HOW-TO 

If we don't get this worked out soon, I may have to abandon the project altogether (samba i.e.) and go buy a windoz box to serve as my dfs root server. I am also talking to netapp but their filers can only be a dfs leaf node, not a root node.

hopefully Jerry is reading this :)

Comment 12 Andrew Ferguson 2006-08-26 15:12:05 UTC
Created attachment 2107 [details]
Sample patch to fix at least smbclient

This patch adds support for deep DFS referrals, at least in smbclient (I have yet to test other parts of the Samba suite). It is based on the comments in Bug 3645.

This patch was created against samba-3.0.23b, and only touches source/libsmb/clidfs.c
Comment 13 Derrell Lipman 2007-02-03 11:22:04 UTC
Should be fixed by check-in 21133.  I don't have an environment to test DFS referrals, so please confirm that this is now working.


Comment 14 Derrell Lipman 2007-02-09 11:38:22 UTC
Volker confirmed this is fixed.  Closing.