ProxyCommand brokent in recent snapshots

Tim Rühsen tim.ruehsen at gmx.de
Sat Oct 26 08:13:26 EST 2013


Am Donnerstag, 24. Oktober 2013, 11:19:35 schrieb Damien Miller:
> Index: ssh.c
> ===================================================================
> RCS file: /cvs/src/usr.bin/ssh/ssh.c,v
> retrieving revision 1.389
> diff -u -p -r1.389 ssh.c
> --- ssh.c	23 Oct 2013 03:05:19 -0000	1.389
> +++ ssh.c	24 Oct 2013 00:19:02 -0000
> @@ -881,9 +881,11 @@ main(int ac, char **av)
>  	/*
>  	 * If canonicalization not requested, or if it failed then try to
>  	 * resolve the bare hostname name using the system resolver's usual
> -	 * search rules.
> +	 * search rules. Skip the lookup if a ProxyCommand is being used
> +	 * unless the user has specifically requested canonicalisation.
>  	 */
> -	if (addrs == NULL) {
> +	if (addrs == NULL && (options.proxy_command == NULL ||
> +            options.canonicalize_hostname == SSH_CANONICALISE_ALWAYS)) {
>  		if ((addrs = resolve_host(host, options.port, 1,
>  		    cname, sizeof(cname))) == NULL)
>  			cleanup_exit(255); /* resolve_host logs the error */
> _______________________________________________
> openssh-unix-dev mailing list
> openssh-unix-dev at mindrot.org
> https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev

With this change, the regression test fails (ssh dumps core).
'addrs' stays NULL but is freed unconditionally a few lines further down.

Tim
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.mindrot.org/pipermail/openssh-unix-dev/attachments/20131025/e08d7bc6/attachment-0001.bin>


More information about the openssh-unix-dev mailing list