NetServerEnum2 from libsmbclient on port 445.

Stephan Kulow coolo at kde.org
Tue Apr 8 14:32:59 GMT 2003


On Tuesday 08 April 2003 16:05, Christopher R. Hertel wrote:
> Since the NetServerEnum2 call returns a list of NetBIOS names it makes sense
> that you'd only try it on the NBT port (unless the user specifically asks
> for a different port, eg: smb://workgroup:445/)
The tricky part is that cli_NetServerEnum doesn't open the connection.
As libsmbclient and smbwrapper cache the connections, you don't know
offhand what type of request you're going to do, the only options I see
are:

a) trying 139 first for all kind of services (when I disable  NetBIOS over TCP/IP in XP 
   I can't get the servers out of the LMB anyway)
b) returning a unique error from cli_NetServerEnum when the port is 445
   that the caller (there are least three points in samba I can find) can interpret
   and reconnect with port 139
c) somehow reconnect in cli_NetServerEnum

Taking that win9* do not listen to 445, winNT/XP do not provide the full services
over 445 and samba doesn't care, I really wonder why the default port was changed.

Greetings, Stephan



More information about the samba-technical mailing list