cm_prepare_connection() & SMBSERVER Netbios query

Volker Lendecke Volker.Lendecke at SerNet.DE
Sun Dec 12 11:00:39 MST 2010


On Sun, Dec 12, 2010 at 05:16:56PM +0100, Volker Lendecke wrote:
> 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.
> 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.

Attached find a patchset that implements this. It connects
to 445, then to 139. It keeps the 445 connection attempt
open until the 139 nb session setup is replied to. A
negative nb session response is treated equivalently to a
tcp connection timeout or so.

At least that's the idea, this patch is completely untested
so far.

Volker


More information about the samba-technical mailing list