diff options
author | Matt Johnston <matt@ucc.asn.au> | 2009-07-30 15:14:33 +0000 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2009-07-30 15:14:33 +0000 |
commit | bb8234c2f12998b6cd9590f7dddd08d1871a5d1f (patch) | |
tree | 8860f704799ceb21d00a5ee830f94d1a7117e74e /cli-agentfwd.c | |
parent | bacd2a8c795f49822146c1eea0d66c2438c26d7f (diff) |
Agent forwarding works
--HG--
branch : agent-client
extra : convert_revision : eb0dae4b62e243ba37a897beb7ba81a4f637d8b3
Diffstat (limited to 'cli-agentfwd.c')
-rw-r--r-- | cli-agentfwd.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/cli-agentfwd.c b/cli-agentfwd.c index ed2c59c..c7df788 100644 --- a/cli-agentfwd.c +++ b/cli-agentfwd.c @@ -226,10 +226,20 @@ out: } } +void cli_setup_agent(struct Channel *channel) { + if (!getenv("SSH_AUTH_SOCK")) { + return; + } + + cli_start_send_channel_request(channel, "auth-agent-req@openssh.com"); + /* Don't want replies */ + buf_putbyte(ses.writepayload, 0); + encrypt_packet(); +} + /* Returned keys are prepended to ret_list, which will be updated. */ -void load_agent_keys(m_list *ret_list) -{ +void cli_load_agent_keys(m_list *ret_list) { /* agent_fd will be closed after successful auth */ cli_opts.agent_fd = connect_agent(); if (cli_opts.agent_fd < 0) { |