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

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


Hi,

>>>>> On Mon, 19 Aug 2002 14:19:02 -0700
>>>>> Kevin Steves <kevin at atomicgears.com> 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.

Sincrely,

--
Hajimu UMEMOTO @ Network Solution System Development Div., Hitachi Ltd.
E-Mail: ume at bisd.hitachi.co.jp ume at mahoroba.org  ume@{,jp.}FreeBSD.org
URL: http://www.imasy.org/~ume/



More information about the openssh-unix-dev mailing list