Resend: loginrec.c patch

Wayne Davison wayned at users.sourceforge.net
Wed Aug 22 04:00:43 EST 2001


I'm resending this patch just in case it got lost.

The first hunk of the patch fixes a problem with the LOGIN_NEEDS_UTMPX
support in that the date was not being set in the logininfo structure
(causing wrong timestamps in the "last" log).

The second hunk just omits the USE_WTMPX code in the LOGIN_NEEDS_UTMPX
section if USE_UTMPX is defined.  This prevents duplicate events in the
last log under Solaris.

Neither of these changes affect the non-LOGIN_NEEDS_UTMPX code.

..wayne..

---8<------8<------8<------8<---cut here--->8------>8------>8------>8---
Index: loginrec.c
--- loginrec.c	2001/08/06 23:29:17	1.34
+++ loginrec.c	2001/08/21 17:53:43
@@ -448,6 +448,8 @@
 login_utmp_only(struct logininfo *li)
 {
 	li->type = LTYPE_LOGIN;
+	/* set the timestamp */
+	login_set_current_time(li);
 # ifdef USE_UTMP
 	utmp_write_entry(li);
 # endif
@@ -456,9 +458,10 @@
 # endif
 # ifdef USE_UTMPX
 	utmpx_write_entry(li);
-# endif
-# ifdef USE_WTMPX
+# else
+#  ifdef USE_WTMPX
 	wtmpx_write_entry(li);
+#  endif
 # endif
 	return 0;
 }
---8<------8<------8<------8<---cut here--->8------>8------>8------>8---




More information about the openssh-unix-dev mailing list