Commit graph

3386 commits

Author SHA1 Message Date
Christos Margiolis
63888350d5 rc: virtual_oss: Silence potential hw.snd.default_unit error
PR:		293582
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week

(cherry picked from commit e85f221def717660c9daf4c0616dfb9cdfb75827)
2026-03-13 12:49:23 +01:00
Navdeep Parhar
11e670ccf2 nuageinit.7: Fix a couple of minor errors
Use the correct key name in the chpasswd section.
Remove a stray line to fix the description of 'password'.

Sponsored by:	Chelsio Communications
Reviewed by:	maxim
Differential Revision:	https://reviews.freebsd.org/D55547

(cherry picked from commit df5014f71cff2c02f46afa8823370d7f61494bdb)
2026-03-07 17:50:18 -08:00
Quentin Thébault
960ef72179 virtual_oss: use hw.snd.default_unit by default
Reviewed by:	christos
MFC after:	1 week
Signed-off-by: 	Quentin Thébault <quentin.thebault@defenso.fr>
Sponsored by: 	Defenso
PR:		293130
Pull Request:	https://github.com/freebsd/freebsd-src/pull/2043
(cherry picked from commit 06b466526a7fc35cc6fc5bf6f6269e7f3a0a7aea)
2026-03-02 15:46:00 +01:00
Enji Cooper
3882602bac tftpd tests: clean trailing whitespace
No functional change intended.

MFC after:	1 week

