smbclient -M sends NetBIOS session service header to port 445

Steve Langasek vorlon at netexpress.net
Mon Jan 6 20:24:00 GMT 2003


On Mon, Jan 06, 2003 at 11:51:24AM -0600, Christopher R. Hertel wrote:

> That would be great.  Please also look at the -L option too, as that
> should default to 139 as well.  (Sort of... it's not necessary for listing
> shares.)

Ok.  I'll add that to my queue behind getting libsmbclient to use the RPC
call for share enumeration instead of the RAP call. :)

> The -p option should override the defaults in any case, though.  There are 
> folks who use port-redirection (for SSH links to the server, etc.).  
> They'd want -p to be authoritative, rather than just explicit.  :)

Done.  See attached.

-- 
Steve Langasek
postmodern programmer
-------------- next part --------------
diff -ur samba-3.0alpha21.orig/source/client/client.c samba-3.0alpha21/source/client/client.c
--- samba-3.0alpha21.orig/source/client/client.c	2002-11-26 20:54:18.000000000 -0600
+++ samba-3.0alpha21/source/client/client.c	2003-01-06 14:08:54.000000000 -0600
@@ -2995,6 +2995,12 @@
 		}
 	}
 
+	/* If -M is specified and -p is not, make sure we use port 139
+	   instead of port 445. srl */
+	if (message && port == 0) {
+		port = 139;
+	}
+
 	init_names();
 
 	if(*new_name_resolve_order)


More information about the samba-technical mailing list