summaryrefslogtreecommitdiffhomepage
path: root/cli-runopts.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2008-09-23 15:57:26 +0000
committerMatt Johnston <matt@ucc.asn.au>2008-09-23 15:57:26 +0000
commitefe45cddbe3a2e3dce3bd6c61038eee381c3ebe2 (patch)
treef91478d1b8b2580a6bb0322afc8591b382a03e33 /cli-runopts.c
parentb98d13effb635f0f0ad76b05c2e7616f3e99305a (diff)
- Enable -s for specifying a subsystem (such as sftp)
--HG-- extra : convert_revision : c7b916e6c522f16f06fe1bd52815ba13aa88b90b
Diffstat (limited to 'cli-runopts.c')
-rw-r--r--cli-runopts.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/cli-runopts.c b/cli-runopts.c
index 0641ec7..be449a3 100644
--- a/cli-runopts.c
+++ b/cli-runopts.c
@@ -58,6 +58,7 @@ static void printhelp() {
"-N Don't run a remote command\n"
"-f Run in background after auth\n"
"-y Always accept remote host key if unknown\n"
+ "-s Request a subsystem (use for sftp)\n"
#ifdef ENABLE_CLI_PUBKEY_AUTH
"-i <identityfile> (multiple allowed)\n"
#endif
@@ -116,6 +117,7 @@ void cli_getopts(int argc, char ** argv) {
cli_opts.backgrounded = 0;
cli_opts.wantpty = 9; /* 9 means "it hasn't been touched", gets set later */
cli_opts.always_accept_key = 0;
+ cli_opts.is_subsystem = 0;
#ifdef ENABLE_CLI_PUBKEY_AUTH
cli_opts.privkeys = NULL;
#endif
@@ -213,6 +215,9 @@ void cli_getopts(int argc, char ** argv) {
case 'f':
cli_opts.backgrounded = 1;
break;
+ case 's':
+ cli_opts.is_subsystem = 1;
+ break;
#ifdef ENABLE_CLI_LOCALTCPFWD
case 'L':
nextislocal = 1;