FreeBSD/src dce6afflib/libc/gen fts.3

fts: Improve the description of FTS_NOSTAT

Note that we still need to stat directories and the roots.

MFC after:      1 week
Sponsored by:   Klara, Inc.
Reviewed by:    kevans
Differential Revision:  https://reviews.freebsd.org/D57325
DeltaFile
+8-1lib/libc/gen/fts.3
+8-11 files

FreeBSD/src b2b9524lib/libc/gen fts.c

fts: Check link count before using it

* Check the range of the link count before trying to use it.

* Rewrite the comment explaining what the link count is used for.

MFC after:      1 week
Sponsored by:   Klara, Inc.
Reviewed by:    kevans
Differential Revision:  https://reviews.freebsd.org/D57324
DeltaFile
+39-5lib/libc/gen/fts.c
+39-51 files

FreeBSD/src 7ec5498lib/libc/tests/gen fts_options_test.c

fts: Add some depth to the options test

MFC after:      1 week
Sponsored by:   Klara, Inc.
Reviewed by:    kevans
Differential Revision:  https://reviews.freebsd.org/D57323
DeltaFile
+74-0lib/libc/tests/gen/fts_options_test.c
+74-01 files

FreeBSD/src ee41a88usr.sbin/spi spi.c

spi: switch to switch

use recommended switch with default case to catch invalid values

Reviewed by:    kevans, adrian
Differential Revision:  https://reviews.freebsd.org/D54759
DeltaFile
+15-20usr.sbin/spi/spi.c
+15-201 files

FreeBSD/ports aefe11cwww/archiva Makefile

www/archiva: Mark DEPRECATED and set to EXPIRE

Project has been moved to Apache Attic more than two years ago and haven't been
updated for several years now. Deprecate and set EXPIRE to 2026-08-31.

Reference:      https://issues.apache.org/jira/browse/ATTIC-221
DeltaFile
+3-0www/archiva/Makefile
+3-01 files

FreeBSD/ports 9a270d0sysutils/edk2 Makefile

sysutils/edk2: Reinstantiate binary aliases for ar and dtc

ar and dtc in base differ in function and capability form the ports
counterparts. Use from ports to make to build run again.

PR:             292544
MFH:            2026Q2
Differential Revision:  https://reviews.freebsd.org/D57279

(cherry picked from commit d69944f5e177117e1e8b0e3041bd44374f88d10f)
DeltaFile
+3-1sysutils/edk2/Makefile
+3-11 files

FreeBSD/ports d69944fsysutils/edk2 Makefile

sysutils/edk2: Reinstantiate binary aliases for ar and dtc

ar and dtc in base differ in function and capability form the ports
counterparts. Use from ports to make to build run again.

PR:             292544
MFH:            2026Q2
Differential Revision:  https://reviews.freebsd.org/D57279
DeltaFile
+3-1sysutils/edk2/Makefile
+3-11 files

FreeBSD/src aa02908tools/test/stress2/misc msdos24.sh msdos22.sh

tools/test/stress2/misc: Add msdosfs tests (currently failing)

Test msdos22.sh creates 1000 files with long random names consisting
of only ASCII characters. The mount is performed without -L option,
therefore no use of iconv to convert between character sets.

Test msdos23.sh mixes some non-ASCII characters into the file names.
The file system is therefore mounted with -L C.UTF-8 to include tests
of the conversions between UTF-8 and UTF-16.

Test msdos24.sh adds emojis to the names to test the (not yet
committed) support of UTF-16 surrogate pairs in filenames.

All 3 tests succeed with a small number of files (e.g., 10), but fail
most of the time when testing with 1000 files.

The tests have been added to all.exclude since they are expected to
fail. They shall be enabled as regression tests, when the msdosfs code
has been fixed.
DeltaFile
+80-0tools/test/stress2/misc/msdos24.sh
+79-0tools/test/stress2/misc/msdos22.sh
+79-0tools/test/stress2/misc/msdos23.sh
+3-0tools/test/stress2/misc/all.exclude
+241-04 files

FreeBSD/src f6911b9sys/sys signal.h

sys: Renumber MTE SEGV codes

Some third party software expects these to not conflict. As the MTE
support isn't fully in the tree, and these values aren't in a release
we can renumber them without any backwards compatibility issues.

Sponsored by:   Arm Ltd
DeltaFile
+2-2sys/sys/signal.h
+2-21 files

FreeBSD/src 1a5ab1dsys/kern kern_time.c

Revert "kern_time: Honor the precise option when counting diff"

This will not work because this kernel version does not support a
precise option. We handle the clock uniformly in all cases.

This reverts commit 3886f1b488e47eba98e1523f85cb570694e97385.
DeltaFile
+1-3sys/kern/kern_time.c
+1-31 files

