BUG 103: Disable proxy command if set to 'none'.

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
Andreas Schneider
2013-07-11 15:15:34 +02:00
parent b6788f369e
commit 23e0053a41
2 changed files with 26 additions and 4 deletions

View File

@@ -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: