Commit Graph

182 Commits

Author SHA1 Message Date
sevan 421949a31f ansify - drop the K&R style prototypes & implementations. 2018-01-23 21:06:24 +00:00
martin ee3280f977 Bump MAXARGV from 20 to 64 - with bozohttpd and all config on the command
line it is easy to hit the (silent) limit.
2017-11-28 11:51:11 +00:00
ozaki-r 37c5cac096 Don't setup SPs if no policy sepecifier is specified
We expect that SPs are set up iff some policy sepecifier(s) are specified.

Found on investigating an issue reported by Robert Swindells
2017-10-17 07:13:19 +00:00
wiz 2b8372dc3b Simplify. 2017-07-20 07:42:54 +00:00
dholland fbbc1f22f4 Rework previous (and the text it modified) for clarity. 2017-07-19 16:37:17 +00:00
wiz 575625986e New sentence, new line. 2017-07-16 21:19:38 +00:00
christos 3aa843808a PR/52412: Edgar Pettijohn: Describe the service/port syntax. 2017-07-16 21:05:19 +00:00
elric e8ad4c8a7e Increase buffer size reported to strlcpy() to be one larger than the
length of the string we copy in so that there is space for the '\0'.
2017-02-15 02:48:31 +00:00
khorben fa8ee723bd Use base 10 when logging the exit status or exit signal for sub-processes,
instead of hexadecimal.
2014-04-05 23:36:10 +00:00
christos a16db3405d PR/47318: Henning Petersen: Replace (r)index with str(r)chr in inetd.c
And while here strncpy with strlcpy
2012-12-13 19:38:40 +00:00
drochner 8fd6dadaf8 include <netipsec/ipsec.h> rather than <netinet6/ipsec.h> from userland
where possible, for consistency and compatibility to FreeBSD
(exception: KAME specific statistics gathering in netstat(1) and systat(1))
2012-01-04 16:09:40 +00:00
joerg bec77c5f43 Use __dead 2011-08-31 13:32:36 +00:00
wiz 9c28d8c767 Use more markup. 2011-04-25 22:12:05 +00:00
pooka a7c3e616ee RLIMIT_NOFILE stabilized in NetBSD 17 years ago, so it's safe now
to remove the #ifdef's from around code which uses it.
2010-12-15 15:36:15 +00:00
pooka 7d769f0a0f Nuke conditionally compiled MULOG stuff. Itojun wanted to do it
already 8 years ago when he fixed the compilation last time, and
again it hasn't been buildable in years.
2010-12-15 13:13:28 +00:00
dholland d4ca0466e8 Avoid SIGSEGV in forked child process for (some?) instant-disconnect clients. 2010-03-25 16:36:00 +00:00
reed 2d0dbf5439 Change manpage reference from talkd to ntalkd.
(Man link does exist, but no binary.)
2009-10-24 12:23:47 +00:00
tsarna 4a827eaa92 Back out mDNS changes which were not discussed.
There is design work that needs to be done first.
2009-10-22 22:50:35 +00:00
wiz aec158cb35 Bump date for mDNS support. 2009-10-22 21:43:28 +00:00
jkunz bd5b8260f5 Add mDNS Service Directory support to inetd(8).
inetd(8) can now advertize services in the mDNS-SD.
(Per service configuration option in inetd.conf(5).)
2009-10-22 16:34:27 +00:00
wiz c267463d84 New sentence, new line; remove trailing whitespace. 2009-07-14 08:24:15 +00:00
dholland b7c32656db Fix typo; also do some minor wording adjustments nearby. 2009-07-14 07:43:16 +00:00
roy 7027866a09 Rename internal getline() function to get_line() so it does
conflict with the soon to be added getline(3) libc function.
2009-07-13 19:05:39 +00:00
christos 6a9b5acd29 print the proper client address (ryo shimizu) 2009-05-23 03:24:51 +00:00
lukem 8d37bc2951 Fix -Wsign-compare issue 2009-04-15 08:38:37 +00:00
christos 8b39f71df8 - when we close an se_fd, set it to -1
- fix int/ssize_t/size_t/socklen_t issues
- fix casts
- remove unused variables
- fix prototypes
- fix const
- remove unneeded casts
2009-01-08 21:37:20 +00:00
christos 5fe5dff0de PR/40340: Ed Ravin: Print the numeric address in addition to the hostname. 2009-01-08 18:29:43 +00:00
christos ef3c9e6675 Print the numeric address of the host. 2009-01-08 18:08:10 +00:00
wiz 6db83de410 Bump date for previous. 2008-08-28 21:39:08 +00:00
elric 6457bb1668 Changed one period into a colon.
Added documentation that inetd can open UNIX-domain sockets.  It's been
able to do this for over a decade but it hasn't been documented and it's
quite a nice feature.
2008-08-27 19:55:20 +00:00
tls b1d270319d Manual pages for accept_filters(9), from FreeBSD. Also, document syntax we
added in NetBSD for specifying accept filters in inetd.conf.
2008-08-10 14:55:13 +00:00
tls 717f903a98 Add accept filters, ported from FreeBSD by Coyote Point Systems. Add inetd
support for specifying an accept filter for a service (mostly as a usage
example, but it can be handy for other things).  Manual pages to follow
in a day or so.

