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
|
$NetBSD: patch-ah,v 1.1 2005/07/07 13:30:07 markd Exp $
--- gnome-pty-helper/gnome-utmp.c.orig 2004-05-01 19:12:51.000000000 +1200
+++ gnome-pty-helper/gnome-utmp.c
@@ -242,6 +242,9 @@ write_logout_record (void *data, int utm
#if defined(HAVE_UT_UT_ID)
strncpy (put.ut_id, ut->ut_id, sizeof (put.ut_id));
#endif
+#if defined(HAVE_UT_UT_NAME)
+ strncpy (put.ut_name, ut->ut_name, sizeof (put.ut_name));
+#endif
strncpy (put.ut_line, ut->ut_line, sizeof (put.ut_line));
@@ -254,6 +257,10 @@ write_logout_record (void *data, int utm
if (utmp)
update_utmp (&put);
+#if defined(HAVE_UT_UT_NAME)
+ memset (put.ut_name, 0, sizeof (put.ut_name));
+#endif
+
if (wtmp)
update_wtmp (WTMP_OUTPUT_FILENAME, &put);
|