FreeBSD/ports f60e436accessibility/darkman Makefile distinfo

accessibility/darkman: Update 2.0.1 => 2.3.1, adopt port

Port changes:
* Move to seperate pkg-plist.
* Add EXAMPLES option for a collection of few shell scripts.
* Remove unneeded MANPAGES_DEPENDS since it's native now.
* Remove extinct patchings from post-patch.
* Silence mkdir(1) calls.
* Also install darkman.conf.5 and darkman.desktop files.

Changelog:
https://gitlab.com/WhyNotHugo/darkman/-/blob/v2.3.1/CHANGELOG.md?ref_type=tags

PR:             295547
Reported by:    Pierre-Alain TORET <pierre-alain+freebsd at toret.fr>
Approved by:    osa, vvd (Mentors, implicit)
MFH:            2026Q2

(cherry picked from commit f6760103998a1c6f266d5d91721b2bb6987c049b)
DeltaFile
+25-36accessibility/darkman/Makefile
+9-15accessibility/darkman/distinfo
+18-0accessibility/darkman/pkg-plist
+52-513 files

FreeBSD/ports f676010accessibility/darkman Makefile distinfo

accessibility/darkman: Update 2.0.1 => 2.3.1, adopt port

Port changes:
* Move to seperate pkg-plist.
* Add EXAMPLES option for a collection of few shell scripts.
* Remove unneeded MANPAGES_DEPENDS since it's native now.
* Remove extinct patchings from post-patch.
* Silence mkdir(1) calls.
* Also install darkman.conf.5 and darkman.desktop files.

Changelog:
https://gitlab.com/WhyNotHugo/darkman/-/blob/v2.3.1/CHANGELOG.md?ref_type=tags

PR:             295547
Reported by:    Pierre-Alain TORET <pierre-alain+freebsd at toret.fr>
Approved by:    osa, vvd (Mentors, implicit)
MFH:            2026Q2
DeltaFile
+25-36accessibility/darkman/Makefile
+9-15accessibility/darkman/distinfo
+18-0accessibility/darkman/pkg-plist
+52-513 files

FreeBSD/ports bcd76c5news/newsx Makefile distinfo

news/newsx: Fix CVE-2008-3252

Security:       CVE-2008-3252
DeltaFile
+4-1news/newsx/Makefile
+3-0news/newsx/distinfo
+7-12 files

FreeBSD/src 8514990tests/sys/mac/do consistency.sh Makefile

MAC/do: Add consistency tests

Test that:
1. Concurrent changes to different parameters on the same jail are
   independent/atomic.
2. Inheritance works.
3. Relaxing only parent jail rules does not leak to a subjail thanks to
   sequential consistency.
4. Sysctl knobs and jail parameters stay consistent.

Some of these tests may be extended in the future with several layers of
jails (there is only a single subjail currently).

Reviewed by:    bapt
MFC after:      1 month
Sponsored by:   The FreeBSD Foundation
Pull Request:   https://ron-dev.freebsd.org/FreeBSD/src/pulls/38
DeltaFile
+211-0tests/sys/mac/do/consistency.sh
+1-1tests/sys/mac/do/Makefile
+212-12 files

FreeBSD/src a95ff5etests/sys/mac/do common.sh

MAC/do: Tests: Add support for exec paths, jail parameters, subjails

And also allow configuration of the mdo(1) executable path.

This commit only contains new or modified infrastructure.  No functional
change intended at this point.

Reviewed by:    bapt
MFC after:      1 month
Sponsored by:   The FreeBSD Foundation
Pull Request:   https://ron-dev.freebsd.org/FreeBSD/src/pulls/38
DeltaFile
+110-9tests/sys/mac/do/common.sh
+110-91 files

FreeBSD/src 33daea3tests/sys/mac/do invalid_configs.sh valid_configs.sh

MAC/do: Tests: Quote the source directory

In a standard test suite installation, this is not necessary, but be
bullet-proof to custom ones, however improbable.

Reviewed by:    bapt
MFC after:      3 days
Sponsored by:   The FreeBSD Foundation
Pull Request:   https://ron-dev.freebsd.org/FreeBSD/src/pulls/38
DeltaFile
+1-1tests/sys/mac/do/invalid_configs.sh
+1-1tests/sys/mac/do/valid_configs.sh
+2-22 files

FreeBSD/src 6159187tests/sys/mac/do common.sh Makefile

MAC/do: Tests: Declare required programs closer to use

Reviewed by:    bapt
MFC after:      3 days
Sponsored by:   The FreeBSD Foundation
Pull Request:   https://ron-dev.freebsd.org/FreeBSD/src/pulls/38
DeltaFile
+2-0tests/sys/mac/do/common.sh
+0-1tests/sys/mac/do/Makefile
+2-12 files

