summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libexec/tcpd/safe_finger/Makefile4
-rw-r--r--libexec/tcpd/safe_finger/safe_finger.859
-rw-r--r--libexec/tcpd/tcpd/tcpd.8351
-rw-r--r--libexec/tcpd/tcpdchk/tcpdchk.8158
-rw-r--r--libexec/tcpd/tcpdmatch/tcpdmatch.8242
5 files changed, 550 insertions, 264 deletions
diff --git a/libexec/tcpd/safe_finger/Makefile b/libexec/tcpd/safe_finger/Makefile
index f3df4b49ef4..86fcffc4573 100644
--- a/libexec/tcpd/safe_finger/Makefile
+++ b/libexec/tcpd/safe_finger/Makefile
@@ -1,6 +1,6 @@
-# $OpenBSD: Makefile,v 1.1 1997/02/26 06:17:02 downsj Exp $
+# $OpenBSD: Makefile,v 1.2 1997/06/24 02:12:23 downsj Exp $
PROG= safe_finger
-NOMAN= yes
+MAN= safe_finger.8
.include <bsd.prog.mk>
diff --git a/libexec/tcpd/safe_finger/safe_finger.8 b/libexec/tcpd/safe_finger/safe_finger.8
new file mode 100644
index 00000000000..310df8990fd
--- /dev/null
+++ b/libexec/tcpd/safe_finger/safe_finger.8
@@ -0,0 +1,59 @@
+.\" $OpenBSD: safe_finger.8,v 1.1 1997/06/24 02:12:24 downsj Exp $
+.\"
+.\" Copyright (c) 1997, Jason Downs. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by Jason Downs for the
+.\" OpenBSD system.
+.\" 4. Neither the name(s) of the author(s) nor the name OpenBSD
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS
+.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+.\" DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT,
+.\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+.\" CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.Dd June 23, 1997
+.Dt SAFE_FINGER 8
+.Os
+.Sh NAME
+.Nm safe_finger
+.Sh SYNOPSYS
+.Nm /usr/libexec/safe_finger
+.Op Ar arguments
+.Sh DECRIPTION
+.Nm safe_finger
+is simply a wrapper around the
+.Xr finger 1
+program, meant for use in
+.Xr tcpd 8
+rulesets. It accepts exactly the same arguments as
+.Xr finger 1 .
+.Sh SEE ALSO
+.Xr finger 1 ,
+.Xr tcpd 8 .
+.Sh AUTHOR
+.Bd -unfilled -offset indent
+Wietse Venema (wietse@wzv.win.tue.nl),
+Department of Mathematics and Computing Science,
+Eindhoven University of Technology
+Den Dolech 2, P.O. Box 513,
+5600 MB Eindhoven, The Netherlands
+.Ed
diff --git a/libexec/tcpd/tcpd/tcpd.8 b/libexec/tcpd/tcpd/tcpd.8
index c916f36efd4..61401d516f5 100644
--- a/libexec/tcpd/tcpd/tcpd.8
+++ b/libexec/tcpd/tcpd/tcpd.8
@@ -1,179 +1,266 @@
-.\" $OpenBSD: tcpd.8,v 1.1 1997/02/26 06:17:05 downsj Exp $
-.TH TCPD 8
-.SH NAME
-tcpd \- access control facility for internet services
-.SH DESCRIPTION
-.PP
-The \fItcpd\fR program can be set up to monitor incoming requests for
-\fItelnet\fR, \fIfinger\fR, \fIftp\fR, \fIexec\fR, \fIrsh\fR,
-\fIrlogin\fR, \fItftp\fR, \fItalk\fR, \fIcomsat\fR and other services
-that have a one-to-one mapping onto executable files.
-.PP
+.\" $OpenBSD: tcpd.8,v 1.2 1997/06/24 02:12:24 downsj Exp $
+.\"
+.\" Copyright (c) 1997, Jason Downs. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by Jason Downs for the
+.\" OpenBSD system.
+.\" 4. Neither the name(s) of the author(s) nor the name OpenBSD
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS
+.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+.\" DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT,
+.\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+.\" CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.Dd June 23, 1997
+.Dt TCPD 8
+.Os
+.Sh NAME
+.Nm tcpd
+.Nd access control facility for internet services
+.Sh DESCRIPTION
+The
+.Nm tcpd
+program can be set up to monitor incoming requests for
+.Xr telnet 1 ,
+.Xr finger 1 ,
+.Xr ftp 1 ,
+.Xr rexecd 8 ,
+.Xr rsh 1 ,
+.Xr rlogin 1 ,
+.Xr tftp 1 ,
+.Xr talk 1 ,
+.Xr comsat 8 ,
+and other services that have a one-to-one mapping onto executable files.
+.Pp
.\" The program supports both 4.3BSD-style sockets and System V.4-style
.\" TLI. Functionality may be limited when the protocol underneath TLI is
.\" not an internet protocol.
-.\" .PP
+.\" .Pp
Operation is as follows: whenever a request for service arrives, the
-\fIinetd\fP daemon is tricked into running the \fItcpd\fP program
-instead of the desired server. \fItcpd\fP logs the request and does
-some additional checks. When all is well, \fItcpd\fP runs the
-appropriate server program and goes away.
-.PP
+.Xr inetd 8
+daemon is tricked into running the
+.Nm tcpd
+program instead of the desired server.
+.Nm tcpd
+logs the request and does some additional checks. When all is well,
+.Nm tcpd
+runs the appropriate server program and goes away.
+.Pp
Optional features are: pattern-based access control, client username
lookups with the RFC 931 etc. protocol, protection against hosts that
pretend to have someone elses host name, and protection against hosts
that pretend to have someone elses network address.
-.SH LOGGING
+.Sh LOGGING
Connections that are monitored by
-.I tcpd
-are reported through the \fIsyslog\fR(3) facility. Each record contains
-a time stamp, the client host name and the name of the requested
-service. The information can be useful to detect unwanted activities,
-especially when logfile information from several hosts is merged.
-.PP
+.Nm tcpd
+are reported through the
+.Xr syslog 3
+facility. Each record contains a time stamp, the client host name and
+the name of the requested service. The information can be useful to detect
+unwanted activities, especially when logfile information from several hosts
+is merged.
+.Pp
In order to find out where your logs are going, examine the syslog
-configuration file, usually /etc/syslog.conf.
-.SH ACCESS CONTROL
+configuration file, usually
+.Pa /etc/syslog.conf .
+.Sh ACCESS CONTROL
Optionally,
-.I tcpd
+.Nm tcpd
supports a simple form of access control that is based on pattern
matching. The access-control software provides hooks for the execution
of shell commands when a pattern fires. For details, see the
-\fIhosts_access\fR(5) manual page.
-.SH HOST NAME VERIFICATION
-The authentication scheme of some protocols (\fIrlogin, rsh\fR) relies
+.Xr hosts_access 5
+manual page.
+.Sh HOST NAME VERIFICATION
+The authentication scheme of some protocols
+.Pf ( Xr rlogin 1 ,
+.Xr rsh 1 )
+relies
on host names. Some implementations believe the host name that they get
from any random name server; other implementations are more careful but
use a flawed algorithm.
-.PP
-.I tcpd
+.Pp
+.Nm tcpd
verifies the client host name that is returned by the address->name DNS
server by looking at the host name and address that are returned by the
name->address DNS server. If any discrepancy is detected,
-.I tcpd
+.Nm tcpd
concludes that it is dealing with a host that pretends to have someone
elses host name.
-.PP
-If the sources are compiled with -DPARANOID,
-.I tcpd
-will drop the connection in case of a host name/address mismatch.
-Otherwise, the hostname can be matched with the \fIPARANOID\fR wildcard,
-after which suitable action can be taken.
-.SH HOST ADDRESS SPOOFING
+.Pp
+.\" If the sources are compiled with -DPARANOID,
+.\" .Nm tcpd
+.\" will drop the connection in case of a host name/address mismatch.
+.\" Otherwise, the hostname can be matched with the
+.\" .Ar PARANOID
+.\" wildcard,
+.\" after which suitable action can be taken.
+.Sh HOST ADDRESS SPOOFING
Optionally,
-.I tcpd
+.Nm tcpd
disables source-routing socket options on every connection that it
deals with. This will take care of most attacks from hosts that pretend
to have an address that belongs to someone elses network. UDP services
do not benefit from this protection. This feature must be turned on
at compile time.
-.SH RFC 931
-When RFC 931 etc. lookups are enabled (compile-time option) \fItcpd\fR
+.Sh RFC 931
+When RFC 931 etc. lookups are enabled (compile-time option)
+.Nm tcpd
will attempt to establish the name of the client user. This will
succeed only if the client host runs an RFC 931-compliant daemon.
Client user name lookups will not work for datagram-oriented
connections, and may cause noticeable delays in the case of connections
from PCs.
-.SH EXAMPLES
-The details of using \fItcpd\fR depend on pathname information that was
-compiled into the program.
-.SH EXAMPLE 1
-This example applies when \fItcpd\fR expects that the original network
-daemons will be moved to an "other" place.
-.PP
-In order to monitor access to the \fIfinger\fR service, move the
-original finger daemon to the "other" place and install tcpd in the
-place of the original finger daemon. No changes are required to
-configuration files.
-.nf
-.sp
-.in +5
-# mkdir /other/place
-# mv /usr/etc/in.fingerd /other/place
-# cp tcpd /usr/etc/in.fingerd
-.fi
-.PP
-The example assumes that the network daemons live in /usr/etc. On some
-systems, network daemons live in /usr/sbin or in /usr/libexec, or have
-no `in.\' prefix to their name.
-.SH EXAMPLE 2
-This example applies when \fItcpd\fR expects that the network daemons
-are left in their original place.
-.PP
-In order to monitor access to the \fIfinger\fR service, perform the
-following edits on the \fIinetd\fR configuration file (usually
-\fI/etc/inetd.conf\fR or \fI/etc/inet/inetd.conf\fR):
-.nf
-.sp
-.ti +5
-finger stream tcp nowait nobody /usr/etc/in.fingerd in.fingerd
-.sp
+.\" .Sh EXAMPLES
+.\" The details of using
+.\" .Nm tcpd
+.\" depend on pathname information that was compiled into the program.
+.\" .Sh EXAMPLE 1
+.\" This example applies when
+.\" .Nm tcpd
+.\" expects that the original network
+.\" daemons will be moved to an "other" place.
+.\" .Pp
+.\" In order to monitor access to the
+.\" .Xr finger 1
+.\" service, move the
+.\" original finger daemon to the "other" place and install tcpd in the
+.\" place of the original finger daemon. No changes are required to
+.\" configuration files.
+.\" .Bd -unfilled -offset indent
+.\" # mkdir /other/place
+.\" # mv /usr/etc/in.fingerd /other/place
+.\" # cp tcpd /usr/etc/in.fingerd
+.\" .Ed
+.\" .Pp
+.\" The example assumes that the network daemons live in /usr/etc. On some
+.\" systems, network daemons live in /usr/sbin or in /usr/libexec, or have
+.\" no `in.\' prefix to their name.
+.\" .Sh EXAMPLE 2
+.Sh EXAMPLE
+This example applies when
+.Nm tcpd
+expects that the network daemons
+are left in their original place, as it is configured within
+.Nm OpenBSD .
+.Pp
+In order to monitor access to the
+.Xr finger 1
+service, perform the following edits on the
+.Xr inetd 8 configuration file,
+.Pa /etc/inetd.conf :
+.Pp
+.Bd -unfilled -offset indent
+finger stream tcp nowait nobody /usr/libexec/fingerd fingerd
+.Ed
+.Pp
becomes:
-.sp
-.ti +5
-finger stream tcp nowait nobody /some/where/tcpd in.fingerd
-.sp
-.fi
-.PP
-The example assumes that the network daemons live in /usr/etc. On some
-systems, network daemons live in /usr/sbin or in /usr/libexec, the
-daemons have no `in.\' prefix to their name, or there is no userid
-field in the inetd configuration file.
-.PP
+.Pp
+.Bd -unfilled -offset indent
+finger stream tcp nowait nobody /usr/libexec/tcpd fingerd
+.Ed
+.\" .Pp
+.\" The example assumes that the network daemons live in /usr/etc. On some
+.\" systems, network daemons live in /usr/sbin or in /usr/libexec, the
+.\" daemons have no `in.\' prefix to their name, or there is no userid
+.\" field in the inetd configuration file.
+.Pp
Similar changes will be needed for the other services that are to be
-covered by \fItcpd\fR. Send a `kill -HUP\' to the \fIinetd\fR(8)
-process to make the changes effective. AIX users may also have to
-execute the `inetimp\' command.
-.SH EXAMPLE 3
+covered by
+.Nm tcpd .
+Send a `kill -HUP\' to the
+.Xr inetd 8
+process to make the changes effective.
+.\" AIX users may also have to execute the `inetimp\' command.
+.\" .Sh EXAMPLE 3
+.Pp
In the case of daemons that do not live in a common directory ("secret"
-or otherwise), edit the \fIinetd\fR configuration file so that it
-specifies an absolute path name for the process name field. For example:
-.nf
-.sp
- ntalk dgram udp wait root /some/where/tcpd /usr/local/lib/ntalkd
-.sp
-.fi
-.PP
-Only the last component (ntalkd) of the pathname will be used for
-access control and logging.
-.SH BUGS
+or otherwise), edit the
+.Xr inetd 8
+configuration file so that it specifies an absolute path name for the process
+name field. For example:
+.Pp
+.Bd -unfilled -offset indent
+ ntalk dgram udp wait root /usr/libexec/tcpd /usr/local/lib/ntalkd
+.Ed
+.Pp
+Only the last component
+.Pf ( Nm ntalkd )
+of the pathname will be used for access control and logging.
+.Sh BUGS
Some UDP (and RPC) daemons linger around for a while after they have
finished their work, in case another request comes in. In the inetd
-configuration file these services are registered with the \fIwait\fR
+configuration file these services are registered with the
+.Ar wait
option. Only the request that started such a daemon will be logged.
-.PP
-The program does not work with RPC services over TCP. These services
-are registered as \fIrpc/tcp\fR in the inetd configuration file. The
-only non-trivial service that is affected by this limitation is
-\fIrexd\fR, which is used by the \fIon(1)\fR command. This is no great
-loss. On most systems, \fIrexd\fR is less secure than a wildcard in
-/etc/hosts.equiv.
-.PP
-RPC broadcast requests (for example: \fIrwall, rup, rusers\fR) always
+.Pp
+.\" The program does not work with RPC services over TCP. These services
+.\" are registered as
+.\" .Ar rpc/tcp
+.\" in the inetd configuration file. The
+.\" only non-trivial service that is affected by this limitation is
+.\" .Xr rexd 8 ,
+.\" which is used by the
+.\" .Xr on 1
+.\" command. This is no great
+.\" loss. On most systems,
+.\" .Xr rexd 8
+.\" is less secure than a wildcard in
+.\" .Pa /etc/hosts.equiv .
+.\" .Pp
+RPC broadcast requests (for example:
+.Xr rwall 1 ,
+.Xr rup 1 ,
+.Xr rusers 1 )
+always
appear to come from the responding host. What happens is that the
-client broadcasts the request to all \fIportmap\fR daemons on its
-network; each \fIportmap\fR daemon forwards the request to a local
-daemon. As far as the \fIrwall\fR etc. daemons know, the request comes
-from the local host.
-.SH FILES
-.PP
+client broadcasts the request to all
+.Xr portmap 8
+daemons on its
+network; each
+.Xr portmap 8
+daemon forwards the request to a local daemon. As far as the
+.Xr rwall 8
+etc. daemons know, the request comes from the local host.
+.Sh FILES
+.Pp
The default locations of the host access control tables are:
-.PP
-/etc/hosts.allow
-.br
-/etc/hosts.deny
-.SH SEE ALSO
-.na
-.nf
-hosts_access(5), format of the tcpd access control tables.
-syslog.conf(5), format of the syslogd control file.
-inetd.conf(5), format of the inetd control file.
-.SH AUTHORS
-.na
-.nf
+.Pp
+.Bl -tag -width /etc/hosts.allow -compact
+.It Pa /etc/hosts.allow
+Access control table (allow list)
+.It Pa /etc/hosts.deny
+Access control table (deny list)
+.El
+.Sh SEE ALSO
+.Xr hosts_access 5 ,
+.Xr inetd.conf 5 ,
+.Xr syslog.conf 5 .
+.Sh AUTHOR
+.Bd -unfilled -offset indent
Wietse Venema (wietse@wzv.win.tue.nl),
Department of Mathematics and Computing Science,
Eindhoven University of Technology
Den Dolech 2, P.O. Box 513,
5600 MB Eindhoven, The Netherlands
+.Ed
\" @(#) tcpd.8 1.5 96/02/21 16:39:16
diff --git a/libexec/tcpd/tcpdchk/tcpdchk.8 b/libexec/tcpd/tcpdchk/tcpdchk.8
index 736f39e4260..e98f9b3d313 100644
--- a/libexec/tcpd/tcpdchk/tcpdchk.8
+++ b/libexec/tcpd/tcpdchk/tcpdchk.8
@@ -1,67 +1,125 @@
-.\" $OpenBSD: tcpdchk.8,v 1.1 1997/02/26 06:17:08 downsj Exp $
-.TH TCPDCHK 8
-.SH NAME
-tcpdchk \- tcp wrapper configuration checker
-.SH SYNOPSYS
-tcpdchk [-a] [-d] [-i inet_conf] [-v]
-.SH DESCRIPTION
-.PP
-\fItcpdchk\fR examines your tcp wrapper configuration and reports all
+.\" $OpenBSD: tcpdchk.8,v 1.2 1997/06/24 02:12:26 downsj Exp $
+.\"
+.\" Copyright (c) 1997, Jason Downs. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by Jason Downs for the
+.\" OpenBSD system.
+.\" 4. Neither the name(s) of the author(s) nor the name OpenBSD
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS
+.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+.\" DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT,
+.\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+.\" CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.Dd June 23, 1997
+.Dt TCPDCHK 8
+.Os
+.Sh NAME
+.Nm tcpdchk
+.Nd tcp wrapper configuration checker
+.Sh SYNOPSYS
+.Nm tcpdchk
+.Op Fl a
+.Op Fl d
+.Op Fl i Ar inet_conf
+.Op Fl v
+.Sh DESCRIPTION
+.Pp
+.Nm tcpdchk
+examines your tcp wrapper configuration and reports all
potential and real problems it can find. The program examines the
-\fItcpd\fR access control files (by default, these are
-\fI/etc/hosts.allow\fR and \fI/etc/hosts.deny\fR), and compares the
-entries in these files against entries in the \fIinetd\fR or \fItlid\fR
-network configuration files.
-.PP
-\fItcpdchk\fR reports problems such as non-existent pathnames; services
-that appear in \fItcpd\fR access control rules, but are not controlled
-by \fItcpd\fR; services that should not be wrapped; non-existent host
+.Xr tcpd 8
+access control files (by default, these are
+.Pa /etc/hosts.allow
+and
+.Pa /etc/hosts.deny ) ,
+and compares the
+entries in these files against entries in the
+.Xr inetd 8
+network configuration file.
+.Pp
+.Nm tcpdchk
+reports problems such as non-existent pathnames; services
+that appear in
+.Xr tcpd 8
+access control rules, but are not controlled by
+.Xr tcpd 8 ;
+services that should not be wrapped; non-existent host
names or non-internet address forms; occurrences of host aliases
instead of official host names; hosts with a name/address conflict;
inappropriate use of wildcard patterns; inappropriate use of NIS
netgroups or references to non-existent NIS netgroups; references to
non-existent options; invalid arguments to options; and so on.
-.PP
-Where possible, \fItcpdchk\fR provides a helpful suggestion to fix the
-problem.
-.SH OPTIONS
-.IP -a
+.Pp
+Where possible,
+.Nm tcpdchk
+provides a helpful suggestion to fix the problem.
+.Sh OPTIONS
+.Bl -tag -width XXXXXXXXXXXX
+.It Fl a
Report access control rules that permit access without an explicit
-ALLOW keyword. This applies only when the extended access control
-language is enabled (build with -DPROCESS_OPTIONS).
-.IP -d
-Examine \fIhosts.allow\fR and \fIhosts.deny\fR files in the current
-directory instead of the default ones.
-.IP "-i inet_conf"
-Specify this option when \fItcpdchk\fR is unable to find your
-\fIinetd.conf\fR or \fItlid.conf\fR network configuration file, or when
-you suspect that the program uses the wrong one.
-.IP -v
+ALLOW keyword.
+.\" This applies only when the extended access control
+.\" language is enabled (build with -DPROCESS_OPTIONS).
+.It Fl d
+Examine
+.Pa hosts.allow
+and
+.Pa hosts.deny
+files in the current directory instead of the default ones.
+.It Fl i Ar inet_conf
+Specify this option when
+.Nm tcpdchk
+is unable to find your
+.Pa inetd.conf
+network configuration file, or when you wish to test with a non-default one.
+.It Fl v
Display the contents of each access control rule. Daemon lists, client
lists, shell commands and options are shown in a pretty-printed format;
this makes it easier for you to spot any discrepancies between what you
want and what the program understands.
-.SH FILES
-.PP
-The default locations of the \fItcpd\fR access control tables are:
-.PP
-/etc/hosts.allow
-.br
-/etc/hosts.deny
-.SH SEE ALSO
-.na
-.nf
-tcpdmatch(8), explain what tcpd would do in specific cases.
-hosts_access(5), format of the tcpd access control tables.
-hosts_options(5), format of the language extensions.
-inetd.conf(5), format of the inetd control file.
-tlid.conf(5), format of the tlid control file.
-.SH AUTHORS
-.na
-.nf
+.Sh FILES
+.Pp
+The default locations of the
+.Xr tcpd 8
+access control tables are:
+.Pp
+.Bl -tag -width /etc/hosts.allow -compact
+.It Pa /etc/hosts.allow
+Access control table (allow list)
+.It Pa /etc/hosts.deny
+Access control table (deny list)
+.El
+.Sh SEE ALSO
+.Xr hosts_access 5 ,
+.Xr hosts_options 5 ,
+.Xr inetd.conf 5 ,
+.Xr tcpdmatch 8 .
+.Sh AUTHOR
+.Bd -unfilled -offset indent
Wietse Venema (wietse@wzv.win.tue.nl),
Department of Mathematics and Computing Science,
Eindhoven University of Technology
Den Dolech 2, P.O. Box 513,
5600 MB Eindhoven, The Netherlands
+.Ed
\" @(#) tcpdchk.8 1.3 95/01/08 17:00:30
diff --git a/libexec/tcpd/tcpdmatch/tcpdmatch.8 b/libexec/tcpd/tcpdmatch/tcpdmatch.8
index 416d0d902a0..77bed5ab6be 100644
--- a/libexec/tcpd/tcpdmatch/tcpdmatch.8
+++ b/libexec/tcpd/tcpdmatch/tcpdmatch.8
@@ -1,99 +1,181 @@
-.\" $OpenBSD: tcpdmatch.8,v 1.1 1997/02/26 06:17:10 downsj Exp $
-.TH TCPDMATCH 8
-.SH NAME
+.\" $OpenBSD: tcpdmatch.8,v 1.2 1997/06/24 02:12:26 downsj Exp $
+.\"
+.\" Copyright (c) 1997, Jason Downs. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by Jason Downs for the
+.\" OpenBSD system.
+.\" 4. Neither the name(s) of the author(s) nor the name OpenBSD
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS
+.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+.\" DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT,
+.\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+.\" CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.Dd June 23, 1997
+.Dt TCPDMATCH 8
+.Os
+.Sh NAME
tcpdmatch \- tcp wrapper oracle
-.SH SYNOPSYS
-tcpdmatch [-d] [-i inet_conf] daemon client
-.sp
-tcpdmatch [-d] [-i inet_conf] daemon[@server] [user@]client
-.SH DESCRIPTION
-.PP
-\fItcpdmatch\fR predicts how the tcp wrapper would handle a specific
-request for service. Examples are given below.
-.PP
-The program examines the \fItcpd\fR access control tables (default
-\fI/etc/hosts.allow\fR and \fI/etc/hosts.deny\fR) and prints its
-conclusion. For maximal accuracy, it extracts additional information
-from your \fIinetd\fR or \fItlid\fR network configuration file.
-.PP
-When \fItcpdmatch\fR finds a match in the access control tables, it
-identifies the matched rule. In addition, it displays the optional
+.Sh SYNOPSYS
+.Nm tcpdmatch
+.Op Fl d
+.Op Fl i Ar inet_conf
+.Ar daemon
+.Ar client
+.Pp
+.Nm tcpdmatch
+.Op Fl d
+.Op Fl i Ar inet_conf
+.Ar daemon Op Ar @server
+.Op Ar user@
+.Ar client
+.Sh DESCRIPTION
+.Nm tcpdmatch
+predicts how the tcp wrapper would handle a specific request for service.
+Examples are given below.
+.Pp
+The program examines the
+.Xr tcpd 8
+access control tables (default
+.Pa /etc/hosts.allow
+and
+.Pa /etc/hosts.deny )
+and prints its conclusion. For maximal accuracy, it extracts additional
+information from your
+.Xr inetd 8
+network configuration file.
+.Pp
+When
+.Nm tcpdmatch
+finds a match in the access control tables, it
+identifies the matched rule. In addition, it displays the optional
shell commands or options in a pretty-printed format; this makes it
easier for you to spot any discrepancies between what you want and what
the program understands.
-.SH ARGUMENTS
+.Sh ARGUMENTS
The following two arguments are always required:
-.IP daemon
+.Pp
+.Bl -tag -width XXXXXX -compact
+.It Ar daemon
A daemon process name. Typically, the last component of a daemon
executable pathname.
-.IP client
+.It Ar client
A host name or network address, or one of the `unknown' or `paranoid'
wildcard patterns.
-.sp
-When a client host name is specified, \fItcpdmatch\fR gives a
-prediction for each address listed for that client.
-.sp
-When a client address is specified, \fItcpdmatch\fR predicts what
-\fItcpd\fR would do when client name lookup fails.
-.PP
-Optional information specified with the \fIdaemon@server\fR form:
-.IP server
+.El
+.Pp
+When a client host name is specified,
+.Nm tcpdmatch
+gives a prediction for each address listed for that client.
+.Pp
+When a client address is specified,
+.Nm tcpdmatch
+predicts what
+.Xr tcpd 8
+would do when client name lookup fails.
+.Pp
+Optional information specified with the
+.Ar daemon@server
+form:
+.Pp
+.Bl -tag -width XXXXXX -compact
+.It Ar server
A host name or network address, or one of the `unknown' or `paranoid'
-wildcard patterns. The default server name is `unknown'.
-.PP
-Optional information specified with the \fIuser@client\fR form:
-.IP user
+wildcard patterns. The default server name is `unknown'.
+.El
+.Pp
+Optional information specified with the
+.Ar user@client
+form:
+.Pp
+.Bl -tag -width XXXXXX -compact
+.It Ar user
A client user identifier. Typically, a login name or a numeric userid.
The default user name is `unknown'.
-.SH OPTIONS
-.IP -d
-Examine \fIhosts.allow\fR and \fIhosts.deny\fR files in the current
-directory instead of the default ones.
-.IP "-i inet_conf"
-Specify this option when \fItcpdmatch\fR is unable to find your
-\fIinetd.conf\fR or \fItlid.conf\fR network configuration file, or when
-you suspect that the program uses the wrong one.
-.SH EXAMPLES
-To predict how \fItcpd\fR would handle a telnet request from the local
-system:
-.sp
-.ti +5
-tcpdmatch in.telnetd localhost
-.PP
+.El
+.Sh OPTIONS
+.Bl -tag -width XXXXXXXXXXXX
+.It Fl d
+Examine
+.Pa hosts.allow
+and
+.Pa hosts.deny
+files in the current directory instead of the default ones.
+.It Fl i Ar inet_conf
+Specify this option when
+.Nm tcpdmatch
+is unable to find your
+.Pa inetd.conf
+network configuration file, or when you wish to test with a non-default one.
+.El
+.Sh EXAMPLES
+To predict how
+.Xr tcpd 8
+would handle a telnet request from the local system:
+.Pp
+.Bd -unfilled -offset indent
+tcpdmatch telnetd localhost
+.Ed
+.Pp
The same request, pretending that hostname lookup failed:
-.sp
-.ti +5
-tcpdmatch in.telnetd 127.0.0.1
-.PP
-To predict what tcpd would do when the client name does not match the
-client address:
-.sp
-.ti +5
-tcpdmatch in.telnetd paranoid
-.PP
-On some systems, daemon names have no `in.' prefix, or \fItcpdmatch\fR
-may need some help to locate the inetd configuration file.
-.SH FILES
-.PP
-The default locations of the \fItcpd\fR access control tables are:
-.PP
-/etc/hosts.allow
-.br
-/etc/hosts.deny
-.SH SEE ALSO
-.na
-.nf
-tcpdchk(8), tcpd configuration checker
-hosts_access(5), format of the tcpd access control tables.
-hosts_options(5), format of the language extensions.
-inetd.conf(5), format of the inetd control file.
-tlid.conf(5), format of the tlid control file.
-.SH AUTHORS
-.na
-.nf
+.Pp
+.Bd -unfilled -offset indent
+tcpdmatch telnetd 127.0.0.1
+.Ed
+.Pp
+To predict what
+.Xr tcpd 8
+would do when the client name does not match the client address:
+.Pp
+.Bd -unfilled -offset indent
+tcpdmatch telnetd paranoid
+.Ed
+.\" .Pp
+.\" On some systems, daemon names have no `in.' prefix, or
+.\" .Nm tcpdmatch\
+.\" may need some help to locate the inetd configuration file.
+.Sh FILES
+.Pp
+The default locations of the
+.Xr tcpd 8
+access control tables are:
+.Pp
+.Bl -tag -width /etc/hosts.allow -compact
+.It Pa /etc/hosts.allow
+Access control table (allow list)
+.It Pa /etc/hosts.deny
+Access control table (deny list)
+.El
+.Sh SEE ALSO
+.Xr hosts_access 5 ,
+.Xr hosts_options 5 ,
+.Xr inetd.conf 5 ,
+.Xr tcpdchk 8 .
+.Sh AUTHOR
+.Bd -unfilled -offset indent
Wietse Venema (wietse@wzv.win.tue.nl),
Department of Mathematics and Computing Science,
Eindhoven University of Technology
Den Dolech 2, P.O. Box 513,
5600 MB Eindhoven, The Netherlands
+.Ed
\" @(#) tcpdmatch.8 1.5 96/02/11 17:01:35