OK core@.
2008-08-04 03:55:47 +00:00
lukem 9c1945664c Remove the \n and tabs from the __COPYRIGHT() strings.
Tweak to use a consistent format.
2008-07-21 13:36:57 +00:00
dholland e62b84ba61 When running a builtin service (a what? yeah, a piece of useless
legacy code), if the builtin service forks (not all do), avoid leaking
listening sockets into the child process.

If the child process were to keep copies of the listening sockets
around and then hang about for a long time, it would prevent inetd
from being able to re-bind them upon restart.

The listening sockets are tagged close-on-exec, but that doesn't help
when one doesn't exec.

Patch from my own very old PR 8253.
2008-05-26 03:41:25 +00:00
martin cd22f25e6f Move TNF licenses to 2 clause form 2008-05-02 18:11:04 +00:00
martin ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
reed 1c05fbcafd Tell what happens if reaches max spawn rate.
(I added this because I forgot it was ten minutes
as defined by RETRYTIME in inetd.c.)
2008-01-04 18:21:35 +00:00
tls 4147a3c54a Add new Makefile knob, USE_FORT, which extends USE_SSP by turning on the
FORTIFY_SOURCE feature of libssp, thus checking the size of arguments to
various string and memory copy and set functions (as well as a few system
calls and other miscellany) where known at function entry.  RedHat has
evidently built all "core system packages" with this option for some time.

This option should be used at the top of Makefiles (or Makefile.inc where
this is used for subdirectories) but after any setting of LIB.

This is only useful for userland code, and cannot be used in libc or in
any code which includes the libc internals, because it overrides certain
libc functions with macros.  Some effort has been made to make USE_FORT=yes
work correctly for a full-system build by having the bsd.sys.mk logic
disable the feature where it should not be used (libc, libssp iteself,
the kernel) but no attempt has been made to build the entire system with
USE_FORT and doing so will doubtless expose numerous bugs and misfeatures.

Adjust the system build so that all programs and libraries that are setuid,
directly handle network data (including serial comm data), perform
authentication, or appear likely to have (or have a history of having)
data-driven bugs (e.g. file(1)) are built with USE_FORT=yes by default,
with the exception of libc, which cannot use USE_FORT and thus uses
only USE_SSP by default.  Tested on i386 with no ill results; USE_FORT=no
per-directory or in a system build will disable if desired.
2007-05-28 12:06:17 +00:00
hubertf 889da1779b * Don't include headers twice
* Remove a few trailing whitespaces
 * Rearrange and join to one #if for some headers

Patch contributed by Slava Semushin <slava.semushin@gmail.com>
in private mail.
2007-01-16 17:32:04 +00:00
rillig 7eb2c18b51 Fixed gcc warnings about comparison between signed and unsigned, as well
as one case where a variable had been used for two different purposes
(which also required different types).
2007-01-02 16:00:46 +00:00
mrg 1fa98f5b05 - use socklen_t where appropriate
- avoid lvalue casts
2006-05-11 06:59:40 +00:00
wiz d57174cb26 Remove useless lines. From YOMURA Masanori in private mail.
While here, remove outdated comment.
2005-09-11 23:38:35 +00:00
christos 2f3bdfce80 Don't ignore SIGCHLD, because we are not going to get kqueue notifications
about it if we do.
2005-04-09 20:14:55 +00:00
lukem 7157011597 Only compile in IPv6 support if ${USE_INET6} != "no"
MKINET6 is for providing IPv6 infrastructure.
USE_INET6 is for compiling IPv6 support into the programs (needs MKINET6).
2005-01-10 02:58:58 +00:00
christos a0d7588f62 Simplify code a bit, and whitespace. 2004-11-28 05:40:47 +00:00
dsl cfe7f80ff0 Add (unsigned char) cast to ctype functions 2004-10-29 20:51:11 +00:00
pk 6b2734d11c Add two missing `#ifdef INET6's. 2004-10-20 11:37:42 +00:00
rumble 7caa241563 Change the log that is produced when the maximum spawn count per
last 60 second interval is reached to more accurately reflect
what has happened.

Also, break up a few long strings, obey 80 columns, and remove a
superfluous newline passed to syslog(3).
2004-09-14 17:42:31 +00:00
mrg 36fa2ebfb9 note that hosts_allow does not affect internal services 2004-04-02 10:13:57 +00:00
wiz 4db64d9590 Bump date for previous, and use Em for
emphasis instead of Sy for symbolic for marking up a warning.
2004-03-24 11:26:16 +00:00