FreeBSD/src b0c948ftests/sys/mac/do invalid_configs.sh valid_configs.sh

MAC/do: Tests: Fix copyrights

No comma needed after a single year.  Add SPDX.

Reviewed by:    bapt
MFC after:      3 days
Sponsored by:   The FreeBSD Foundation
Pull Request:   https://ron-dev.freebsd.org/FreeBSD/src/pulls/38
DeltaFile
+3-1tests/sys/mac/do/invalid_configs.sh
+3-1tests/sys/mac/do/valid_configs.sh
+2-1tests/sys/mac/do/common.sh
+8-33 files

FreeBSD/src 79a987atests/sys/mac/do invalid_configs.sh valid_configs.sh

MAC/do: Tests: Remove shebang lines

They are automatically added by <bsd.test.mk>.

Reviewed by:    bapt
MFC after:      3 days
Sponsored by:   The FreeBSD Foundation
Pull Request:   https://ron-dev.freebsd.org/FreeBSD/src/pulls/38
DeltaFile
+0-2tests/sys/mac/do/invalid_configs.sh
+0-2tests/sys/mac/do/valid_configs.sh
+0-42 files

FreeBSD/src 3981865share/man/man4 mac_do.4

mac_do.4: Document executable paths, default jail values and consistency

While here, fix the bug of mentioning 'enable' as a possible value for
the 'mac.do' jail parameter whereas it is 'new' instead.

Reviewed by:    bapt
MFC after:      1 month
Sponsored by:   The FreeBSD Foundation
Pull Request:   https://ron-dev.freebsd.org/FreeBSD/src/pulls/38
DeltaFile
+143-46share/man/man4/mac_do.4
+143-461 files

FreeBSD/src fcb0018sys/security/mac_do mac_do.c

MAC/do: Update copyright

Update years for the Foundation.

While here, remove the initial '/*-' which has been useless for a long
time.

While here, add a missing space on bapt@'s copyright line (approved by
him).

Reviewed by:    bapt
MFC after:      1 month
Sponsored by:   The FreeBSD Foundation
Pull Request:   https://ron-dev.freebsd.org/FreeBSD/src/pulls/38
DeltaFile
+3-3sys/security/mac_do/mac_do.c
+3-31 files

FreeBSD/src 1fa1e3fsys/security/mac_do mac_do.c

MAC/do: Do not skip blanks when parsing executable paths

The kind of tolerance we apply to parsing rules, whose format we have
defined, cannot be applied to paths since blank characters are allowed
there.

There is still the limitation that no escape character is currently
supported, and so it is not possible to configure a path having a ':'
character.

Reviewed by:    bapt
Fixes:          9818224174c4 ("MAC/do: Executable paths feature (GSoC 2025's final state)")
MFC after:      1 month
Sponsored by:   The FreeBSD Foundation
Pull Request:   https://ron-dev.freebsd.org/FreeBSD/src/pulls/38
DeltaFile
+1-1sys/security/mac_do/mac_do.c
+1-11 files

FreeBSD/src 4c98f7asys/security/mac_do mac_do.c

MAC/do: Serialize installing/modifying some jail's configuration

See the immediately preceding commit for explanations on what this is
fixing.

When setting 'mac.do' to 'inherit' on a jail with 'mac.do.rules' and
'mac.do.exec_paths' also specified in the same call, ensure that the
check that these passed parameters are the same as those to be inherited
is atomic with respect to enabling the inheritance (i.e., removing the
jail's 'struct conf' object).  (See previous commit "MAC/do: Fix the
recent logic to set jail parameters, make it more tolerant" as for why
this check exists.)

Because we currently only modify a single configuration object per
transaction, we introduce the parse_and_commit_conf() wrapper around
parse_and_set_conf() to remove duplicated code that would ensue from
calling the latter directly, namely, releasing the 'mac_do_rwl' lock and
freeing the old configuration object (if any).


    [9 lines not shown]
DeltaFile
+76-23sys/security/mac_do/mac_do.c
+76-231 files

FreeBSD/src 0db7f11sys/security/mac_do mac_do.c

MAC/do: Support for atomically modifying configurations

As mentioned in previous commits "MAC/do: parse_and_set_conf(): Require
the model configuration" and "MAC/do: Sequential consistency for
configuration retrieval", the introduction of the "executable path"
feature, more fundamentally, the fact that there is now more than one
per-jail parameter and that parameters can be independently modified or
copied, causes an atomicity problem in case of concurrent accesses to of
a jail's applicable configuration.

