From owner-freebsd-bugs@FreeBSD.ORG Fri May 23 06:40:01 2014 Return-Path: Delivered-To: freebsd-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 868176AD for ; Fri, 23 May 2014 06:40:01 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49CD62807 for ; Fri, 23 May 2014 06:40:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s4N6e1nf081718 for ; Fri, 23 May 2014 06:40:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s4N6e1Fr081717; Fri, 23 May 2014 06:40:01 GMT (envelope-from gnats) Resent-Date: Fri, 23 May 2014 06:40:01 GMT Resent-Message-Id: <201405230640.s4N6e1Fr081717@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Eugene Grosbein Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9802767A for ; Fri, 23 May 2014 06:37:24 +0000 (UTC) Received: from k-45-monitor.sd.rdtc.ru (k-45-monitor.sd.rdtc.ru [62.231.191.161]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 00A4B27F6 for ; Fri, 23 May 2014 06:37:23 +0000 (UTC) Received: from k-45-monitor.sd.rdtc.ru (localhost [127.0.0.1]) by k-45-monitor.sd.rdtc.ru (8.14.8/8.14.8) with ESMTP id s4N6aax5010980; Fri, 23 May 2014 13:36:37 +0700 (NOVT) (envelope-from eugen@k-45-monitor.sd.rdtc.ru) Received: (from eugen@localhost) by k-45-monitor.sd.rdtc.ru (8.14.8/8.14.8/Submit) id s4N6aZe8010970; Fri, 23 May 2014 13:36:35 +0700 (NOVT) (envelope-from eugen) Message-Id: <201405230636.s4N6aZe8010970@k-45-monitor.sd.rdtc.ru> Date: Fri, 23 May 2014 13:36:35 +0700 (NOVT) From: Eugene Grosbein To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.114 Subject: bin/190133: [patch] last(1) still mentiones non-existing wtmp X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 May 2014 06:40:01 -0000 >Number: 190133 >Category: bin >Synopsis: [patch] last(1) still mentiones non-existing wtmp >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri May 23 06:40:00 UTC 2014 >Closed-Date: >Last-Modified: >Originator: Eugene Grosbein >Release: FreeBSD 9.2-STABLE amd64 >Organization: RDTC JSC >Environment: System: FreeBSD k-45-monitor 9.2-STABLE FreeBSD 9.2-STABLE #24 r265054M: Mon May 5 20:04:48 NOVT 2014 root@k-45-monitor:/usr/obj/usr/local/src/sys/K-45-MONITOR amd64 >Description: Modern versions of FreeBSD moved from wtmp to utx.log and last(1) deals with utx.log but still prints "wtmp begins ..." at the end of output. Also, "last -f filename" does not affect this output but it should. >How-To-Repeat: Run "last". >Fix: --- usr.bin/last/last.c.orig 2013-06-18 14:52:57.000000000 +0700 +++ usr.bin/last/last.c 2014-05-23 13:29:24.000000000 +0700 @@ -229,8 +229,8 @@ wtmp(void) doentry(&buf[--amount]); tm = localtime(&t); - (void) strftime(ct, sizeof(ct), "\nwtmp begins %+\n", tm); - printf("%s", ct); + (void) strftime(ct, sizeof(ct), "\n%%s begins %+\n", tm); + printf(ct, file); } /* >Release-Note: >Audit-Trail: >Unformatted: