#
351925 |
|
06-Sep-2019 |
eugen |
MFC r351413,351459,351467: unbreak last(1) for 8-bit locales
Ouput format of last's broken for non UTF-8 locales since it got libxo(3) support. It uses strftime(3) that produces non UTF-8 strings passed to xo_emit(3) with wrong %s format - it should be %hs in this case, so xo_emit(3) produces empty output.
This change is basically no-op when locale is of UTF-8 type, f.e. en_GB.UTF-8 or ru_RU.UTF-8 or sr_RS.UTF-8@latin. Also it is no-op for C/POSIX locale that's a subset of UTF-8.
It fixes output for other locales.
|
#
338451 |
|
04-Sep-2018 |
philip |
MFC r319508: Fix a memory leak with last free memory allocated to 'buf'
Submitted by: Thomas Rix <trix@juniper.net>
MFC r338352: Add libxo(3) support to last(1).
|
#
331722 |
|
29-Mar-2018 |
eadler |
Revert r330897:
This was intended to be a non-functional change. It wasn't. The commit message was thus wrong. In addition it broke arm, and merged crypto related code.
Revert with prejudice.
This revert skips files touched in r316370 since that commit was since MFCed. This revert also skips files that require $FreeBSD$ property changes.
Thank you to those who helped me get out of this mess including but not limited to gonzo, kevans, rgrimes.
Requested by: gjb (re)
|
#
330897 |
|
14-Mar-2018 |
eadler |
Partial merge of the SPDX changes
These changes are incomplete but are making it difficult to determine what other changes can/should be merged.
No objections from: pfg
|
#
302408 |
|
07-Jul-2016 |
gjb |
Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle. Prune svn:mergeinfo from the new branch, as nothing has been merged here.
Additional commits post-branch will follow.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation |
#
285742 |
|
21-Jul-2015 |
ed |
Unbreak "last reboot".
According to the last(1) man page, the "reboot" pseudo-user should print all system reboot entries. This got broken by the utmpx import, as records are typed.
Re-add support for "last reboot" by specifically matching against SHUTDOWN_TIME and BOOT_TIME records.
PR: 168844 Submitted by: matthew@ MFC after: 1 month
|
#
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)
|
#
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
|
#
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.
|
#
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.
|
#
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
|
#
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).
|
#
92920 |
|
21-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.
|
#
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 |
|
28-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>
|
#
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 |
|
27-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
|
#
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
|
#
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
|
#
36434 |
|
27-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.
|
#
1590 |
|
27-May-1994 |
rgrimes |
BSD 4.4 Lite Usr.bin Sources
|