diff options
| author | Aris Adamantiadis <aris@0xbadc0de.be> | 2010-05-10 22:32:52 +0200 |
|---|---|---|
| committer | Aris Adamantiadis <aris@0xbadc0de.be> | 2010-05-10 22:32:52 +0200 |
| commit | bae409071522ae65c02bc36fccb87ee2a7179edf (patch) | |
| tree | 0481d1b62e6281b8de5b15ea78dd76ce0a681c9b /libssh/options.c | |
| parent | 403ded1e978f716769ade6d099b2419e4fceaff7 (diff) | |
Backport of the proxycommand feature
Diffstat (limited to 'libssh/options.c')
| -rw-r--r-- | libssh/options.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libssh/options.c b/libssh/options.c index dafd72e0..0c881cde 100644 --- a/libssh/options.c +++ b/libssh/options.c @@ -362,6 +362,10 @@ char *dir_expand_dup(ssh_session session, const char *value, int allowsshdir) { * Set the compression to use for server to client * communication (string, "none" or "zlib"). * + * - SSH_OPTIONS_PROXYCOMMAND: + * Set the command to be executed in order to connect to + * server. + * * @param value The value to set. This is a generic pointer and the * datatype which is used should be set according to the * type set. @@ -612,6 +616,14 @@ int ssh_options_set(ssh_session session, enum ssh_options_e type, return -1; } break; + case SSH_OPTIONS_PROXYCOMMAND: + if (value == NULL) { + ssh_set_error_invalid(session, __FUNCTION__); + return -1; + } else { + session->ProxyCommand = strdup(value); + } + break; default: ssh_set_error(session, SSH_REQUEST_DENIED, "Unknown ssh option %d", type); return -1; |
