Mailing List Archive

PrintLastLog fails on systems without lastlog but with utmpx
From FreeBSD PR 209441. configure sets DISABLE_LASTLOG if we do not
have lastlog.ll_line:

AC_CHECK_MEMBER([struct lastlog.ll_line], [], [
if test x$SKIP_DISABLE_LASTLOG_DEFINE != "xyes" ; then
], [

However DISABLE_LASTLOG disables support for PrintLastLog altogether
-- from servconf.c:

{ "printlastlog", sUnsupported, SSHCFG_GLOBAL },
{ "printlastlog", sPrintLastLog, SSHCFG_GLOBAL },

In getlast_entry() DISABLE_LASTLOG disables use of wtmp and wtmpx, but
not utmpx. DISABLE_LASTLOG seems to be intended to mean disable last
login functionality altogether, and disable use of specifically
utmp/lastlog, in different locations.

It seems like (for consistency with --disable-utmp, --disable-utmpx,
--disable-wtmp, --disable-wtmpx) DISABLE_LASTLOG should refer only to
lastlog specifically, not last login functionality in general. Thus,
servconf should probably be:

#if defined(DISABLE_LASTLOG) && defined(DISABLE_UTMP) &&
defined(DISABLE_UTMPX) &&...
{ "printlastlog", sUnsupported, SSHCFG_GLOBAL },
{ "printlastlog", sPrintLastLog, SSHCFG_GLOBAL },

and getlast_entry() should move the wtmp/wtmpx cases out of
openssh-unix-dev mailing list