CVS update: samba/source/lib

Christopher R. Hertel crh at ubiqx.mn.org
Sun Jul 27 03:48:43 GMT 2003


Tim Potter wrote:
> 
> On Sun, Jul 27, 2003 at 02:28:25AM +0000, abartlet at samba.org wrote:
> 
> > Modified Files:
> >       Tag: SAMBA_3_0
> >       charcnv.c
> > Log Message:
> > Some small fixes to our charset conversion code:
> >
> >  - Treat the NMB names in the 'session request' packet as 'ASCII'.  This
> >    means
> >    that we do not get invalid multibyte from the wire, even if we truncate
> >    in the conversion.  (Otherwise we panic when we try to strupper_m it).
> 
> This will probably break netbios names containing international
> characters.  Unfortunately Netbios names are in the dos codepage of the
> client so there isn't a lot left to break (-: but it is supposed to work
> amongst clients with identical dos codpages.

NetBIOS names are a string of octets and they're not supposed to contain nul
octets (0x00).

That said, all sorts of things have been seen in the wild.

I imagine that there are plenty of bits of software that will try to mung a
multibyte string into a NetBIOS name.  The problem, of course, is that there
is absolutely no way to know which encoding, codepage, or otherwise an
application on a remote node is using.

Ick.

I agree with Abartlet that we should be viewing these as strings of octets.
I would also say that we may need to watch for bogus octets, such as nul
bytes and lower-case characters, that may be included in the NetBIOS name.

[Yes, some Microsoft will create NetBIOS names with lower-case characters.]

Chris -)-----

-- 
"Implementing CIFS - the Common Internet FileSystem" ISBN: 013047116X
Samba Team -- http://www.samba.org/     -)-----   Christopher R. Hertel
jCIFS Team -- http://jcifs.samba.org/   -)-----   ubiqx development, uninq.
ubiqx Team -- http://www.ubiqx.org/     -)-----   crh at ubiqx.mn.org
OnLineBook -- http://ubiqx.org/cifs/    -)-----   crh at ubiqx.org



More information about the samba-technical mailing list