Bug 1123 - National characters in links are wrong if encodings on client/server are different
Summary: National characters in links are wrong if encodings on client/server are diff...
Status: RESOLVED WONTFIX
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: Extended Characters (show other bugs)
Version: 3.0.1
Hardware: All Linux
: P3 normal
Target Milestone: none
Assignee: Alexander Bokovoy
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-24 04:13 UTC by Andrew Zabolotny
Modified: 2005-01-27 15:02 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Zabolotny 2004-02-24 04:13:10 UTC
The output of readlink() is not translated to Unicode (or to client encoding, 
I'm not sure how and where this happens). For Cyrillic I have in config file:

unix charset = KOI8-R
dos charset = 866
display charset = KOI8-R

Now all filenames with Cyrillic letters are shown correctly on both Unix and 
Windows clients (even for symlinks), but the links themselves are broken (the 
symlink pointer is not encoded correctly).
Comment 1 Alexander E. Patrakov 2004-08-08 23:22:37 UTC
Please use cp866 instead of plain "866"
Comment 2 Alexander Bokovoy 2005-01-13 05:58:04 UTC
Is this fixed when using CP866 as the charset name?
Comment 3 Andrew Zabolotny 2005-01-13 12:44:28 UTC
(In reply to comment #2)
> Is this fixed when using CP866 as the charset name?

First of all, "CP866" doesn't work, only "cp866" does.

Second, this doesn't help. Here's a ls -la listing (I'm using codepage 1251 to 
display cyrillic letters, I'm not sure how Bugzilla will react):

drwxrwxrwx  1 root root         0 Дек  5 14:54 ____разгрести/
lrw-rw-rw-  1 root root        13 Янв 13 22:37 тест -> ____а §ЈаҐбвЁ

The second directory is a link to the first one. As you can see, both 
directories are in the correct encoding (cp1251), while the contents of the link 
are left untranslated (cp866). As a result, the link is broken.
Comment 4 Björn Jacke 2005-01-26 17:06:44 UTC
what client do you use to reproduce this bug? smbmount/smbfs I guess, right? Any
other one? If you use cifs, everything works fine. smbclient works fine, too. I
think this is just another smbfs bug - won't ever be fixed most likely.
Comment 5 Andrew Zabolotny 2005-01-27 15:02:00 UTC
(In reply to comment #4)
> what client do you use to reproduce this bug? smbmount/smbfs I guess, right?
Ah exactly, that was it. Using cifsmount to mount the share fixes the bug (for 
some reason samba-client package from fedora core 2 doesn't include it). So it 
looks like it's a bug in kernel smbfs module.

By looking at drivers/fs/smbfs/proc.c, function smb_proc_read_link I clearly see 
now that it just does strcpy() on the received link contents, rather than 
calling server->ops->conver(). Maybe I'll try if that works but it definitely 
looks like a smbfs module bug.

I believe this bug can be closed, then.