[linux-cifs-client] Re: Unicode filenames on cifs mounted share

Steve French smfltc at us.ibm.com
Tue Aug 24 15:22:38 GMT 2004


> there is a problem with Unicode filenames on cifs mounted shares. 
> It works okay with "simple" umlaut-containing filenames but it is
> broken for example with Japanese filenames. Here is an example ...

I can't yet prove that in your example the problem is caused by a cifs
bug (rather than in the conversion from Unicode to UTF-8 done in the
Linux NLS module), but I am aware of a cifs problem that could be
related and was pointed out to me in the cifs code a few weeks ago at
the cifs conference - It is possible apparently when using UTF8 codepage
to have strings end up longer than the same string would be encoded when
in Unicode since UTF8 characters can take more than two bytes (while the
Unicode strings on the wire are always 2 bytes per character).  This may
lead to corruption in search buffers - when such (hopefully unusual)
strings are converted locally on the client in place in the network
buffer because this might lead to the string conversion overwriting part
of the following string.  That behavior (doing Unicode->local codepage)
conversions in place is a bad idea based on an incorrect assumption -
which which needs to be fixed (at least) in cifs_readdir, but
cifs_readdir has gotten a total rewrite anyway (to workaround the Netapp
server bug and to make the search code more efficient and to handle
search rewind) so this will be part of that code which may still be able
to make 2.6.9



More information about the linux-cifs-client mailing list