OpenBSD CVS

CVS log for src/libexec/fingerd/fingerd.c


[BACK] Up to [local] / src / libexec / fingerd

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.42 / (download) - annotate - [select for diffs], Mon Jul 12 15:09:18 2021 UTC (2 years, 10 months ago) by beck
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0, HEAD
Changes since 1.41: +2 -2 lines
Diff to previous 1.41 (colored)

Change the error reporting pattern throughout the tree when unveil
fails to report the path that the failure occured on. Suggested by
deraadt@ after some tech discussion.

Work done and verified by Ashton Fagg <ashton@fagg.id.au>

ok deraadt@ semarie@ claudio@

Revision 1.41 / (download) - annotate - [select for diffs], Fri Jun 28 13:32:53 2019 UTC (4 years, 11 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.40: +3 -3 lines
Diff to previous 1.40 (colored)

When system calls indicate an error they return -1, not some arbitrary
value < 0.  errno is only updated in this case.  Change all (most?)
callers of syscalls to follow this better, and let's see if this strictness
helps us in the future.

Revision 1.40 / (download) - annotate - [select for diffs], Fri Aug 3 15:14:18 2018 UTC (5 years, 10 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4
Changes since 1.39: +6 -4 lines
Diff to previous 1.39 (colored)

Move pledge to after getopt, when the finger program becomes known
(defaults to /usr/bin/finger, but can be redefined with -P option).
Then unveil that program for "x" (execution), and pledge as before.
No other filesystem accesses occur after that point.

Revision 1.39 / (download) - annotate - [select for diffs], Fri Nov 13 01:26:33 2015 UTC (8 years, 6 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2, OPENBSD_6_1_BASE, OPENBSD_6_1, OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.38: +14 -1 lines
Diff to previous 1.38 (colored)

4-step pledge in a program noone really uses anymore.
pledge "stdio inet dns proc exec" at startup.
In the logging codepath, "stdio dns proc exec" after getpeername()
drop to stdio proc exec(), before fork / execve
Parent moving data out of the pipe only needs "stdio"

Revision 1.38 / (download) - annotate - [select for diffs], Fri Nov 13 01:23:59 2015 UTC (8 years, 6 months ago) by deraadt
Branch: MAIN
Changes since 1.37: +3 -2 lines
Diff to previous 1.37 (colored)

_exit() in the child; as a result, must use syslog() directly.

Revision 1.37 / (download) - annotate - [select for diffs], Fri Jan 16 06:39:50 2015 UTC (9 years, 4 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8, OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.36: +3 -2 lines
Diff to previous 1.36 (colored)

Replace <sys/param.h> with <limits.h> and other less dirty headers where
possible.  Annotate <sys/param.h> lines with their current reasons.  Switch
to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc.  Change
MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where
sensible to avoid pulling in the pollution.  These are the files confirmed
through binary verification.
ok guenther, millert, doug (helped with the verification protocol)

Revision 1.36 / (download) - annotate - [select for diffs], Tue Dec 4 02:24:47 2012 UTC (11 years, 6 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6, OPENBSD_5_5_BASE, OPENBSD_5_5, OPENBSD_5_4_BASE, OPENBSD_5_4, OPENBSD_5_3_BASE, OPENBSD_5_3
Changes since 1.35: +1 -2 lines
Diff to previous 1.35 (colored)

remove some unnecessary sys/param.h inclusions

Revision 1.35 / (download) - annotate - [select for diffs], Tue Oct 27 23:59:31 2009 UTC (14 years, 7 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0, OPENBSD_4_9_BASE, OPENBSD_4_9, OPENBSD_4_8_BASE, OPENBSD_4_8, OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.34: +1 -15 lines
Diff to previous 1.34 (colored)

rcsid[] and sccsid[] and copyright[] are essentially unmaintained (and
unmaintainable).  these days, people use source.  these id's do not provide
any benefit, and do hurt the small install media
(the 33,000 line diff is essentially mechanical)
ok with the idea millert, ok dms

Revision 1.34 / (download) - annotate - [select for diffs], Mon Aug 11 17:17:53 2008 UTC (15 years, 10 months ago) by tobias
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6, OPENBSD_4_5_BASE, OPENBSD_4_5
Changes since 1.33: +3 -3 lines
Diff to previous 1.33 (colored)

Prevent a buffer underrun if a line is received which only contains
(multiple) @.

ok millert, otto

Revision 1.33 / (download) - annotate - [select for diffs], Sat Aug 19 06:01:00 2006 UTC (17 years, 9 months ago) by ray
Branch: MAIN
CVS Tags: OPENBSD_4_4_BASE, OPENBSD_4_4, OPENBSD_4_3_BASE, OPENBSD_4_3, OPENBSD_4_2_BASE, OPENBSD_4_2, OPENBSD_4_1_BASE, OPENBSD_4_1, OPENBSD_4_0_BASE, OPENBSD_4_0
Changes since 1.32: +17 -18 lines
Diff to previous 1.32 (colored)

Don't shadow err(3).
Store strlen() results in a size_t.
Add __dead to both usage() and logerr().
Get rid of /* NOTREACHED */.
Get rid of extraneous _exit().
Calls err(3) on getpeername failure.

``reads well to me!'' avsm@

Revision 1.32 / (download) - annotate - [select for diffs], Tue Jan 17 17:51:21 2006 UTC (18 years, 4 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_9_BASE, OPENBSD_3_9
Changes since 1.31: +3 -3 lines
Diff to previous 1.31 (colored)

Incllude <sys/param.h> to get MAXHOSTNAMELEN

Revision 1.31 / (download) - annotate - [select for diffs], Fri Oct 17 10:41:18 2003 UTC (20 years, 7 months ago) by jmc
Branch: MAIN
CVS Tags: OPENBSD_3_8_BASE, OPENBSD_3_8, OPENBSD_3_7_BASE, OPENBSD_3_7, OPENBSD_3_6_BASE, OPENBSD_3_6, OPENBSD_3_5_BASE, OPENBSD_3_5
Changes since 1.30: +3 -3 lines
Diff to previous 1.30 (colored)

slight update for fingerd; sort options;

Revision 1.30 / (download) - annotate - [select for diffs], Mon Jun 2 19:38:24 2003 UTC (21 years ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_4_BASE, OPENBSD_3_4
Changes since 1.29: +3 -7 lines
Diff to previous 1.29 (colored)

Remove the advertising clause in the UCB license which Berkeley
rescinded 22 July 1999.  Proofed by myself and Theo.

Revision 1.29 / (download) - annotate - [select for diffs], Fri Sep 6 19:43:54 2002 UTC (21 years, 9 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_3_3_BASE, OPENBSD_3_3, OPENBSD_3_2_BASE, OPENBSD_3_2
Changes since 1.28: +3 -3 lines
Diff to previous 1.28 (colored)

use socklen_t more; henning ok

Revision 1.28 / (download) - annotate - [select for diffs], Wed Jul 3 23:39:03 2002 UTC (21 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.27: +4 -6 lines
Diff to previous 1.27 (colored)

KNF

Revision 1.27 / (download) - annotate - [select for diffs], Sun Jun 2 01:27:15 2002 UTC (22 years ago) by deraadt
Branch: MAIN
Changes since 1.26: +3 -3 lines
Diff to previous 1.26 (colored)

minor KNF

Revision 1.26 / (download) - annotate - [select for diffs], Tue Feb 19 19:39:38 2002 UTC (22 years, 3 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_1_BASE, OPENBSD_3_1
Changes since 1.25: +4 -18 lines
Diff to previous 1.25 (colored)

We live in an ANSI C world.  Remove lots of gratuitous #ifdef __STDC__ cruft.

Revision 1.25 / (download) - annotate - [select for diffs], Sat Feb 16 21:27:29 2002 UTC (22 years, 3 months ago) by millert
Branch: MAIN
Changes since 1.24: +4 -4 lines
Diff to previous 1.24 (colored)

Part one of userland __P removal.  Done with a simple regexp with some minor hand editing to make comments line up correctly.  Another pass is forthcoming that handles the cases that could not be done automatically.

Revision 1.24 / (download) - annotate - [select for diffs], Fri Dec 7 18:45:32 2001 UTC (22 years, 6 months ago) by mpech
Branch: MAIN
Changes since 1.23: +4 -4 lines
Diff to previous 1.23 (colored)

kill more registers;

millert@ ok

Revision 1.23 / (download) - annotate - [select for diffs], Tue Nov 27 17:10:26 2001 UTC (22 years, 6 months ago) by millert
Branch: MAIN
Changes since 1.22: +12 -8 lines
Diff to previous 1.22 (colored)

When copying command line arguments to out new argument vector,
don't go past the end of the buffer.  Not a security issue since
root controls the fingerd arguments.  Noticed by Brian Poole.

Revision 1.22 / (download) - annotate - [select for diffs], Sat Aug 18 18:31:21 2001 UTC (22 years, 9 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_3_0_BASE, OPENBSD_3_0
Changes since 1.21: +3 -3 lines
Diff to previous 1.21 (colored)

strlcpy invades the tree

Revision 1.21 / (download) - annotate - [select for diffs], Sun Jul 8 21:18:07 2001 UTC (22 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.20: +6 -4 lines
Diff to previous 1.20 (colored)

-Wall

Revision 1.20 / (download) - annotate - [select for diffs], Thu Jan 25 19:22:08 2001 UTC (23 years, 4 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_9_BASE, OPENBSD_2_9
Changes since 1.19: +3 -3 lines
Diff to previous 1.19 (colored)

KNF

Revision 1.19 / (download) - annotate - [select for diffs], Fri Aug 18 05:28:31 2000 UTC (23 years, 9 months ago) by itojun
Branch: MAIN
CVS Tags: OPENBSD_2_8_BASE, OPENBSD_2_8
Changes since 1.18: +8 -4 lines
Diff to previous 1.18 (colored)

check error result from getnameinfo.

Revision 1.18 / (download) - annotate - [select for diffs], Fri Jul 7 03:48:12 2000 UTC (23 years, 11 months ago) by millert
Branch: MAIN
Changes since 1.17: +7 -25 lines
Diff to previous 1.17 (colored)

Change fingerd back to using fgets(3), not fgetln(3).  Using fgetln(3)
was a mistake since it allows an attacker to trivially drive up the
load on a machine.  Of course, this can still be done with multiple
connections but there's no reason to make it easier than it needs
to be.  This also simplifies the logging a bit.

Revision 1.17 / (download) - annotate - [select for diffs], Mon Nov 15 01:03:27 1999 UTC (24 years, 7 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_7_BASE, OPENBSD_2_7
Changes since 1.16: +6 -4 lines
Diff to previous 1.16 (colored)

logging getpeername() failures is a waste of time

Revision 1.16 / (download) - annotate - [select for diffs], Mon Aug 2 17:42:39 1999 UTC (24 years, 10 months ago) by pjanzen
Branch: MAIN
CVS Tags: OPENBSD_2_6_BASE, OPENBSD_2_6
Changes since 1.15: +3 -3 lines
Diff to previous 1.15 (colored)

typo

Revision 1.15 / (download) - annotate - [select for diffs], Tue Jul 20 22:40:37 1999 UTC (24 years, 10 months ago) by deraadt
Branch: MAIN
Changes since 1.14: +13 -3 lines
Diff to previous 1.14 (colored)

bad arguments? usage() should syslog()

Revision 1.14 / (download) - annotate - [select for diffs], Sat Jul 3 18:24:13 1999 UTC (24 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.13: +9 -13 lines
Diff to previous 1.13 (colored)

use getnameinfo()

Revision 1.13 / (download) - annotate - [select for diffs], Wed Feb 24 17:00:01 1999 UTC (25 years, 3 months ago) by aaron
Branch: MAIN
CVS Tags: OPENBSD_2_5_BASE, OPENBSD_2_5
Changes since 1.12: +3 -3 lines
Diff to previous 1.12 (colored)

fowarding -> forwarding

Revision 1.12 / (download) - annotate - [select for diffs], Fri Nov 21 01:01:44 1997 UTC (26 years, 6 months ago) by gene
Branch: MAIN
CVS Tags: OPENBSD_2_4_BASE, OPENBSD_2_4, OPENBSD_2_3_BASE, OPENBSD_2_3
Changes since 1.11: +3 -3 lines
Diff to previous 1.11 (colored)

Remove LOG_CONS from openlog() call so every darned finger connect message
doesn't go to console.  Change discussed and checked with millert.

Revision 1.11 / (download) - annotate - [select for diffs], Mon Nov 17 00:43:25 1997 UTC (26 years, 6 months ago) by millert
Branch: MAIN
Changes since 1.10: +42 -14 lines
Diff to previous 1.10 (colored)

1) use fgetln for arbitrary sized lines
2) do puts("foo\r") not puts("foo\r\n") as puts adds a \n itself
3) log the command given when -l is specified, replacing \r, \n, NULL with ' '
4) with -l, log possible probes (ie: EOF) that were previously ignored

Revision 1.10 / (download) - annotate - [select for diffs], Sat Aug 16 21:38:21 1997 UTC (26 years, 9 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_2_2_BASE, OPENBSD_2_2
Changes since 1.9: +3 -3 lines
Diff to previous 1.9 (colored)

<string.h> not <strings.h>

Revision 1.9 / (download) - annotate - [select for diffs], Sat Aug 16 20:34:20 1997 UTC (26 years, 9 months ago) by millert
Branch: MAIN
Changes since 1.8: +11 -2 lines
Diff to previous 1.8 (colored)

OpenBSD tags and document assumption about finger(1) arg parsing.

Revision 1.8 / (download) - annotate - [select for diffs], Fri Jul 25 19:41:14 1997 UTC (26 years, 10 months ago) by mickey
Branch: MAIN
Changes since 1.7: +4 -4 lines
Diff to previous 1.7 (colored)

#if __STDC__ --> #ifdef __STDC__

Revision 1.7 / (download) - annotate - [select for diffs], Wed Jul 23 20:36:22 1997 UTC (26 years, 10 months ago) by kstailey
Branch: MAIN
Changes since 1.6: +2 -2 lines
Diff to previous 1.6 (colored)

tabify

Revision 1.6 / (download) - annotate - [select for diffs], Wed Jan 15 23:40:56 1997 UTC (27 years, 4 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_2_1_BASE, OPENBSD_2_1
Changes since 1.5: +2 -2 lines
Diff to previous 1.5 (colored)

getopt(3) returns -1 when out of args, not EOF, whee!

Revision 1.5 / (download) - annotate - [select for diffs], Sun Dec 8 13:29:54 1996 UTC (27 years, 6 months ago) by downsj
Branch: MAIN
Changes since 1.4: +5 -2 lines
Diff to previous 1.4 (colored)

Add -M.

Revision 1.4 / (download) - annotate - [select for diffs], Tue Jul 16 17:55:43 1996 UTC (27 years, 10 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_2_0_BASE, OPENBSD_2_0
Changes since 1.3: +138 -68 lines
Diff to previous 1.3 (colored)

Updated to 4.4BSD fingerd + Theo's @@@@ optimization and some
added options to further restrict the info given out.

Revision 1.3 / (download) - annotate - [select for diffs], Mon Jun 24 17:41:07 1996 UTC (27 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.2: +27 -6 lines
Diff to previous 1.2 (colored)

add -s flag; if specified in inetd, does not allow forwarding @ requests

Revision 1.2 / (download) - annotate - [select for diffs], Thu May 30 08:44:11 1996 UTC (28 years ago) by deraadt
Branch: MAIN
Changes since 1.1: +11 -1 lines
Diff to previous 1.1 (colored)

optimize something like "finger @@@@@@@@@@@@@cvs@@@@@@cvs@@@@@@cvs' to hit
fewer hosts. Basically, chew @ signs when possible.

Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Wed Oct 18 08:43:15 1995 UTC (28 years, 7 months ago) by deraadt
CVS Tags: netbsd_1_1
Changes since 1.1: +0 -0 lines
Diff to previous 1.1 (colored)

initial import of NetBSD tree

Revision 1.1 / (download) - annotate - [select for diffs], Wed Oct 18 08:43:15 1995 UTC (28 years, 7 months ago) by deraadt
Branch: MAIN

Initial revision

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.