cm_prepare_connection() & SMBSERVER Netbios query
Christopher R. Hertel
crh at ubiqx.mn.org
Sun Dec 12 11:19:34 MST 2010
Volker Lendecke wrote:
> *SMBSERVER used to be the wildcard name every CIFS server
> should listen on. This was done because on the internet
> (Yes, the expansion of "CIFS" does contain that word)
> usually all you have is the IP of the target host. I would
> guess that the fact that W2K8 does not do this anymore is a
> simple bug.
Unfortunately not. I discussed this at length with the Microsoft engineers
at the SNIA conference last September, and they assured me that it was
changed on purpose (though none of those present actually knew why).
According to [MS-NBTE], the *SMBSERVER name is only supported in Windows
2000, Windows XP, and Windows Server 2003. [MS-NBTE] does not cover NT4,
and I believe that *SMBSERVER is supported there as well.
> Sure, sounds perfectly reasonable. The simplest way would be
> to just skip 139 if winbind knows that a domain is AD. This
> might break some obscure, broken firewall settings. So for
> those I think winbind should improve the fallback: If you
> get exactly that error message, retry with just 445.
The old-fashioned way of doing it is to send a NODE STATUS REQUEST and look
for a unique <20> name, but that's kludgey and prone to problems. Minor
problems, but it means that it's not the best option.
> Alternatively, it might keep the 445 connection attempt
> queued in case we get the "name not present". In any case,
> that should not be more than very few hours of coding. With
> tevent_req the latter alternative should be pretty easy to
> do. Just make two async routines: One to just connect to
> 445 and one to connect to 139 and do the nb session setup.
> Set up the 445 connect, wait a few milliseconds and then
> fire the 139/nbsesssetup combo. Whichever of both gets
> through successfully wins.
Well... That's a much, much better description of what I had in mind than I
was able to give.
"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