Bug 5909 - MS-DFS does not work on Vista, if link name includes multibyte character.
Summary: MS-DFS does not work on Vista, if link name includes multibyte character.
Status: RESOLVED FIXED
Alias: None
Product: Samba 3.2
Classification: Unclassified
Component: File services (show other bugs)
Version: 3.2.4
Hardware: All All
: P3 normal
Target Milestone: ---
Assignee: Samba Bugzilla Account
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-19 21:26 UTC by Yasuma Takeda
Modified: 2008-11-20 13:42 UTC (History)
0 users

See Also:


Attachments
a patch for samba 3.2 (919 bytes, patch)
2008-11-19 21:28 UTC, Yasuma Takeda
no flags Details
a patch for samba 3.0 (983 bytes, patch)
2008-11-19 21:28 UTC, Yasuma Takeda
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yasuma Takeda 2008-11-19 21:26:47 UTC
I found a problem in msdfs.c/setup_ver[23]_dfs_referral().
"(consumedcnt * 2)" is wrong. If pathname includes multibyte characters(ex. Japanese UTF-8),
strlen(pathname) does not match the bytes of UCS-2.

It must be calculated as bytes of UCS-2.
I will attach a patch.

This cause a problem on Vista. XP is not influenced.
1. I create a dfs link on Samba.
   # ln -s msdfs:192.168.1.10\\dfslink  dfs[xxxx]    
   * [xxxx] includes multibyte characters.

2. A user logs in Vista, and map the share which includes dfs link to a network drive(Z:).

3. Te user opens Explorer from start menu, and click the network drive(Z:).
   So, the link is invalid. Explorer shows a error message. "can not find the network path"

On the other hand, if I open the share from "Network", there is no error. This is very strange behavior!
Comment 1 Yasuma Takeda 2008-11-19 21:28:09 UTC
Created attachment 3753 [details]
a patch for samba 3.2
Comment 2 Yasuma Takeda 2008-11-19 21:28:29 UTC
Created attachment 3754 [details]
a patch for samba 3.0
Comment 3 Jeremy Allison 2008-11-20 13:42:28 UTC
Perfect patch, thanks ! Applied to all branches.
Jeremy.