# HG changeset patch # User Matt Johnston # Date 1251198695 0 # Node ID 1929bbe3fa84f3b1dcb7b6cb5d25ace571f742cc # Parent 12fc5b342dc091fcd9d5afb739a7be7dc0e1770a# Parent fad3eb63b907d78a648a87e2a6868110ac2a59ac merge of '0d7a9127af37d6e74efc5ec031a7001ce63d334d' and 'e35cd321b6d4fab6ad854827249f610da3bb6878' diff -r fad3eb63b907 -r 1929bbe3fa84 cli-agentfwd.c --- a/cli-agentfwd.c Tue Aug 25 05:24:18 2009 +0000 +++ b/cli-agentfwd.c Tue Aug 25 11:11:35 2009 +0000 @@ -66,6 +66,10 @@ fd = connect_unix(agent_sock); + if (fd < 0) { + dropbear_log(LOG_INFO, "Failed to connect to agent"); + } + return fd; } @@ -79,6 +83,9 @@ return SSH_OPEN_ADMINISTRATIVELY_PROHIBITED; fd = connect_agent(); + if (cli_opts.agent_fd < 0) { + return SSH_OPEN_CONNECT_FAILED; + } setnonblocking(fd); @@ -243,7 +250,6 @@ /* agent_fd will be closed after successful auth */ cli_opts.agent_fd = connect_agent(); if (cli_opts.agent_fd < 0) { - dropbear_log(LOG_INFO, "Failed to connect to agent"); return; }