[Bug 209441] SSHd in FreeBSD 10.3 complains about PrintLastLog

From: <bugzilla-noreply_at_freebsd.org>
Date: Wed, 18 May 2022 18:19:04 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=209441

--- Comment #18 from Ed Maste <emaste@freebsd.org> ---
This is a bug in OpenSSH upstream and I've sent mail to the openssh-unix-devel
mailing list about it.

This patch is probably closer to the proper fix; please give it a try:

diff --git a/crypto/openssh/servconf.c b/crypto/openssh/servconf.c
index 6eaf9c2876ff..45587631cb8b 100644
--- a/crypto/openssh/servconf.c
+++ b/crypto/openssh/servconf.c
@@ -611,7 +611,7 @@ static struct {
        { "listenaddress", sListenAddress, SSHCFG_GLOBAL },
        { "addressfamily", sAddressFamily, SSHCFG_GLOBAL },
        { "printmotd", sPrintMotd, SSHCFG_GLOBAL },
-#ifdef DISABLE_LASTLOG
+#if defined(DISABLE_LASTLOG) && defined(DISABLE_UTMPX)
        { "printlastlog", sUnsupported, SSHCFG_GLOBAL },
 #else
        { "printlastlog", sPrintLastLog, SSHCFG_GLOBAL },
@@ -2915,7 +2915,7 @@ dump_config(ServerOptions *o)
        dump_cfg_fmtint(sKbdInteractiveAuthentication,
            o->kbd_interactive_authentication);
        dump_cfg_fmtint(sPrintMotd, o->print_motd);
-#ifndef DISABLE_LASTLOG
+#if !defined(DISABLE_LASTLOG) || !defined(DISABLE_UTMPX)
        dump_cfg_fmtint(sPrintLastLog, o->print_lastlog);
 #endif
        dump_cfg_fmtint(sX11Forwarding, o->x11_forwarding);

-- 
You are receiving this mail because:
You are on the CC list for the bug.