diff options
author | Andreas Schneider <asn@cryptomilk.org> | 2013-07-11 15:15:34 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2013-07-11 15:34:50 +0200 |
commit | e52cc613e4127d419b79aca5db9e5493f62a5593 (patch) | |
tree | 9da6ad71a54c1ee526f7369fc7cde5bbfda07989 /src/options.c | |
parent | 89be6d0309f3ab7a869805b4de6ce63d769484c9 (diff) | |
download | libssh-e52cc613e4127d419b79aca5db9e5493f62a5593.tar.gz libssh-e52cc613e4127d419b79aca5db9e5493f62a5593.tar.xz libssh-e52cc613e4127d419b79aca5db9e5493f62a5593.zip |
BUG 103: Disable proxy command if set to 'none'.
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'src/options.c')
-rw-r--r-- | src/options.c | 12 |
1 files changed, 8 insertions, 4 deletions
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: |