sshd doesn't log hostname into utmp correctly [resend]

Hajimu UMEMOTO ume at
Tue Aug 20 15:49:43 EST 2002


>>>>> On Mon, 19 Aug 2002 14:19:02 -0700
>>>>> Kevin Steves <kevin at> said:

kevin> thanks.  which utmp field is effected?  in loginrec.c i see ut_addr
kevin> being set from sockaddr, but for AF_INET only.  and ut_host is set
kevin> from the login_alloc_entry() hostname argument it seems.

record_login() copies addr by calling login_set_addr() but just
sizeof(struct sockaddr).  Since sizeof(struct sockaddr) is equal to
sizeof(struct sockaddr_in), IPv4 is not affected.  However,
sizeof(struct sockaddr) is too short against sizeof(struct
sockaddr_in6).  This breaks IPv6 address.


Hajimu UMEMOTO @ Network Solution System Development Div., Hitachi Ltd.
E-Mail: ume at ume at  ume@{,jp.}

More information about the openssh-unix-dev mailing list