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

Andrew Tridgell tridge at samba.org
Fri Feb 16 01:16:45 GMT 2001


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.

Cheers, Tridge




More information about the samba-technical mailing list