svn commit: samba r5118 - in branches/SAMBA_4_0/source: librpc/idl librpc/ndr nbt_server

Christopher R. Hertel crh at ubiqx.mn.org
Tue Feb 1 02:32:48 GMT 2005


On Tue, Feb 01, 2005 at 10:53:56AM +1100, Andrew Tridgell wrote:
> Chris,
> 
>  > Point is, I have seen NetBIOS names with nul bytes in them and had to
>  > modify my own tools to handle them.
> 
> really? Can you give me an example of a an application that uses name
> with a nul in the middle?  (obviously the '*' name doesn't count).

Try Unicode machine names, though I'm not sure if that's going to do it or 
not.

I saw an example or two at the University (of Minnesota, where I work),
but I was doing network debugging for someone else and, of course, I can't 
remember the IP addresses of the hosts involved any more.  The problem 
wasn't on the server, but on the (non-Microsoft) client that was trying to 
access the services.  It was several months ago, but I remember doing the 
overhaul of my code in order to "see" the names in question.

...something tells me it was Unicode-related.

> I just don't see how this would work with nbt implementation.

If there is a way to present a Unicode name to the NetBIOS Name 
Registration code, or to get in below that code somewhere and add the 
encoded name directly, then it would be fairly easy.

Other odd things certainly manage to get into those tables.  Consider the
Internet Information Server IS~ names.  If the machine name is longer than
12 bytes the 13th byte will (on some Windows flavors) overwrite the suffix
byte (which is normally <00> because names 12 bytes and shorter are
nul-terminated and nul-padded... or so it would seem).

Yes, what I need is the empirical evidence to present to you and no I 
don't have it at-hand.  Sorry.

> Eventually those NBT names come from a config file,
> and that config file will be in a human readable form. Unless you know
> of real applications that directly deal with the encoded name in their
> config I just don't see how this happens.

Unicode, as one guess...  A bad conversion of old code to Unicode support 
might cause this kind of behavior.

> If it does happen then I might change the nbt code to deal with it,
> but I'd like an example so I know I'm not just wasting time on a
> non-problem.

Well, I'll do what I can to scare one up for you.  No promises, as I'm in 
the middle of changing positions at the University... and working on 
embedded Samba4... and...  ;)

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