cm_prepare_connection() & SMBSERVER Netbios query
Christopher R. Hertel
crh at ubiqx.mn.org
Sun Dec 12 11:34:55 MST 2010
Volker Lendecke wrote:
> On Sun, Dec 12, 2010 at 12:10:23PM -0600, Christopher R. Hertel wrote:
>> They used that name in NT4, W2K, WXP, W2003... and then abandoned it.
>> Windows server 2008 doesn't support that name any more, and I have no idea
>> why not. It's a small bit of insanity on Microsoft's part.
> Where is that documented?
WBN #2 in [MS-NBTE] is the only thing I've seen. I was not aware of the
change until I hit a similar problem to the one Dina is reporting at the
SNIA SDC. I asked the Microsoft engineers about it and they went digging to
find out why it didn't work any more. All they could find out was that the
*SMBSERVER name was not supported past W2K3.
>> So, what you need to do is send an NBT NODE STATUS REQUEST to the server,
>> get the list of names that *are* registered, figure out which of them is the
>> SMB Server Service, and send your request message to that name instead.
> NBT NODE STATUS REQUEST, that's UDP? Or can we do that over
> the 139 TCP connection?
That's part of the name service, so it's UDP.
This is the old way of looking up the SMB Server Service name:
* Send the NODE STATUS REQUEST to the target node using the IP
and querying for the wildcard name ('*' + 15 nul bytes).
* Read through the NODE_NAME_ARRAY in the response looking for only
unique names that have a suffix byte of 0x20.
* If you get more than one, perform any heuristics you like to
guess which is the most likely name.
* Try that as the CALLED NAME in the NBT Session Request message
over port 139.
"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