Commit Graph

29 Commits

Author SHA1 Message Date
wiz 930c6cf21c Sync usage with man page. 2020-05-07 12:52:40 +00:00
wiz a9c88f9a45 New sentence, new line. 2020-05-07 12:52:26 +00:00
kim 955964c1b9 Output records in original order
Append to the list of output records instead of pushing on it, so we
don't reverse the order of records (when not sorting).
2020-05-06 19:45:39 +00:00
kim b41a6df0d4 Use memcpy for copying out lastlog and lastlogx text
Lastlog and lastlogx text fields are not NUL-terminated when original data
is truncated.
2020-05-06 19:31:32 +00:00
kim 6f210b4518 If the passwd entry is not found for a lastlogx entry, cons up a fake
struct passwd where pw_name is the numeric uid in parentheses. This was
already implemented for lastlog entries in revision 1.13.

If -n is specified more than once, also print the user numerically
(ie, uid instead of username) for lastlog entries. This was already
implemented for lastlogx entries in revision 1.13.

Reorder the lastlogx host name numeric condition so it better matches
the user name numeric condition.
2020-05-06 13:47:39 +00:00
kim 45e7025978 Size output columns dynamically by default to fit contents. 2020-05-06 11:58:33 +00:00
joerg 12e6140314 __dead + ANSIfy 2011-08-31 13:31:29 +00:00
lukem ed9b940f4a Fix WARNS=4 (-Wshadow -Wcast-qual) 2009-04-16 05:59:56 +00:00
joerg cdea36b6f8 Fix markup. 2009-04-08 14:20:38 +00:00
atatat 26201c11b4 If the passwd entry is not found for a lastlog entry, cons up a fake
struct passwd where pw_name is the numeric uid in parentheses.

If -n is specified more than once, also print the user numerically
(ie, uid instead of username).
2005-04-09 02:13:20 +00:00
wiz d2a070c12b Prefer mdoc formatting to roff. 2005-03-04 16:10:00 +00:00
christos 6a39b4f823 PR/28904: Kimmo Suominen: Fix documentation deficiencies with respect to
lastlogx use.
2005-03-04 16:06:26 +00:00
martin 112b49392d Avoid a NULL pointer dereference. From Karim Ayad in PR bin/28958. 2005-01-14 07:41:34 +00:00
christos e1816fa337 Use sockaddr_snprintf() 2004-11-19 21:43:40 +00:00
he b659e3ae0f The size_t type isn't necessarily an int (on arm it's an unsigned int),
so add casts to int before using as a printf field width specifier.
2004-11-13 00:11:03 +00:00
wiz 1a496846ae Sort options, fix Xr, some nit fixes. 2004-11-12 02:39:21 +00:00
christos cd0f7573f1 Add support for lastlogx output. Unfortunately not many programs use it
yet.
2004-11-11 20:17:36 +00:00
wulf 4a58b169c3 Fixed a bug that made lastlogin ignore the first user argument 2003-12-16 15:40:29 +00:00
wiz 829e2cfa46 Bump date for last. 2003-08-28 18:55:16 +00:00
elric 6ab21fc010 Add sorting based on last login time via -t (most recent first a la ls(1)).
Add reverse of current sort via -r (like ls(1) as well.)
Add a couple of lines of documentation to the man page about the two new
options.
2003-08-28 15:54:41 +00:00
wiz 01497fccea Whitespace nits, use standard headers. 2002-01-19 03:20:56 +00:00
cgd 25bdbb661e convert to use getprogname() 2001-02-19 23:22:40 +00:00
matt 3ab02a8704 More #include <stdlib.h> string, etc. cleanup 2000-07-04 20:27:35 +00:00
garbled d1407362ba More and more .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages.  Many more to
come.
1999-03-22 18:43:46 +00:00
perry 34a98169f0 macroize BSD, NetBSD, FreeBSD and misc cleanup 1998-02-06 05:54:12 +00:00
perry a12002f43a change includes to fix compiler warning 1998-02-03 04:39:14 +00:00
lukem fcfec169df WARNSify 1997-10-17 10:18:36 +00:00
christos cc117ae3ac Don't keep trying getpwuid(0) when ll_time == 0! This brings down the
execution time from 5 minutes -> 1 second in our password file.
1997-03-27 17:25:49 +00:00
phil 38d6f43246 Import of lastlogin from John M. Vinopal, from PR #1932.
RCS ID changes from PR.  Updated man page for NetBSD 1.2 instead
of NetBSD 1.1.   If this program is merged with last(1), then
it will be removed.
1997-02-11 18:36:51 +00:00