From e52cc613e4127d419b79aca5db9e5493f62a5593 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Thu, 11 Jul 2013 15:15:34 +0200 Subject: BUG 103: Disable proxy command if set to 'none'. Signed-off-by: Andreas Schneider --- src/options.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/options.c b/src/options.c index 931cb31e..d389f7c9 100644 --- a/src/options.c +++ b/src/options.c @@ -780,11 +780,15 @@ int ssh_options_set(ssh_session session, enum ssh_options_e type, return -1; } else { SAFE_FREE(session->opts.ProxyCommand); - q = strdup(v); - if (q == NULL) { - return -1; + /* Setting the command to 'none' disables this option. */ + rc = strcasecmp(v, "none"); + if (rc != 0) { + q = strdup(v); + if (q == NULL) { + return -1; + } + session->opts.ProxyCommand = q; } - session->opts.ProxyCommand = q; } break; default: -- cgit