opnsense-src/libexec
Dag-Erling Smørgrav 626ee3cac8 tftpd: Add missing -S option to synopsis.
MFC after:	3 days
Sponsored by:	Klara, Inc.
Reviewed by:	imp, markj
Differential Revision:	https://reviews.freebsd.org/D45129

(cherry picked from commit 816c4d3dcf99adcd40a03d93431237ddbd23bbdf)

tftpd: Drop unneeded includes.

MFC after:	3 days
Sponsored by:	Klara, Inc.
Reviewed by:	imp, markj
Differential Revision:	https://reviews.freebsd.org/D45130

(cherry picked from commit 1111da6b7c612c571453a23a8dd02fd5e7e40b18)

tftpd: Add missing include.

This went unnoticed due to namespace pollution in our headers.

MFC after:	3 days
Sponsored by:	Klara, Inc.
Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D45131

(cherry picked from commit ae285a8cbf1212bdc1b3f81219635bc1395fadee)

tftpd: Satisfy clang-analyzer.

* Replace `random()` with `arc4random()`.
* Change some variable types.
* Drop some unused assignments.

MFC after:	3 days
Sponsored by:	Klara, Inc.
Reviewed by:	imp, markj
Differential Revision:	https://reviews.freebsd.org/D45132

(cherry picked from commit 4d09eb87c5d5bec2e2832f50537e2ce6f75f4117)

tftpd: silence gcc overflow warnings

GCC 13 complains that we might be writing too much to an on-stack buffer
when createing a filename.

In practice there is a check that filename isn't too long given the
time format and other static characters so GCC is incorrect, but GCC
isn't wrong that we're potentially trying to put a MAXPATHLEN length
string + some other characters into a MAXPATHLEN buffer (if you ignore
the check GCC can't realistically evaluate at compile time).

Switch to snprintf to populate filename to ensure that future logic
errors don't result in a stack overflow.

Shorten the questionably named yyyymmdd buffer enough to slience the
warning (checking the snprintf return value isn't sufficent) while
preserving maximum flexibility for admins who use the -F option.

MFC after:	3 days
Sponsored by:	Klara, Inc.
Reviewed by:	brooks
Differential Revision:	https://reviews.freebsd.org/D45086

(cherry picked from commit 25945af47e7a1d06c44c8c160045a866e90569ab)
2024-05-14 08:58:40 +02:00
..
atf Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
atrun Purge more stray embedded $FreeBSD$ strings 2023-10-24 10:10:12 -07:00
blacklistd-helper Track upstream project rename in contrib/blocklistd 2024-01-07 14:31:11 -05:00
bootpd bootpd(8): Fix a typo in a source code comment 2024-01-25 07:45:24 +01:00
comsat Purge more stray embedded $FreeBSD$ strings 2023-10-24 10:10:12 -07:00
dma dma.conf: Fix typo 2024-04-07 12:34:04 -04:00
fingerd Track upstream project rename in contrib/blocklistd 2024-01-07 14:31:11 -05:00
flua Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
ftpd Track upstream project rename in contrib/blocklistd 2024-01-07 14:31:11 -05:00
getty Purge more stray embedded $FreeBSD$ strings 2023-10-24 10:10:12 -07:00
hyperv Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
kgdb crashinfo: Print stack traces for all on-CPU threads 2024-02-09 09:55:45 -05:00
mail.local Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
makewhatis.local Remove $FreeBSD$: two-line nroff pattern 2023-08-16 11:55:10 -06:00
mknetid Purge more stray embedded $FreeBSD$ strings 2023-10-24 10:10:12 -07:00
nuageinit nuageinit: add basic support for cloudinit. 2024-04-11 13:52:52 +02:00
phttpget Remove remnants of portsnap(8) 2024-05-09 15:52:53 +09:00
pppoed Remove $FreeBSD$: two-line nroff pattern 2023-08-16 11:55:10 -06:00
rbootd Purge more stray embedded $FreeBSD$ strings 2023-10-24 10:10:12 -07:00
rc New sysctl to disable NOMATCH until devmatch runs 2024-05-13 15:24:29 -07:00
revnetgroup Purge more stray embedded $FreeBSD$ strings 2023-10-24 10:10:12 -07:00
rpc.rquotad Remove $FreeBSD$: two-line nroff pattern 2023-08-16 11:55:10 -06:00
rpc.rstatd Purge more stray embedded $FreeBSD$ strings 2023-10-24 10:10:12 -07:00
rpc.rusersd Purge more stray embedded $FreeBSD$ strings 2023-10-24 10:10:12 -07:00
rpc.rwalld Remove $FreeBSD$: two-line nroff pattern 2023-08-16 11:55:10 -06:00
rpc.sprayd Purge more stray embedded $FreeBSD$ strings 2023-10-24 10:10:12 -07:00
rtld-elf rtld.1: clarify interaction between -u and -o 2024-05-06 07:42:19 +03:00
rtld-elf32 Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
save-entropy save-entropy: Add manual page 2024-05-03 17:25:24 -03:00
smrsh Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
talkd Purge more stray embedded $FreeBSD$ strings 2023-10-24 10:10:12 -07:00
tcpd Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
tests Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
tftp-proxy Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
tftpd tftpd: Add missing -S option to synopsis. 2024-05-14 08:58:40 +02:00
ulog-helper Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
ypxfr Remove $FreeBSD$: two-line nroff pattern 2023-08-16 11:55:10 -06:00
Makefile nuageinit: add basic support for cloudinit. 2024-04-11 13:52:52 +02:00
Makefile.inc Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00