pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/misc/screen On sparc64 when I used the "w" command, th...
details: https://anonhg.NetBSD.org/pkgsrc/rev/5d7c82bd8e03
branches: trunk
changeset: 463880:5d7c82bd8e03
user: ben <ben%pkgsrc.org@localhost>
date: Mon Dec 01 15:18:27 2003 +0000
description:
On sparc64 when I used the "w" command, the screen logins had absurdly
large login and idle times. This was due to a bug in utmp.c:
in os.h
-------
# define utmp utmpx
# define ut_time ut_xtime
in utmp.c::makeuser()
---------------------
struct utmp *u;
(void)time((time_t *)&u->ut_time);
The above works fine on i386 where ut_xtime and time_t are the same size,
but on sparc64 ut_xtime is 8 bytes rather than 4.
This fix was tested on i386 and sparc64.
diffstat:
misc/screen/Makefile | 4 ++--
misc/screen/distinfo | 4 ++--
misc/screen/patches/patch-al | 20 +++++++++++++++++++-
3 files changed, 23 insertions(+), 5 deletions(-)
diffs (62 lines):
diff -r 2c1eb418e88a -r 5d7c82bd8e03 misc/screen/Makefile
--- a/misc/screen/Makefile Mon Dec 01 15:07:03 2003 +0000
+++ b/misc/screen/Makefile Mon Dec 01 15:18:27 2003 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.49 2003/11/27 20:29:48 wiz Exp $
+# $NetBSD: Makefile,v 1.50 2003/12/01 15:18:27 ben Exp $
DISTNAME= screen-4.0.1
-PKGREVISION= 1
+PKGREVISION= 2
CATEGORIES= misc
MASTER_SITES= ftp://ftp.uni-erlangen.de/pub/utilities/screen/ \
${MASTER_SITE_GNU:=screen/}
diff -r 2c1eb418e88a -r 5d7c82bd8e03 misc/screen/distinfo
--- a/misc/screen/distinfo Mon Dec 01 15:07:03 2003 +0000
+++ b/misc/screen/distinfo Mon Dec 01 15:18:27 2003 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.15 2003/11/27 20:29:48 wiz Exp $
+$NetBSD: distinfo,v 1.16 2003/12/01 15:18:27 ben Exp $
SHA1 (screen-4.0.1.tar.gz) = 61f24b18c56b5862c769345d204f57b1e7f222ab
Size (screen-4.0.1.tar.gz) = 837445 bytes
@@ -9,7 +9,7 @@
SHA1 (patch-ai) = a3d2c7d2ef3db9deb7a5e70ed7f906efd3196af6
SHA1 (patch-aj) = 8aa5c79e483e500ca9b3ed978835bbf1a866a5dc
SHA1 (patch-ak) = 1e83c3406fb862e15f0fd5b90da8cf5310fbb68b
-SHA1 (patch-al) = 2f042d43030a9166f4c1bf19e4d473d1031aba4e
+SHA1 (patch-al) = 6ee93058847f3894a886346676e4a613c0bd134e
SHA1 (patch-am) = 5fdc32f33ebbb5385292919f6cd01bedc30491d9
SHA1 (patch-an) = 9c5f451edb228f10daf593eba79f1fb11b4ffb24
SHA1 (patch-ao) = 81b0d64dd5918cd4d6fbc02dff0470a441a200d4
diff -r 2c1eb418e88a -r 5d7c82bd8e03 misc/screen/patches/patch-al
--- a/misc/screen/patches/patch-al Mon Dec 01 15:07:03 2003 +0000
+++ b/misc/screen/patches/patch-al Mon Dec 01 15:18:27 2003 +0000
@@ -1,4 +1,4 @@
-$NetBSD: patch-al,v 1.1 2002/09/15 06:51:39 kim Exp $
+$NetBSD: patch-al,v 1.2 2003/12/01 15:18:27 ben Exp $
Make extra calls to remove utmp entries when utmpx is used.
For non-login entries we only update utmpx, as it stores
@@ -39,3 +39,21 @@
if (utmpok && D_loginslot != (slot_t)0 && D_loginslot != (slot_t)-1)
{
debug1(" logging you in again (slot %#x)\n", (int)D_loginslot);
+@@ -604,6 +616,7 @@
+ char *line, *user;
+ int pid;
+ {
++ time_t temp;
+ u->ut_type = USER_PROCESS;
+ strncpy(u->ut_user, user, sizeof(u->ut_user));
+ /* Now the tricky part... guess ut_id */
+@@ -618,7 +631,8 @@
+ #endif /* sgi */
+ strncpy(u->ut_line, line, sizeof(u->ut_line));
+ u->ut_pid = pid;
+- (void)time((time_t *)&u->ut_time);
++ (void)time(&temp);
++ u->ut_time = temp;
+ }
+
+ static slot_t
Home |
Main Index |
Thread Index |
Old Index