NetBSD/usr.sbin
christos b19025f3ec PR/56448: Solomon Ritzow: Various improvements.
Rate limiting code has been moved to ratelimit.c. I renamed
clear_ip_list to rl_clear_ip_list and broke the code up into more
functions. I have also made the per-IP rate limiting allocation more
efficient. IP addresses are now stored in their network format instead
of a string from getnameinfo (see inetd.h struct rl_ip_node). malloc
calls use only the space needed by the structure by using offsetof on
union members (I suppose this can be a bit dangerous if not done
correctly...). Per-IP rate limiting still supports textual comparison
using getnameinfo for address families other than AF_INET and AF_INET6, but I
don't think there are any that are actually compatible or used by inetd (I
haven't tested UNIX sockets with a remote bound to another file, but I did test
using IPv6 with the textual format by commenting out the IPv6 specific
code, and it works properly). Still potentially handy for the future.
The IP node list (se_rl_ip_list) now uses the <sys/queue.h> SLIST macros
instead of a custom list. I've broken rl_process up into helper functions
for each type of rate limiting and created a separate function for
address stringification, for use with printouts from the -d flag. I
tried to reduce stack memory use by moving printing code involving
string buffers into separate functions. I haven't tested rl_ipv6_eq on
a 32-bit system.

The code for the positional syntax has also been moved to parse.c.
Function try_biltin has been added to remove parse.c:parse_server's
dependency on the biltin structure definition.

File inetd.h has been updated with the proper function prototypes, and
the servtab structure has been update with the new IP node SLIST. I also
moved things around a bit. The way we (a peer and myself)
formatted inetd.h previously was somewhat confusing. Function and global
variable prototypes are now organized by the source file they are
defined in.

