| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Change added in 90a7728cd8905cd26b90d06f7873df8bad43ae9a contained a
lot of bugs:
- If all network interfaces correctly respond to DHCP, then pwait was
waiting forever.
- If there was more than 1 interface, then "cat
/tmp/ephemeraldhcp.*.pid" joined pid numbers into one long string.
- "for iface in $left; do kill -15 $left; done" is not using $iface.
Tested by: adam.mizerski@ovhcloud.com
Sponsored by: OVHcloud
Pull Request: https://github.com/freebsd/freebsd-src/pull/2436
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Incorrect ELF might have PT_NOTE slightly larger than the needed to
contain all notes, and the PT_NOTE size could be larger than one page.
Then rtld mmaps just the notes bytes to parse. After the last note,
we iterate past the mapped region trying to read the Elf_Note header.
This was found in wild.
Require full elf note to fit into the [start_note, end_note) region to
continue the parsing. Check it in stages, first verifying the Elf_Note
header structure fits, to be able to read the name and data length.
After that, check the whole note against limit.
Reported and tested by: makc
Reviewed by: emaste
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D59635
|
| |
|
|
|
| |
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
|
| |
|
|
|
|
|
| |
Discussed with: jrtc27
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D59269
|
| |
|
|
|
|
|
| |
Discussed with: jrtc27
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D59269
|
| |
|
|
|
|
|
| |
Discussed with: jrtc27
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D59269
|
| |
|
|
|
|
|
| |
Discussed with: jrtc27
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D59269
|
| |
|
|
|
|
|
| |
Discussed with: jrtc27
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D59269
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The default on my laptop is annoyingly bright, and this is a useful
feature to mitigate that. The backlight script is largely a copy of the
mixer service which provides the same value for mixers, but this one is
specifically dependant on kld to allow DRM drivers a chance to attach.
Note that it's off by default to avoid interference with DEs, and
document the capability in backlight(8). Set backlight_enable=YES in
rc.conf(5) to enable save/restore.
Relnotes: maybe
Reviewed by: bapt, ivy, manu, ziaee
Differential Revision: https://reviews.freebsd.org/D59296
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch adds a new nfs_client_rdma_enable variable
to /etc/rc.d/nfsclient to enable the client side of
NFS over RDMA. The client side of NFS over RDMA
requires the nfsclrdma.ko module, which is still under
test/review.
I wanted to get the "glue" into main so that others
could test the module more easily. Avaliability of
the module will be announced on freebsd-current@ soon.
It should not affect non-RDMA operation.
I've specified a long MFC, since the module still
requires extensive testing and, hopefully, a review.
MFC after: 3 months
|
| |
|
|
|
|
|
|
|
|
| |
Twenty cases over where each rc option and each method executes for a
jailed service, the jail's lifetime, and the svcj option handling. Each
case drives the service inside a chroot built in its ATF work directory.
MFC after: 1 week
MFC to: stable/15
Assisted-by: Claude Code (Opus 5)
|
| |
|
|
|
|
|
|
|
|
|
| |
setaudit(8) is prefixed to the command inside the jail when
${name}_audit_user is set, and needs allow.setaudit.
This is not added automatically when ${name}_audit_user is set, this
needs an administrative setting of the options on purpose.
MFC after: 1 week
MFC to: stable/15
|
| |
|
|
|
|
|
|
|
|
|
| |
A script that defines non-default restart_cmd or status_cmd should
execute them in the service jail. Where there is no jail to enter,
restart starts the service instead of failing.
Fixes: 2efbd480f1d3 rc: add service jails framework
MFC after: 1 week
MFC to: stable/15
Assisted-by: Claude Code (Opus 5)
|
| |
|
|
|
|
|
|
|
|
|
| |
A service whose tracked process had died while another process of its own
kept the jail alive, therefore left svcj-${name} behind, and the next start
would fail.
Fixes: 2efbd480f1d3 rc: add service jails framework
MFC after: 1 week
MFC to: stable/15
Assisted-by: Claude Code (Opus 5)
|
| |
|
|
|
|
|
|
| |
Fix the logic for svcj_all_enable.
Fixes: 2efbd480f1d3 rc: add service jails framework
MFC after: 1 week
MFC to: stable/15
|
| |
|
|
|
|
|
|
|
|
|
| |
A service running under ${name}_user was signalled from the host as that
user, which the parent of a jail may no longer do: since 8a5ceebece03 an
unprivileged process would need allow.unprivileged_parent_tampering.
Stop and reload therefore failed and left both the service and its jail
running.
MFC after: 1 week
MFC to: stable/15
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In VM and cloud environments it is often possible to enlarge virtual
disks; this can be useful, for example, if a system is launched with a
small root disk and it later becomes clear that more space is needed.
On kernels which support run-time resizing of disks (for NVMe, this was
added in November 2025; some other disk types have supported this for
longer) a SIZECHANGE notification is sent to userland via devd.
Add a "nostart" rc.d script (runnable manually but not automatically at
boot time) and a devd script which invokes it when a notification
arrives. The rc.d script enlarges the "final partition" on partitioned
geoms, or the UFS filesystem or zpool device when triggered on a disk
containing either of those.
Reviewed by: imp, ziaee
MFC after: 2 weeks
Relnotes: Disk partitions and filesystems can be enlarged
automatically when disks grow by setting
growfs_postboot_enable=YES in /etc/rc.conf.
Sponsored by: Amazon
Differential Revision: https://reviews.freebsd.org/D58582
|
| |
|
|
|
|
|
|
|
| |
PermitRootLogin is "no" by default and that stopped root from logging in
even though disable_root was set to false during initialization.
Reviewed by: bapt
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D59101
|
| |
|
|
|
|
|
|
|
|
|
| |
The default for nfs_server_rdma_listen transposed two digits: 20490
instead of 20049, the IANA-assigned port for NFS-over-RDMA.
Fixes: 471e14267bea ("nfsd: Update the rc.d script for RDMA for the nfsd service")
MFC after: 1 month
Sponsored by: VersatusHPC
Pull Request: #2371
Signed-off-by: Vinícius Ferrão <ferrao@versatushpc.com.br>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit 7144a1d58c5c added the hooks for the nfsrdma.ko module.
Once loaded, this module adds RDMA support to the nfsd.
This patch adds a few lines to /etc/rc.d/nfsd, so that
nfs_server_rdma_enable="YES"
in your /etc/rc.conf will load nfsrdma.ko, so that RDMA
service is enabled.
It also supports
nfs_server_rdma_listen="port#"
so that the default of 20490 can be overridden in /etc/rc.conf.
At this available as time, the nfsrdma.ko module is an unofficial port,
since it was developed by Vinicius Ferrao <ferrao@versatushpc.com.br>
using generative AI.
As soon as it is available, it will be announced on
freebsd-current@freebsd.org.
Suggested by: Vinicius Ferrao <versatushpc.com.br>
MFC after: 1 month
|
| |
|
|
|
|
|
|
|
|
|
| |
We have ports and basesystem services, where the internal name and the
filename differ. While the documentation recommends to keep them in
sync, the reality is different. For service jails use the basename of
the service filename.
Fixes: 2efbd48 rc: add service jails framework
Suggested by: joneum
MFC after: 1 week
MFC to: stable/15
|
| |
|
|
|
|
|
| |
The name of the script and the name used internally for rc.conf differ,
as such the hardcoded disabling of service jails for the didn't work.
Fix by using the correct name.
Fixes: f99f0ee14e3af rc.d: add a service jails config to all base system services
|
| |
|
|
|
|
|
|
|
|
| |
rtld has always been built PIC since commit
7ca8e6a67068e8357e251bd3ea86253c8a751d59. The stale #ifdef might
confuse a reader by thinking rtld can be built as non-PIC.
Reviewed by: kib
Sponsored by: AFRL, DARPA
Differential Revision: https://reviews.freebsd.org/D58623
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
nuageinit_user_data_script references 'firstboot_freebsd_update'
and 'firstboot_pkg_upgrade', which are from Ports. In a default
base system test without sysutils/firstboot-freebsd-update and
sysutils/firstboot-pkg-upgrade, rcorder will warn on "unknown
provisions" to stderr, but is otherwise harmless.
Reviewed by: arrowd
Fixes: 16e47f317c4ce2be5fed530bf8a9af9f9bf55364
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
|
| |
|
|
| |
Skip importing datasource public keys when set to false.
|
| |
|
|
| |
Alias cloud-init lock_passwd key alongside locked.
|
| |
|
|
| |
Treat "no"/"unchanged" correctly instead of any non-nil value as yes.
|
| |
|
|
|
|
|
| |
disable_root now restricts root's authorized_keys instead of setting
PermitRootLogin.
Reported by: np@
|
| |
|
|
|
| |
Fixes: 7e2f38311e62 ("rtld-elf/rtld.c: apply clang-format")
Sponsored by: Innovate UK
|
| |
|
|
|
|
|
|
|
|
| |
Allowing nuageinit user scripts to run before these makes it possible to
customize official BASIC-CI and BASIC-CLOUDINIT FreeBSD images.
This was requested by KDE for their CI.
Approved by: cperciva
Pull-Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/60
|
| |
|
|
|
|
|
|
|
| |
Pass a single module name to load_kld for kbdmux and vkbd, allowing
bthidd_prestart to load both modules successfully.
Fixes: cfe1962a1925 (rc: Fix improper use of load_kld)
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
|
| |
|
|
|
|
|
|
|
|
| |
All sorts of places in the ELF loading code assume that filesz <=
memsz, so check that explicitly up front. The kernel already performs
this check for the PT_LOAD segments in the main binary and rtld in
imgact_elf.c.
Reviewed by: jrtc27, kib
Differential Revision: https://reviews.freebsd.org/D58541
|
| |
|
|
|
|
|
| |
Reviewed by: kib
Fixes: 561991144e42 ("Remove Obj_Entry textsize member.")
Sponsored by: AFRL, DARPA
Differential Revision: https://reviews.freebsd.org/D58522
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Use pwait's new -r option to wait until the target processes have not
only terminated, but also been reaped.
PR: 293183
MFC after: 1 week
Sponsored by: Klara, Inc.
Sponsored by: NetApp, Inc.
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D58391
|
| |
|
|
|
|
|
|
|
| |
- Scope local variables properly to each function.
- Quote variables that should be treated as single words.
- Replace `${cmd}; if [ $? -eq 0 ]` with `if ${cmd}` for simplicity.
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D57899
|
| |
|
|
|
|
|
| |
Reviewed by: kevans
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D57908
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For DoneList allocations, its size depends on the number of loaded DSOs.
Small images could be served by alloca(), but large donelists need to
go into heap.
For map_object(), alloca size is the number of segments in the object.
In both cases, over-grown situations would cause a stack overflow.
PR: 295991
Noted and reviewed by: kevans
Tested by: Marek Zarychta <zarychtam@plan-b.pwste.edu.pl>
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D57908
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Right now, the rtld malloc is called under the write-locked rtld bind
lock. A future change adds places where only read-locked rtld bind lock
is held, and then the spinlock protects the malloc structures from the
parallel updates.
Reviewed by: kevans
Tested by: Marek Zarychta <zarychtam@plan-b.pwste.edu.pl>
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D57908
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Just as was done for ipfw's log device stop creating entire struct
ifnet's for pflog devices. Create only a bpf_t.
This does mean we lose the create/destroy infrastructure provided by the
clone interface. Rather than implement this ourselves we allow users to
configure the number of pflog interfaces using the net.pflog.if_count
sysctl. We default to 8 devices, but allow up to 256.
The /etc/rc.d/pflog script will create extra devices as required.
While it was possible to rename pflog devices pfctl expected the pflogX
name, so it's safe to assume users never did this.
Requested by: glebius
Reviewed by: glebius
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D57851
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The documented flags are named differently than the script name, this
requires special handling of the flags.
The Service Jails feature requires the handling of the variable to be
differently than it was initially. The change back then did not work,
which resulted in the flags to be ignored.
This commit fixes the issue in head. This affects 15.0 and 15.1 too.
PR: 296233
Reported by: Robert Blayzor <rblayzor@inoc.net>
Tested by: Robert Blayzor <rblayzor@inoc.net>
Fixes: f99f0ee14e3af81c2 - rc.d: add a service jails config to all base system services
MFC after: 1 month
MFC to: 15-stable
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The default behavior of load_kld is now robust enough for devmatch.
Switching means settings from /etc/sysctl.kld.d are now properly applied
when the corresponding modules are loaded by devmatch.
While here, reduce the amount of output produced by devmatch from one
line per module to a single line.
MFC after: 1 week
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D57707
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Centralize the usage message.
* Document and enforce that -e and -m are mutually exclusive; previously,
speficying both would result in only -e being applied.
* If -e was not specified, and -m was not specified or did not match,
fall back to `kldstat -n file` which will always work for modules that
aren't built into the kernel.
This means the kld and ntpd scripts can now rely on load_kld to dtrt.
MFC after: 1 week
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D57706
|
| |
|
|
|
|
|
|
|
|
|
| |
Fix scripts that needlessly used -e when the simpler -m would work, or
that used -m when the module and file name are the same, or, in one
particularly egregious case, used -m with the wrong name when using
nothing at all would have worked just fine.
MFC after: 1 week
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D57705
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
By default don't block booting with a prompt if a zpool needs a keyboard
password to unlock it. To enable prompting for keyboard password during
boot require:
zfskeys_enable="YES"
zfskeys_prompt_enable="YES"
to both be enabled. This returns to POLA of prior behaviour.
PR: 296130
Reviewed by: kevans
Differential Revision: https://reviews.freebsd.org/D57750
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
rtld calls functions in the .init_array section one at a time, until
it finds a distinguished sentinel value. The C runtime does the same
thing (in crtend.c). However, that checks for the sentinel -1 and not
1. If one is using a linker that unifies .ctors and .init_array, then
rtld will miss the sentinel value. I believe the author of this code
intended to write -1 instead of 1. Indeed, changing the code to also
check for -1 prevents rtld from attempting to call a non-existent
function. The same is true of .dtors and .fini_array.
Signed-off-by: Daniel Levin <daniellevin2607@gmail.com>
Reviewed by: kib
MFC after: 3 days
Pull Request: https://github.com/freebsd/freebsd-src/pull/2270
|
| |
|
|
|
|
|
| |
Reviewed by: des, dim
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D57549
|