diff options
Diffstat (limited to 'cli-runopts.c')
-rw-r--r-- | cli-runopts.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/cli-runopts.c b/cli-runopts.c index 54d4875..c2134a6 100644 --- a/cli-runopts.c +++ b/cli-runopts.c @@ -53,6 +53,9 @@ static void printhelp() { #ifdef ENABLE_CLI_PUBKEY_AUTH "-i <identityfile> (multiple allowed)\n" #endif +#ifdef ENABLE_CLI_AGENTFWD + "-A Enable agent auth forwarding\n" +#endif #ifdef ENABLE_CLI_LOCALTCPFWD "-L <listenport:remotehost:remoteport> Local port forwarding\n" "-g Allow remote hosts to connect to forwarded ports\n" @@ -99,6 +102,10 @@ void cli_getopts(int argc, char ** argv) { #ifdef ENABLE_CLI_REMOTETCPFWD cli_opts.remotefwds = NULL; #endif +#ifdef ENABLE_CLI_AGENTFWD + cli_opts.agent_fwd = 0; + cli_opts.agent_keys_loaded = 0; +#endif /* not yet opts.ipv4 = 1; opts.ipv6 = 1; @@ -183,6 +190,11 @@ void cli_getopts(int argc, char ** argv) { printhelp(); exit(EXIT_SUCCESS); break; +#ifdef ENABLE_CLI_AGENTFWD + case 'A': + cli_opts.agent_fwd = 1; + break; +#endif #ifdef DEBUG_TRACE case 'v': debug_trace = 1; @@ -291,6 +303,7 @@ static void loadidentityfile(const char* filename) { nextkey->key = key; nextkey->next = cli_opts.privkeys; nextkey->type = keytype; + nextkey->source = SIGNKEY_SOURCE_RAW_FILE; cli_opts.privkeys = nextkey; } } |