History log of /freebsd-10.0-release/usr.bin/last/
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
259065 07-Dec-2013 gjb

- Copy stable/10 (r259064) to releng/10.0 as part of the
10.0-RELEASE cycle.
- Update __FreeBSD_version [1]
- Set branch name to -RC1

[1] 10.0-CURRENT __FreeBSD_version value ended at '55', so
start releng/10.0 at '100' so the branch is started with
a value ending in zero.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


240506 14-Sep-2012 eadler

Bump date missed in r202756

PR: docs/171624
Submitted by: bdrewery
Approved by: gabor
MFC after: 3 days


240425 12-Sep-2012 ed

Switch batch to an SLIST.

This code requires none of the features of LIST.


230458 22-Jan-2012 hrs

- Replace "wtmp" with "utx.log" because last(1) no longer reads wtmp.
- A real filename is now shown in an output report when "-f file" is specified.
- Add Xr lastlogin into last(1) manual page.

Reviewed by: ed
MFC after: 1 week


227168 06-Nov-2011 ed

Add missing static keywords to last(1)


226361 14-Oct-2011 ed

Build last(1) and leave(1) with WARNS=6.

These ports were only built with WARNS=1, because they use certain
format extensions. We can use NO_WFORMAT for that instead.


216370 11-Dec-2010 joel

Remove the advertising clause from UCB copyrighted files in usr.bin. This
is in accordance with the information provided at
ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change

Also add $FreeBSD$ to a few files to keep svn happy.

Discussed with: imp, rwatson


202756 21-Jan-2010 ed

Remove stale references to utmp(5) and its corresponding filenames.

I removed utmp and its manpage, but not other manpages referring to it.


202643 19-Jan-2010 ed

Make last(1) display the full log file.

I must have misread when I ported the original last(1) source code.
Instead of only processing the last 1024 entries, it reads them in in
chucks of 1024 entries at a time.

Unfortunately we cannot walk through the log file in reverse order,
which means we have to allocate a piece of memory to hold all the
entries. Call realloc() for each 128 entries we read.

Reported by: Andrzej Tobola <ato iem pw edu pl>


202197 13-Jan-2010 ed

Port last(1) to use utmpx.

Basically there are three major things I changed about last(1):

- It should use ut_type instead of determining by hand what type of
record was given.
- It should now keep track of ut_id's instead of TTYs. This means the
ttylist has been renamed to the idlist, storing all the ut_id's it has
processed until the next reboot.
- I've removed the signal handler. Because our wtmp is rotated so often,
it makes little sense. Even on a simple piece of hardware it should be
capable of grinding through megabytes of logs in a second.


201386 02-Jan-2010 ed

Build usr.bin/ with WARNS=6 by default.

Also add some missing $FreeBSD$ to keep svn happy.


141846 13-Feb-2005 ru

Expand *n't contractions.


140420 18-Jan-2005 ru

Sort sections.


133332 08-Aug-2004 dwmalone

s/FALLTHOUGH/FALLTHROUGH/

Submitted by: Xin LI <delphij@frontfree.net>


125856 15-Feb-2004 dwmalone

Include timeconv.h for _int_to_time and _time_to_int.


119024 17-Aug-2003 tjr

Tidy up synopsis.


119023 17-Aug-2003 tjr

Tidy up usage message.


118077 27-Jul-2003 tjr

Add the -n maxrec option as an alias for -maxrec for compatibility with
System V and consistency with other utilities. Document the new form
instead of the old form in the manual page.

PR: 54661


106215 30-Oct-2002 mux

Fix core dumps when invoking with something like ``last -w1''.

PR: bin/44583
Reported by: Amit Chakradeo <sdbug@spam.chakradeo.net>
MFC after: 3 days


102944 04-Sep-2002 dwmalone

ANSIify function definitions.
Add some constness to avoid some warnings.
Remove use register keyword.
Deal with missing/unneeded extern/prototypes.
Some minor type changes/casts to avoid warnings.

Reviewed by: md5


100440 21-Jul-2002 charnier

s/A last utility last appeared/A last utility appeared/ (horikawa).
Use .Pa for wtmp.

Submitted by: horikawa


99112 30-Jun-2002 obrien

Consistently use FBSDID


96785 17-May-2002 jmallett

Clean up malloc(3)'s argument. Remove casts which do nothing when we're
using sizeof() anyway. Use slightly more consistent (per-file) error
reporting for malloc(3) returning NULL. If "malloc failed" was being printed,
don't use err(3). If a NULL format is being used, use err(3). In one case
errx(3) was being used with strerror(3), so just use err(3).


95124 20-Apr-2002 charnier

