lastlog broken?

Archaic archaic at
Mon Mar 21 22:05:57 PST 2005

On Mon, Mar 21, 2005 at 12:02:45PM -0800, Jim Gifford wrote:
> Archaic,
>    Try this patch.

That patch did the job.

Here is an LFS'd version of the patch. The above doesn't apply due to a
timestamp in the patch.

I'm CC'ing hlfs-dev as I think both books should include it. I've just
committed it to the patches repo.


Want control, education, and security from your operating system?
Hardened Linux From Scratch

-------------- next part --------------
Submitted By: Archaic <archaic at linuxfromscratch dot org>
Date: 2005-03-22
Initial Package Version: 4.0.7
Upstream Status: Already in CVS
Description: Shadow fails to update the time of last login as noted by lastlog
when logging into a regular console. The Port (tty) column does get updated.
Remote logins and xterm logins seem to be not be broken, just console.

diff -Naur shadow-4.0.7.orig/libmisc/log.c shadow-4.0.7/libmisc/log.c
--- shadow-4.0.7.orig/libmisc/log.c	2003-12-17 12:52:25.000000000 +0000
+++ shadow-4.0.7/libmisc/log.c	2005-03-22 05:53:59.000000000 +0000
@@ -89,6 +89,7 @@
 	ll_time = newlog.ll_time;
 	time (&ll_time);
+	newlog.ll_time = ll_time;
 	strncpy (newlog.ll_line, line, sizeof newlog.ll_line);
 	strncpy (newlog.ll_host, host, sizeof newlog.ll_host);

More information about the hlfs-dev mailing list