1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
$NetBSD: patch-af,v 1.4 2002/09/30 21:20:06 martin Exp $
--- src/logging.c.orig Mon Sep 30 22:44:27 2002
+++ src/logging.c Mon Sep 30 23:00:46 2002
@@ -130,6 +130,17 @@
void
rxvt_update_lastlog(const char *fname, const char *pty, const char *host)
{
+# ifdef RXVT_UTMP_AS_UTMPX
+ struct lastlogx ll;
+ char filename[FILENAME_MAX];
+
+ MEMSET(&ll, 0, sizeof(ll));
+ gettimeofday(&ll.ll_tv, NULL);
+ STRNCPY(ll.ll_line, pty, sizeof(ll.ll_line));
+ STRNCPY(ll.ll_host, host, sizeof(ll.ll_host));
+
+ updlastlogx(RXVT_UTMPX_FILE, geteuid(), &ll);
+# else
# ifdef HAVE_STRUCT_LASTLOG
int fd;
struct passwd *pwent;
@@ -165,6 +176,7 @@
}
# endif /* LASTLOG_IS_DIR */
# endif /* HAVE_STRUCT_LASTLOG */
+# endif /* RXVT_UTMP_AS_UTMPX */
}
#endif /* LASTLOG_SUPPORT */
/* ------------------------------------------------------------------------- */
|