From 358781559526f962c96c1af88cd104946c507d05 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 8 Apr 2010 20:32:36 -0700 Subject: Fix bug #7339 - MSDFS is non-functional in 3.5.x 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. This patch 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. --- source3/smbd/trans2.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source3/smbd/trans2.c') diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index 0ee9be32b2..06b454ab39 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -6038,6 +6038,7 @@ static NTSTATUS smb_file_rename_information(connection_struct *conn, status = resolve_dfspath_wcard(ctx, conn, req->flags2 & FLAGS2_DFS_PATHNAMES, newname, + true, &newname, &dest_has_wcard); if (!NT_STATUS_IS_OK(status)) { -- cgit