OpenBSD CVS

CVS log for src/usr.bin/last/last.c


[BACK] Up to [local] / src / usr.bin / last

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.54 / (download) - annotate - [select for diffs], Sun Oct 24 21:24:16 2021 UTC (2 years, 6 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, HEAD
Changes since 1.53: +2 -2 lines
Diff to previous 1.53 (colored)

For open/openat, if the flags parameter does not contain O_CREAT, the
3rd (variadic) mode_t parameter is irrelevant.  Many developers in the past
have passed mode_t (0, 044, 0644, or such), which might lead future people
to copy this broken idiom, and perhaps even believe this parameter has some
meaning or implication or application. Delete them all.
This comes out of a conversation where tb@ noticed that a strange (but
intentional) pledge behaviour is to always knock-out high-bits from
mode_t on a number of system calls as a safety factor, and his bewilderment
that this appeared to be happening against valid modes (at least visually),
but no sorry, they are all irrelevant junk.  They could all be 0xdeafbeef.
ok millert

Revision 1.53 / (download) - annotate - [select for diffs], Mon Jul 12 15:09:19 2021 UTC (2 years, 10 months ago) by beck
Branch: MAIN
CVS Tags: OPENBSD_7_0_BASE, OPENBSD_7_0
Changes since 1.52: +2 -2 lines
Diff to previous 1.52 (colored)

Change the error reporting pattern throughout the tree when unveil
fails to report the path that the failure occured on. Suggested by
deraadt@ after some tech discussion.

Work done and verified by Ashton Fagg <ashton@fagg.id.au>

ok deraadt@ semarie@ claudio@

Revision 1.52 / (download) - annotate - [select for diffs], Fri Jun 28 13:35:01 2019 UTC (4 years, 10 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.51: +3 -3 lines
Diff to previous 1.51 (colored)

When system calls indicate an error they return -1, not some arbitrary
value < 0.  errno is only updated in this case.  Change all (most?)
callers of syscalls to follow this better, and let's see if this strictness
helps us in the future.

Revision 1.51 / (download) - annotate - [select for diffs], Fri Aug 3 15:01:28 2018 UTC (5 years, 9 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4
Changes since 1.50: +6 -4 lines
Diff to previous 1.50 (colored)

pledge() a little later, after getopt operation, in case -f option changes
the filename.  We can then unveil that file, pledge() as before, and proceed
to parsing.

Revision 1.50 / (download) - annotate - [select for diffs], Thu Oct 29 03:00:31 2015 UTC (8 years, 6 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2, OPENBSD_6_1_BASE, OPENBSD_6_1, OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.49: +4 -1 lines
Diff to previous 1.49 (colored)

pledge "stdio rpath".

Revision 1.49 / (download) - annotate - [select for diffs], Thu Aug 20 22:32:41 2015 UTC (8 years, 9 months ago) by deraadt
Branch: MAIN
Changes since 1.48: +3 -3 lines
Diff to previous 1.48 (colored)

Do not cast result of malloc/calloc/realloc* if stdlib.h is in scope
ok krw millert

Revision 1.48 / (download) - annotate - [select for diffs], Sun Mar 15 00:41:28 2015 UTC (9 years, 2 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8
Changes since 1.47: +3 -2 lines
Diff to previous 1.47 (colored)

tzfile.h is an internal header that should never have been installed.
What's worse, the tzfile.h that gets installed is over 20 years old
and doesn't match the real tzfile.h in libc/time.  This makes the
tree safe for /usr/include/tzfile.h removal.  The TM_YEAR_BASE
define has been moved to time.h temporarily until its usage is
replaced by 1900 in the tree.  Actual removal of tzfile.h is pending
a ports build.  Based on a diff from deraadt@

Revision 1.47 / (download) - annotate - [select for diffs], Sat Mar 14 18:00:31 2015 UTC (9 years, 2 months ago) by deraadt
Branch: MAIN
Changes since 1.46: +3 -3 lines
Diff to previous 1.46 (colored)

use ctime_r to avoid a re-entrancy signal race
ok millert

Revision 1.46 / (download) - annotate - [select for diffs], Sun Feb 8 23:40:34 2015 UTC (9 years, 3 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.45: +3 -3 lines
Diff to previous 1.45 (colored)

in getopt() blocks, stop incrementing flag variable which are supposed
to just be 0/1
ok miod florian

Revision 1.45 / (download) - annotate - [select for diffs], Fri Jan 16 06:40:09 2015 UTC (9 years, 4 months ago) by deraadt
Branch: MAIN
Changes since 1.44: +3 -3 lines
Diff to previous 1.44 (colored)

Replace <sys/param.h> with <limits.h> and other less dirty headers where
possible.  Annotate <sys/param.h> lines with their current reasons.  Switch
to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc.  Change
MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where
sensible to avoid pulling in the pollution.  These are the files confirmed
through binary verification.
ok guenther, millert, doug (helped with the verification protocol)

Revision 1.44 / (download) - annotate - [select for diffs], Tue Dec 9 15:40:23 2014 UTC (9 years, 5 months ago) by tedu
Branch: MAIN
Changes since 1.43: +2 -2 lines
Diff to previous 1.43 (colored)

init crmsg to something so it doesn't crash on invalid wtmp files.
from david higgs

Revision 1.43 / (download) - annotate - [select for diffs], Wed Nov 26 18:34:51 2014 UTC (9 years, 5 months ago) by millert
Branch: MAIN
Changes since 1.42: +2 -2 lines
Diff to previous 1.42 (colored)

Prefer setvbuf() to setlinebuf() for portability; ok deraadt@

Revision 1.42 / (download) - annotate - [select for diffs], Tue Apr 22 12:36:36 2014 UTC (10 years ago) by okan
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.41: +13 -5 lines
Diff to previous 1.41 (colored)

Instead of special casing ftpd, uucpd and others that may have entries
in wtmp, go the other way and exclude entries we know ('console' and
'tty') from pid stripping, then strip the rest.

idea, feedback and ok millert@

Revision 1.41 / (download) - annotate - [select for diffs], Thu Apr 17 14:49:11 2014 UTC (10 years, 1 month ago) by okan
Branch: MAIN
Changes since 1.40: +3 -6 lines
Diff to previous 1.40 (colored)

remove special case for uucp entries.

ok guenther

Revision 1.40 / (download) - annotate - [select for diffs], Thu Apr 17 09:56:09 2014 UTC (10 years, 1 month ago) by guenther
Branch: MAIN
Changes since 1.39: +41 -49 lines
Diff to previous 1.39 (colored)

Correct some time_t printing; factor out a grotty block while here

Based on a diff from Arto Jonsson (ajonsson (at) kapsi.fi)
ok deraadt@

Revision 1.39 / (download) - annotate - [select for diffs], Thu Aug 22 04:43:40 2013 UTC (10 years, 8 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.38: +3 -3 lines
Diff to previous 1.38 (colored)

Correct format string mismatches turned up by -Wformat=2

suggestions and ok millert@

Revision 1.38 / (download) - annotate - [select for diffs], Mon Feb 18 10:40:12 2013 UTC (11 years, 3 months ago) by fgsch
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4, OPENBSD_5_3_BASE, OPENBSD_5_3
Changes since 1.37: +2 -1 lines
Diff to previous 1.37 (colored)

Fix after last commit: add missing header.
sthen@ ok.

Revision 1.37 / (download) - annotate - [select for diffs], Tue Feb 12 20:24:32 2013 UTC (11 years, 3 months ago) by lum
Branch: MAIN
Changes since 1.36: +3 -3 lines
Diff to previous 1.36 (colored)

Reflect the -f option in last's output. Original diff from Jacob L. Leifman.
Other feedback from Callum Davies and sthen@
ok mpi@ ian@ kettenis@

Revision 1.36 / (download) - annotate - [select for diffs], Tue Oct 27 23:59:39 2009 UTC (14 years, 6 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0, OPENBSD_4_9_BASE, OPENBSD_4_9, OPENBSD_4_8_BASE, OPENBSD_4_8, OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.35: +1 -14 lines
Diff to previous 1.35 (colored)

rcsid[] and sccsid[] and copyright[] are essentially unmaintained (and
unmaintainable).  these days, people use source.  these id's do not provide
any benefit, and do hurt the small install media
(the 33,000 line diff is essentially mechanical)
ok with the idea millert, ok dms

Revision 1.35 / (download) - annotate - [select for diffs], Fri May 1 10:38:17 2009 UTC (15 years ago) by chl
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6
Changes since 1.34: +3 -2 lines
Diff to previous 1.34 (colored)

add missing header needed by isdigit()

ok otto@ millert@ gilles@

Revision 1.34 / (download) - annotate - [select for diffs], Fri Oct 27 07:16:25 2006 UTC (17 years, 6 months ago) by jmc
Branch: MAIN
CVS Tags: OPENBSD_4_5_BASE, OPENBSD_4_5, OPENBSD_4_4_BASE, OPENBSD_4_4, OPENBSD_4_3_BASE, OPENBSD_4_3, OPENBSD_4_2_BASE, OPENBSD_4_2, OPENBSD_4_1_BASE, OPENBSD_4_1
Changes since 1.33: +4 -4 lines
Diff to previous 1.33 (colored)

- simplify and sort synopsis
- sort options
- some minor text tweaks
- sync usage()

Revision 1.33 / (download) - annotate - [select for diffs], Mon Nov 14 15:38:05 2005 UTC (18 years, 6 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_4_0_BASE, OPENBSD_4_0, OPENBSD_3_9_BASE, OPENBSD_3_9
Changes since 1.32: +95 -106 lines
Diff to previous 1.32 (colored)

fix fd leak; then i got a bit carried away making the code prettier

Revision 1.32 / (download) - annotate - [select for diffs], Fri Jul 1 02:10:24 2005 UTC (18 years, 10 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_8_BASE, OPENBSD_3_8
Changes since 1.31: +18 -14 lines
Diff to previous 1.31 (colored)

Replace numeric argument handling (e.g. last -30) with something that
can deal with mixer number and normal arguments, adapted from my code
in diff(1).  OK deraadt@

Revision 1.31 / (download) - annotate - [select for diffs], Wed Jun 16 22:30:08 2004 UTC (19 years, 11 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_7_BASE, OPENBSD_3_7, OPENBSD_3_6_BASE, OPENBSD_3_6
Changes since 1.30: +15 -8 lines
Diff to previous 1.30 (colored)

Add a new -n option that replaces the old -number option (which now
only exists for backwards compat).
Based on a diff from robert@; OK robert@ and deraadt@

Revision 1.30 / (download) - annotate - [select for diffs], Thu Jan 8 13:36:52 2004 UTC (20 years, 4 months ago) by otto
Branch: MAIN
CVS Tags: OPENBSD_3_5_BASE, OPENBSD_3_5
Changes since 1.29: +3 -3 lines
Diff to previous 1.29 (colored)

Fix uninitialized variable. From Ilya Voronin <ivoronin at trancom dot ru>

Revision 1.29 / (download) - annotate - [select for diffs], Sun Nov 9 20:13:57 2003 UTC (20 years, 6 months ago) by otto
Branch: MAIN
Changes since 1.28: +3 -3 lines
Diff to previous 1.28 (colored)

Typos in comments from Jared Yanovich <jjy2+ at pitt dot edu>

Revision 1.28 / (download) - annotate - [select for diffs], Thu Aug 14 21:02:09 2003 UTC (20 years, 9 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_3_4_BASE, OPENBSD_3_4
Changes since 1.27: +34 -35 lines
Diff to previous 1.27 (colored)

make 9-char login names not stretch the line; millert ok

Revision 1.27 / (download) - annotate - [select for diffs], Tue Jun 10 22:20:47 2003 UTC (20 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.26: +12 -23 lines
Diff to previous 1.26 (colored)

mostly ansi cleanup; pval ok

Revision 1.26 / (download) - annotate - [select for diffs], Tue Jun 3 02:56:09 2003 UTC (20 years, 11 months ago) by millert
Branch: MAIN
Changes since 1.25: +3 -7 lines
Diff to previous 1.25 (colored)

Remove the advertising clause in the UCB license which Berkeley
rescinded 22 July 1999.  Proofed by myself and Theo.

Revision 1.25 / (download) - annotate - [select for diffs], Thu May 29 17:21:39 2003 UTC (20 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.24: +8 -8 lines
Diff to previous 1.24 (colored)

avoid more signal races

Revision 1.24 / (download) - annotate - [select for diffs], Fri Apr 25 07:13:55 2003 UTC (21 years ago) by tedu
Branch: MAIN
Changes since 1.23: +3 -3 lines
Diff to previous 1.23 (colored)

minor tweak to error message, from Eric in pr3235

Revision 1.23 / (download) - annotate - [select for diffs], Mon Apr 14 02:04:58 2003 UTC (21 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.22: +6 -6 lines
Diff to previous 1.22 (colored)

fix time spec even better; emmf26@umr.edu

Revision 1.22 / (download) - annotate - [select for diffs], Sun Apr 6 18:40:14 2003 UTC (21 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.21: +21 -13 lines
Diff to previous 1.21 (colored)

make usage exactly like in the man page; andrushock@korovino.net

Revision 1.21 / (download) - annotate - [select for diffs], Sat Apr 5 16:24:59 2003 UTC (21 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.20: +7 -8 lines
Diff to previous 1.20 (colored)

simple snprintf and strlcpy; henning ok

Revision 1.20 / (download) - annotate - [select for diffs], Mon Sep 23 04:10:14 2002 UTC (21 years, 8 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_3_BASE, OPENBSD_3_3, OPENBSD_3_2_BASE, OPENBSD_3_2
Changes since 1.19: +3 -2 lines
Diff to previous 1.19 (colored)

Add missing includes, breaks and semicolons to appease gcc3; David Krause
deraadt@ OK

Revision 1.19 / (download) - annotate - [select for diffs], Sat Feb 16 21:27:47 2002 UTC (22 years, 3 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_1_BASE, OPENBSD_3_1
Changes since 1.18: +11 -11 lines
Diff to previous 1.18 (colored)

Part one of userland __P removal.  Done with a simple regexp with some minor hand editing to make comments line up correctly.  Another pass is forthcoming that handles the cases that could not be done automatically.

Revision 1.18 / (download) - annotate - [select for diffs], Mon Feb 4 17:40:59 2002 UTC (22 years, 3 months ago) by mickey
Branch: MAIN
Changes since 1.17: +31 -31 lines
Diff to previous 1.17 (colored)

fix a typo; from Sam Smith <S@mSmith.net>

Revision 1.17 / (download) - annotate - [select for diffs], Mon Nov 5 09:42:13 2001 UTC (22 years, 6 months ago) by deraadt
Branch: MAIN
Changes since 1.16: +3 -2 lines
Diff to previous 1.16 (colored)

mark a zone of signal races

Revision 1.16 / (download) - annotate - [select for diffs], Wed Jul 18 17:17:39 2001 UTC (22 years, 10 months ago) by pvalchev
Branch: MAIN
CVS Tags: OPENBSD_3_0_BASE, OPENBSD_3_0
Changes since 1.15: +7 -7 lines
Diff to previous 1.15 (colored)

-Wall cleanup

Revision 1.15 / (download) - annotate - [select for diffs], Thu Jul 12 05:17:13 2001 UTC (22 years, 10 months ago) by deraadt
Branch: MAIN
Changes since 1.14: +17 -16 lines
Diff to previous 1.14 (colored)

first pass at a -Wall cleanup

Revision 1.14 / (download) - annotate - [select for diffs], Tue Feb 6 22:10:09 2001 UTC (23 years, 3 months ago) by fgsch
Branch: MAIN
CVS Tags: OPENBSD_2_9_BASE, OPENBSD_2_9
Changes since 1.13: +3 -3 lines
Diff to previous 1.13 (colored)

Change host width to 24 so last produces one line per user; deraadt ok.

Revision 1.13 / (download) - annotate - [select for diffs], Wed Jan 31 17:42:26 2001 UTC (23 years, 3 months ago) by deraadt
Branch: MAIN
Changes since 1.12: +17 -14 lines
Diff to previous 1.12 (colored)

move utmp to large format, usernames to 32 chars; downsj

Revision 1.12 / (download) - annotate - [select for diffs], Tue Dec 12 09:16:03 2000 UTC (23 years, 5 months ago) by deraadt
Branch: MAIN
Changes since 1.11: +4 -4 lines
Diff to previous 1.11 (colored)

incorrect time specification; noted by sigh@kuzirabekon.econ.nagasaki-u.ac.jp

Revision 1.11 / (download) - annotate - [select for diffs], Mon Jul 13 02:11:33 1998 UTC (25 years, 10 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_2_8_BASE, OPENBSD_2_8, OPENBSD_2_7_BASE, OPENBSD_2_7, OPENBSD_2_6_BASE, OPENBSD_2_6, OPENBSD_2_5_BASE, OPENBSD_2_5, OPENBSD_2_4_BASE, OPENBSD_2_4
Changes since 1.10: +3 -3 lines
Diff to previous 1.10 (colored)

ftpd: sleep for an indeterminate amount for non-existant logins
      to simulate a crypt, like login does.
Use SEEK_* not L_* and kill some 0L's used in lseek while we're there.

Revision 1.10 / (download) - annotate - [select for diffs], Sat Apr 25 00:40:18 1998 UTC (26 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.9: +4 -3 lines
Diff to previous 1.9 (colored)

print year; mason@primenet.com.au

Revision 1.9 / (download) - annotate - [select for diffs], Tue Mar 10 00:50:40 1998 UTC (26 years, 2 months ago) by downsj
Branch: MAIN
CVS Tags: OPENBSD_2_3_BASE, OPENBSD_2_3
Changes since 1.8: +88 -31 lines
Diff to previous 1.8 (colored)

Add -c (for humans) and -s (for machines).

Revision 1.8 / (download) - annotate - [select for diffs], Mon Aug 25 23:11:12 1997 UTC (26 years, 8 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_2_BASE, OPENBSD_2_2
Changes since 1.7: +5 -4 lines
Diff to previous 1.7 (colored)

incorrect type for variable; enami@but-b.or.jp

Revision 1.7 / (download) - annotate - [select for diffs], Thu Aug 21 05:46:56 1997 UTC (26 years, 9 months ago) by deraadt
Branch: MAIN
Changes since 1.6: +77 -77 lines
Diff to previous 1.6 (colored)

correct [yy]yy stuff in manpages and usage

Revision 1.6 / (download) - annotate - [select for diffs], Fri Jul 25 02:23:34 1997 UTC (26 years, 10 months ago) by mickey
Branch: MAIN
Changes since 1.5: +37 -23 lines
Diff to previous 1.5 (colored)

-T to display seconds, from jhawk netbsd-pr#1548

Revision 1.5 / (download) - annotate - [select for diffs], Sun Jul 20 09:07:17 1997 UTC (26 years, 10 months ago) by jdm
Branch: MAIN
Changes since 1.4: +59 -11 lines
Diff to previous 1.4 (colored)

minor cleanup on the -d flag code

Revision 1.4 / (download) - annotate - [select for diffs], Sun Jul 20 07:54:09 1997 UTC (26 years, 10 months ago) by jdm
Branch: MAIN
Changes since 1.3: +116 -8 lines
Diff to previous 1.3 (colored)

add -d flag for reporting active sessions at a specified point in time.

Revision 1.3 / (download) - annotate - [select for diffs], Wed Jan 15 23:42:41 1997 UTC (27 years, 4 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_2_1_BASE, OPENBSD_2_1
Changes since 1.2: +3 -3 lines
Diff to previous 1.2 (colored)

getopt(3) returns -1 when out of args, not EOF, whee!

Revision 1.2 / (download) - annotate - [select for diffs], Wed Jun 26 05:34:51 1996 UTC (27 years, 10 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_0_BASE, OPENBSD_2_0
Changes since 1.1: +2 -1 lines
Diff to previous 1.1 (colored)

rcsid

Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Wed Oct 18 08:45:28 1995 UTC (28 years, 7 months ago) by deraadt
CVS Tags: netbsd_1_1
Changes since 1.1: +0 -0 lines
Diff to previous 1.1 (colored)

initial import of NetBSD tree

Revision 1.1 / (download) - annotate - [select for diffs], Wed Oct 18 08:45:28 1995 UTC (28 years, 7 months ago) by deraadt
Branch: MAIN

Initial revision

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.