Bug 1569

Summary: Hostbased auth fails when using a proxy command
Product: Portable OpenSSH Reporter: Iain Morgan <imorgan>
Component: sshAssignee: Assigned to nobody <unassigned-bugs>
Status: CLOSED FIXED    
Severity: normal CC: djm, dtucker
Priority: P2    
Version: 5.2p1   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 1626    
Attachments:
Description Flags
Allow get_local_name() to handle a socket or pipe. none

Description Iain Morgan 2009-03-10 05:16:47 AEDT
Created attachment 1612 [details]
Allow get_local_name() to handle a socket or pipe.

If hostbased authentication is enabled and a proxy command is used to 
connect to the server, the following warning messages typically
appear:

cannot get sockname for fd
ssh_keysign: no reply
key_sign failed

This is due to the assumption that the file descriptor passed to 
get_local_name() corresponds to a socket, which is not the case when a
proxy command is used.

The attached patch modifies get_local_name() sot that it falls back to
using gethostname() if get_socket_address() fails. As a result, some
redundant code in sshconnect2.c is removed. A typo is sshconnect2.c is
also fixed. ('no installed' vs 'not installed')
Comment 1 Darren Tucker 2010-01-13 12:20:55 AEDT
Your patch has been applied and will be in the 5.4 release.

Thanks.
Comment 2 Darren Tucker 2010-03-26 10:51:45 AEDT
With the release of 5.4p1, this bug is now considered closed.