Commit Graph

86 Commits

Author SHA1 Message Date
kim 2bdb47dc37 Add lastlogx support 2020-05-07 13:40:20 +00:00
sevan efbdbc2cd9 finish with a full stop 2020-01-30 23:59:59 +00:00
sevan e3670d570c Drop url which is now invalid, see CSRG archive or mirrors on TUHS.org or
svnweb.FreeBSD.org
2020-01-30 23:50:23 +00:00
abhinav 2faad91b8c Instead of saying "The finger displays information..." say "The finger utility"
(not sure if it was intentionally written like that :)

Also, add an xref to fingerd(8)
2016-12-22 12:39:40 +00:00
sevan 39bbc68a3b Drop main() prototype. 2016-09-05 00:40:28 +00:00
chs 8da07e54f6 in find_idle_and_ttywrite(), initialize idletime and writable to 0
when stat() fails.  this prevents a coredump later in stimeprint()
due to gmtime() returning NULL for an uninitialized idletime.
2016-03-09 16:12:14 +00:00
christos e9836e5e7e fix format 2015-11-21 15:22:17 +00:00
christos ad7787327b And correct it. 2014-12-26 12:45:57 +00:00
christos 1a965b8777 Correct the provenance of finger.1 and show the link that it was part of
2BSD (from Marcin F. Michalski)
2014-12-26 03:49:00 +00:00
christos b856a9b7db - Don't dump core or print random junk on corrupt utmp entries.
- Factor out duplicated code in the process.
- The actual code is now smaller and does error checking, and encoding.
2013-01-18 22:10:31 +00:00
dholland 089467b866 Fix description of -o option. Noted by Snader_LB on freenode. 2012-06-10 17:45:59 +00:00
lukem f8d0e3558c Fix WARNS=4 issues (-Wshadow, -Wcast-qual, -Wsign-compare) 2009-04-12 06:18:54 +00:00
lukem 98e5374ccb Remove the \n and tabs from the __COPYRIGHT() strings.
Tweak to use a consistent format.
2008-07-21 14:19:20 +00:00
tls 4147a3c54a Add new Makefile knob, USE_FORT, which extends USE_SSP by turning on the
FORTIFY_SOURCE feature of libssp, thus checking the size of arguments to
various string and memory copy and set functions (as well as a few system
calls and other miscellany) where known at function entry.  RedHat has
evidently built all "core system packages" with this option for some time.

This option should be used at the top of Makefiles (or Makefile.inc where
this is used for subdirectories) but after any setting of LIB.

This is only useful for userland code, and cannot be used in libc or in
any code which includes the libc internals, because it overrides certain
libc functions with macros.  Some effort has been made to make USE_FORT=yes
work correctly for a full-system build by having the bsd.sys.mk logic
disable the feature where it should not be used (libc, libssp iteself,
the kernel) but no attempt has been made to build the entire system with
USE_FORT and doing so will doubtless expose numerous bugs and misfeatures.

Adjust the system build so that all programs and libraries that are setuid,
directly handle network data (including serial comm data), perform
authentication, or appear likely to have (or have a history of having)
data-driven bugs (e.g. file(1)) are built with USE_FORT=yes by default,
with the exception of libc, which cannot use USE_FORT and thus uses
only USE_SSP by default.  Tested on i386 with no ill results; USE_FORT=no
per-directory or in a system build will disable if desired.
2007-05-28 12:06:17 +00:00
christos d0d49a5805 PR/36278: David A. Holland: hard-coded paths in finger 2007-05-05 16:55:17 +00:00
mrg 70daf20d05 no need to cast setlocale()'s return value. 2006-05-11 01:20:33 +00:00
christos e8877ca717 Coverity CID 1780, 1779: Fix memory leak. 2006-04-28 19:53:56 +00:00
rumble 0fe2cb9e42 Ensure that malloc does not return NULL before copying the buffer. 2006-03-17 04:53:55 +00:00
elad 9e505fa94b Fix two off-by-ones found by Coverity. 2006-03-17 01:55:31 +00:00
perry ee5c979c9f de-__P, ANSIfy prototypes, and kill register 2006-01-04 01:17:54 +00:00
lukem 7157011597 Only compile in IPv6 support if ${USE_INET6} != "no"
MKINET6 is for providing IPv6 infrastructure.
USE_INET6 is for compiling IPv6 support into the programs (needs MKINET6).
2005-01-10 02:58:58 +00:00
christos 81726ab7e3 Print the full pty name; reported by atatat 2004-11-16 04:52:46 +00:00
christos 692346d6f0 PR/28264: Miles Nordin: finger does not consult utmp if a username is specified 2004-11-12 21:48:58 +00:00
dsl 43371ff1ac Add (unsigned char) cast to ctype functions 2004-10-30 17:17:35 +00:00
kleink c6aa3261e7 Remove duplicate header inclusions; from Jeff Ito in PR bin/25797. 2004-06-03 18:33:57 +00:00
kleink cee29a73ab Remove a trailing blank line; from Jeff Ito in PR bin/25797. 2004-06-03 18:32:18 +00:00
agc 89aaa1bb64 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22365, verified by myself.
2003-08-07 11:13:06 +00:00
salo 0f5a0c156d netbsd.org->NetBSD.org 2003-07-26 20:34:11 +00:00
itojun 032ed69f9a strlcpy 2003-07-12 13:23:55 +00:00
simonb 276fd1665c The Double-Semi-Colon Police. 2003-01-20 05:29:53 +00:00
wiz 1035faff1d writable, not writeable. 2003-01-06 20:30:28 +00:00
grant be8ae688ae New sentence, new line. 2002-09-30 11:08:56 +00:00
lukem 5d4973fe97 makefile delint. use NETBSDSRCDIR as appropriate 2002-09-18 14:00:33 +00:00
wiz 1e2e8ea0ca Sort options. Bump date for -8 addition. 2002-09-12 10:06:12 +00:00
kim b3399fd721 Implement 8-bit pass-through. 2002-09-12 01:31:41 +00:00
kim dfb75c5ad4 Add back locale support for data display.
We only enable 8-bit output for known single-byte locales, currently
ISO8859-*.  For all other locales the program output is unchanged.

