diff options
| author | Andreas Schneider <asn@cryptomilk.org> | 2013-07-11 15:15:34 +0200 |
|---|---|---|
| committer | Andreas Schneider <asn@cryptomilk.org> | 2013-07-26 08:42:26 +0200 |
| commit | 23e0053a419b38bda11bbabe3baba9681d7f8fa1 (patch) | |
| tree | 69d4d8b29ff29b01902bf624fcece146474368c3 /src/options.c | |
| parent | b6788f369e5dadd2ead72f0a13225f6da0a48d39 (diff) | |
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 398242be..4fc22dfe 100644 --- a/src/options.c +++ b/src/options.c @@ -655,11 +655,15 @@ int ssh_options_set(ssh_session session, enum ssh_options_e type, return -1; } else { SAFE_FREE(session->ProxyCommand); - q = strdup(value); - if (q == NULL) { - return -1; + /* Setting the command to 'none' disables this option. */ + rc = strcasecmp(value, "none"); + if (rc != 0) { + q = strdup(value); + if (q == NULL) { + return -1; + } + session->ProxyCommand = q; } - session->ProxyCommand = q; } break; default: |
