From owner-cvs-all Mon May 28 2:57:24 2001 Delivered-To: cvs-all@freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 1784737B422; Mon, 28 May 2001 02:57:21 -0700 (PDT) (envelope-from ru@FreeBSD.org) Received: (from ru@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f4S9vLF43015; Mon, 28 May 2001 02:57:21 -0700 (PDT) (envelope-from ru) Message-Id: <200105280957.f4S9vLF43015@freefall.freebsd.org> From: Ruslan Ermilov Date: Mon, 28 May 2001 02:57:20 -0700 (PDT) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/usr.bin/last last.c X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG ru 2001/05/28 02:57:20 PDT Modified files: usr.bin/last last.c Log: The last(1) choked if there were two successive "login" marks found in wtmp(5) for the same TTY without in-between "logout" mark. This may be demonstrated by executing login(1), logging in and out, and watching the last(1) output on this TTY: : # last -tv7 -w : ru ttyv7 Mon May 28 12:46 - 12:46 (00:00:01) : ru ttyv7 Mon May 28 12:45 still logged in The fix merely takes the second "login" mark as the "logout" for the first "login" mark, if there were no "logout" mark in-between. This restores the behavior of last.c,v 1.2: : # last -tv7 -w : ru ttyv7 Mon May 28 12:46 - 12:46 (00:00:01) : ru ttyv7 Mon May 28 12:45 - 12:46 (00:00:25) Silence from: -arch, dg Revision Changes Path 1.18 +2 -5 src/usr.bin/last/last.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message