Commit Graph

29 Commits

Author SHA1 Message Date
Pedro F. Giffuni
8a16b7a18f General further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 3-Clause license.

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.

Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.
2017-11-20 19:49:47 +00:00
Warner Losh
fbbd9655e5 Renumber copyright clause 4
Renumber cluase 4 to 3, per what everybody else did when BSD granted
them permission to remove clause 3. My insistance on keeping the same
numbering for legal reasons is too pedantic, so give up on that point.

Submitted by:	Jan Schaumann <jschauma@stevens.edu>
Pull Request:	https://github.com/freebsd/freebsd/pull/96
2017-02-28 23:42:47 +00:00
Kurt Lidl
6e786098f2 Do not truncate office phones in finger's summary listing
When finger is invoked as as "finger username", it produces the
long listing by default, and phones numbers are pretty-printed
by the prphone() function. When invoked as just "finger", the
same pretty-printing happens, but is truncated at 9 characters.
Given the summary listing is already greater than 80 columns,
making it even wider is of no harm.

Approved by:	rpaulo (mentor)
Differential Revision:	https://reviews.freebsd.org/D5638
2016-03-14 22:20:22 +00:00
Joel Dahl
da52b4caaf 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
2010-12-11 08:32:16 +00:00
Ed Schouten
550dcc5960 Migrate finger(1) towards utmpx.
It was already ported to use libulog, which makes it simpler now. Be
sure to catch the error returned by setutxdb(). Otherwise it may perform
a lookup on the utx.active database.
2010-01-13 17:50:58 +00:00
Ed Schouten
70ad88f354 Migrate finger(1) away from <utmp.h>.
Unfortunately it also uses lastlog, which means we must resort to local
extensions of the utmpx-interface. Because the user name and TTY name
are now nul-terminated, there is no need to copy around strings as
often.
2009-12-28 20:54:34 +00:00
Robert Watson
e0f5d997de Reduce number of spaces for full name by four, and reduce padding
after tty entry by one space in order to provide extra spaces for
the tty entry.  As a result, full pts names are now visible (up
to 999 pts's anyway):

Before:
Login            Name                 TTY  Idle  Login  Time   Office  Phone
robert           Robert Watson       *v0   3:55  Fri    02:54
robert           Robert Watson        p0     19  Sat    11:01
robert           Robert Watson        pts        Sat    14:55

After:

Login            Name             TTY      Idle  Login  Time   Office  Phone
robert           Robert Watson   *v0       5:08  Fri    02:54
robert           Robert Watson    p0          8  Sat    11:01
robert           Robert Watson    pts/5          Sat    14:55

MFC after:	1 week
2006-03-04 16:13:16 +00:00
Robert Watson
7d7d429762 If stat() on the terminal specified in utmp fails due to ENOENT, don't
print a warning, and set the idletime variable for the entry to -1;
then pick up the -1 later in sprint() and lprint() and ignore those
idle times by printing just whitespace.  When third party applications,
such as kdm, insert utmp entries, they sometimes use strings like ":0",
which can't be stat()'d and currently result in warnings that are
not helpful to the user.
2003-04-02 20:22:29 +00:00
David Malone
f4ac32def2 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
2002-09-04 23:29:10 +00:00
Jonathan Mini
0830bd135e Add -g option, which restricts printing of the gecos fields to just the user's
real name.

PR:		bin/39462
Submitted by:	Mike Makonnen <makonnen@pacbell.net>
Obtained from:	NetBSD
MFC after:	1 week
2002-07-02 08:00:20 +00:00
Warner Losh
f1bb2cd2aa remove __P 2002-03-22 01:22:50 +00:00
David Malone
9f5b04e925 Style improvements recommended by Bruce as a follow up to some
of the recent WARNS commits. The idea is:

1) FreeBSD id tags should follow vendor tags.
2) Vendor tags should not be compiled (though copyrights probably should).
3) There should be no blank line between including cdefs and __FBSDIF.
2001-12-10 21:13:08 +00:00
Mark Murray
4e030ba6cb WARNS=2 fix, remove 'register' and use __FBSDID(). 2001-12-02 20:13:42 +00:00
Andrey A. Chernov
f4d292b799 Don't attempt to parse %c 2001-03-21 18:43:49 +00:00
Philippe Charnier
4c86f3ad84 Spelling
Remove unused #includes
2001-02-06 20:13:48 +00:00
Jeroen Ruigrok van der Werven
d70eeca360 Backout previous commit.
(Mental note: don't forget -rRELENG_4 next time.)
2000-07-12 09:50:20 +00:00
Jeroen Ruigrok van der Werven
ae67045f8e MFC: fix some output cosmetics so that the finger -s output is properly
lined up
2000-07-12 08:50:09 +00:00
Jeroen Ruigrok van der Werven
28035b8ba8 Fix finger -s output on an user who never logged in.
This is purely a cosmetic patch.

PR:		9809
Submitted by:	se
Nagged about:	nrahlstr
2000-07-11 08:37:56 +00:00
Peter Wemm
c3aac50f28 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
Philippe Charnier
b14d8277cc Add rcsid, usage(). Silent -Wall. Use warn(3). 1997-07-02 06:34:51 +00:00
Peter Wemm
df3f5d9dd5 Merge from Lite2 1997-03-11 13:43:33 +00:00
Andrey A. Chernov
5b3675170f Adjust line to not overflow 80 cols (result of recent utmp changes) 1996-12-05 17:33:46 +00:00
Peter Wemm
39c17c43c5 Reverse out some of the previous commit I did, which shortened the
finger output from 80 to 79 characters to stop the syscons
every-second-line-is-blank problem.

Also, redo the TTY column mod so that it steals one of the (usually) two
blank spaces from the before the tty column rather than from the office
phone number.

This means the office phone field width in the short finger is back to 15
characters instead of 13.
1995-10-10 02:31:09 +00:00
Peter Wemm
6926792029 Increase the tty column width from 2 to 3 characters.
This gives us more room to breath with tty names, especially with drivers
that support large numbers of ports..  eg: specialix and digiboard.

This does not actually change the current tty names, it just allows room
for reporting more characters if the drivers use them.
1995-09-04 01:22:54 +00:00
Andrey A. Chernov
7a88bad16a Replace asctime/ctime by strftime %c to use national representation 1995-08-08 00:38:33 +00:00
Garrett Wollman
656dcd4316 Delete bogus referneces to timezone code internal header file `tzfile.h',
which is no longer bogusly installed in /usr/include.
1995-08-07 19:17:46 +00:00
Joerg Wunsch
b2b31a1c92 Make finger(1) accept "cua" to be also a tty, and use the suffix instead
of the very meaningful string "cu" to describe the tty.
1995-03-25 18:15:40 +00:00
Paul Traina
86641d8f9c Install Luke's enhancements for finger.
By default, behave like the old ugly 4.4bsd finger and print office
information instead of remote login information.

It's an easy one line fix to make it behave like most other vendor's
fingers if we decide to change the default.

Reviewed by:	pst
1994-09-07 07:22:41 +00:00
Rodney W. Grimes
9b50d90275 BSD 4.4 Lite Usr.bin Sources 1994-05-27 12:33:43 +00:00