Bug 4058 - same unix charset can be sometimes valid, sometimes invalid
Summary: same unix charset can be sometimes valid, sometimes invalid
Status: NEW
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: File Services (show other bugs)
Version: 3.0.23b
Hardware: Other Linux
: P3 normal
Target Milestone: none
Assignee: Samba Bugzilla Account
QA Contact: Samba QA Contact
Depends on:
Reported: 2006-08-26 14:09 UTC by Björn Jacke
Modified: 2006-10-05 06:34 UTC (History)
0 users

See Also:

level 10 log (171.92 KB, text/plain)
2006-10-05 06:19 UTC, Björn Jacke
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Björn Jacke 2006-08-26 14:09:46 UTC
when "unix charset = iso8859-1" is set, files are correctly being listed for latin1 encoded files but copying files is not possible, smbd logs says

log.smbd:  init_iconv: Conversion from iso8859-1 to ASCII not supported

So iso8859-1 is a valid writing for some samba parts but it's an invalid writing for other parts of samba. If you use "iso-8859-1" (dash after iso) then things work well, listing and file transfers.

Tested with SLES10.

Can't provide more detailed logs right now, sorry. Can reproduce this later on with more contextual logs...
Comment 1 Björn Jacke 2006-10-05 06:19:50 UTC
Created attachment 2177 [details]
level 10 log

this is a level 10 log from smbd startup till that error occurs.

Samba configured with unix charset = iso8859-1

- then Windows XP listing netlogon share with file "täst" (working fine)
- then Windows XP reading "täst" file results in message that file cannot be read
Comment 2 Björn Jacke 2006-10-05 06:34:03 UTC
obviously Samba correctly probles that the iconv implementation does not support the "iso8859-1" charset. Samba proceeds anyway and logs that it will "replace with conversion from ASCII to ASCII".

Then it finally calles:
[2006/10/05 13:12:35, 3] lib/charcnv.c:convert_string_internal(253)
  E2BIG: convert_string(iso8859-1,UTF-16LE): srclen=2 destlen=2 - 'äst'

It's strange that the directory listing can be done probably by accident, and very strange. Then (by less accident) it fails with conversion when file should be read.

IMHO smbd should refuse to start at all if a charset is configured with is obviously unsupported by iconv. Using replacement conversions will just hide errors for some time and is a stumble stone for users.