libsmbclient and browsing NT and Win9X workgroups: Evidence of bad things

Simo Sorce simo.sorce at polimi.it
Fri Feb 16 11:00:33 GMT 2001


On Fri, 16 Feb 2001, Andrew Tridgell wrote:

> Richard,
>
> > I now have evidence that Windows NT, in responding to a GetBackupList
> > request, ignores the source port number in both the UDP header and the the
> > NetBIOS datagram service header, and responds to port 138! Evidence attached.
>
> That's not too surprising. We already know about two other packet
> types that they do this on. Thus the unexpected packet database.
>
> Note that you will find that different versions of NT are unlikely to
> be consistent about this. I have noticed that with node status
> requests that each version of NT seems to be different.
>
> > 1. Insist on nmbd from Samba 2.2.x being on the system, and rummaging
> > through the unexpected TDB for the response ... if we timeout on the
> > receipt of the GetBackupList response ...
>
> Have a look at receive_nmb_packet() in nmblib.c for an example of how
> to do this.
>
> > 2. If the right version of nmbd is not running (which we should be able to
> > detect by trying to init tdb), then install our own port 138 listener that
> > simply throws all incoming port 138 packets into the unexpected TDB ...
> > Should time those entries out after a while as well.  This listener will
> > have to run SUID root. It would be started up by smbc_init if we can't do a
> > TDB init.
>
> no, that's too ugly and would mean that restarting nmbd would not be
> reliable as some client prog could grab the port before we restart.
>
As other interoperability software will start to rise, more and more
similar cases may occur.
Wouldn't it be a good thing to build up a dispatcher to which others
programs may attach (nmbd, smbd libsmbclient, etc...) and see the needed
packets?

SImo.

-- 
Simo Sorce - Linux Systems Consultant
E-mail: simo.sorce at polimi.it
Tel: +39 0348 7149179 - Fax: +39 02 700442399
-----------------------------------------------------------------
Be happy, use Linux!





More information about the samba-technical mailing list