cm_prepare_connection() & SMBSERVER Netbios query

Dina_Fine at Dell.com Dina_Fine at Dell.com
Sun Dec 12 08:45:29 MST 2010


Hello,

I am testing Windows 2008 AD functionality. And I noticed that wbinfo -t (checking machine secret) sometimes fails.
The reason for that failure is that the Windows 2008 AD we have, responses with negative answer for netbios query: "*SMBSERVER<20> from c19<00>" with an error: "Called name not present"
I read in "Implementing CIFS" that it is a legal response for such a query and that a server MAY not support this query.

But cm_prepare_connection() function (winbindd_cm.c) doesn't deal well with this failure.
The flow is that cm_open_connection calls to open_any_socket_out with two ports 139 and 445. And when the port 139 is ready first (As far as I understand the code), the cm_prepare_connection() will use this port and will send *SMBSERVER query to initiate a session. If the call fails, the cm_prepare_connection() fails as well.

Taking into consideration that some AD servers will not support *SMBSERVER query, is not it better to use only socket 445 for AD authentication requests? Or perhaps to have some kind of fallback to 445 port after the *SMBSERVER query fails?

Thanks a lot,
Dina Fine
Engineering Team Leader
Dell | IDC
office +972 97698825,  fax +972 97698889
dina_fine at dell.com<mailto:dina_fine at dell.com>
Dell IDC. 4 Hacharoshet St, Raanana 43657, Israel



More information about the samba-technical mailing list