comparison cli-agentfwd.c @ 560:52d7301e46bd agent-client

Agent forwarding works
author Matt Johnston <matt@ucc.asn.au>
date Thu, 30 Jul 2009 15:14:33 +0000
parents de3653483ac0
children a900cb1c53fa
comparison
equal deleted inserted replaced
559:7f66b8e40f2d 560:52d7301e46bd
224 buf_free(inbuf); 224 buf_free(inbuf);
225 inbuf = NULL; 225 inbuf = NULL;
226 } 226 }
227 } 227 }
228 228
229 void cli_setup_agent(struct Channel *channel) {
230 if (!getenv("SSH_AUTH_SOCK")) {
231 return;
232 }
233
234 cli_start_send_channel_request(channel, "[email protected]");
235 /* Don't want replies */
236 buf_putbyte(ses.writepayload, 0);
237 encrypt_packet();
238 }
239
229 /* Returned keys are prepended to ret_list, which will 240 /* Returned keys are prepended to ret_list, which will
230 be updated. */ 241 be updated. */
231 void load_agent_keys(m_list *ret_list) 242 void cli_load_agent_keys(m_list *ret_list) {
232 {
233 /* agent_fd will be closed after successful auth */ 243 /* agent_fd will be closed after successful auth */
234 cli_opts.agent_fd = connect_agent(); 244 cli_opts.agent_fd = connect_agent();
235 if (cli_opts.agent_fd < 0) { 245 if (cli_opts.agent_fd < 0) {
236 dropbear_log(LOG_INFO, "Failed to connect to agent"); 246 dropbear_log(LOG_INFO, "Failed to connect to agent");
237 return; 247 return;