Created attachment 1852 [details] add conf_wtmp_location and conf_lastlog_location for AIX Configure doesn't determine the wtmp or the lastlog location on AIX. Modify configure to explicitly add the paths. add conf_wtmp_location and conf_lastlog_location for AIX
Comment on attachment 1852 [details] add conf_wtmp_location and conf_lastlog_location for AIX looks reasonable (the change actually has to go into configure.ac) but I'm curious about why you need it: the login records are written through loginsuccess(). Are you building without WITH_AIX_AUTHENTICATE?
Comment on attachment 1852 [details] add conf_wtmp_location and conf_lastlog_location for AIX >+ conf_wtmp_location=/var/adm/wtmp >+ conf_lastlog_location="/etc/security/lastlog" Actually on further investigation, this looks wrong (/etc/security/lastlog on AIX is a text format, not the binary format sshd would write). Taking this off the list for 5.7p1 until I understand what problem this is fixing.
I do compile with WITH_AIX_AUTHENTICATE as well as -DCUSTOM_FAILED_LOGIN (I was the author of those many years ago). At one point CUSTOM_FAILED_LOGIN was not needed as it was part of WITH_AIX_AUTHENTICATE, not sure why it was moved into it's own DEFINE as it is needed for AIX to log the appropriate entries. I will have to reinvestigate this one as it has been a long time.
After some testing - with/without keys, /var/adm/wtmp, /etc/security/lastlog, login_success, login_failure, restricted_logins all seem to work on AIX for openssh 5.7 without any addition patches needed. This bug can be closed. Thanks!
Thanks. One thing to be aware of is that binaries compiled on AIX4 won't log wtmp entries correctly on AIX5 systems, could this have been what you saw?
I compile openssh for each OS level, so wtmp should have not been an issue. I have been doing this patch and defining CUSTOM_FAILED_LOGIN for years, so whatever the reason was initially does not seem to be the case now as it works just as well without the patch. Perhaps I was shooting myself in the foot by defining CUSTOM_FAILED_LOGIN. Thanks for looking into this.