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.
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 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.
CC:ing Karolin so she is aware of this. Karolin, I think this one is essential for 3.5.3. Jeremy.
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 on attachment 5613 [details] git am fix for 3.5.3. Looks good
Karolin, please pick this for 3.5.3
Pushed to v3-5-test. Will be included in 3.5.3 (scheduled for May 19). Closing out bug report. Thanks!