From owner-freebsd-bugs Mon May 21 3:20: 7 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id BFFC537B424 for ; Mon, 21 May 2001 03:20:03 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f4LAK3I87657; Mon, 21 May 2001 03:20:03 -0700 (PDT) (envelope-from gnats) Date: Mon, 21 May 2001 03:20:03 -0700 (PDT) Message-Id: <200105211020.f4LAK3I87657@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Ruslan Ermilov Subject: Re: bin/27482: /var/log/wtmp is not updated on logout Reply-To: Ruslan Ermilov Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR bin/27482; it has been noted by GNATS. From: Ruslan Ermilov To: bug-followup@FreeBSD.org Cc: Subject: Re: bin/27482: /var/log/wtmp is not updated on logout Date: Mon, 21 May 2001 13:17:14 +0300 The following patch fixes at least the case where you: 1. login to a tty (1st wtmp `login' mark is then made) 2. execute /usr/bin/login and login again (2nd wtmp `login' mark) 3. leave the second login (wtmp `logout' mark isn't written) Index: last.c =================================================================== RCS file: /home/ncvs/src/usr.bin/last/last.c,v retrieving revision 1.10.6.2 diff -u -p -r1.10.6.2 last.c --- last.c 2001/03/04 08:39:25 1.10.6.2 +++ last.c 2001/05/21 10:10:35 @@ -309,13 +309,10 @@ wtmp() delta / 86400, width, width, ct + 11); } } - LIST_REMOVE(tt, list); - free(tt); if (maxrec != -1 && !--maxrec) return; - } else { - tt->logout = bp->ut_time; } + tt->logout = bp->ut_time; } } } This was first "broken" in last.c, rev.1.3. Cheers, -- Ruslan Ermilov Oracle Developer/DBA, ru@sunbay.com Sunbay Software AG, ru@FreeBSD.org FreeBSD committer, +380.652.512.251 Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message