diff options
author | assar <assar@FreeBSD.org> | 2001-02-13 16:46:19 +0000 |
---|---|---|
committer | assar <assar@FreeBSD.org> | 2001-02-13 16:46:19 +0000 |
commit | 3a971fe69aad52dfd248901ae796e64a96ae3e37 (patch) | |
tree | ac7b5c62510ffa9f0316643bcb19a3fed3d5bef7 /crypto/heimdal/lib/roken/mini_inetd.c | |
parent | 2934fc23653f64b32f4db32233d7eda11ca274f0 (diff) | |
parent | ebfe6dc471c206300fd82c7c0fd145f683aa52f6 (diff) | |
download | FreeBSD-src-3a971fe69aad52dfd248901ae796e64a96ae3e37.zip FreeBSD-src-3a971fe69aad52dfd248901ae796e64a96ae3e37.tar.gz |
This commit was generated by cvs2svn to compensate for changes in r72445,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'crypto/heimdal/lib/roken/mini_inetd.c')
-rw-r--r-- | crypto/heimdal/lib/roken/mini_inetd.c | 32 |
1 files changed, 5 insertions, 27 deletions
diff --git a/crypto/heimdal/lib/roken/mini_inetd.c b/crypto/heimdal/lib/roken/mini_inetd.c index 9b8a650..bb31962 100644 --- a/crypto/heimdal/lib/roken/mini_inetd.c +++ b/crypto/heimdal/lib/roken/mini_inetd.c @@ -33,35 +33,11 @@ #ifdef HAVE_CONFIG_H #include <config.h> -RCSID("$Id: mini_inetd.c,v 1.25 2000/01/26 00:54:48 assar Exp $"); -#endif - -#include <stdio.h> - -#ifdef HAVE_UNISTD_H -#include <unistd.h> -#endif -#ifdef HAVE_SYS_TYPES_H -#include <sys/types.h> -#endif -#ifdef HAVE_SYS_TIME_H -#include <sys/time.h> -#endif -#ifdef HAVE_SYS_SOCKET_H -#include <sys/socket.h> -#endif -#ifdef HAVE_NETINET_IN_H -#include <netinet/in.h> -#endif -#ifdef HAVE_NETINET_IN6_H -#include <netinet/in6.h> -#endif -#ifdef HAVE_NETINET6_IN6_H -#include <netinet6/in6.h> +RCSID("$Id: mini_inetd.c,v 1.28 2000/10/08 13:38:47 assar Exp $"); #endif #include <err.h> -#include <roken.h> +#include "roken.h" /* * accept a connection on `s' and pretend it's served by inetd. @@ -72,7 +48,7 @@ accept_it (int s) { int s2; - s2 = accept(s, NULL, 0); + s2 = accept(s, NULL, NULL); if(s2 < 0) err (1, "accept"); close(s); @@ -127,6 +103,8 @@ mini_inetd (int port) err (1, "bind"); if (listen (fds[i], SOMAXCONN) < 0) err (1, "listen"); + if (fds[i] >= FD_SETSIZE) + errx (1, "fd too large"); FD_SET(fds[i], &orig_read_set); max_fd = max(max_fd, fds[i]); ++i; |