1 From f0ec680c71b9c2f0c2d729d58231dca27593a5b4 Mon Sep 17 00:00:00 2001
2 From: oracle <solaris@oracle.com>
3 Date: Mon, 3 Aug 2015 14:34:41 -0700
4 Subject: [PATCH 03/30] lastlogin
5
6 # The man page change here is Solaris-specific and thus is not being
7 # contributed back to the upstream community. The servconf.c change
8 # was developed in-house and has been submitted upstream to OpenSSH for
9 # their consideration:
10 # https://bugzilla.mindrot.org/show_bug.cgi?id=2278
11 #
12 # OpenSSH normally updates lastlog when users login and reads lastlog to
13 # determine the last login time of the user however on Solaris the
14 # pam_unix_session(5) module handles both of these tasks so we compile
15 # OpenSSH with --disable-lastlog to disable all lastlog references.
16 # This means the sshd_config option of PrintLastLog is now ignored and
17 # can't be changed so we update sshd's configuration parsing to flag
18 # this as unsupported and update the man page here.
19 #
20 *** old/servconf.c Wed Sep 17 02:54:26 2014
21 ---
22 servconf.c | 4 ++++
23 sshd_config.5 | 7 ++++---
24 2 files changed, 8 insertions(+), 3 deletions(-)
25
26 diff --git a/servconf.c b/servconf.c
27 index 5e8ed97..4ec6b57 100644
28 --- a/servconf.c
29 +++ b/servconf.c
30 @@ -504,7 +504,11 @@ static struct {
31 { "listenaddress", sListenAddress, SSHCFG_GLOBAL },
32 { "addressfamily", sAddressFamily, SSHCFG_GLOBAL },
33 { "printmotd", sPrintMotd, SSHCFG_GLOBAL },
34 +#ifdef DISABLE_LASTLOG
35 + { "printlastlog", sUnsupported, SSHCFG_GLOBAL },
36 +#else
37 { "printlastlog", sPrintLastLog, SSHCFG_GLOBAL },
38 +#endif
39 { "ignorerhosts", sIgnoreRhosts, SSHCFG_GLOBAL },
40 { "ignoreuserknownhosts", sIgnoreUserKnownHosts, SSHCFG_GLOBAL },
41 { "x11forwarding", sX11Forwarding, SSHCFG_ALL },
42 diff --git a/sshd_config.5 b/sshd_config.5
43 index b18d340..476f71c 100644
44 --- a/sshd_config.5
45 +++ b/sshd_config.5
46 @@ -1300,8 +1300,8 @@ Specifies whether
47 .Xr sshd 8
48 should print the date and time of the last user login when a user logs
49 in interactively.
50 -The default is
51 -.Dq yes .
52 +On Solaris this option is always ignored since pam_unix_session(5)
53 +reports the last login time.
54 .It Cm PrintMotd
55 Specifies whether
56 .Xr sshd 8
57 @@ -1721,7 +1721,8 @@ This file should be writable by root only, but it is recommended
58 (though not necessary) that it be world-readable.
59 .El
60 .Sh SEE ALSO
61 -.Xr sshd 8
62 +.Xr sshd 8 ,
63 +.Xr pam_unix_session 5
64 .Sh AUTHORS
65 OpenSSH is a derivative of the original and free
66 ssh 1.2.12 release by Tatu Ylonen.
67 --
68 2.3.2 (Apple Git-55)
69