看板 FB_bugs 關於我們 聯絡資訊
>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: _______________________________________________ freebsd-bugs@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-bugs To unsubscribe, send any mail to "freebsd-bugs-unsubscribe@freebsd.org"