RFC-1288 recommends that administrators have a mechanism to enable
characters greater than ASCII 126.  A suggested solution is an
environment variable.  The environment variables of choice here are
LC_CTYPE and LANG.

Thanks to Martin Husemann <martin@duskware.de> for the idea on checking
for known single-byte locales, to Johan Danielsson <joda@pdc.kth.se> for
checking RFC-1288, and to Jun-ichiro itojun Hagino <itojun@iijlab.net>
for insisting on retaining security for multi-byte locales.

If you experience any problems with these changes, please send me email
describing the problem and how to repeat it.  I'd rather try to fix the
problem than have this change reverted.  Thanks!
2002-09-10 03:02:40 +00:00
christos 3d5da4cf52 don't limit username printing to UT_NAMESIZE 2002-08-20 14:02:45 +00:00
itojun f695b9ecd3 revert attempt to make finger locale-dependent. (1) locale dependent
daemon is a bad idea, (2) there's no standard in 8bit finger, (3) there's no
guarantee that finger/fingerd uses the same locale, (4) existing finger client
could scream.  see tech-userlevel.
2002-08-20 00:27:59 +00:00
kim 36df211313 Obey the locale settings of the user when deciding what characters are
valid for output.  If something bad gets printed, either the locale
settings for the user (or output terminal) are wrong, or the LC_CTYPE
definitions on the system are invalid.
2002-08-11 03:59:31 +00:00
kim b33db3215a Obey the locale settings of the user when deciding what characters are
valid for output.  If something bad gets printed, either the locale
settings for the user (or output terminal) are wrong, or the LC_CTYPE
definitions on the system are invalid.
2002-08-10 16:10:46 +00:00
tron 4fe0cc63d7 Undo accidental change. 2002-08-05 08:05:03 +00:00
tron a626c50944 Avoid segmentation fault if "finger @somehost" is used. 2002-08-05 08:04:03 +00:00
christos 8bff4369e7 support utmpx; no lastlogx support yet. 2002-08-02 00:10:40 +00:00
wiz c63ad27273 Note -g in usage. bin/16592 by Ryan Younce. 2002-05-02 13:04:10 +00:00
christos e5785ba616 fix nested extern 2001-02-05 01:56:51 +00:00
christos 8b325711d4 don't include extern.h here; every other file includes it. 2001-02-05 01:56:38 +00:00
itojun bbef2fbaac errx?/warnx? audit. do not pass variable alone, use %s. idea from openbsd 2000-07-07 15:10:32 +00:00
drochner 85cbf55d16 Since our gcc doesn't warn about NULL format strings anymore, we can
fix the incorrect err(1, "%s", "") et al.
Closes PR bin/7592 by cgd.
1999-11-09 15:06:30 +00:00
itojun 98a141cc3f dual-stack finger.
% finger itojun@::1
% finger itojun@127.0.0.1
% finger itojun@localhost
	tries all addresses listed on DNS, uses first one with successful
	connect(2).
1999-07-02 06:01:22 +00:00
garbled 9e44e9b578 More and more .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages.  Many more to
come.
1999-03-22 18:16:34 +00:00