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

Pete Peterson petersonp at genrad.com
Mon Jul 17 11:39:00 GMT 2000


Peter:

Thanks!  It now works fine on Solaris 2.6.  Now I just need to remember how
to manipulate source RPMs so I can fix the Linux (RedHat 6.x) version. :-)

   pete

> From peter at cadcamlab.org  Sun Jul 16 16:41:17 2000
> Cc: <samba at samba.org>
> Subject: [PATCH] `smbclient -M' ignores `-p port'
> 
> [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