[PATCH] ControlCommand: execute a command if no control socket is available

Helmut Grohne helmut at subdivi.de
Thu Jul 9 17:29:08 EST 2009


On Thu, Jul 09, 2009 at 09:12:01AM +0200, Bert Wesarg wrote:
> The simpliest configuration would be:
> 
> ControlMaster  command
> ControlCommand "ssh -nNfM -p %p %u@%h"

Interesting. It looks like one control master nastyness goes away. :-)

Your patch could also be abused for my task by badly mixing
ControlMaster configuration. However a separated approach should be much
cleaner.

> The patch removes also the redundant check in ssh_local_cmd() for the
> permit_local_command option, because all callsites check this in-front of the
> call.

Good. I did not check that.

> ---
>  mux.c        |   24 +++++++++++++++++++-----
>  readconf.c   |   15 +++++++++++++--
>  readconf.h   |    3 +++
>  ssh.c        |   40 +++++++++++++++++++++++++++++++++++-----
>  sshconnect.c |    3 +--
>  5 files changed, 71 insertions(+), 14 deletions(-)

I'd suggest that your patch also changes ssh_config.5. It would have to
be documented anyway before it can be applied, so you can do that
beforehand.

Helmut


More information about the openssh-unix-dev mailing list