Commit 578b42ab authored by Marco d'Itri's avatar Marco d'Itri

Imported Upstream version 0.20080125

parent deb118bb
/Makefile/1.3/Fri Mar 31 01:00:49 2000//
/inetd.8/1.27/Thu Dec 30 16:35:38 2004//
/inetd.c/1.122/Thu Dec 30 16:35:38 2004//
/pathnames.h/1.2/Thu Dec 30 16:35:39 2004//
D
src/usr.sbin/inetd
anoncvs@anoncvs1.usa.openbsd.org:/cvs
This diff is collapsed.
# $OpenBSD: Makefile,v 1.3 2000/03/31 01:00:49 deraadt Exp $
# $OpenBSD: Makefile,v 1.2 1997/09/21 11:43:44 deraadt Exp $
PROG= inetd
MAN= inetd.8
......
.\" $OpenBSD: inetd.8,v 1.27 2004/06/30 07:58:12 otto Exp $
.\" $OpenBSD: inetd.8,v 1.31 2008/01/06 13:49:42 jmc Exp $
.\" Copyright (c) 1985, 1991 The Regents of the University of California.
.\" All rights reserved.
.\"
......@@ -28,7 +28,7 @@
.\"
.\" from: @(#)inetd.8 6.7 (Berkeley) 3/16/91
.\"
.Dd March 16, 1991
.Dd $Mdocdate: January 6 2008 $
.Dt INETD 8
.Os
.Sh NAME
......@@ -65,6 +65,11 @@ Turns on debugging.
.It Fl R Ar rate
Specify the maximum number of times a service can be invoked
in one minute; the default is 256.
If a service exceeds this limit,
.Nm
will log the problem
and stop servicing requests for the specific service for ten minutes.
See also the wait/nowait configuration fields below.
.El
.Pp
Upon execution,
......@@ -80,8 +85,7 @@ Comments are denoted by a
at the beginning
of a line.
The fields of the configuration file are as follows:
.Pp
.Bd -unfilled -offset indent -compact
.Bd -unfilled -offset indent
service name
socket type
protocol
......@@ -93,8 +97,7 @@ server program arguments
.Pp
To specify a Sun-RPC
based service, the entry would contain these fields.
.Pp
.Bd -unfilled -offset indent -compact
.Bd -unfilled -offset indent
service name/version
socket type
rpc/protocol
......@@ -253,13 +256,15 @@ suffix (separated from
.Dq wait
or
.Dq nowait
by a dot) specifies the maximum number of server instances that may be
spawned from
.Nm inetd
within an interval of 60 seconds.
When omitted,
.Dq max
defaults to 256.
by a dot) specifies the maximum number of times a service can be invoked
in one minute; the default is 256.
If a service exceeds this limit,
.Nm
will log the problem
and stop servicing requests for the specific service for ten minutes.
See also the
.Fl R
option above.
.Pp
Stream servers are usually marked as
.Dq nowait
......@@ -380,7 +385,6 @@ only IPv6 traffic will be routed to the server.
.Xr identd 8 ,
.Xr rshd 8 ,
.Xr talkd 8 ,
.Xr telnetd 8 ,
.Xr tftpd 8
.Sh HISTORY
The
......@@ -402,9 +406,3 @@ have more than one entry for a given RPC service, everything should
work correctly.
(Note that default host address specifiers do apply to
RPC lines with no explicit specifier.)
.Pp
.Dq rpc
or
.Dq tcpmux
on IPv6 is not tested enough.
Kerberos support on IPv6 is not tested.
/* $OpenBSD: inetd.c,v 1.123 2005/04/02 18:10:52 otto Exp $ */
/* $OpenBSD: inetd.c,v 1.125 2008/01/05 09:53:42 jmc Exp $ */
/*
* Copyright (c) 1983,1991 The Regents of the University of California.
......@@ -37,7 +37,7 @@ char copyright[] =
#ifndef lint
/*static const char sccsid[] = "from: @(#)inetd.c 5.30 (Berkeley) 6/3/91";*/
static const char rcsid[] = "$OpenBSD: inetd.c,v 1.123 2005/04/02 18:10:52 otto Exp $";
static const char rcsid[] = "$OpenBSD: inetd.c,v 1.125 2008/01/05 09:53:42 jmc Exp $";
#endif /* not lint */
/*
......@@ -358,7 +358,8 @@ main(int argc, char *argv[])
}
case '?':
default:
fprintf(stderr, "usage: %s [-R rate] [-d] [conf]\n",
fprintf(stderr,
"usage: %s [-d] [-R rate] [configuration file]\n",
progname);
exit(1);
}
......@@ -375,6 +376,11 @@ main(int argc, char *argv[])
progname);
exit(1);
}
if (argc > 1) {
fprintf(stderr, "%s: more than one argument specified\n",
progname);
exit(1);
}
umask(022);
if (debug == 0) {
......@@ -1494,13 +1500,9 @@ again:
char *
nextline(FILE *fd)
{
char *cp;
if (fgets(line, sizeof (line), fd) == NULL)
return (NULL);
cp = strchr(line, '\n');
if (cp)
*cp = '\0';
line[strcspn(line, "\n")] = '\0';
return (line);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment