Hajimu UMEMOTO
2002-Aug-19 18:06 UTC
sshd doesn't log hostname into utmp correctly [resend]
Hi, Though I sent this message before, I didn't get any response. So, I send this message, again. This problem is occur when the connection is form IPv6, and IPv4 is not affected. openssh-3.4p1 doesn't handle actual size of struct sockaddr correctly, and does copy it as long as just size of struct sockaddr. So, sshd deesn't log hostname into utmp correctly. Here is a patch to fix this problem. Sincerely, -------------- next part -------------- A non-text attachment was scrubbed... Name: openssh-3.4p1-loghost.diff Type: text/x-patch Size: 3998 bytes Desc: not available Url : http://lists.mindrot.org/pipermail/openssh-unix-dev/attachments/20020820/a93f3bd1/attachment.bin -------------- next part -------------- -- Hajimu UMEMOTO @ Internet Mutual Aid Society Yokohama, Japan ume at mahoroba.org ume at bisd.hitachi.co.jp ume@{,jp.}FreeBSD.org http://www.imasy.org/~ume/
On Tue, Aug 20, 2002 at 03:06:50AM +0900, Hajimu UMEMOTO wrote:> Though I sent this message before, I didn't get any response. So, I > send this message, again. > This problem is occur when the connection is form IPv6, and IPv4 is > not affected. > > openssh-3.4p1 doesn't handle actual size of struct sockaddr correctly, > and does copy it as long as just size of struct sockaddr. So, sshd > deesn't log hostname into utmp correctly. Here is a patch to fix this > problem.thanks. which utmp field is effected? in loginrec.c i see ut_addr being set from sockaddr, but for AF_INET only. and ut_host is set from the login_alloc_entry() hostname argument it seems.