1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
diff -ur putty.old/unix/pty.c putty/unix/pty.c
--- putty.old/unix/pty.c 2003-05-11 07:28:53.000000000 -0500
+++ putty/unix/pty.c 2004-05-07 10:03:44.174148128 -0500
@@ -106,7 +106,7 @@
strncpy(utmp_entry.ut_id, ttyname+8, lenof(utmp_entry.ut_id));
strncpy(utmp_entry.ut_user, pw->pw_name, lenof(utmp_entry.ut_user));
strncpy(utmp_entry.ut_host, location, lenof(utmp_entry.ut_host));
- time(&utmp_entry.ut_time);
+ utmp_entry.ut_time = time(NULL);
#if defined HAVE_PUTUTLINE
utmpname(UTMP_FILE);
@@ -147,7 +147,7 @@
utmp_entry.ut_type = DEAD_PROCESS;
memset(utmp_entry.ut_user, 0, lenof(utmp_entry.ut_user));
- time(&utmp_entry.ut_time);
+ utmp_entry.ut_time = time(NULL);
if ((wtmp = fopen(WTMP_FILE, "a")) != NULL) {
fwrite(&utmp_entry, 1, sizeof(utmp_entry), wtmp);
|