Commit Graph

39 Commits

Author SHA1 Message Date
Simon J. Gerraty
d9a4274795 Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
Emmanuel Vadot
0c6b2a9179 pkgbase: Put accounting utilities in the acct package 2022-08-16 21:15:19 +02:00
Benedict Reuschling
6aca7aa44b A single comma was missing to separate the "see also" items in
last.1 and lastlogin.8. Add it back.

PR:		231187
Submitted by:	david.marec@davenulle.org
2018-10-20 17:22:04 +00:00
Philip Paeps
427b88d77e 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
2018-08-28 17:12:37 +00:00
Pedro F. Giffuni
1de7b4b805 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.
2017-11-27 15:37:16 +00:00
Bryan Drewery
ea825d0274 DIRDEPS_BUILD: Update dependencies.
Sponsored by:	Dell EMC Isilon
2017-10-31 00:07:04 +00:00
Simon J. Gerraty
ccfb965433 Add META_MODE support.
Off by default, build behaves normally.
WITH_META_MODE we get auto objdir creation, the ability to
start build from anywhere in the tree.

Still need to add real targets under targets/ to build packages.

Differential Revision:       D2796
Reviewed by: brooks imp
2015-06-13 19:20:56 +00:00
Simon J. Gerraty
44d314f704 dirdeps.mk now sets DEP_RELDIR 2015-06-08 23:35:17 +00:00
Simon J. Gerraty
fae50821ae Updated dependencies 2014-05-16 14:09:51 +00:00
Simon J. Gerraty
76b28ad6ab Updated dependencies 2014-05-10 05:16:28 +00:00
Simon J. Gerraty
7cf3a1c6b2 Updated dependencies 2013-03-11 17:21:52 +00:00
Simon J. Gerraty
f5f7c05209 Updated dependencies 2013-02-16 01:23:54 +00:00
Marcel Moolenaar
7750ad47a9 Sync FreeBSD's bmake branch with Juniper's internal bmake branch.
Requested by: Simon Gerraty <sjg@juniper.net>
2012-08-22 19:25:57 +00:00
Ed Schouten
05c67f2245 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.
2011-06-06 18:40:01 +00:00
Ed Schouten
6d2b7c381b Don't forget to catch realloc() errors. 2010-04-11 12:07:03 +00:00
Ed Schouten
aacd7d6afc 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.
2010-04-11 12:02:13 +00:00
Ed Schouten
d7f1607c6a Chop off excessive long hostnames to keep the table structure intact.
This makes lastlogin(8) use exactly the same printf format as last(1).
2010-03-20 09:29:25 +00:00
Ed Schouten
3c247358fe Remove unneeded setpassent() calls.
lastlogin no longer requires the use of the passwd database.
2010-01-24 14:29:40 +00:00
Ed Schouten
0806dd9238 Remove stale references to utmp(5) and its corresponding filenames.
I removed utmp and its manpage, but not other manpages referring to it.
2010-01-21 17:25:12 +00:00
Ed Schouten
b5207b31c4 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.
2010-01-13 18:17:12 +00:00
Ed Schouten
71ccf09269 The last big commit: let usr.sbin/ use WARNS=6 by default. 2010-01-02 11:07:44 +00:00
Ed Schouten
10bc3a7f42 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.
2009-12-29 22:53:27 +00:00
Ed Schouten
444999a314 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.
2009-12-26 22:36:05 +00:00
Ed Schouten
b486f60642 Port lastlogin(1) to libulog.
Just use ulog_getutxuser() to obtain lastlog records or ulog_getutxent()
to browse through all of them.
2009-12-09 20:05:37 +00:00
Ruslan Ermilov
07bfccd71e Mechanically kill hard sentence breaks. 2004-07-02 23:13:00 +00:00
Philippe Charnier
490d5836b5 The .Nm utility 2002-07-14 14:47:15 +00:00
Alfred Perlstein
d89167b4ea de-__P() 2002-07-11 18:31:16 +00:00
Bruce Evans
db774d6099 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.
2002-07-08 20:13:07 +00:00
Mike Barcroft
6a85a2d149 Don't depend on <pwd.h> to bogusly include <sys/types.h>. 2002-06-09 19:29:55 +00:00
Matthew Dillon
170ac683f2 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.
2002-01-19 23:20:02 +00:00
Matthew Dillon
5e8a6141be Fix ctime(&int) due to change to lastlog->ll_time 2001-10-29 00:40:05 +00:00
David E. O'Brien
90e655ea4e Perform a major cleanup of the usr.sbin Makefiles.
These are not perfectly in agreement with each other style-wise, but they
are orders of orders of magnitude more consistent style-wise than before.
2001-07-20 06:20:32 +00:00
Dima Dorfman
f6751868e4 Set WARNS=2 on programs that compile cleanly with it; add $FreeBSD$
where necessary.

Submitted by:	Mike Barcroft <mike@q9media.com>
2001-06-30 05:39:36 +00:00
Dima Dorfman
c869717158 Include stdlib.h for exit(3).
Submitted by:	Mike Barcroft <mike@q9media.com>
2001-06-24 20:05:30 +00:00
Ruslan Ermilov
345e52e742 - Backout botched attempt to introduce MANSECT feature.
- MAN[1-9] -> MAN.
2001-03-26 14:42:20 +00:00
Ruslan Ermilov
c73e22c3d4 Set the default manual section for usr.sbin/ to 8. 2001-03-20 18:17:26 +00:00
Ruslan Ermilov
d2d06762f9 mdoc(7) cosmetics.
Submitted by:	sheldonh
2000-12-11 10:18:32 +00:00
Philippe Charnier
fdd5d777dc Remove unused #includes, duplicate $FreeBSD$ and $NetBSD$ definitions.
Reviewed by:	Ruslan Ermilov <ru@FreeBSD.org>
2000-12-10 20:57:23 +00:00
Ruslan Ermilov
b3b01ff362 Added the lastlogin utility.
Obtained from:	NetBSD
2000-11-14 17:49:38 +00:00