Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/inetd Add text to more clearly document that tcpd i...
details: https://anonhg.NetBSD.org/src/rev/1c9ce052a3ef
branches: trunk
changeset: 506963:1c9ce052a3ef
user: fair <fair%NetBSD.org@localhost>
date: Sat Mar 10 11:52:51 2001 +0000
description:
Add text to more clearly document that tcpd is not needed, per PR 10754.
Add a FILES section. Add a few more references to SEE ALSO.
Clean up nroff nits (e.g. spaces at end of line).
diffstat:
usr.sbin/inetd/inetd.8 | 161 ++++++++++++++++++++++++++++++++----------------
1 files changed, 108 insertions(+), 53 deletions(-)
diffs (truncated from 343 to 300 lines):
diff -r 114e0e4e0fd2 -r 1c9ce052a3ef usr.sbin/inetd/inetd.8
--- a/usr.sbin/inetd/inetd.8 Sat Mar 10 11:00:37 2001 +0000
+++ b/usr.sbin/inetd/inetd.8 Sat Mar 10 11:52:51 2001 +0000
@@ -1,12 +1,12 @@
-.\" $NetBSD: inetd.8,v 1.34 2001/03/04 14:18:32 bjh21 Exp $
+.\" $NetBSD: inetd.8,v 1.35 2001/03/10 11:52:51 fair Exp $
.\"
.\" Copyright (c) 1998 The NetBSD Foundation, Inc.
.\" All rights reserved.
-.\"
+.\"
.\" This code is derived from software contributed to The NetBSD Foundation
.\" by Jason R. Thorpe of the Numerical Aerospace Simulation Facility,
.\" NASA Ames Research Center.
-.\"
+.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
@@ -22,7 +22,7 @@
.\" 4. Neither the name of The NetBSD Foundation nor the names of its
.\" contributors may be used to endorse or promote products derived
.\" from this software without specific prior written permission.
-.\"
+.\"
.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
@@ -68,7 +68,7 @@
.\"
.\" from: @(#)inetd.8 8.4 (Berkeley) 6/1/94
.\"
-.Dd March 16, 1991
+.Dd March 10, 2001
.Dt INETD 8
.Os
.Sh NAME
@@ -87,13 +87,13 @@
.Pa /etc/rc
(see
.Xr rc 8 ) .
-It then listens for connections on certain
-internet sockets. When a connection is found on one
-of its sockets, it decides what service the socket
-corresponds to, and invokes a program to service the request.
-After the program is
-finished, it continues to listen on the socket (except in some cases which
-will be described below). Essentially,
+It then listens for connections on certain internet sockets.
+When a connection is found on one of its sockets, it decides what
+service the socket corresponds to, and invokes a program to service
+the request.
+After the program is finished, it continues to listen on the socket
+(except in some cases which will be described below).
+Essentially,
.Nm
allows running one daemon to invoke several others,
reducing load on the system.
@@ -122,10 +122,11 @@
option is also given on the command line.
There must be an entry for each field of the configuration
file, with entries for each field separated by a tab or
-a space. Comments are denoted by a ``#'' at the beginning
-of a line. There must be an entry for each field (except for one
-special case, described below). The
-fields of the configuration file are as follows:
+a space.
+Comments are denoted by a ``#'' at the beginning of a line.
+There must be an entry for each field (except for one
+special case, described below).
+The fields of the configuration file are as follows:
.Pp
.Bd -unfilled -offset indent -compact
[addr:]service-name
@@ -152,8 +153,8 @@
.Ed
.Pp
For Internet services, the first field of the line may also have a host
-address specifier prefixed to it, separated from the service name by a
-colon. If this is done, the string before the colon in the first field
+address specifier prefixed to it, separated from the service name by a colon.
+If this is done, the string before the colon in the first field
indicates what local address
.Nm
should use when listening for that service, or the single character
@@ -166,7 +167,8 @@
host address specifier and colon, but no further fields, causes the
host address specifier to be remembered and used for all further lines
with no explicit host specifier (until another such line or the end of
-the file). A line
+the file).
+A line
.Dl *:
is implicitly provided at the top of the file; thus, traditional
configuration files (which have no host address specifiers) will be
@@ -192,8 +194,8 @@
.Pa /etc/rpc .
The part on the right of the
.Dq /
-is the RPC version number. This
-can simply be a single numeric argument or a range of versions.
+is the RPC version number.
+This can simply be a single numeric argument or a range of versions.
A range is bounded by the low version to the high version \-
.Dq rusers/1-3 .
.Pp
@@ -242,14 +244,17 @@
.Dq faith/tcp6 .
.Pp
In addition to the protocol, the configuration file may specify the
-send and receive socket buffer sizes for the listening socket. This
-is especially useful for TCP as the window scale factor, which is based on
-the receive socket buffer size, is advertised when the connection handshake
-occurs, thus the socket buffer size for the server must be set on the listen
-socket. By increasing the socket buffer sizes, better TCP performance may
-be realized in some situations. The socket buffer sizes are specified by
-appending their values to the protocol specification
-as follows:
+send and receive socket buffer sizes for the listening socket.
+This is especially useful for
+.Tn TCP
+as the window scale factor, which is based on the receive socket
+buffer size, is advertised when the connection handshake occurs,
+thus the socket buffer size for the server must be set on the listen socket.
+By increasing the socket buffer sizes, better
+.Tn TCP
+performance may be realized in some situations.
+The socket buffer sizes are specified by appending their values to
+the protocol specification as follows:
.Bd -literal -offset indent
tcp,rcvbuf=16384
tcp,sndbuf=64k
@@ -260,7 +265,8 @@
.Sq k
to indicate kilobytes or
.Sq m
-to indicate megabytes. Socket buffer sizes may be specified for all
+to indicate megabytes.
+Socket buffer sizes may be specified for all
services and protocols except for tcpmux services.
.Pp
The
@@ -277,7 +283,8 @@
.Dq multi-threaded
server, and should use the
.Dq nowait
-entry. For datagram servers which process all incoming datagrams
+entry.
+For datagram servers which process all incoming datagrams
on a socket and eventually time out, the server is said to be
.Dq single-threaded
and should use a
@@ -304,10 +311,11 @@
.Dq wait
or
.Dq nowait
-by a dot or a colon) specifies the maximum number of server instances that may
+by a dot or a colon) specifies the maximum number of server instances that may
be spawned from
.Nm
-within an interval of 60 seconds. When omitted,
+within an interval of 60 seconds.
+When omitted,
.Dq max
defaults to 40.
.Pp
@@ -317,24 +325,26 @@
marked as
.Dq wait .
The master socket will then be passed as fd 0 to the server, which will then
-need to accept the incoming connection. The server should eventually time
+need to accept the incoming connection.
+The server should eventually time
out and exit when no more connections are active.
.Nm
will continue to
listen on the master socket for connections, so the server should not close
-it when it exits.
+it when it exits.
.Xr identd 8
is usually the only stream server marked as wait.
.Pp
The
.Em user
-entry should contain the user name of the user as whom the server should
-run. This allows for servers to be given less permission than root.
+entry should contain the user name of the user as whom the server should run.
+This allows for servers to be given less permission than root.
Optionally, a group can be specified by appending a colon to the user name,
followed by the group name (it is possible to use a dot (``.'') in lieu of a
colon, however this feature is provided only for backward compatibility).
This allows for servers to run with a different (primary) group id than
-specified in the password file. If a group is specified and
+specified in the password file.
+If a group is specified and
.Em user
is not root, the supplementary groups associated with that user will still be
set.
@@ -344,7 +354,8 @@
entry should contain the pathname of the program which is to be
executed by
.Nm
-when a request is found on its socket. If
+when a request is found on its socket.
+If
.Nm
provides this service internally, this entry should
be
@@ -354,7 +365,8 @@
.Em server program arguments
should be just as arguments
normally are, starting with argv[0], which is the name of
-the program. If the service is provided internally, the
+the program.
+If the service is provided internally, the
word
.Dq internal
should take the place of this entry.
@@ -363,7 +375,8 @@
provides several
.Dq trivial
services internally by use of
-routines within itself. These services are
+routines within itself.
+These services are
.Dq echo ,
.Dq discard ,
.Dq chargen
@@ -372,8 +385,8 @@
(human readable time), and
.Dq time
(machine readable time,
-in the form of the number of seconds since midnight, January
-1, 1900). For details of these services, consult the appropriate
+in the form of the number of seconds since midnight, January 1, 1900 GMT).
+For details of these services, consult the appropriate
.Tn RFC
from the Network Information Center.
.Pp
@@ -386,6 +399,23 @@
creates a file
.Em /var/run/inetd.pid
that contains its process identifier.
+.Ss libwrap
+Support for
+.Tn TCP
+wrappers is included with
+.Nm
+to provide internal tcpd-like access control functionality.
+An external tcpd program is not needed.
+You do not need to change the
+.Pa /etc/inetd.conf
+server-program entry to enable this capability.
+.Nm
+uses
+.Pa /etc/hosts.allow
+and
+.Pa /etc/hosts.deny
+for access control facility configurations, as described in
+.Xr hosts_access 5 .
.Ss IPsec
The implementation includes a tiny hack to support IPsec policy settings for
each socket.
@@ -417,7 +447,7 @@
.Ss IPv6 TCP/UDP behavior
If you wish to run a server for IPv4 and IPv6 traffic,
you'll need to run two separate process for the same server program,
-specified as two separate lines on
+specified as two separate lines on
.Pa inetd.conf ,
for
.Dq tcp4
@@ -455,14 +485,33 @@
.Xr ip6 4
for details.
.El
+.Sh FILES
+.Bl -tag -width /etc/hosts.allow -compact
+.It Pa /etc/inetd.conf
+configuration file for all
+.Nm
+provided services
+.It Pa /etc/services
+service name to protocol and port number mappings.
+.It Pa /etc/protocols
+protocol name to protocol number mappings
+.It Pa /etc/rpc
+.Tn Sun-RPC
+service name to service number mappings.
+.It Pa /etc/hosts.allow
+explicit remote host access list.
+.It Pa /etc/hosts.deny
+explicit remote host denial of service list.
+.El
.Sh BUGS
Host address specifiers, while they make conceptual sense for RPC
-services, do not work entirely correctly. This is largely because the
-portmapper interface does not provide a way to register different ports
-for the same service on different local addresses. Provided you never
-have more than one entry for a given RPC service, everything should
Home |
Main Index |
Thread Index |
Old Index