SMBFS: NLS support for kernel 2.4.0-test6

Urban Widmark urban at svenskatest.se
Wed Aug 16 13:28:10 GMT 2000


On Wed, 16 Aug 2000, Kir Kostuchenko wrote:

>     Hello. It's a thing which all Russia and, I think, many other
> countries need.

Yes, I know.


nls->charset2upper is broken. Do you need 2upper/2lower conversions? I
have other reports from Russia that cp866<->koi8-r is working fine without
it. See http://www.hojdpunkten.ac.se/054/samba/

Your patch is not correct for utf8 (which is the "official" linux
encoding) nor for 16 bit codepages. These can both make a name longer than
it was. You are doing in-place conversion without checking the length of
the result.

Modifying the "struct smb_mount_data" is not a workable solution. In short
it will cause every samba version that does not have your patch applied to
fail to compile. This is related to smbmount including kernel headers
directly. A more flexible solution is to replace the struct with an ascii
string (as done by vfat, ext2 and others).

I have already sent a patch for 2.4.0-test7-pre4, it includes nls
support, the ascii replacement for struct smb_mount_data and some other
bugfixes.
(for example 'tail -f' should now work, find and updatedb on a smbfs
 mount should no longer be able to crash smbfs, signals at unfortunate
 times should not be able to make a smbfs mount unuseable by making
 smbmount terminate).

Since there is no test7-pre5 yet and no complaints from Linus, I don't
know more on the status than so.


> Two new options added to smbmount: iocharset=<charset> and
> servercharset=<charset>.

iocharset and codepage would be consistent with what vfat uses. Although
vfat uses codepage=850 and smbfs uses codepage=cp850.

Also, for really good nls support vs some servers, smbfs should support
unicode as a server "codepage".

/Urban



More information about the samba mailing list