mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-11-29 01:03:57 +03:00
BUG 103: Disable proxy command if set to 'none'.
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user