git: 545163d9bc9c - stable/12 - openssh: restore PrintLastLog option

From: Ed Maste <emaste_at_FreeBSD.org>
Date: Thu, 27 Apr 2023 16:48:44 UTC
The branch stable/12 has been updated by emaste:

URL: https://cgit.FreeBSD.org/src/commit/?id=545163d9bc9c807cad78577bfe3346efb2d02482

commit 545163d9bc9c807cad78577bfe3346efb2d02482
Author:     Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2023-04-20 00:09:13 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2023-04-27 16:48:33 +0000

    openssh: restore PrintLastLog option
    
    Upstream's autoconf sets DISABLE_LASTLOG if lastlog.ll_line does not
    exist, but PrintLastLog also works with utmpx and other mechanisms.
    
    Reported upstream at
    https://lists.mindrot.org/pipermail/openssh-unix-dev/2022-May/040242.html
    
    PR:             209441
    Sponsored by:   The FreeBSD Foundation
    
    (cherry picked from commit 43c6b7a60aff069da7e0ba6c87d3d7a532e812f6)
    (cherry picked from commit 170511589e4d15a27ee92979691cfc1b26929bb7)
    (cherry picked from commit 170520f882297617eaee7665a6813d03243e87a4)
---
 crypto/openssh/config.h     | 2 +-
 crypto/openssh/configure.ac | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/crypto/openssh/config.h b/crypto/openssh/config.h
index e267ba122719..c40746f48410 100644
--- a/crypto/openssh/config.h
+++ b/crypto/openssh/config.h
@@ -113,7 +113,7 @@
 /* #undef DISABLE_FD_PASSING */
 
 /* Define if you don't want to use lastlog */
-#define DISABLE_LASTLOG 1
+/* #undef DISABLE_LASTLOG */
 
 /* Define if you don't want to use your system's login() call */
 /* #undef DISABLE_LOGIN */
diff --git a/crypto/openssh/configure.ac b/crypto/openssh/configure.ac
index 56da82b81756..ef1a3c559ece 100644
--- a/crypto/openssh/configure.ac
+++ b/crypto/openssh/configure.ac
@@ -1016,6 +1016,7 @@ mips-sony-bsd|mips-sony-newsos4)
 	    [NetBSD read function is sometimes redirected, breaking atomicio comparisons against it])
 	;;
 *-*-freebsd*)
+	SKIP_DISABLE_LASTLOG_DEFINE=yes
 	AC_DEFINE([LOCKED_PASSWD_PREFIX], ["*LOCKED*"], [Account locked with pw(1)])
 	AC_DEFINE([SSH_TUN_FREEBSD], [1], [Open tunnel devices the FreeBSD way])
 	AC_CHECK_HEADER([net/if_tap.h], ,