Latest libsmbclient.so changes committed etc

Simo Sorce simo.sorce at polimi.it
Mon Feb 19 08:16:29 GMT 2001


On Mon, 19 Feb 2001, Richard Sharpe wrote:

> Hi
>
> I have committed some more changes to libsmbclient.
>
> The big change is that I have determined that WinNT and Win2K, and I
> presume, Win9X, all behave incorrectly[1] with respect to UDP messages to
> ports 137 and 138.
>
> When a UDP datagram is sent to a Windows system, say on port 138, Windows
> responds to port 138 on the sending system, regardless of what the source
> port was in the datagram.
>
> This creates problems for libsmbclient, as it is unlikely to be running as
> root, and even if it were, if Samba is running on the same machine,
> libsmbclient will not be able to gain access to port 138.
>
> Thus a different mechanism is needed to gain access to responses to
> GetBackupList requests and to Registration requests.
>
> Rather than exploring different approaches (which may be what nmblookup and
> smbclient do in certain situations), I have stuck with using GetBackupList
> requests and have made use of a feature in nmbd that makes unexpected
> packets available to other processes via the unexpected packet TDB.
>
> The problem with this approach is that it requires Samba to be on the Linux
> system if you are working in an environment containing NT, Win2K or Win9X
> systems.
>
> However, it seems that there may be a simpler approach that is worth
> exploring that will allow us to avoid the reliance on Samba/nmbd. So, I
> will spend some time looking at this.
>
> A quick check shows that name lookups for <DOMAIN><1D>, the Local Master
> Browser address, for example, returns to a non-privileged port and gives us
> an IP address to deal with.
>
> Since for Win9X systems (possibly only Win95) we will need the NetBIOS name
> of the server, as it does not accept connections on *SMBSERVER, we may need
> to do an NBSTAT call on the name <DOMAIN><1D> which returns quite a lot of
> info ...
>
>
> [1] Seems lots of people agree with me here ...
>

Does this mean you does not ever need to use GetBackupList Registration
because an nbstat against <DOMAIN><1D> will retrun enough info?

--
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