Bug 7339 - MSDFS is non-functional in 3.5.x
Summary: MSDFS is non-functional in 3.5.x
Status: RESOLVED FIXED
Alias: None
Product: Samba 3.5
Classification: Unclassified
Component: File services (show other bugs)
Version: 3.5.2
Hardware: All All
: P3 critical
Target Milestone: ---
Assignee: Karolin Seeger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-08 22:32 UTC by Jeremy Allison
Modified: 2020-12-11 07:22 UTC (History)
2 users (show)

See Also:


Attachments
git am fix for 3.5.3. (3.50 KB, patch)
2010-04-08 22:38 UTC, Jeremy Allison
metze: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy Allison 2010-04-08 22:32:33 UTC
In the refactoring around filename_convert, the split between the functions resolve_dfspath() and resolve_dfspath_wcard() was lost, leaving us only with resolve_dfspath_wcard().

Internally resolve_dfspath_wcard() calls dfs_redirect() only with a "allow_wcards" flag of true, wheras the old resolve_dfspath() would call with a value of false. The loss of this case causes dfs_redirect to always masquerade DFS links as directories, even when they are being queried directly by a trans2 QPATHINFO call. We should only masquerade DFS links as directories when called from a SMBsearch or trans2 findfirst/findnext - which was the intent of the "allow_wcards" flag.

Patch to follow, that adds back an allow_wcards bool parameter to resolve_dfspath_wcard(). This bool is set from the state of the ucf_flags when filename_convert() is called.

I will follow this up with a new smbclient-based torture test that will prevent us from ever regressing our DFS support again.

Jeremy.
Comment 1 Jeremy Allison 2010-04-08 22:38:31 UTC
Created attachment 5613 [details]
git am fix for 3.5.3.

This bug only exists in 3.5.x, not 3.4.x or below.
Comment 2 Jeremy Allison 2010-04-08 22:39:30 UTC
Comment on attachment 5613 [details]
git am fix for 3.5.3.

Metze and Volker, please review for 3.5.3. I think this one is critical.

Jeremy.
Comment 3 Jeremy Allison 2010-04-08 22:39:31 UTC
Comment on attachment 5613 [details]
git am fix for 3.5.3.

Metze and Volker, please review for 3.5.3. I think this one is critical.

Jeremy.
Comment 4 Jeremy Allison 2010-04-09 11:15:22 UTC
CC:ing Karolin so she is aware of this. Karolin, I think this one is essential for 3.5.3.

Jeremy.
Comment 5 Grace Chen (mail address dead) 2010-04-10 00:39:50 UTC
We have tested the fix, it works well for us. We use DFS extensively, this is a critical fix for us. Thanks Jeremy!

-Grace Chen
Comment 6 Stefan Metzmacher 2010-04-10 02:06:50 UTC
Comment on attachment 5613 [details]
git am fix for 3.5.3.

Looks good
Comment 7 Stefan Metzmacher 2010-04-10 02:07:34 UTC
Karolin, please pick this for 3.5.3
Comment 8 Karolin Seeger 2010-04-12 02:19:47 UTC
Pushed to v3-5-test. Will be included in 3.5.3 (scheduled for May 19).
Closing out bug report.

Thanks!