Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 24 Aug 2002 19:49:10 -0700 (PDT)
From:      Peter Wemm <peter@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 16533 for review
Message-ID:  <200208250249.g7P2nAIn060087@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://people.freebsd.org/~peter/p4db/chv.cgi?CH=16533

Change 16533 by peter@peter_mckinley on 2002/08/24 19:48:32

	OK, timeconv.h is actually what I wanted.

Affected files ...

.. //depot/projects/ia64/lib/libpam/modules/pam_lastlog/pam_lastlog.c#9 edit

Differences ...

==== //depot/projects/ia64/lib/libpam/modules/pam_lastlog/pam_lastlog.c#9 (text+ko) ====

@@ -55,6 +55,7 @@
 #include <string.h>
 #include <syslog.h>
 #include <time.h>
+#include <timeconv.h>
 #include <unistd.h>
 #include <utmp.h>
 
@@ -110,7 +111,7 @@
 		goto file_err;
 	if ((flags & PAM_SILENT) == 0) {
 		if (read(fd, &ll, sizeof ll) == sizeof ll && ll.ll_time != 0) {
-			t = ll.ll_time;
+			t = _time32_to_time(ll.ll_time);
 			if (*ll.ll_host != '\0')
 				pam_info(pamh, "Last login: %.*s from %.*s",
 				    24 - 5, ctime(&t),
@@ -126,7 +127,7 @@
 
 	bzero(&ll, sizeof(ll));
 	time(&t);
-	ll.ll_time = t;
+	ll.ll_time = _time_to_time32(t);
 
 	/* note: does not need to be NUL-terminated */
 	strncpy(ll.ll_line, tty, sizeof(ll.ll_line));
@@ -144,7 +145,7 @@
 	 */
 	bzero(&utmp, sizeof(utmp));
 	time(&t);
-	utmp.ut_time = t;
+	utmp.ut_time = _time_to_time32(t);
 	/* note: does not need to be NUL-terminated */
 	strncpy(utmp.ut_name, user, sizeof(utmp.ut_name));
 	if (rhost != NULL)

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe p4-projects" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200208250249.g7P2nAIn060087>