From 0059933c8d5f219c65a61df017225d9030ea3ae8 Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Fri, 5 Apr 2013 11:20:18 +1100 Subject: - markus@cvs.openbsd.org 2013/02/22 19:13:56 [sshconnect.c] support ProxyCommand=- (stdin/out already point to the proxy); ok djm@ --- ChangeLog | 3 +++ sshconnect.c | 9 ++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 327615d6..69ea7e8c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -12,6 +12,9 @@ [ssh.c readconf.c readconf.h] Don't complain if IdentityFiles specified in system-wide configs are missing. ok djm, deraadt. + - markus@cvs.openbsd.org 2013/02/22 19:13:56 + [sshconnect.c] + support ProxyCommand=- (stdin/out already point to the proxy); ok djm@ 20130401 - (dtucker) [openbsd-compat/bsd-cygwin_util.{c,h}] Don't include windows.h diff --git a/sshconnect.c b/sshconnect.c index 07800a65..cf071128 100644 --- a/sshconnect.c +++ b/sshconnect.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshconnect.c,v 1.236 2012/09/14 16:51:34 markus Exp $ */ +/* $OpenBSD: sshconnect.c,v 1.237 2013/02/22 19:13:56 markus Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -89,6 +89,13 @@ ssh_proxy_connect(const char *host, u_short port, const char *proxy_command) pid_t pid; char *shell, strport[NI_MAXSERV]; + if (!strcmp(proxy_command, "-")) { + packet_set_connection(STDIN_FILENO, STDOUT_FILENO); + packet_set_timeout(options.server_alive_interval, + options.server_alive_count_max); + return 0; + } + if ((shell = getenv("SHELL")) == NULL || *shell == '\0') shell = _PATH_BSHELL; -- cgit v1.2.3