[PATCH] `smbclient -M' ignores `-p port'

Peter Samuelson peter at cadcamlab.org
Sun Jul 16 20:41:11 GMT 2000


[Pete Peterson <petersonp at genrad.com>]
> It appears that "smbclient -p <portnumber>" doesn't work as
> advertised in Samba 2.x.

It does work, just not for winpopup messages. (:  This patch should fix
it.  It's untested but almost certainly correct.

Samba maintainers please apply.  2.0, HEAD and TNG all have this bug.

Peter

--- samba-2.0.x/source/client/client.c~	Mon Jul  3 01:15:21 2000
+++ samba-2.0.x/source/client/client.c	Sun Jul 16 15:33:34 2000
@@ -2164,7 +2164,8 @@
 	ip = ipzero;
 	if (have_ip) ip = dest_ip;
 
-	if (!(cli=cli_initialise(NULL)) || !cli_connect(cli, desthost, &ip)) {
+	if (!(cli=cli_initialise(NULL)) || !cli_set_port(cli, port) ||
+	    !cli_connect(cli, desthost, &ip)) {
 		DEBUG(0,("Connection to %s failed\n", desthost));
 		return 1;
 	}


More information about the samba mailing list