Partially modifying a configuration is indeed akin to
a read-modify-write operation, where the read is either to the current
or an inherited configuration.  More precisely, once pointed to by
a jail, a configuration object is immutable, and changing the jail's
configuration means making the jail point to another configuration
object.  To change a jail's configuration, a new configuration object is
thus built, and if only some parameters have been explicitly specified,
those that have not been are set by copying the corresponding values
from an existing configuration object (in case of partial modification

    [34 lines not shown]
DeltaFile
+49-15sys/security/mac_do/mac_do.c
+49-151 files

FreeBSD/src 5b194a4sys/security/mac_do mac_do.c

MAC/do: Sequential consistency for configuration retrieval

Since the inception of mac_do(4), find_conf(), used to retrieve the
applicable configuration, has been weakly consistent with respect to
concurrent modifications to configuration inheritance that influence its
result (and it has been sequentially consistent with respect to other
configuration modifications, which the initial executable paths feature
and introduction of implicit parameters broke and which will be fixed in
a subsequent commit).

Indeed, find_conf() climbs the jail tree to find an applicable
configuration, which is not an atomic operation.  It examines the
current jail's configuration pointer for each browsed jail, which does
not prevent concurrent modifications of the configuration pointer for
jails below or above it.  Modifications above the current jail are not
a problem, since if climbing needs to continue (i.e., the current jail
inherits), these modifications will be seen if performed before that
check (and may or may not be seen if performed after that check).
However, modifications below the current jail impair sequential

    [48 lines not shown]
DeltaFile
+69-53sys/security/mac_do/mac_do.c
+69-531 files

FreeBSD/src 5bedb5esys/security/mac_do mac_do.c

MAC/do: Comment to explain the main invariant for configurations

Once visible, configuration structures must *never* change.

Spell that out in a comment to help future readers/contributors
understand the design.

Reviewed by:    bapt
MFC after:      1 month
Sponsored by:   The FreeBSD Foundation
Pull Request:   https://ron-dev.freebsd.org/FreeBSD/src/pulls/38
DeltaFile
+5-0sys/security/mac_do/mac_do.c
+5-01 files

FreeBSD/src 31ef4eesys/security/mac_do mac_do.c

MAC/do: Allocate only one default configuration

When mac_do(4) is loaded, all jails get the same default configuration
(disabled, with only one allowed executable path: '/usr/bin/mdo').
Share it between all jails instead of creating a separate copy for each.

Reviewed by:    bapt
Fixes:          9818224174c4 ("MAC/do: Executable paths feature (GSoC 2025's final state)")
MFC after:      1 month
Sponsored by:   The FreeBSD Foundation
Pull Request:   https://ron-dev.freebsd.org/FreeBSD/src/pulls/38
DeltaFile
+12-12sys/security/mac_do/mac_do.c
+12-121 files

FreeBSD/src 01e2b0csys/security/mac_do mac_do.c

MAC/do: Visually separate some file sections

With additional empty lines.

No functional change (intended).

Reviewed by:    bapt
MFC after:      1 month
Sponsored by:   The FreeBSD Foundation
Pull Request:   https://ron-dev.freebsd.org/FreeBSD/src/pulls/38
DeltaFile
+2-0sys/security/mac_do/mac_do.c
+2-01 files

FreeBSD/src 888a84csys/security/mac_do mac_do.c

MAC/do: Fix reporting of "mac.do" post-"executable paths"

In mac_do_jail_get(), computation of 'jsys' had not been updated to take
into account executable paths.

Reviewed by:    bapt
Fixes:          9818224174c4 ("MAC/do: Executable paths feature (GSoC 2025's final state)")
MFC after:      1 month
Sponsored by:   The FreeBSD Foundation
Pull Request:   https://ron-dev.freebsd.org/FreeBSD/src/pulls/38
DeltaFile
+2-3sys/security/mac_do/mac_do.c
+2-31 files

FreeBSD/src 51cc584sys/security/mac_do mac_do.c

MAC/do: Configuration: Fix default values: Remove jail creation method

mac_do_jail_create() would create a default configuration on the
just-created jail, erroneously causing mac_do_jail_set() to then
retrieve it and use it as a model when determining the default values
for not-specified parameters, instead of using the configuration
applicable to the parent jail.

Setting a default configuration in mac_do_jail_create() had been done as
a kind of defensive measure to prevent a created jail not to have
a configuration (effectively making it inherit from an ancestor jail,
which is a security hazard except if explicitly requested).  However,
this measure was never really effective (osd_jail_call(PR_METHOD_CREATE)
in kern_jail_set() calls the PR_PETHOD_CREATE methods in an unspecified
order, and stops at the first error), so we are forced to rely in any
case on the fact that an error in a PR_METHOD_CREATE or PR_METHOD_SET
method leads to stopping the jail creation process (which is the case
today; see kern_jail_set()).


    [5 lines not shown]
DeltaFile
+6-14sys/security/mac_do/mac_do.c
+6-141 files