Retire the GNU subtree
With GNU diff and cdialog gone, this is now an empty shell.
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D55425
Retire dialog
This is the last remaining piece of GPL software in the base system.
The installer transitioned to bsddialog four years ago, and the last
remaining dialog consumer, dpv, was turned off more than two years ago.
Retire dpv, libdpv, libfigpar (used only by dpv), and dialog itself.
Reviewed by: dteske
Differential Revision: https://reviews.freebsd.org/D55424
rc.firewall: Use checkyesno for boolean variables
Use the checkyesno function from rc.subr instead of hardcoded checks for
boolean variables. Also drop an incorrect comment about the default
logamount value; the actual default is zero (unlimited).
MFC after: 1 week
Reviewed by: kevans, allanjude
Differential Revision: https://reviews.freebsd.org/D57678
(cherry picked from commit a3c077c1ccbe57ffad6317879bc1e49291892414)
local-unbound-setup: Support IPv6-only systems
* In the server configuration, disable protocols not supported by the
kernel.
* In resolv.conf, instead of only using 127.0.0.1, use either 127.0.0.1,
::1, or both depending on which protocols the kernel supports.
MFC after: 1 week
Reviewed by: jlduran
Differential Revision: https://reviews.freebsd.org/D57840
(cherry picked from commit f0a861efbafeb81428d5e8c23dac9da73fe14007)
rc.firewall: Support on-disk lists
For firewall_allowservices and firewall_trusted, if an element of the
list looks like an absolute path, read the file, skipping comments and
blank lines, and treat the first word on each line as an address or
subnet to be added to the list.
We should probably be using tables instead, but this is still an
improvement over the status quo ante.
MFC after: 1 week
Relnotes: yes
Reviewed by: allanjude
Differential Revision: https://reviews.freebsd.org/D57679
(cherry picked from commit a71abf38e2b46c02965f3224c62bb6ef1971996e)
rc.d/tmp: Fix dupe mount check
Before mounting a new mfs on /tmp, we check if there already is one.
However, the dupe check only takes /dev/md[0-9]* into account, while the
default mfs type these days is tmpfs. Rewrite it to look for tmpfs as
well.
Note that the dupe check is redundant in the tmpmfs=auto case, but we
leave moving it for later.
PR: 182035
MFC after: 1 week
Reviewed by: kevans, allanjude
Differential Revision: https://reviews.freebsd.org/D57682
(cherry picked from commit 45efa4e61623e3eeee7fd0a3f4436616e24c8e98)
rc.d/ddb: Really silently exit
The comment says “silently exit if ddb is not enabled”, but we'd exit
with an error message.
Note that I switched the sysctl variable used to test for the presence
of ddb from debug.ddb.scripting.scripts to d.d.s.script, which has a
smaller value if set.
While here, drop a pointless fork-exec, and use ${SYSCTL_N} for
consistency.
PR: 177217
MFC after: 1 week
Reviewed by: kevans
Differential Revision: https://reviews.freebsd.org/D57686
(cherry picked from commit b0d3a2889a1b8e4b73ad1f396884224e1442b214)
local-unbound-setup: Support IPv6-only systems
* In the server configuration, disable protocols not supported by the
kernel.
* In resolv.conf, instead of only using 127.0.0.1, use either 127.0.0.1,
::1, or both depending on which protocols the kernel supports.
MFC after: 1 week
Reviewed by: jlduran
Differential Revision: https://reviews.freebsd.org/D57840
(cherry picked from commit f0a861efbafeb81428d5e8c23dac9da73fe14007)
rc.d/tmp: Fix dupe mount check
Before mounting a new mfs on /tmp, we check if there already is one.
However, the dupe check only takes /dev/md[0-9]* into account, while the
default mfs type these days is tmpfs. Rewrite it to look for tmpfs as
well.
Note that the dupe check is redundant in the tmpmfs=auto case, but we
leave moving it for later.
PR: 182035
MFC after: 1 week
Reviewed by: kevans, allanjude
Differential Revision: https://reviews.freebsd.org/D57682
(cherry picked from commit 45efa4e61623e3eeee7fd0a3f4436616e24c8e98)
rc.d/ddb: Really silently exit
The comment says “silently exit if ddb is not enabled”, but we'd exit
with an error message.
Note that I switched the sysctl variable used to test for the presence
of ddb from debug.ddb.scripting.scripts to d.d.s.script, which has a
smaller value if set.
While here, drop a pointless fork-exec, and use ${SYSCTL_N} for
consistency.
PR: 177217
MFC after: 1 week
Reviewed by: kevans
Differential Revision: https://reviews.freebsd.org/D57686
(cherry picked from commit b0d3a2889a1b8e4b73ad1f396884224e1442b214)
rc.firewall: Use checkyesno for boolean variables
Use the checkyesno function from rc.subr instead of hardcoded checks for
boolean variables. Also drop an incorrect comment about the default
logamount value; the actual default is zero (unlimited).
MFC after: 1 week
Reviewed by: kevans, allanjude
Differential Revision: https://reviews.freebsd.org/D57678
(cherry picked from commit a3c077c1ccbe57ffad6317879bc1e49291892414)
rc.firewall: Support on-disk lists
For firewall_allowservices and firewall_trusted, if an element of the
list looks like an absolute path, read the file, skipping comments and
blank lines, and treat the first word on each line as an address or
subnet to be added to the list.
We should probably be using tables instead, but this is still an
improvement over the status quo ante.
MFC after: 1 week
Relnotes: yes
Reviewed by: allanjude
Differential Revision: https://reviews.freebsd.org/D57679
(cherry picked from commit a71abf38e2b46c02965f3224c62bb6ef1971996e)
pdfork.2: clarify that PD_DAEMON acts on current file
Also do not start a new list for each flag item.
Reviewed by: markj
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential revision: https://reviews.freebsd.org/D57124
procdesc: track count of open files
Introduce pd_fpcount that counts the number of file references to the
procdesc. Remove the PDF_CLOSED flag, now it is expressed as
pd_fpcount == 0.
Only send SIGKILL and clear pointers when we are closing the last file
referencing procdesc.
This should be nop until the next commit.
Reviewed by: markj
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D57124
procdesc_exit(): assert that _exit() was called
Check that the P_WEXIT flag is set.
Requested by: markj
Reviewed by: markj
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D57124