Samba pre-2.0.7 snapshot available.

Urban Widmark urban at
Mon Jan 31 21:28:36 GMT 2000

On Mon, 31 Jan 2000, Giulio Orsero wrote:

> Now about linux/samba:
> Could one of the SambaTeam members, you who have the "power", ask A.Cox
> to include the smbfs-nls patch or a similar thing (to smbmount win9x dir
> with accented chars) in the official linux 2.2.x kernel?

If this is my smbfs-nls patch [1] you are talking about then it is flawed
and should not be included as-is. It has at least the following problems:

1) It changes the mount_data struct, but it could just as easy pass the
   same info through an ioctl. That would make a modified smbmount still
   work with older kernels (old distro, new samba, using smbfs ...)

2) The conversion is unnecessarily slow, from codepage -> unicode ->
   codepage for each char. That translation could be done once at mount
   time and kept in a 256 byte array for codepage <-> codepage

3) It handles utf8 encodings, but it uses a buffer on the stack. That
   should be allocated at mount time and only for utf8. I'm talking about
   this bit:
+                       /* utf8 makes strings longer, I can't do
+                           in-place conversion. */
+                       char namebuf[SMB_MAXNAMELEN];
   Oops, we ran out of stack space ... (hasn't happened to me but)

Number 1 is the big problem since it may generate unnecessary questions,
when things don't work.

If you are talking about this patch:

then it doesn't suffer from the problems in 1 and 2 (as I recall, that is
where I saw a better way to do these things), but it does not support utf8
as the Linux side encoding. Since utf8 is defined to be the native linux
encoding it would be nice to support that.

Last I heard Tridge hadn't had time to look at this, but that was in
October. I'm sure he has found heaps of time since then ... :-)
Since he is the smbfs maintainer he decides what goes in and not, 

Oh, and if it is a different smbfs-nls patch you are talking about could
you send me a link/copy? And thanks for the reminder that I need to dl
2.0.7pre and test it. :)



More information about the samba-technical mailing list