Use `The .Nm utility'


92920 22-Mar-2002 imp

remove __P


91541 01-Mar-2002 iedowse

Add a new "-y" flag which causes the year to be included in the
session start time. This is useful when looking at old or long-running
wtmp files.

PR: bin/12982
Obtained from: KOJIMA Hajime <kjm@rins.ryukoku.ac.jp>, keramida
Reviewed by: keramida
MFC after: 1 week


91538 01-Mar-2002 iedowse

Oops, unbreak the -d and -<n> options. The `snapfound' variable
needs to be retained across entries, and we need to exit(), not
return from doentry() when `maxrec' reaches 0. Move the code for
processing `maxrec' into printentry() for simplicity.


91536 01-Mar-2002 iedowse

Split up the big wtmp() function to avoid long lines and code
duplication.


90415 08-Feb-2002 markm

Remove leaf node WARNS?=2 (that mainly I added). This should
help the GCC3 transition and CURRENT in general.


89572 19-Jan-2002 dillon

I've been meaning to do this for a while. Add an underscore to the
time_to_xxx() and xxx_to_time() functions. e.g. _time_to_xxx()
instead of time_to_xxx(), to make it more obvious that these are
stopgap functions & placemarkers and not meant to create a defacto
standard. They will eventually be replaced when a real standard
comes out of committee.


85648 29-Oct-2001 dillon

localtime() was being called on an int pointer (due to recent
utmp-related commits). fixed.


81161 05-Aug-2001 dd

Document -d in usage.

Submitted by: Martin Kammerhofer <mkamm@sbox.tu-graz.ac.at>


79535 10-Jul-2001 ru

mdoc(7) police: removed HISTORY info from the .Os call.


79275 05-Jul-2001 ru

mdoc(7) police: add missing .Ar in SYNOPSIS.


78201 14-Jun-2001 dd

Silence warnings and minor style fixes. Mostly constify and don't
assume that time_t is a long. Clamp down with WARNS=2.

Not objected to by: -audit


77328 28-May-2001 ru

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


77291 28-May-2001 dd

Implement snapshots. The new -d option allows the user to find out
who was logged in at a certain time and date.

Obtained from: OpenBSD


76014 26-Apr-2001 dd

mdoc(7) police: remove hard sentence breaks.


74588 21-Mar-2001 ache

Don't attempt to parse %c


70467 29-Dec-2000 phk

Used macro-API to <sys/queue.h>.

Submitted by: ben


68963 20-Nov-2000 ru

mdoc(7) police: use the new features of the Nm macro.


65428 04-Sep-2000 imp

getopt and friends are declared in <unistd.h>
getopt returns -1 not EOF.


62871 10-Jul-2000 kris

Don't call printf with no format string.


60938 26-May-2000 jake

Back out the previous change to the queue(3) interface.
It was not discussed and should probably not happen.

Requested by: msmith and others


60833 23-May-2000 jake

Change the way that the queue(3) structures are declared; don't assume that
the type argument to *_HEAD and *_ENTRY is a struct.

Suggested by: phk
Reviewed by: phk
Approved by: mdodd


57670 01-Mar-2000 sheldonh

Remove single-space hard sentence breaks. These degrade the quality
of the typeset output, tend to make diffs harder to read and provide
bad examples for new-comers to mdoc.


50477 28-Aug-1999 peter

$Id$ -> $FreeBSD$


48792 12-Jul-1999 nik

Add $Id$, to make it simpler for members of the translation teams to
track.

The $Id$ line is normally at the bottom of the main comment block in the
man page, separated from the rest of the manpage by an empty comment,
like so;

.\" $Id$
.\"

If the immediately preceding comment is a @(#) format ID marker than the
the $Id$ will line up underneath it with no intervening blank lines.
Otherwise, an additional blank line is inserted.

Approved by: bde


36434 28-May-1998 danny

Reviewed by: Peter Hawkins <thepish@FreeBSD.org>
Add s and w flags to show duration in or with seconds.


36062 15-May-1998 jb

Change variable from long to time_t where they are passed by reference
to time().


35658 03-May-1998 steve

Add the year to the 'wtmp begins...' line.

PR: 6421
Submitted by: phk


24360 29-Mar-1997 imp

compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.


20158 05-Dec-1996 ache

Remove one space to produce the same output alignment
like in who, rwho, w, etc.


19223 28-Oct-1996 joerg

Don't dereference a free()ed pointer.

Closes PR bin/1909: 'last' coredumps if MALLOC_OPTIONS...


16438 17-Jun-1996 ache

Localize time


11547 17-Oct-1995 dg

Fixed a bug that caused last(1) to be extremely slow in some cases, and
made other performance improving changes. This improves the performance
of last(1) by as much as 32 times in some cases, and in more typical cases
is about twice as fast.
Added a BUGS section to the manual page to describe the behavior of last(1)
when a login shell terminates abnormally (and thus doesn't write a logout
record to the wtmp file).


9987 07-Aug-1995 wollman

Delete bogus referneces to timezone code internal header file `tzfile.h',
which is no longer bogusly installed in /usr/include.


1591 27-May-1994 rgrimes

This commit was generated by cvs2svn to compensate for changes in r1590,
which included commits to RCS files with non-trunk default branches.