I also added a -f flag that I saw in another problem report
(https://gnats.netbsd.org/12823) that I thought could be useful. It
runs inetd in the foreground but without debug printouts or SO_DEBUG.
I'm not completely sure about the line "if (foreground) setsid()" that
I changed from "if (debug) setsid()".
2021-10-12 19:08:04 +00:00
..
ac use strlcpy() to ensure desired nul termination. 2021-04-12 09:29:53 +00:00
accton
acpitools fix various typos in comments, messages and documentation. 2021-09-19 10:34:06 +00:00
altq Fix all remaining typos, mainly in comments but also in few definitions and log messages, reported by me in PR kern/54889. 2021-07-24 21:31:31 +00:00
apm introduce some common variables for use in GCC warning disables: 2019-10-13 07:28:04 +00:00
apmd introduce some common variables for use in GCC warning disables: 2019-10-13 07:28:04 +00:00
arp arp: Permanence is from the llentry, not the route 2020-09-15 11:14:16 +00:00
autofs autofs: fix lint errors 2021-09-14 20:40:55 +00:00
bad144
bootp address-of-packed-member warning is no longer a problem here. 2021-05-30 02:28:35 +00:00
bta2dpd bta2dpd: fix lint build 2021-09-14 20:45:19 +00:00
btattach
btconfig
btdevctl Update for proplib(3) API changes. 2020-06-07 00:12:00 +00:00
bthcid Update for proplib(3) API changes. 2020-06-07 00:51:48 +00:00
btpand introduce some common variables for use in GCC warning disables: 2019-10-13 07:28:04 +00:00
catman Restore BSD BUGS section 2021-08-15 11:00:43 +00:00
chroot
cnwctl introduce some common variables for use in GCC warning disables: 2019-10-13 07:28:04 +00:00
cpuctl Move some common functions into x86/identcpu_subr.c. No functional change. 2021-10-07 13:04:18 +00:00
crash more -fcommon for sources not ready yet 2021-04-13 08:55:06 +00:00
dev_mkdb
diskpart fix typo in definition: s/threshhold/threshold/ 2021-08-01 18:02:22 +00:00
dumpfs Change the default for ACLs to be posix1e instead of nfsv4 to match FreeBSD. 2021-09-18 03:05:19 +00:00
dumplfs remove GCC_NO_ADDR_OF_PACKED_MEMBER now lfs_accessors.h works. 2020-09-07 03:19:04 +00:00
edquota introduce some common variables for use in GCC warning disables: 2019-10-13 07:28:04 +00:00
eeprom memcpy->strncpy, and avoid copying beyond the static string length 2019-10-05 23:30:22 +00:00
envstat New sentence, new line. 2020-11-14 20:07:13 +00:00
etcupdate comparision -> comparison 2020-12-02 14:20:19 +00:00
extattrctl
faithd
flashctl
fssconfig
fstyp remove lint hacks now that lint supports _Static_assert 2021-09-17 21:06:35 +00:00
fusermount
fwctl
gpioctl Be consistent in not marking up "GPIO". 2019-10-20 17:45:08 +00:00
grfconfig
gspa
hdaudioctl fix proplib deprecation 2021-06-21 03:04:27 +00:00
i2cscan Use .Sy, not .Em, for bold-faced WARNING of impending doom. 2019-11-30 02:47:14 +00:00
ifmcstat - show " refcount %d" for consistency 2020-03-03 08:56:05 +00:00
ifwatchd ifwatchd: Enable SO_RERROR to re-sync interface state. 2020-10-04 20:36:32 +00:00
inetd PR/56448: Solomon Ritzow: Various improvements. 2021-10-12 19:08:04 +00:00
installboot fix various typos in comments. 2021-08-06 07:55:13 +00:00
intrctl Adjust description of compact list view output. 2021-02-22 11:38:13 +00:00
iopctl
iostat
ip6addrctl
ipwctl introduce some common variables for use in GCC warning disables: 2019-10-13 07:28:04 +00:00
irdaattach
isibootd s/priviledge/privilege/ in comments/log messages and fix one typo in descriptor. 2021-08-22 20:18:39 +00:00
iteconfig
iwictl introduce some common variables for use in GCC warning disables: 2019-10-13 07:28:04 +00:00
kgmon Improved the performance of kernel profiling on MULTIPROCESSOR, and possible to get profiling data for each CPU. 2021-08-14 17:51:18 +00:00
kvm_mkdb
lastlogin Sync usage with man page. 2020-05-07 12:52:40 +00:00
ldpd Make use of packed member addreses non-fatal for clang, too 2021-02-23 15:05:08 +00:00
link
lockstat Make makelists() a little bit faster. 2020-04-04 16:40:50 +00:00
lpr Fix all remaining typos, mainly in comments but also in few definitions and log messages, reported by me in PR kern/54889. 2021-07-24 21:31:31 +00:00
lptctl
mailwrapper
makefs s/helt/held+s/eroneously/erroneously/+s/splitted/split/+s/recommented/recommended/ 2021-08-21 09:59:45 +00:00
makemandb - Remove obsolete cltom(9) and mtocl(9). 2021-04-16 07:45:41 +00:00
map-mbone add support for new GCC 9 warnings that may be too much to fix 2020-09-06 07:20:26 +00:00
mdconfig use opendisk()/dehumanize_number 2020-08-18 19:26:29 +00:00
mdsetimage Explicitly print a fs image filename on "fs image is too big" errors. 2020-06-14 18:24:21 +00:00
memswitch
mld6query
mlxctl
mmcformat s/lenght/length/ 2019-12-26 04:53:11 +00:00
mopd fix mainly same typos as in my previous commit but outside sys/dev/dm. 2021-08-21 23:00:30 +00:00
mountd Fix typo, its the element not the array ... 2021-06-05 08:26:34 +00:00
moused avoid attempting to print NULL. 2021-04-12 09:30:32 +00:00
mrinfo add support for new GCC 9 warnings that may be too much to fix 2020-09-06 07:20:26 +00:00
mrouted change cksum prototype to const void *, and check alignment via assertion. 2020-09-07 18:37:21 +00:00
mscdlabel
mtrace add support for new GCC 9 warnings that may be too much to fix 2020-09-06 07:20:26 +00:00
mtree Deal with the case when a device gets recreated (eg when mtree is called by 2021-04-03 13:37:18 +00:00
ndbootd add support for new GCC 9 warnings that may be too much to fix 2020-09-06 07:20:26 +00:00
ndp fix few more typos in comments, messages and documentation. 2021-09-19 11:37:00 +00:00
netgroup_mkdb
nfsd Revert previous, don't write to the parent too early because it can exit 2020-09-17 12:48:12 +00:00
npf PR/56307: Konrad Schroder: npfctl's error messages don't report the failing 2021-07-14 09:15:01 +00:00
nvmmctl Add HAVE_NVMM and use it to control the build of NVMM related components. 2020-09-26 17:49:49 +00:00
ofctl evbmips: add ofctl(8) and /dev/openfirm support 2020-07-24 12:07:09 +00:00
paxctl
pcictl Use .Sy, not .Em, for bold-faced WARNING of impending doom. 2019-11-30 02:47:14 +00:00
perfused perfused: use SOL_LOCAL 2021-08-08 20:56:54 +00:00
pf add some new uses of existing GCC_NO_* variables for warning issues. 2021-04-12 02:54:07 +00:00
postinstall s/accidentaly/accidentally/ 2021-08-21 10:06:33 +00:00
powerd powerd: Stop crashing if entries are not found in the dictionary 2020-10-12 16:54:43 +00:00
psrset Add a recommendation for SMT to not split threads. XXX This should report 2020-01-09 15:50:16 +00:00
pstat fix a buffer size (off by one), and fix all the comments for the 2021-04-12 05:11:09 +00:00
puffs fix typos in word "successfully", mainly s/succesfully/successfully/. 2021-09-16 21:29:41 +00:00
pwd_mkdb
quot
quotacheck convert HAVE_GCC == 7 to HAVE_GCC >= 7. 2019-09-29 23:44:58 +00:00
quotaon
quotarestore
racoon One more ldap change 2021-08-14 17:08:21 +00:00
racoonctl
rarpd introduce some common variables for use in GCC warning disables: 2019-10-13 07:28:04 +00:00
rbootd introduce some common variables for use in GCC warning disables: 2019-10-13 07:28:04 +00:00
rdate
repquota introduce some common variables for use in GCC warning disables: 2019-10-13 07:28:04 +00:00
rip6query
rmt
route6d introduce some common variables for use in GCC warning disables: 2019-10-13 07:28:04 +00:00
rpc.bootparamd _rpcpmstart is defined by rpcgen, so externalize it here 2020-04-22 23:47:02 +00:00
rpc.lockd introduce some common variables for use in GCC warning disables: 2019-10-13 07:28:04 +00:00
rpc.pcnfsd fix various typos in compatibility, mainly in comments. 2021-08-09 20:49:08 +00:00
rpc.statd drop my name from the advertising clause. 2019-12-02 19:23:53 +00:00
rpc.yppasswdd introduce some common variables for use in GCC warning disables: 2019-10-13 07:28:04 +00:00
rpcbind avoid potential uninitialised variable use. 2021-04-13 05:58:45 +00:00
rtadvd print function names as %s: not <%s> everywhere for consistency. 2021-03-23 18:16:53 +00:00
rtsold Update date 2020-04-17 13:36:48 +00:00
rwhod introduce some common variables for use in GCC warning disables: 2019-10-13 07:28:04 +00:00
sa
schedctl
screenblank
sdpd introduce a SOL_LOCAL for unix-domain socket level socket options 2021-08-08 20:54:48 +00:00
service
services_mkdb Avoid memory leak on empty lines (https://reviews.freebsd.org/D29370) 2021-03-22 03:28:55 +00:00
sesd
sliplogin introduce some common variables for use in GCC warning disables: 2019-10-13 07:28:04 +00:00
spray introduce some common variables for use in GCC warning disables: 2019-10-13 07:28:04 +00:00
srtconfig usr.sbin/srtconfig: Suppress -Werror=stringop-truncation error. 2020-02-09 15:10:31 +00:00
sti
sunlabel
sysinst sysinst: fix typo in comment 2021-10-11 18:46:34 +00:00
syslogd fix typos in word "successful". 2021-09-16 22:19:10 +00:00
tadpolectl
tcpdchk Add blocklist support to libwrap which enables all programs using libwrap 2021-03-07 15:09:12 +00:00
tcpdmatch Add blocklist support to libwrap which enables all programs using libwrap 2021-03-07 15:09:12 +00:00
tcpdrop
timed s/parition/partition/ 2020-09-29 02:49:55 +00:00
tpctl
tprof Print the path that we failed to open on error 2021-01-30 11:46:25 +00:00
traceroute traceroute: no longer need gcc packed member warning 2021-02-03 06:49:18 +00:00
traceroute6 traceroute6: Remove __packed 2021-02-03 06:42:50 +00:00
trpt
unlink
usbdevs Use strtoi instead of atoi() to catch bad input (Alexander Kuleshov) 2019-11-27 17:56:08 +00:00
user Fix warning in userdel -r. 2019-07-29 09:33:21 +00:00
veriexecgen Move case 'f' to go right after case 'F'. 2019-08-01 08:51:52 +00:00
videomode
vipw
vnconfig Add magic incantation to configure an image for mount_udf(8). 2021-01-09 23:54:26 +00:00
wakeonlan
wg-keygen Clarify wg(4)'s relation to WireGuard, pending further discussion. 2020-08-26 16:03:40 +00:00
wg-userspace Clarify wg(4)'s relation to WireGuard, pending further discussion. 2020-08-26 16:03:40 +00:00
wgconfig Show the time of the latest handshake properly formatted. 2020-08-28 17:17:53 +00:00
wiconfig introduce some common variables for use in GCC warning disables: 2019-10-13 07:28:04 +00:00
wlanctl
wsconscfg
wsfontload wsfontload.8: clean up examples 2021-04-24 09:18:44 +00:00
wsmoused conditional build fix. 2021-09-01 06:10:06 +00:00
wsmuxctl
ypbind introduce some common variables for use in GCC warning disables: 2019-10-13 07:28:04 +00:00
yppoll
ypserv fix multiplei repetitive typos in comments, messages and documentation. mainly because copy paste code big amount of files are affected. 2021-08-17 22:00:26 +00:00
ypset introduce some common variables for use in GCC warning disables: 2019-10-13 07:28:04 +00:00
zdump Update LLVM to 10.0.0git (01f3a59fb3e2542fce74c768718f594d0debd0da) 2019-11-11 22:44:56 +00:00
zic Change the default to be slim 2019-07-03 15:50:40 +00:00
Makefile Descend into wg-userspace. 2020-08-20 21:30:46 +00:00
Makefile.inc usr.sbin: enable lint for all programs 2021-09-14 20:36:02 +00:00