diff --git a/ChangeLog b/ChangeLog index 9724473f8..f5ee63e4f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -16,6 +16,9 @@ [auth2-none.c sshd_config sshd_config.5] Support "Banner=none" to disable displaying of the pre-login banner; ok dtucker@ deraadt@ + - djm@cvs.openbsd.org 2007/08/23 03:23:26 + [sshconnect.c] + Execute ProxyCommands with $SHELL rather than /bin/sh unconditionally 20070914 - (dtucker) [openbsd-compat/bsd-asprintf.c] Plug mem leak in error path. @@ -3213,4 +3216,4 @@ OpenServer 6 and add osr5bigcrypt support so when someone migrates passwords between UnixWare and OpenServer they will still work. OK dtucker@ -$Id: ChangeLog,v 1.4746 2007/09/17 01:57:38 djm Exp $ +$Id: ChangeLog,v 1.4747 2007/09/17 01:58:04 djm Exp $ diff --git a/sshconnect.c b/sshconnect.c index a222233d0..7e3c9fff4 100644 --- a/sshconnect.c +++ b/sshconnect.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshconnect.c,v 1.200 2006/10/10 10:12:45 markus Exp $ */ +/* $OpenBSD: sshconnect.c,v 1.201 2007/08/23 03:23:26 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -86,7 +86,10 @@ ssh_proxy_connect(const char *host, u_short port, const char *proxy_command) char *command_string, *tmp; int pin[2], pout[2]; pid_t pid; - char strport[NI_MAXSERV]; + char *shell, strport[NI_MAXSERV]; + + if ((shell = getenv("SHELL")) == NULL) + shell = _PATH_BSHELL; /* Convert the port number into a string. */ snprintf(strport, sizeof strport, "%hu", port); @@ -132,7 +135,7 @@ ssh_proxy_connect(const char *host, u_short port, const char *proxy_command) /* Stderr is left as it is so that error messages get printed on the user's terminal. */ - argv[0] = _PATH_BSHELL; + argv[0] = shell; argv[1] = "-c"; argv[2] = command_string; argv[3] = NULL;