summaryrefslogtreecommitdiffstats
path: root/usr.sbin/inetd/inetd.c
Commit message (Collapse)AuthorAgeFilesLines
* Per letter dated July 22, 1999 remove 3rd clause of Berkeley derived softwareimp2004-08-071-4/+0
| | | | (with permission of addtional copyright holders where appropriate)
* Remove the requirement that the "discard" service be defined in thebrooks2004-04-201-1/+5
| | | | | | | services database. Now only services that are actually used need to be defined. Submitted by: ume
* The list of (key,value) pairs to request_init is terminated by a 0 key,dwmalone2004-04-041-1/+1
| | | | | | | not NULL. Submitted by: Stefan Farfeleder <stefan@fafoe.narf.at> MFC after: 3 days
* On startup, warn if inetd's config file doesn't exist. This isn'tdwmalone2004-03-221-0/+2
| | | | | | | | | | | exactly the same as patch from the PR, which also exited if the config file was missing. I didn't use Jeff's patch because I was worried that some people might start inetd, create the config file and then HUP inetd. PR: 60806 Submitted by: Jeff Ito <jeffi@rcn.com> MFC after: 2 weeks
* Rather than use the gcc -fno-builtin-log flag, just rename the 'int log'peter2003-10-301-4/+4
| | | | variable.
* Since semantic of IPV6_PKTINFO was changed in RFC3542, we need toume2003-10-261-1/+1
| | | | | | use IPV6_RECVPKTINFO instead. Reported by: someone (I had removed the mail wrongly, sorry)
* Use -fno-builtin-log so gcc doesn't get ideas about using a math functionpeter2003-10-261-1/+1
| | | | | to log data. Clean up an unused variable that was hidden by the WARNS?=2 being commented out. Uncomment it now that it compiles cleanly again.
* Get the connections per minute calculation right. By good fortunedwmalone2003-07-151-1/+1
| | | | | | | | | | | (or possibly testing) the previous formula worked for the default constants compiled into inetd, but if you recompiled with different values of CHTSIZE and CHTGRAN the calculation might not have worked. PR: 54354 Submitted by: Claus Assmann <ca@sendmail.org> Submitted by: Jose Marcio Martins da Cruz <Jose-Marcio.Martins@ensmp.fr> MFC after: 5 days
* Under some unusual conditions, inetd can leak a open file discriptordwmalone2003-02-231-7/+23
| | | | | | | | | | into a child process. Rather than closing the discriptors manually, mark all discriptors as close-on-exec. PR: 47694 Submitted by: Max Okumoto <okumoto@ucsd.edu> Obtained from: NetBSD MFC after: 2 weeks
* After calling login_getclass, be sure to call login_close so thatdwmalone2003-02-231-1/+6
| | | | | | | | | we don't leak memory. Only one of these two cases (reconfig) actually causes a leak because the other is usually followed by an exec. PR: 46845 Reviewed by: David Wang <dsw@juniper.net> MFC after: 2 weeks
* The tcp_wrappers function `fromhost()' can fail. In suchume2003-02-131-2/+16
| | | | | | | cases, the `struct sockaddr' will not be allocated. Reported by: nectar MFC after: 2 days
* Using LOGIN_SETALL &~LOGIN_SETMAC to avoid setting the MAC label improperly,rwatson2003-01-161-1/+1
| | | | | | | | | | rather than specifically setting the process priority and resource class; otherwise, we improperly set other aspects of the login class. We have a bit more to do here, but the proper fix will probably involve breaking out MAC labels from the login class at some point, as well as further clarifying the logic here. Pointed out by: kuriyama, max
* For now, set only the resource limits and process priority associatedrwatson2003-01-081-1/+2
| | | | | | | | | | | | | | | | | with a class, rather than all aspects of the class when switching classes for an inetd service. Because we hard-code /daemon in the current inetd implementation, using SETALL has unfortunate side-effects involving the MAC code, and potentially other credential related settings in the future. This change maintains the DoS-resistent aspects of the class behavior, which is all that is promised in the inetd man page. A larger set of diffs providing more pluggability and configurability was deferred for this more simple approach in the short term. Reviewed by: ache Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
* Add used #include <limits.h>.wollman2002-10-271-3/+4
|
* When printing the wait status, break it down into a signal and a exit status.dwmalone2002-09-041-4/+10
| | | | | | PR: 41912 Submitted by: Aaron Smith <aaron@mutex.org> MFC after: 2 weeks
* Swap sense of no_v[46]bind variables and rename as v[46]bind_ok -dwmalone2002-09-041-19/+19
| | | | | | | this avoids some double negatives which are a bit difficult to parse. Always tread v[46]bind{,_ok} as booleans.
* Fix parsing of unix domain entries after addition of IPv6 RPC support.dwmalone2002-09-041-38/+39
| | | | | PR: 40771 Submitted by: Jean-Luc Richier <Jean-Luc.Richier@imag.fr>
* Don't initialise policy, v4bind and v6bind where the variables aredwmalone2002-09-021-3/+10
| | | | | | | | | | | declared - it was bad style and caused a bug. v[46]bind need to be reset whenever we go to the "more:" label. Jean-Luc and I came up with this patch independently, so it had better be right! PR: 40771 Submitted by: Jean-Luc Richier <Jean-Luc.Richier@imag.fr>
* tpc -> tcp in an error message.dwmalone2002-09-021-2/+2
| | | | | PR: 40771 Submitted by: Jean-Luc Richier <Jean-Luc.Richier@imag.fr>
* Clear up a few warnings (unused variable, rpc versions are usigned so use %u,dwmalone2002-09-021-8/+7
| | | | | | rename a parameter to avoid shadowing a global). MFC after: 1 month
* Add capability for limiting the maximum number of simultaneousume2002-08-071-3/+283
| | | | | | | | | invocations of each service from a single IP address. Requested by: matusita Reviewed by: dwmalone Tested by: matusita on snapshots.jp.FreeBSD.org MFC after: 2 weeks
* use IPV6_V6ONLY instead of non standard IPV6_BINDV6ONLY.ume2002-07-221-4/+2
| | | | MFC after: 1 week
* add support for rpc IPv6 (rpc/udp/46 ...)alfred2002-07-151-32/+99
| | | | Submitted by: Jean-Luc Richier <Jean-Luc.Richier@imag.fr>
* Replace the SWAP(var0,var1) macro with SWAP(type,var0,var1) and use it asjmallett2002-06-221-9/+9
| | | | | | | | | is appropriate to avoid using typeof/__typeof__. It is worth noting that SWAP() is only ever used to swap pointer values so 'void *' assumptions would have been acceptable, but I'd gladly pay you tuesday for a cheeseburger^W cleaner interface today. Poked into submission by: bde
* Unused macro.jmallett2002-06-221-1/+0
|
* __FBSDID() strategic insertion.jmallett2002-06-211-2/+3
|
* Kill __P, yuck.jmallett2002-06-211-22/+22
|
* Mark unused variables __unused.jmallett2002-06-211-3/+3
| | | | Built standalone, inetd(8) is WARNS=5 clean, WARNS=6 if you ignore %m fits.
* Use __typeof__ instead of typeof.jmallett2002-06-211-1/+1
|
* ANSI prototypes via protoize(1).jmallett2002-06-211-56/+28
|
* Log invalid config entries. Make the -d option actually log tojwd2002-05-261-4/+7
| | | | | | | the terminal(-d fix from dwmalone). Approved by: dwmalone MFC after: 2 weeks
* Make compilable without -DINET6.ume2002-05-081-2/+2
|
* Log address family of a connection.ume2002-05-081-4/+6
| | | | | Requested by: matusita Reviewed by: matusita
* o Remove old setproctitle.dwmalone2001-07-171-47/+5
| | | | | | | | o Mark unused variables. o Set WARNS?=2 o Results in no code changes. Submitted by: Mike Barcroft <mike@q9media.com>
* Fix most of the warnings given by WARNS=2.dwmalone2001-06-241-38/+65
|
* Give inetd the ability to manage unix domain sockets. Details ofdwmalone2001-06-161-10/+95
| | | | | | | | | | | how to use this feature are in the man page. This is based on work by Lyndon Nerenberg. (The only difficult part about this patch is the fact that you can't fchown a unix domain socket, which means the sockets must be put in a secure directory). Reviewed by: dillon
* Get rid of se_ctladdrinitok, which doesn't do anything and seemesdwmalone2001-06-061-14/+0
| | | | | | | to have been accidently imported when ipv6 support was added to inetd. Approved by: ume
* Recently, other BSDs had faith support in inetd. Though our inetd hasume2001-05-311-1/+7
| | | | | | | | it already, their syntax is not compatible with ours. It will confuse users. So, we have compatibility with their syntex. Approved by: dwmalone Obtained from: NetBSD
* Various cleanups of inetd: Avoid shadowing variables, use socklen_tdwmalone2001-01-221-19/+17
| | | | | | | instead of ints, don't cast to char *, clear up some remote name handling code which had become a little odd. Should result in no functional changes.
* Don't mention /etc/protocols in inetd documentation or comments, as inetddwmalone2001-01-221-2/+2
| | | | | | | doesn't actually use it. PR: 24307 Submitted by: opentrax@email.com
* Tidy up some prototypes:dwmalone2000-12-031-4/+8
| | | | | | | make sure there is exactly one prototype for each function, use K&R style definitions everywhere to match dominant style, make flag_signal take an int to avoid problems if we have ANSI prototypes and K&R definitions.
* Fix two typos in comments.dwmalone2000-10-241-1/+1
| | | | | PR: 22268 Submitted by: Daniel S. Lewart <d-lewart@uiuc.edu>
* Don't leak a file discriptor if a service we've called accept() fordwmalone2000-10-211-0/+3
| | | | | | loops. Submitted by: Ian Dowse <iedowse@maths.tcd.ie>
* Make reconfiguring an external service as builtin service work.dwmalone2000-10-021-0/+1
| | | | | | PR: 21650 Submitted by: ben Tested by: dan@ducky.nz.freebsd.org
* Explain "-c" option more exactly and state the default in the mandwmalone2000-08-031-7/+9
| | | | | | | | | | | | | page. Add ability to run "inetd -R 0" to disable the default connection per minute limit of 256 connections. Document this in man page. Don't use maxchild as a boolean - instead check if it is greater than zero. Reviewed by: sheldonh Based on a patch by: Alexander Langer <alex@big.endian.de>
* Sleep for a second after tcp wrappers rejects a connection, so wedwmalone2000-07-311-1/+3
| | | | | | | don't traumatise the parent inetd. Requested by: wietse@porcupine.org Approved by: markm
* Make sure to use IPv4 mapped IPv6 address when mapped address isume2000-04-021-5/+6
| | | | | | requested in /etc/inetd.conf. Reviewed by: shin
* Make inetd compilable without INET6.shin2000-03-111-2/+2
| | | | | | Approved by: jkh Submitted by: jhb
* Fix broken inet logging when wrapping options are not specified.shin2000-02-221-2/+2
| | | | | | Approved by: jkh Submitted by: Ben Smithurst <ben@scientia.demon.co.uk>
* Fix inetd wrong AF check for RPC servicesshin2000-02-031-2/+3
| | | | | | | | | | | | Incorrect Address Family check is done for RPC services, and fail to initialize it. The error check is replaced to new one, which checks if IPv4 bind is enabled or not. (It is disabled when IPv6 numeric addr is specified for -a bind address option.) An review reqeust is once sent to des, but he quit MAINTAINER. Approved by: jkh
OpenPOWER on IntegriCloud