smbclient -M sends NetBIOS session service header to port 445
Christopher R. Hertel
crh at ubiqx.mn.org
Tue Jan 7 04:25:00 GMT 2003
On Mon, Jan 06, 2003 at 02:23:13PM -0600, Steve Langasek wrote:
:
> > 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.
Well, see, the thing about coders is...
I fiddled your patch. I'm applying the one below. Same idea, except that
I put it with the '-M' code in the switch(). If the '-p' option is
entered later on the command line, it will override the value of <port>.
Chris -)-----
samba.3.0/source/client$ diff -ur client.orig client.c
--- client.orig Mon Jan 6 22:19:12 2003
+++ client.c Mon Jan 6 22:18:05 2003
@@ -2839,8 +2839,14 @@
pstrcpy(new_name_resolve_order, optarg);
break;
case 'M':
- name_type = 0x03; /* messages are sent to NetBIOS name type 0x3 */
+ /* Messages are sent to NetBIOS name type 0x3
+ * (Messenger Service). Make sure we default
+ * to port 139 instead of port 445. srl,crh
+ */
+ name_type = 0x03;
pstrcpy(desthost,optarg);
+ if( 0 == port )
+ port = 139;
message = True;
break;
case 'i':
--
Samba Team -- http://www.samba.org/ -)----- Christopher R. Hertel
jCIFS Team -- http://jcifs.samba.org/ -)----- ubiqx development, uninq.
ubiqx Team -- http://www.ubiqx.org/ -)----- crh at ubiqx.mn.org
OnLineBook -- http://ubiqx.org/cifs/ -)----- crh at ubiqx.org
More information about the samba-technical
mailing list