summaryrefslogtreecommitdiffstats
path: root/usr.bin/finger/util.c
Commit message (Collapse)AuthorAgeFilesLines
* If stat() on the terminal specified in utmp fails due to ENOENT, don'trwatson2003-04-021-1/+14
| | | | | | | | | 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.
* ANSIify function definitions.dwmalone2002-09-041-25/+12
| | | | | | | | | 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
* Clean up malloc(3)'s argument. Remove casts which do nothing when we'rejmallett2002-05-171-2/+2
| | | | | | | 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).
* remove __Pimp2002-03-221-3/+3
|
* Style improvements recommended by Bruce as a follow up to somedwmalone2001-12-101-5/+6
| | | | | | | | 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.
* WARNS=2 fix, remove 'register' and use __FBSDID().markm2001-12-021-18/+18
|
* Replace the condemned access(2) by stat(2),yar2001-08-081-1/+2
| | | | as per the discussion in -audit.
* Don't use ".nofinger" as a string constant from within the codeyar2001-07-301-1/+2
| | | | since there is the ``pathnames.h'' file; use _PATH_NOFINGER instead.
* MAXPATHLEN is enough.imp2001-03-011-2/+1
| | | | | Also, snprinf is guaranteed by the new ansi standard to NUL terminate the string, so we don't need to do that ourselves.
* Spellingcharnier2001-02-061-10/+8
| | | | Remove unused #includes
* Check strdup() return valuesjedgar2001-01-201-4/+8
| | | | Reviewed by: kris
* If the utmp login time is greater than the tty atime, use it to calculatebrian2000-12-211-1/+7
| | | | | | | | | the idle time instead of the atime. This makes entries for people that have logged in but done nothing else show up correctly. Reviewed by: markk@knigma.org
* Don't call warn() with no format string.kris2000-07-101-1/+1
|
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Use the final version of the patch for the overflow, not the next toimp1999-08-221-7/+9
| | | | | | final. Noticed by: eivind
* Fix possible buffer overflow with finger and fingerd.imp1999-08-211-16/+27
| | | | | | | Submitted by: Lukasz Luzar <lluzar@noname.kki.krakow.pl> and Eivind Eklund <eivind@yes.no> This patch is actually a combination of those two patches.
* Add rcsid, usage(). Silent -Wall. Use warn(3).charnier1997-07-021-4/+7
|
* Merge from Lite2peter1997-03-111-44/+20
|
* Add Sean Eric Fagan's support for a ~/.nofinger file for user who preferjkh1995-01-041-0/+28
| | | | | their privacy. Submitted by: sef
* Install Luke's enhancements for finger.pst1994-09-071-2/+19
| | | | | | | | | | 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
* BSD 4.4 Lite Usr.bin Sourcesrgrimes1994-05-271-0/+381
OpenPOWER on IntegriCloud