(cherry picked from commit fd6217075e6a5926bdc627145b38194b6c5ba8da)
2026-02-21 19:37:16 -08:00
Sarah Walker
dd80750453 rtld-elf: Pass HWCAP flags to ifunc resolver functions
Function arguments are based on Section 9.4.1 "GNU C Library IFUNC interface"
from "System V ABI for the Arm 64-bit Architecture (AArch64)", 2025Q1.
(https://github.com/ARM-software/abi-aa/releases/download/2025Q1/sysvabi64.pdf)

Reviewed by:	kib, andrew
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D54559

(cherry picked from commit a652357fb59f03bee85d61814002f9c60ea52340)
2026-02-09 14:50:03 +00:00
Baptiste Daroussin
cfd1ade5c7 nuageinit: support fetching configuration on multiple iface
On some environement a VM can be connected to multiple ifaces but only
one will respond to dhcp and able to fetch the metadata.

Launch the early dhclient on all available ifaces and as soon as one
dhcp has successfully configured an iface, proceed with fetching the
metadata.

MFC After:	1 week
Reported by:	mateusz.klejn@ovhcloud.com
Tested by:	mateusz.klejn@ovhcloud.com
Sponsored by:	OVHcloud

(cherry picked from commit 90a7728cd8905cd26b90d06f7873df8bad43ae9a)
2026-02-05 15:09:50 +01:00
Eric A. Borisch
33c49c35d0 Set virtual_oss_enable="NO" in /etc/defaults/rc.conf
This prevents 'service -e' from emitting (/var/log/messages):

/usr/sbin/service: WARNING: $virtual_oss_enable is not set properly - see rc.conf(5)

Pull Request:	https://github.com/freebsd/freebsd-src/pull/1987
Reviewed by:	christos
Signed-off-by:	eborisch@gmail.com
MFC after:	1 week

(cherry picked from commit 1b2d495a24c36d81b14178a2f898025946bff2d8)
2026-01-30 18:30:10 +02:00
Christos Margiolis
2bee4bb7f1 src.opts: Introduce MK_SOUND
PR:		291853
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Reviewed by:	zarychtam_plan-b.pwste.edu.pl, markj
Differential Revision:	https://reviews.freebsd.org/D54456

(cherry picked from commit f74f891581bc4df20431607de9b761107f6a0aa7)
(cherry picked from commit 37164224eefd11278b0203e1367e1d9d1454da3f)
(cherry picked from commit 241a43cf9da8933f500e7d0df7fff621fd52168c)
(cherry picked from commit cf34eb8264954a8fd1e92081bcf67719bddbc2aa)
(cherry picked from commit 466bad427d74e666e85445729b2e63b82e10d18f)
2026-01-21 18:06:42 +02:00
Gonéri Le Bouder
92a3d6c190 nuageinit: set the hostname when user-data is missing
This address the situation reported here
https://github.com/freebsd/freebsd-src/pull/1952#issuecomment-3720210259

The user-data file was missing and the `sethostname` function is never
called. This commit adjusts slightly the logic to avoid the `exit()` call
when the `user-data` file is missing.

MFC After:	1 week
Signed-off-by: Gonéri Le Bouder <goneri@lebouder.net>
Differential Revision:	https://github.com/freebsd/freebsd-src/pull/1953
(cherry picked from commit cae280931c9e1f072d8bf300c377ae120300b898)
2026-01-14 13:30:43 +01:00
Baptiste Daroussin
4039401974 nuageinit: fix test after recent behaviour change
with recent change nuageinit always create a "freebsd" user, if no
users are specified, which means we do need to get the rootdir in the
testsuite containing a group file otherwise pw complains and the tests
fails.

(cherry picked from commit 65e77d34fdff9065616cfaedef3ef53329cdad26)
2026-01-14 13:30:43 +01:00
Gonéri Le Bouder
9d2c4e83c9 nuageinit: only create the default user when needed
The "default" user should only be created when:

- the `users` key is missing
- or the `default` string is present in the `users` list

Since the `public_keys` is extracted from the meta-data, this patch has
to slightly adjust the way they are loaded.
The change simplify the logic around the default user SSH key injection.
Both `ssh_authorized_keys` and `public_keys` are handled at the same time.

MFC After:	1 week
Signed-off-by: Gonéri Le Bouder <goneri@lebouder.net>
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1952
(cherry picked from commit cbc00fcc2b92e6e38b0a180261547b1a22b461bd)
2026-01-14 13:30:43 +01:00
Baptiste Daroussin
57a7fa9c92 nuageinit(7): pert mandoc linter
MFC After: 	1 week

(cherry picked from commit 9ea30bbb0e3c34b3ea369e217d930e2165610c0c)
2026-01-14 13:30:43 +01:00
Gonéri Le Bouder
4702a1166a nuageinit: config2_network support dns service cfg
This change enhances `config2_network()` to honor the DNS
configuration, when it's defined through the `services` section.

The `network_data.json` file can hold DNS configuration at two different
places:
- within a network configuration entry
- or `dns` entry in the `services` section, in this case the configuration is global.

An example of such configuration:

{"links": [{"id": "interface0", "type": "phy",
"ethernet_mac_address": "52:54:00:01:59:03"}], "networks": [{"id": "private-ipv4-0", "type": "ipv4", "link": "interface0",
"ip_address": "192.168.123.5", "netmask": "255.255.255.0", "routes": [{"network": "0.0.0.0", "netmask": "0.0.0.0", "gateway":
"192.168.123.1"}], "network_id": "9e5b1ed9-f5e6-4941-a90f-2e06bab858de", "dns_nameservers": ["192.168.123.1"], "services": [{"type":
 "dns", "address": "192.168.123.1"}]}], "services": [{"type": "dns", "address": "192.168.123.1"}]}

See: https://docs.openstack.org/nova/latest/user/metadata.html

MFC After: 	1 week
Signed-off-by: Gonéri Le Bouder <goneri@lebouder.net>
Pull Request: 	https://github.com/freebsd/freebsd-src/pull/1941
(cherry picked from commit 7af8b75201b7af353fa74c8feb937b52f5ccf9bb)
2026-01-14 13:30:43 +01:00
Gonéri Le Bouder
5ec4bf7781 nuageinit/man: clarify how to enable sudo and doas
Clarify that both `sudo` and `doas` are not part of the base system and
they need to be listed in the `packages` section if the user wants to
enable them.

MFC After: 	1 week
Signed-off-by: Gonéri Le Bouder <goneri@lebouder.net>
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1944
(cherry picked from commit 402f1353707783e2adc8d0bff01faf557820f6f5)
2026-01-14 13:30:42 +01:00
Mark Johnston
7999ce0d29 rc.subr: Use the variable we defined to invoke setaudit(8)
Reported by:	gtetlow
Fixes:		39ee24182b92 ("rc.subr: Support setting the audit user when starting services")
MFC after:	1 week

(cherry picked from commit 9dda51f13cd85791c0f18782461219f5a88e2d67)
2025-12-29 14:31:31 +00:00
Dag-Erling Smørgrav
8959eda100 noshutdown: Fix startup order
This rc script exists solely to create a file, so have it explicitly
require FILESYSTEMS.  In its current form, it was as likely as not to
end up running before cleanvar, which would undo its work.

MFC after:	3 days
Fixes:		384d976725 ("rc.d: Add precious_machine rc.conf knob to create /var/run/noshutdown")
Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D54119

(cherry picked from commit e540e8b2c04f03b4210a3bf2f421c05b918d1b51)
2025-12-13 22:01:14 +00:00
Dag-Erling Smørgrav
ca876906cf cleanvar: Fix startup order
Instead of having FILESYSTEMS require cleanvar, which doesn't really
make semantic sense, say that cleanvar needs to run before FILESYSTEMS.

MFC after:	3 days
Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D54118

(cherry picked from commit 6ce227d6274869a95150746d2f2d8c8c5ed9a266)
2025-12-13 22:01:14 +00:00
Cy Schubert
d9b9de6608 rc.d/ipfilter: ipfilter must be enabled for options to take
ipfilter options are erased and reset to default when ipfilter is
disabled. This results in nullifying options from rc.conf that were
previously set.

8d6feaaaa2, which added this code, was incorrect as it was for a bug in
ipfilter 4.2.28 and no longer applies to ipfilter 5.1.2.

Fixes:		8d6feaaaa2

(cherry picked from commit cc1e4aae5a67a20f3c0fff13612364e6e4404f93)
2025-12-10 13:10:07 -08:00
Cy Schubert
f9a4a42eed rc.d/{ipfilter,ippool}: Fix typo in variable name
(cherry picked from commit f04b23ce3547c238dcd52d4fa1a7d401ad38d1b1)
2025-12-10 13:10:06 -08:00
Mark Johnston
7edef91176 rc.subr: Support setting the audit user when starting services
When an unprivileged user restarts a service using, e.g., sudo, the
service runs with the audit user ID set to that of the unprivileged
user.  This can have surprising effects: for instance, a user that
restarts a jail that is running sshd will end up with their UID attached
to all audit logs associated with users who log in via that sshd
instance.  (sshd will set the audit user, but this is disallowed in
jails by default.)

Add support for rc.conf directives which cause rc to override the audit
user.  Specifically, make <name>_audit_user=foo cause the audit user to
be set to "foo" for service <name>.  A plain audit_user=foo directive
causes all services to be started as foo.

Note, like other similar rc features, this feature is limited to rc
services which are run by executing a command.  Shell functions can't be
wrapped this way.

Reviewed by:	0mp
MFC after:	2 weeks
Sponsored by:	Modirum MDPay
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D53747

(cherry picked from commit 39ee24182b92114d006abc2b8095334a1d8a083c)
2025-12-08 14:14:58 +00:00
Mark Johnston
e4e7b5840f rc.subr: Remove misguided cpuset usage
When running an rc command, if the target rc script defines
<command>_cmd, e.g., start_cmd=..., then the run_rc_command() executes
that instead of $command.  In general it's a shell function, and
"cpuset -l <n> <shell function>" doesn't work.

Moreover, it doesn't really make sense to run cpuset for anything other
than start_cmd.

Other optional isolation mechanisms (e.g., <name>_fib,
<name>_chroot) are only used when invoking $command directly as part of
the "start" command.  Make <name>_cpuset consistent with everything else
by removing these extraneous cpuset invocations.

Reviewed by:	0mp
MFC after:	2 weeks
Sponsored by:	Modirum MDPay
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D53746

(cherry picked from commit 71f6592a01506899efd91306b6d8147f14a6b219)
2025-12-08 14:14:58 +00:00
Mark Johnston
cd0e5f95d0 rc.subr: Try to make svjc option handling a bit easier to read
Specifically, make this code fit in fewer columns:
- deindent cases to conform to the usual style,
- use a local variable to minimize duplication in each case.

No functional change intended.

Reviewed by:	0mp, netchild
MFC after:	2 weeks
Sponsored by:	Klara, Inc.
Sponsored by:	Modirum MDPay
Differential Revision:	https://reviews.freebsd.org/D53754

(cherry picked from commit 7861d051de2ea2f244bcf73111a04389dc5bcf51)
2025-12-08 14:14:57 +00:00
Dag-Erling Smørgrav
74b10f0b57 rtld-elf: Mark LD_SHOW_AUXV insecure
This prevents dumping the memory layout of setugid processes.

MFC after:	3 days
Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D54033

(cherry picked from commit 5242bcff202fa2a5a39895423c8d8c11c02ad76a)
2025-12-05 15:08:55 +00:00
Cy Schubert
d7129761f5 ipfilter: Load optionlist prior to ippool invocation
As a safety precaution df381bec2d2b limits ippool hash table size to 1K.
This causes any legitimely large hash table to fail to load. The
htable_size_max ipf tuneable adjusts this but the adjustment is made
in the ipfilter rc script, invoked after the ippool script (because it
depends on ippool). Let's load the ipfilter_optionlist in ippool as well.
ipfilter_optionlist load will also occur in the ipfilter rc script in case
the user uses ipfilter without ippool.

Fixes:		df381bec2d2b
(cherry picked from commit d5d005e9bf4933d5680dd0bb5d42bdf440122aa4)
2025-12-02 07:28:15 -08:00
Konstantin Belousov
b903f27e17 rtld: fix powerpc build
(cherry picked from commit 0628c252bd161ccdd1228a3b8aefeb471044ca04)
2025-11-28 02:44:15 +02:00
Konstantin Belousov
ff6a70efd9 rtld-elf: move powerpc-specific auxv compat code into arch hook
(cherry picked from commit b2b3d2a962eb00005641546fbe672b95e5d0672a)
2025-11-28 02:44:15 +02:00
Jose Luis Duran
a7cadff8cc
nuageinit: Add guards against empty user data
Add guards against attempting to process a user data file with an empty
first line or contents.

PR:		290395
Reviewed by:	bapt (earlier), dtxdf, markj
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D53239

(cherry picked from commit 57d25b6333523491ac7a3e869bd5d16127203eed)
2025-11-25 00:39:37 +00:00
Jose Luis Duran
a5adb1ca35
nuageinit: Silence luacheck warnings and fix typos
No functional change intended.

Reviewed by:	bapt, dtxdf, kevans
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D53238

(cherry picked from commit 81af04b081402d131c7e34b30c88b7c337271fad)
2025-11-25 00:39:15 +00:00
Gordon Bergling
d14a007afb libexec/lua: Fix two typos in the manual pages
- s/environnement/environment/
- s/interger/integer/

(cherry picked from commit 58b86e40ce76de649db19d9d1f8571d5c942d44b)
2025-11-22 10:19:11 +01:00
Gordon Bergling
734142d4a2 nuageinit: Fix a typo in an error message
- s/outout/output/

(cherry picked from commit 73a026d5e9778ac182be4a5876771eefa2cd6f41)
2025-11-22 10:18:35 +01:00
Christos Margiolis
29e5f29fc0 rc: virtual_oss: Use required_modules instead of load_kld
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Reviewed by:	imp, markj, emaste
Differential Revision:	https://reviews.freebsd.org/D53616

(cherry picked from commit ac2aa9e869a16b28095364b2e14683df9885ac34)
2025-11-18 01:51:24 +01:00
Lexi Winter
cdfa913977 atf: Move the tests back to the tests package
Commit 9065390ddc7b moved atf to its own package, but mistakenly moved
the tests as well.  Put the tests back into the test package.

Fixes:	9065390ddc7b ("packages: Remove the tests-dev package")
MFC after:	1 day
Reviewed by:	emaste
Sponsored by:	https://www.patreon.com/bsdivy
Differential Revision:	https://reviews.freebsd.org/D53594

(cherry picked from commit 4b342830abd39cdc20b67a215e15309293673e75)
2025-11-07 05:15:54 +00:00
Lexi Winter
e4ef333917 flua: Move to a new flua package
flua is a standalone third-party component that deserves its own
package.  In particular, this means things can use flua without
having to depend on FreeBSD-utilities, which will be useful as
more base utilities use flua.

This saves ~500kB in FreeBSD-utilities for systems which don't
need flua.

MFC after:	3 days
Reviewed by:	kevans
Sponsored by:	https://www.patreon.com/bsdivy
Differential Revision:	https://reviews.freebsd.org/D53161

(cherry picked from commit 957715f877b57a17545ead94d27ea8fd3ff4932a)
2025-10-30 12:34:28 +00:00
Dag-Erling Smørgrav
7b375832c2 rc.subr: Fix slow shutdown issue
Instead of sleeping after pwait returns, use its new -p option to
obtain the list of processes that still have not terminated.

MFC after:	3 days
PR:		290357
Fixes:		5953e7c98427 ("rc.subr: Move the sleep in wait_for_pids")
Reviewed by:	0mp, markj
Differential Revision:	https://reviews.freebsd.org/D53294

(cherry picked from commit 22cff1f3e9d82b48aad440c52f883bfd4995359c)
2025-10-30 10:37:35 +00:00
Jose Luis Duran
b7780e2453
Revert "blocklist-helper: Silence a bogus pf warning"
This reverts commit 2347ca21d657121670e6e7246c6ac32efc996cac.

A fix has been implemented in 99560fe98c76 ("pfctl: Do not warn if there
is no Ethernet anchor").

Revert this commit to avoid having differences with upstream.

MFC after:	2 days

(cherry picked from commit e12ec5f4338c2d769c266278320232a98a962f63)
2025-10-30 01:48:53 +00:00
Jose Luis Duran
7af5c1da28
blocklist: Fix rcorder(8)
The blocklist daemon depends on a packet filter in order to block.

Add all supported packet filters to the REQUIRE line, not just pf, to
indicate rcorder(8) that it should start after the packet filter service
has started.

While here, change the mode of the rc file to include the executable
bit, just like the rest of the files in the rc.d source directory.

Reviewed by:	0mp
MFC after:	2 days
Differential Revision:	https://reviews.freebsd.org/D53364

(cherry picked from commit 79e374217d69a98161fc91a286dacf1f78090894)
2025-10-30 01:47:37 +00:00
Cy Schubert
0fe083b6e8 rc: Chase 052211e08c and bfb202c455, remove ifconfig down/up
bfb202c455 addresses the CTRL-EVENT-SCAN-FAILED. Upstream d807e289d
caused FreeBSD regression in driver_bsd.c, which this rc.d patch
worked around. As of bfb202c455 this workaround is no longer needed.

052211e08c implemented this change for wpa_supplicant but not for
hostapd.

Reported by:	avg
MFC after:	3 days

(cherry picked from commit 05637c82243e681b5db5d7e9829e699515456524)
2025-10-23 20:34:52 -07:00
Mark Johnston
8028cb0b3c rc tests: Add a test to check for warnings from rcorder
Reviewed by:	des
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D52954

(cherry picked from commit 04d47c7cde54cc325cca3f47113976f5500dc58f)
2025-10-22 12:52:00 +00:00
Jose Luis Duran
fa2e886206
rc: dmesg: Allow umask to be configurable
Allow umask to be configurable.

Being able to set the umask via an rc variable is useful when setting:

    security.bsd.unprivileged_read_msgbuf=0

As it allows a user to configure:

    dmesg_umask="066"

Without modifying the rc script, and preventing the contents of the
$dmesg_file (/var/run/dmesg.boot) from being publicly readable.

PR:		272552
Reviewed by:	netchild
MFC after:	2 days
Differential Revision:	https://reviews.freebsd.org/D53169

(cherry picked from commit edadbc6ee95570627679f3bc14a1d5476d0ce339)
2025-10-20 16:04:35 +00:00
Jose Luis Duran
59c0a987e0
rc.conf: Fix typo interferring -> interfering
Reviewed by:	emaste
MFC after:	2 days
Differential Revision:	https://reviews.freebsd.org/D53168

(cherry picked from commit 982d70ca2e6333b7e8ccf828b004ccf20a9cc550)
2025-10-20 16:02:25 +00:00
Mark Johnston
838c8027f9 libexec/kgdb: Add new modules and install them together with debug info
This change simplifies integration of gdb python scripts with our kernel
debugging infrastructure.  Rather than putting debugging scripts in
/usr/libexec/kgdb, move them to <path-to-kernel-debug-symbols>/gdb, and
add a kernel-gdb.py which automatically loads modules from that
directory.  kernel-gdb.py will be automatically executed by kgdb when
loading kernel debug symbols (assuming a default configuration), so one
no longer needs to do anything to use these modules.

The change also adds a couple of new modules, vnet.py and pcpu.py, for
conveniently accessing VNET symbols and PCPU/DPCPU fields, respectively.
Note that these require a change to the kernel linker when accessing
symbols from a loadable kernel module.

sys/tools/gdb/README.txt describes the scheme in more detail and
provides some rudiementary documentation for the commands and functions
added by these modules.  It should be updated when adding new features.

sys/tools/gdb/selftest.py can be used to do some primitive testing of
the modules.  All it does is execute a number of gdb commands making use
of commands and functions added by these modules.  The developer is
expected to verify that the commands complete without errors and that
the output looks sane.

Discussed with:	kp, avg, jhb, glebius
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D50825

(cherry picked from commit ea675a43f09ba569adf1dd17b4f1ced970e48de4)
2025-10-17 12:41:58 +00:00
Mark Johnston
8e957b78e6 rc: Update dependencies for zpool scripts
After commit 900bc02063, zpool depends on mountcritlocal.  zpoolreguid
and zpoolupgrade depend on zpool and want to run before mountcritcycle,
so we have a pair of cycles.

Update zpoolreguid and zpoolupgrade to avoid this.

Reviewed by:	des
MFC after:	3 days
Fixes:	900bc02063 ("rc.d/zpool: change mountcritlocal dep from BEFORE to REQUIRE")
Differential Revision:	https://reviews.freebsd.org/D52953

(cherry picked from commit ae6db60ff56de5b93de9f6fee6116cbc2d4b498e)
2025-10-15 13:23:03 +00:00
Lexi Winter
f1b0e00d56 packages: Rename unbound to local-unbound
This more accurately reflects its purpose, and its contents, since
everything in the package is prefixed with "local-".

While here, add a message on upgrade about regenerating the config.

MFC after:	3 seconds
Requested by:	des
Reviewed by:	des
Sponsored by:	https://www.patreon.com/bsdivy
Differential Revision:	https://reviews.freebsd.org/D53056

(cherry picked from commit bf84861460f9287fe9cf66b2cd22fefe8e242a28)
2025-10-15 13:55:50 +01:00
Jose Luis Duran
ba5768504b
blocklist-helper: Silence a bogus pf warning
Silence a bogus warning about (an ethernet) anchor not being found.

It has been reported as PR 280516.  In the meantime, just sweep under
the carpet.

Approved by:	emaste (mentor)
MFC after:	2 days

(cherry picked from commit 2347ca21d657121670e6e7246c6ac32efc996cac)
2025-10-14 00:53:40 +00:00
Jose Luis Duran
7f6f2139ee
blocklist: Rename blacklist to blocklist
Follow up upstream rename from blacklist to blocklist.

- Old names and rc scripts are still valid, but emitting an ugly warning
- Old firewall rules and anchor names should work, but emitting an ugly
  warning
- Old MK_BLACKLIST* knobs are wired to the new ones

Although care has been taken not to break current configurations, this
is a large patch containing mostly duplicated code.  If issues arise, it
will be swiftly reverted.

Reviewed by:	ivy (pkgbase)
Approved by:	emaste (mentor)
MFC after:	2 days
Relnotes:	yes

(cherry picked from commit 7238317403b95a8e35cf0bc7cd66fbd78ecbe521)
2025-10-14 00:53:16 +00:00
Christos Margiolis
2a6c17544e virtual_oss: Clean up rcorder
sndiod is part of audio/sndio, so we should avoid referencing a port
utility from base.

We should also require NETWORKING for the service to start, since
virtual_oss can be configured to send audio through the network.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 day
Reviewed by:	des, markj, emaste
Differential Revision:	https://reviews.freebsd.org/D53019

(cherry picked from commit 188ddc15e5460b3abfb2ad5492557911465bedc1)
2025-10-10 23:23:31 +02:00
Lexi Winter
8a703d0988 libexec/rc/rc.d/Makefile: Use CONFGROUPS.yes
Replace .if statements with CONFGROUPS.${MK_FOO} where possible,
and also sort and re-indent the file for readability.

A couple of more complicated sections don't work with CONFGROUPS.yes
yet, so leave those as they are for now.

MFC after:	1 week
Reviewed by:	imp
Sponsored by:	https://www.patreon.com/bsdivy
Differential Revision:	https://reviews.freebsd.org/D52974

(cherry picked from commit 56f9879c3dd8fb9cd82fb7bc33e1acf5f8b578ff)
2025-10-10 05:32:52 +01:00
Dag-Erling Smørgrav
df70662f47 rc: Teach netwait to wait for DAD
In some configurations, especially in jails, it is possible for the
system to boot so fast that we end up launching daemons while duplicate
address detection is still ongoing.  If that happens, said daemons may
fail to bind to IPv6 addresses, as they are still tentative.  Teach the
netwait service to wait (up to 10 seconds, by default) for the tentative
flag to vanish.

MFC after:	1 week
Reviewed by:	olce
Differential Revision:	https://reviews.freebsd.org/D51889

(cherry picked from commit 5ead817c3b7af6d6b5fea222ab144db2c3167b22)

rc: Improve netwait DAD logic

Disable if IPv6 is not supported, and instead of 10 seconds, default to
one more than the value of net.inet6.ip6.dad_count.

Fixes:		5ead817c3b7a ("rc: Teach netwait to wait for DAD")
Reviewed by:	bz
Differential Revision:	https://reviews.freebsd.org/D52905

(cherry picked from commit ec6ad605ecea5c4a76d2e744df0265cc3f3a01b9)
2025-10-09 12:16:04 +00:00
Jesús Daniel Colmenares Oviedo
6c6b157a9f nuageinit: Ignore non-existent groups
In cloud-init, when a group specified in the 'users.{index}.groups' parameter
does not exist, it is ignored, but the user is created anyway. In the case of
nuageinit, it exits with an exception, since pw(8) expects each group to exist.

Reviewed by:		bapt@
Approved by:		bapt@
Differential Revision:	https://reviews.freebsd.org/D52718

(cherry picked from commit 68691160f41bf6ce9ab70ddeeb7eeec2a7bff245)
2025-10-07 08:51:18 +02:00
Lexi Winter
d63d221507 libexec: Move blacklistd-helper to the blocklist package
Reviewed by:	emaste
Sponsored by:	https://www.patreon.com/bsdivy
Differential Revision:	https://reviews.freebsd.org/D52830

(cherry picked from commit 63ce00f5d0b5dc34d57fb8d3969b875732c93eb2)
2025-10-03 20:21:50 +01:00