ping? ALL feedback is welcome :-)
--- Forwarded message follows ---
From: "Jacob L. Leifman"
To: tech@openbsd.org
Date sent: Fri, 25 Jan 2013 18:34:55 -0500
The last(1) utility allows for an alternate data file to be specified
with -f switch which is particularly useful for reviewing rotated
versions of wtmp or forensic analysis.
What I found distracting (and made me briefly think it was not working)
is that regardless this specification, at the end last(1) always prints
"wtmp begins ..." because this name is hardcoded in the output.
Below is a quick-and-dirty patch to use the actual name of the data
file. The "dirty" refers to the fact that it prints the full pathname
(e.g. /var/log/wtmp) even in the most common use case when all defaults
are used. Although this may be objectionable under the doctrine of
least change, I also see a potential benefit that it will always
indicate the source of the data in an unambiguous manner.
--- last.c.orig Thu Oct 29 00:33:55 2009
+++ last.c Fri Jan 25 18:20:10 2013
@@ -407,7 +407,7 @@
asctime(gmtime(&total))+11);
}
ct = ctime(&buf[0].ut_time);
- printf("\nwtmp begins %10.10s %*.*s %4.4s\n", ct, timesize,
timesize,
+ printf("\n%s begins %10.10s %*.*s %4.4s\n", file, ct, timesize,
timesize,
ct + 11, ct + 20);
}
--- End of forwarded message ---
WPM$4FA7.PM$
Description: Mail message body