History log of /freebsd-current/usr.sbin/lastlogin/lastlogin.c
Revision Date Author Comments
# c8573564 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: alt one-line .c pattern

Remove /^\s*__RCSID\("\$FreeBSD\$"\);\n/


# 427b88d7 28-Aug-2018 Philip Paeps <philip@FreeBSD.org>

Add libxo(3) support to lastlogin(8).

Reviewed by: kp
Approved by: re (gjb)
MFC after: 1 week
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D16919


# 1de7b4b8 27-Nov-2017 Pedro F. Giffuni <pfg@FreeBSD.org>

various: general adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

No functional change intended.


# 05c67f22 06-Jun-2011 Ed Schouten <ed@FreeBSD.org>

Allow custom files to be opened and allow sorting by timestamp.

While implementing a tool to import lastlog entries into utmpx, I
noticed lastlogin doesn't allow custom database files to be opened. Add
a -f switch to support this. Also, add -r and -t similar to ls(1),
ruptime(1), etc. where you can sort entries by timestamp and reverse
them. This allows you to spot active/idle users more easily.


# a7d5f7eb 19-Oct-2010 Jamie Gritton <jamie@FreeBSD.org>

A new jail(8) with a configuration file, to replace the work currently done
by /etc/rc.d/jail.


# 6d2b7c38 10-Apr-2010 Ed Schouten <ed@FreeBSD.org>

Don't forget to catch realloc() errors.


# aacd7d6a 10-Apr-2010 Ed Schouten <ed@FreeBSD.org>

Alphabetically sort the output of lastlogin(8).

According to the manpage, the entries have to be sorted by uid. This is
no longer possible, since our utmpx implementation is completely unaware
of user IDs. You can safely add entries for multiple users sharing the
same uid.

Make the output less random by sorting everything by name.


# d7f1607c 20-Mar-2010 Ed Schouten <ed@FreeBSD.org>

Chop off excessive long hostnames to keep the table structure intact.

This makes lastlogin(8) use exactly the same printf format as last(1).


# fe0506d7 09-Mar-2010 Marcel Moolenaar <marcel@FreeBSD.org>

Create the altix project branch. The altix project will add support
for the SGI Altix 350 to FreeBSD/ia64. The hardware used for porting
is a two-module system, consisting of a base compute module and a
CPU expansion module. SGI's NUMAFlex architecture can be an excellent
platform to test CPU affinity and NUMA-aware features in FreeBSD.


# 3c247358 24-Jan-2010 Ed Schouten <ed@FreeBSD.org>

Remove unneeded setpassent() calls.

lastlogin no longer requires the use of the passwd database.


# b5207b31 13-Jan-2010 Ed Schouten <ed@FreeBSD.org>

Port lastlogin(8) to utmpx.

While there, fix a bug I introduced previously. We must reopen the
database for each username passed on the command line. We must rewind
the database and search from the beginning.


# 10bc3a7f 29-Dec-2009 Ed Schouten <ed@FreeBSD.org>

ANSIfy almost all applications that use WARNS=6.

I was considering committing all these patches one by one, but as
discussed with brooks@, there is no need to do this. If we ever
need/want to merge these changes back, it is still possible to do this
per application.


# 444999a3 26-Dec-2009 Ed Schouten <ed@FreeBSD.org>

Several refinements to libulog's API.

- Only set the fields in the ulog_utmpx structure that are valid for the
command in question. This means that strings like "shutdown" or "~"
are not visible to the user anymore.
- Rename UTXF_* to UTXI_*, indicating the indexation, instead of using
the `antique' filename. If we ever get rid of utmp, it makes little
sense calling it by its old name.


# b486f606 09-Dec-2009 Ed Schouten <ed@FreeBSD.org>

Port lastlogin(1) to libulog.

Just use ulog_getutxuser() to obtain lastlog records or ulog_getutxent()
to browse through all of them.


# d7f03759 19-Oct-2008 Ulf Lilleengen <lulf@FreeBSD.org>

- Import the HEAD csup code which is the basis for the cvsmode work.


# d89167b4 11-Jul-2002 Alfred Perlstein <alfred@FreeBSD.org>

de-__P()


# db774d60 08-Jul-2002 Bruce Evans <bde@FreeBSD.org>

Fixed some world breakage caused by not updating clients when <timeconv.h>
was split off from <time.h>. This became fatal here when -Werror was
reenabled.


# 6a85a2d1 09-Jun-2002 Mike Barcroft <mike@FreeBSD.org>

Don't depend on <pwd.h> to bogusly include <sys/types.h>.


# 170ac683 19-Jan-2002 Matthew Dillon <dillon@FreeBSD.org>

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.


# 5e8a6141 28-Oct-2001 Matthew Dillon <dillon@FreeBSD.org>

Fix ctime(&int) due to change to lastlog->ll_time


# c8697171 24-Jun-2001 Dima Dorfman <dd@FreeBSD.org>

Include stdlib.h for exit(3).

Submitted by: Mike Barcroft <mike@q9media.com>


# fdd5d777 10-Dec-2000 Philippe Charnier <charnier@FreeBSD.org>

Remove unused #includes, duplicate $FreeBSD$ and $NetBSD$ definitions.

Reviewed by: Ruslan Ermilov <ru@FreeBSD.org>


# b3b01ff3 14-Nov-2000 Ruslan Ermilov <ru@FreeBSD.org>

Added the lastlogin utility.

Obtained from: NetBSD