comparison cli-agentfwd.c @ 563:12fc5b342dc0

- Don't print warning if SSH_AUTH_SOCK is unset
author Matt Johnston <matt@ucc.asn.au>
date Thu, 13 Aug 2009 14:57:27 +0000
parents a900cb1c53fa
children 3c5f631358a0
comparison
equal deleted inserted replaced
562:a900cb1c53fa 563:12fc5b342dc0
64 if (agent_sock == NULL) 64 if (agent_sock == NULL)
65 return -1; 65 return -1;
66 66
67 fd = connect_unix(agent_sock); 67 fd = connect_unix(agent_sock);
68 68
69 if (fd < 0) {
70 dropbear_log(LOG_INFO, "Failed to connect to agent");
71 }
72
69 return fd; 73 return fd;
70 } 74 }
71 75
72 // handle a request for a connection to the locally running ssh-agent 76 // handle a request for a connection to the locally running ssh-agent
73 // or forward. 77 // or forward.
78 if (!cli_opts.agent_fwd) 82 if (!cli_opts.agent_fwd)
79 return SSH_OPEN_ADMINISTRATIVELY_PROHIBITED; 83 return SSH_OPEN_ADMINISTRATIVELY_PROHIBITED;
80 84
81 fd = connect_agent(); 85 fd = connect_agent();
82 if (cli_opts.agent_fd < 0) { 86 if (cli_opts.agent_fd < 0) {
83 dropbear_log(LOG_INFO, "Failed to connect to agent");
84 return SSH_OPEN_CONNECT_FAILED; 87 return SSH_OPEN_CONNECT_FAILED;
85 } 88 }
86 89
87 setnonblocking(fd); 90 setnonblocking(fd);
88 91
245 be updated. */ 248 be updated. */
246 void cli_load_agent_keys(m_list *ret_list) { 249 void cli_load_agent_keys(m_list *ret_list) {
247 /* agent_fd will be closed after successful auth */ 250 /* agent_fd will be closed after successful auth */
248 cli_opts.agent_fd = connect_agent(); 251 cli_opts.agent_fd = connect_agent();
249 if (cli_opts.agent_fd < 0) { 252 if (cli_opts.agent_fd < 0) {
250 dropbear_log(LOG_INFO, "Failed to connect to agent");
251 return; 253 return;
252 } 254 }
253 255
254 agent_get_key_list(ret_list); 256 agent_get_key_list(ret_list);
255 } 257 }