On Sun, Nov 18, 2018 at 10:10:30AM +1100, Darren Tucker wrote:
> On Sun, Nov 18, 2018 at 10:03:20AM +1100, Darren Tucker wrote:
> > On Sun, 18 Nov 2018 at 09:48, Darren Tucker <[email protected]> wrote:
> > 
> > > Was able to reproduce and confirmed by bisecting that the "redirect stderr
> > > of ProxyCommands to /dev/null when ssh is started with ControlPersist"
> > > change is where it breaks, but I don't understand what mosh is doing under
> > > the covers that now doesn't work.  Will look further.
> > >
> > 
> > Not sure if I understand the intent of the change correctly, but to me the
> > logic looks inverted.
> > 
> >                 /*
> >                  * Stderr is left for non-ControlPersist connections is so
> >                  * error messages may be printed on the user's terminal.
> >                  */
> >                 if (debug_flag || !options.control_persist)
> >                         stderr_null();
> > 
> > If nothing else the control_persist part should probably check if
> > ControlPath is set too.
> 
> ok?

This fixes the issue for me yes.
Thanks.

> 
> diff --git a/sshconnect.c b/sshconnect.c
> index a700f467..ed86d0d9 100644
> --- a/sshconnect.c
> +++ b/sshconnect.c
> @@ -163,7 +163,8 @@ ssh_proxy_fdpass_connect(struct ssh *ssh, const char 
> *host, u_short port,
>                * Stderr is left for non-ControlPersist connections is so
>                * error messages may be printed on the user's terminal.
>                */
> -             if (debug_flag || !options.control_persist)
> +             if (!debug_flag && options.control_path != NULL &&
> +                 options.control_persist)
>                       stderr_null();
>  
>               argv[0] = shell;
> @@ -245,7 +246,8 @@ ssh_proxy_connect(struct ssh *ssh, const char *host, 
> u_short port,
>                * Stderr is left for non-ControlPersist connections is so
>                * error messages may be printed on the user's terminal.
>                */
> -             if (debug_flag || !options.control_persist)
> +             if (!debug_flag && options.control_path != NULL &&
> +                 options.control_persist)
>                       stderr_null();
>  
>               argv[0] = shell;
> 
> -- 
> Darren Tucker (dtucker at dtucker.net)
> GPG key 11EAA6FA / A86E 3E07 5B19 5880 E860  37F4 9357 ECEF 11EA A6FA (new)
>     Good judgement comes with experience. Unfortunately, the experience
> usually comes from bad judgement.

-- 
Matthieu Herrb

Reply via email to