aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/inetd
Commit message (Collapse)AuthorAgeFilesLines
* ctlstat: add prometheus outputAlan Somers2022-04-201-0/+3
| | | | | | | | | | | | | | | When invoked by inetd, ctlstat -P will now produce output suitable for ingestion into Prometheus. It's a drop-in replacement for https://github.com/Gandi/ctld_exporter, except that it doesn't report the number of initiators per target, and it does report time and dma_time. MFC after: 2 weeks Sponsored by: Axcient Relnotes: yes Reviewed by: bapt, bcr Differential Revision: https://reviews.freebsd.org/D29901
* inetd(8): Fix a typo in the manual pageGordon Bergling2022-04-191-1/+1
| | | | | | - s/similarily/similarly/ MFC after: 3 days
* inetd: Use the synopsis from the manual pageMateusz Piotrowski2021-12-061-3/+3
| | | | | | Also, document -s in the usage message. MFC after: 7 days
* inetd.8: Sort optionsMateusz Piotrowski2021-12-061-71/+68
| | | | | | | | | | | | While here: - Cluster flags without arguments together. - Simplify the synopsis of the -a flag. There is no need to distinguish between address and hostname there. - Add a missing argument to the -a flag in the description section. - Fix some typos. MFC after: 3 days
* inetd.8: Lint the fileMateusz Piotrowski2021-12-061-12/+11
| | | | | | Remove Tn macros and fix other style warnings. MFC after: 3 days
* inetd.conf: Wordsmith recommendationDaniel Ebdrup Jensen2021-03-181-1/+2
| | | | | Rather than recommend specific VTIs, it's better to give a general recommendation for where current and future suitable VTIs can be found.
* inetd: Add examples from manual page and other sourcesDaniel Ebdrup Jensen2021-02-262-43/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The manual page lists a bunch of examples, some of which already exist in this file. Since it's both easier to remember when all examples are listed in the same location, move examples so they get installed into /etc/inetd.conf This also means users won't have to copy-paste, but can simply uncomment one or more services to use them. As such, it also becomes necessary to remove the examples from the manual page, so instead add a note explaining where the previous examples as well as others may be found. Cross-references, including to ports, have also been added where applicable. The rsync example has lived in the bug tracker for too long, considering how useful it can situationally be, for example when backup jobs on client devices are run through periodic(8) weekly. The microsoft-ds entry is necessary for Windows 10 compatibility (this can be confirmed with packet capturing, as it is not readily documented at time of writing). While here, remove two examples for which compatible daemons could not be found in ports. Submitted by: David Yeske <dyeske at gmail.com> (in part, prev ver) PR: 122037 Reviewed by: kevans, brueffer, lwhsu, yuripv Differential Revision: https://reviews.freebsd.org/D28882
* inetd: fix unix sockaddr's length assignmentKyle Evans2021-02-121-5/+4
| | | | | | | | | | | | unsz was always exactly '1' here due to an unfortunate mispositioning of closing parenthesis. While it's generally irrelevant because bind(2) is passed the (accurate) sep->se_ctrladdr_size instead, it's not very helpful for anything locally that wants to use it rather than assuming that sep->se_ctrladdr_size perfectly fits the end of sun_path. Just drop unsz entirely and use the result of SUN_LEN() for it. MFC-after: 3 days
* inetd(8): Add comments to all examplesKyle Evans2020-05-141-2/+16
| | | | | | | | | | Submitted by: debdrup (with some minor changes by kevans) Reviewed by: bcr (manpages) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D24818 Notes: svn path=/head/; revision=361036
* inetd(8): Provide HTTP proxy example using netcatKyle Evans2020-05-131-1/+4
| | | | | | | | | | | | | | One of the fortunes that are included in freebsd-tips talks about how the superserver can be used to proxy connections with netcat, but there are no examples provided. This commit adds an example with comment explaining what it does. Submitted by: debdrup MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D24800 Notes: svn path=/head/; revision=361000
* inetd: two more nitsKyle Evans2020-01-101-6/+7
| | | | | | | | | | Use __COPYRIGHT for copyright to simply either embed it via .ident or have it properly marked __unused Move an ipsec reference to IPSEC Notes: svn path=/head/; revision=356602
* inetd: free WITHOUT_INET6_SUPPORT build of warningsKyle Evans2020-01-101-2/+13
| | | | | | | | | | | | | | | If inetd is compiled without inet6 support, we need to error out on rpc+inet6 services rather than attempting to call into rpc bits with an uninitialized netid. v4bind is only used with INET6 support, so move it under the proper #ifdefs with v6bind. Reported by: Pavel Timofeev <timp87 gmail com> MFC after: 3 days Notes: svn path=/head/; revision=356601
* inetd: fix WITHOUT_TCP_WRAPPERS build after r356248Ed Maste2020-01-031-0/+2
| | | | | | | | | | | | After increasing WARNS, building WITHOUT_TCP_WRAPPERS failed because of some unused variables. Reported by: Cirrus-CI (against my WIP branch) MFC with: r356248 Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=356318
* inetd: final round of trivial cleanup, NFCKyle Evans2020-01-011-34/+21
| | | | | | | | | | | | | | Highlights: - Use MAX() for maxsock raising; small readability improvement IMO - malloc(3) + memset(3) -> calloc(3) where appropriate - stop casting the return value of malloc(3) - mallloc(3) -> reallocarray(3) where appropriate A future change may enter capability mode when forking for some of the built-in handlers. Notes: svn path=/head/; revision=356254
* inetd: convert remaining bzero(3) to memset(3), NFCKyle Evans2020-01-012-4/+3
| | | | | | | | | | | | This change is purely in the name of noise reduction from static analyzers that want to complain that bzero(3) is obsolete in favor of memset(3). With this, clang-analyze at least is now noise free. WARNS= 6 also appears to have been OK for some time now, so drop the current setting and opt for the default. Notes: svn path=/head/; revision=356248
* inetd: track all child pids, regardless of maxchild specKyle Evans2020-01-012-29/+40
| | | | | | | | | | | | | | | | Currently, child pids are only tracked if maxchildren is specified. As a consequence, without a maxchild limit we do not get a notice in syslog on children aborting abnormally. This turns out to be a great debugging aide at times. Children are now tracked in a LIST; the management interface is decidedly less painful when there's no upper bound on the number of entries we may have at the cost of one small allocation per connection. PR: 70335 Notes: svn path=/head/; revision=356247
* inetd: add some macros for checking child limits, NFCKyle Evans2020-01-012-5/+9
| | | | | | | | | The main point here is capturing the maxchild > 0 check. A future change to inetd will start tracking all of the child pids so that it can give proper and consistent notification of process exit/signalling. Notes: svn path=/head/; revision=356246
* inetd: prefer strlcpy to strlen(3) check + strcpy(3), NFCKyle Evans2019-12-311-6/+9
| | | | | | | This is again functionally equivalent but more concise. Notes: svn path=/head/; revision=356218
* inetd: prefer strtonum(3) to strspn(3)+atoi(3), NFCKyle Evans2019-12-311-2/+8
| | | | | | | | strtonum(3) does effectively the same validation as we had, but it's more concise. Notes: svn path=/head/; revision=356217
* inetd: knock out some clang analyze warningsKyle Evans2019-12-312-8/+16
| | | | | | | | | | | | | | | | | chargen_dg: clang-analyze is convinced that endring could be non-NULL at entry, and thus wants to assume that rs == NULL. Just independently initialize rs if it's NULL to appease the analyzer. getconfigent: policy leaks on return free_connlist: reorganize the loop to make it clear that we're not going to access `conn` after it's been freed. cpmip/hashval: left-shifts performed will result in UB as we take signed 0xABC3D20F and left shift it by 5. Notes: svn path=/head/; revision=356215
* inetd: don't leak `policy` on returnKyle Evans2019-12-301-4/+3
| | | | | | | | | | | | | sep->se_policy gets a strdup'd version of policy, so we don't need it to stick around afterwards. While here, remove a couple of NULL checks prior to free(policy). CID: 1006865 MFC after: 3 days Notes: svn path=/head/; revision=356204
* Update Makefile.depend filesSimon J. Gerraty2019-12-111-2/+0
| | | | | | | | | | | | | Update a bunch of Makefile.depend files as a result of adding Makefile.depend.options files Reviewed by: bdrewery MFC after: 1 week Sponsored by: Juniper Networks Differential Revision: https://reviews.freebsd.org/D22494 Notes: svn path=/head/; revision=355617
* Add Makefile.depend.optionsSimon J. Gerraty2019-12-111-0/+6
| | | | | | | | | | | | | | | | | | | | Leaf directories that have dependencies impacted by options need a Makefile.depend.options file to avoid churn in Makefile.depend DIRDEPS for cases such as OPENSSL, TCP_WRAPPERS etc can be set in local.dirdeps-options.mk which can add to those set in Makefile.depend.options See share/mk/dirdeps-options.mk Reviewed by: bdrewery MFC after: 1 week Sponsored by: Juniper Networks Differential Revision: https://reviews.freebsd.org/D22469 Notes: svn path=/head/; revision=355616
* Remove all the RELEASE_CRUNCH instances that partially disable IPSECWarner Losh2019-07-151-3/+0
| | | | | | | | | | We remove IPSEC only in parts of the tree, and not others. RELEASE_CRUNCH to disable it has not kept up with all its uses. Remove it. Should there be a real need to disable IPSEC, one that hasn't shown up in the base system to date, it can be re-added behind a WITHOUT_IPSEC build option. Notes: svn path=/head/; revision=349996
* Move inetd.conf to usr.sbin/inetd/Brad Davis2018-08-122-0/+124
| | | | | | | | | | | This is pkgbase related as it uses CONFS to tag the file as a config file Approved by: AllanJude (mentor) Sponsored by: Essen Hackathon Differential Revision: https://reviews.freebsd.org/D16693 Notes: svn path=/head/; revision=337687
* various: general adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-271-0/+2
| | | | | | | | | | | | | | | | | Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. No functional change intended. Notes: svn path=/head/; revision=326276
* Don't assign rs as we will assign it later.Xin LI2017-11-271-3/+1
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=326244
* General further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-203-3/+9
| | | | | | | | | | | | | | | | | Mainly focus on files that use BSD 3-Clause license. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Special thanks to Wind River for providing access to "The Duke of Highlander" tool: an older (2014) run over FreeBSD tree was useful as a starting point. Notes: svn path=/head/; revision=326025
* DIRDEPS_BUILD: Update dependencies.Bryan Drewery2017-10-311-1/+0
| | | | | | | Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325188
* Simplify a pipe for signal handling.Hiroki Sato2017-03-201-53/+33
| | | | Notes: svn path=/head/; revision=315644
* Renumber copyright clause 4Warner Losh2017-02-284-4/+4
| | | | | | | | | | | | Renumber cluase 4 to 3, per what everybody else did when BSD granted them permission to remove clause 3. My insistance on keeping the same numbering for legal reasons is too pedantic, so give up on that point. Submitted by: Jan Schaumann <jschauma@stevens.edu> Pull Request: https://github.com/freebsd/freebsd/pull/96 Notes: svn path=/head/; revision=314436
* Fix up r312105Enji Cooper2017-01-141-0/+4
| | | | | | | | | | | | | | | | - Only #include tcpd.h when LIBWRAP is true to avoid header include errors - Only define whichaf when LIBWRAP is true to avoid -Wunused warning and to avoid issues with structs being defined that should only be defined when tcpd.h is included. MFC after: 2 weeks X-MFC with: r312105 Pointyhat to: ngie Reported by: gcc tinderbox Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=312162
* Conditionalize libwrap support into inetd based on MK_TCP_WRAPPERSEnji Cooper2017-01-142-1/+10
| | | | | | | | | | | | | This will allow inetd to stand by itself without libwrap. MFC after: 2 weeks Relnotes: yes Reviewed by: hrs (earlier version) Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D9056 Notes: svn path=/head/; revision=312105
* Fix build when WITHOUT_INET6 is defined.Hiroki Sato2017-01-051-0/+8
| | | | Notes: svn path=/head/; revision=311354
* - Add static for symbols which need not to be exported.Hiroki Sato2016-12-313-124/+129
| | | | | | | - Clean up warnings to the WARNS=6 level. Notes: svn path=/head/; revision=310921
* Rename getline with get_line to avoid collision with getline(3)Baptiste Daroussin2016-05-101-3/+3
| | | | | | | | When getline(3) in 2009 was added a _WITH_GETLINE guard has also been added. This rename is made in preparation for the removal of this guard Notes: svn path=/head/; revision=299356
* Use MAX macro from sys/param.h.Marcelo Araujo2016-05-021-1/+1
| | | | | | | MFC after: 2 weeks. Notes: svn path=/head/; revision=298909
* Use the SOCK_CLOEXEC flags in the socket(2) 'type' attribute instead ofBaptiste Daroussin2016-04-161-8/+3
| | | | | | | | | calling fcntl(2) MFC after: 1 week Notes: svn path=/head/; revision=298114
* Use pipe2(2) to directly set the close-on-exec flags directlyBaptiste Daroussin2016-04-161-6/+1
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=298111
* - Remove unused union p_un.Hiroki Sato2015-09-191-22/+13
| | | | | | | | | | | | - Use NI_MAXHOST-long buffer for getnameinfo(). Although INET6_ADDRSTRLEN was designed to hold the longest IPv6 address in IPv4-mapped address format a long time ago, getnameinfo() can return scope identifier in addition to it. MFC after: 1 day Notes: svn path=/head/; revision=287998
* - Fix a crash on a rpc entry when an IPv6 address is explicitly specifiedHiroki Sato2015-09-191-4/+2
| | | | | | | | | | | | | | in -a flag. - Fix a bug that sockaddr_in was used where sockaddr_in6 should have been used. This was not actually harmful because offsetof(struct sockaddr_in, sin_port) is equal to offsetof(struct sockaddr_in6, sin6_port). MFC after: 1 day Notes: svn path=/head/; revision=287997
* Add META_MODE support.Simon J. Gerraty2015-06-131-0/+23
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp Notes: svn path=/head/; revision=284345
| * dirdeps.mk now sets DEP_RELDIRSimon J. Gerraty2015-06-081-2/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=284172
| * Merge sync of headSimon J. Gerraty2015-05-272-7/+5
| |\ | |/ |/| | | Notes: svn path=/projects/bmake/; revision=283595
| * Merge from head@274682Simon J. Gerraty2014-11-191-14/+6
| |\ | | | | | | | | | Notes: svn path=/projects/bmake/; revision=274683
| * | Updated dependenciesSimon J. Gerraty2014-05-161-1/+0
| | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=266219
| * | Updated dependenciesSimon J. Gerraty2014-05-101-0/+2
| | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=265802
| * | Merge from headSimon J. Gerraty2014-05-081-1/+1
| |\ \ | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=265720
| * | | Updated dependenciesSimon J. Gerraty2013-03-111-0/+1
| | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=248169
| * | | Updated dependenciesSimon J. Gerraty2013-02-161-2/+0
| | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=246868