Commit Graph

25680 Commits

Author SHA1 Message Date
Kyle Evans 06afa0a55e pkgbase: move ncurses into its own package
Pushing ncurses into clibs adds extra upgrade risk to a package that
otherwise consists of integral libs with non-trivial interdependencies.

Adding it to -runtime was considered, but the move was historically
motivated to some extent by allowing a much smaller set of base libs to
be installed for smaller VM images that don't really need all of the
runtime package.

This also fixes the ncurses build to ensure that libmenuw is grouped
with the rest of the ncurses libraries, which doesn't seem to have been
an intentional omission.

Reviewed by:	ivy
MFC after:	2 days (pkgbase movement)
Differential Revision:	https://reviews.freebsd.org/D52786
2025-09-30 07:21:33 -05:00
Lexi Winter 4c8bbf5897 libstdbuf: Move to the utilities package
This is a niche tool which is only useful in a small number of
specific situations.  It's very small (8kB), and the executable
component /usr/bin/stdbuf is already in -utilities, so move the
shlib to -utilities as well.

MFC after:	1 day
Reviewed by:	bapt
Sponsored by:	https://www.patreon.com/bsdivy
Differential Revision:	https://reviews.freebsd.org/D52788
2025-09-30 09:15:04 +01:00
Lexi Winter a053f948ad libbsm: Rename package to audit-lib
This is part of audit, so use the new LIB_PACKAGE feature to name the
package audit-lib, rather than libbsm.

MFC after:	1 day
Reviewed by:	bapt
Sponsored by:	https://www.patreon.com/bsdivy
Differential Revision:	https://reviews.freebsd.org/D52789
2025-09-30 09:14:58 +01:00
Lexi Winter 41ee4321cc libsdp: Move to bluetooth-lib package
Instead of creating a separate libsdp package, use LIB_PACKAGE to
ship this in bluetooth-lib.

MFC after:	1 day
Reviewed by:	bapt
Sponsored by:	https://www.patreon.com/bsdivy
Differential Revision:	https://reviews.freebsd.org/D52790
2025-09-30 09:14:51 +01:00
Lexi Winter 9124ace751 packages: Rename liblzma package to xz
Rename liblzma to xz, and use LIB_PACKAGE to create an xz-lib package
for runtime libraries.

MFC after:	1 day
Reviewed by:	bapt
Sponsored by:	https://www.patreon.com/bsdivy
Differential Revision:	https://reviews.freebsd.org/D52791
2025-09-30 09:14:46 +01:00
Lexi Winter 11709058bf libstdthreads: Move to the runtime package
This library is required for C11 conformance, and is tiny (11kB), so
instead of creating a bunch of packages for it, put it in runtime.

Although this is a core C library and might be expected to live in
clibs, kib objected to this on the basis that almost nothing actually
uses libstdthreads and putting it in clibs would be wasteful.

MFC after:	1 day
Reviewed by:	kib
Sponsored by:	https://www.patreon.com/bsdivy
Differential Revision:	https://reviews.freebsd.org/D52792
2025-09-30 09:14:38 +01:00
Lexi Winter b0f25a38d7 liby: Move to toolchain package
We don't need an entire package for this trivial library.  Move it to
toolchain, which in practice means it's installed in toolchain-dev as
it only contains a static library.

MFC after:	1 day
Reviewed by:	bapt
Sponsored by:	https://www.patreon.com/bsdivy
Differential Revision:	https://reviews.freebsd.org/D52793
2025-09-30 09:14:05 +01:00
Li-Wen Hsu 6952bb321c wlanstat(8): Follow-ups after moving to /usr/sbin and renaming
- Update related comments
- Remove from tools/tools/net80211

Reviewed by:	imp, adrian
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D52726
2025-09-30 11:31:12 +08:00
Lexi Winter 614c8750ce Remove ftpd(8)
This was previously deprecated and is slated for removal in 15.0.
Users who still need ftpd(8) can install the ftp/freebsd-ftpd port.

Retain the ftp(d) PAM services since other FTP daemons use them.

Update /etc/inetd.conf to point to /usr/local.

Add ftpd to ObsoleteFiles, but do not list configuration files since
users may want to preserve these to use with the freebsd-ftpd port.

There is still some language in the manual referring to ftpd(8)
which is relevant to the port, which has been retained but updated
to reference the port.

MFC after:	3 days
Relnotes:	yes
Reviewed by:	cperciva
Differential Revision:	https://reviews.freebsd.org/D52739
2025-09-29 22:53:34 +01:00
Dag-Erling Smørgrav cf76bfbb23 tzcode: Test escape from TZDIR
Test a value of TZ that temporarily escapes from TZDIR (which is not
permitted when setugid) then reenters it.

MFC after:	3 days
2025-09-29 14:39:49 +02:00
Xin LI 8d485a8490 MFV: expat 2.7.3.
MFC after:	3 days
2025-09-28 21:28:12 -07:00
Xin LI a8fa7ccb47 Vendor import of expat 2.7.3. 2025-09-28 21:20:40 -07:00
Rick Macklem 70730cd21c rpc_generic.c: Fix a rpcbind core dump when rpcinfo is done
Commit c5d671b added netlink support to
server side rpcbind. However it did not add
a case for AF_NETLINK to __rpc_taddr2uaddr_af().
(Reported as PR#289625.)

As such, without this patch the r_addr field of the
netlink rbllist is NULL, which causes a crash in
svc_sendreply() for a Dump query (what rpcinfo
does).

PR:	289625
Reviewed by:	glebius
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D52651
Fixes:	c5d671b711 ("libc/rpc: add userland side RPC server over netlink(4)")
2025-09-28 07:57:34 -07:00
Christos Margiolis 9cab9fde5e virtual_oss: Port to base
This patch diverges quite a bit from the current upstream [1] in a few
ways:

1. virtual_oss(8), virtual_bt_speaker(8) and virtual_oss_cmd(8) are
   actually separate programs.
2. Backends (lib/virtual_oss) are built as separate shared libraries and
   we dlopen() them in virtual_oss(8) and virtual_bt_speaker(8) on
   demand.
3. virtual_equalizer(8) and the sndio and bluetooth backends are built
   as ports, because they depend on third-party libraries.
4. Use newer libav API in bluetooth backend (see HAVE_LIBAV ifdefs) to
   address compiler errors.

[1] https://github.com/freebsd/virtual_oss

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D52308
2025-09-28 11:56:52 +02:00
Dag-Erling Smørgrav df8bc705eb tzcode: Fix issues when TZ is an absolute path
* If TZ starts with TZDIR, strip any additional slashes so relname
  does not end up looking like an absolute path.  For instance,
  TZ=/usr/share/zoneinfo//UTC should result in UTC, not /UTC.

* In the setugid case, we were incorrectly passing name rather than
  relname to fstatat().

* Modify the tz_env and tz_env_setugid test cases to exercise both
  of these scenarios.

* Also add test cases for invalid values of TZ, which I wrote
  earlier but forgot to include in a5f14e4f90.

Reported by:	Paul Eggert <eggert@cs.ucla.edu>
MFC after:	3 days
Fixes:		967a49a21a ("Update tzcode to 2025b")
Fixes:		a5f14e4f90 ("tzcode: Use -00 only for invalid time zones")
Reviewed by:	philip
Differential Revision:	https://reviews.freebsd.org/D52753
2025-09-27 19:07:16 +02:00
Paul Floyd 7feac79331 libc/aarch64: fix ELF size of timingsafe_memcmp
Looks like a copy and paste error.
The ELF size of 0 prevents Valgrind from redirecting this function.

PR:		289845
Reviewed by:	fuz
Fixes:		3f224333af
See also:	https://bugs.kde.org/show_bug.cgi?id=509406
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1854
MFC after:	1 day
Event:		EuroBSDcon 2025
2025-09-26 11:04:54 +02:00
Konstantin Belousov 495813bfd7 libsys: drop private exports no longer needed
after libc is switched to use public symbols for pre-ino64 syscalls.

Reviewed by:	olce
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D52687
2025-09-26 09:51:28 +03:00
Konstantin Belousov e194103bd3 libc: properly forward the compat syscall references to libsys
same as it was done for setgroups@FBSD_1.0.
Switch from weakref to symver, since GNU as cannot handle version spec
with weakref.

Reviewed by:	olce
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D52687
2025-09-26 09:51:28 +03:00
Konstantin Belousov f15d3694db libc: un-namespace gen-compat.h
There are no symbols that needs to be namespaced in the header, and it
would not allow to use proper raw syscall names later, where they are
needed.

Reviewed by:	olce
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D52687
2025-09-26 09:51:28 +03:00
Kristof Provost b84666f798 pf: export expiration time as time_t
time_t has a different size on different platforms (i.e. 32-bit on i386, 64-bit
on others). Rather than always exporting it as 64-bits use the platform-native
size.
This means we can safely write directly into a time_t variable, which we can't
do on i386 eif we export 64 bits.

Sponsored by:	Rubicon Communications, LLC ("Netgate")
2025-09-25 14:41:11 +02:00
Kristof Provost b9d652bb75 pf: print 'once' rule expire time
Obtained from:	OpenBSD, sashan <sashan@openbsd.org>, 8cf23eed7f
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2025-09-25 14:41:09 +02:00
Gleb Smirnoff b0091036f7 psignal(3): document return values of sig2str() and str2sig
Reviewed by:		bcr
Differential Revision:	https://reviews.freebsd.org/D52698
2025-09-25 01:19:46 -07:00
Lexi Winter 61ca69110f packages: Replace libbz2 package with a bzip2 package
Currently libbz2 is in the libbz2 package, while bzip2 itself is in
-utilities, which is inconsistent.  Move both the library and the
utility to a new -bzip2 package, and use LIB_PACKAGE to create a
separate -bzip2-lib package for runtime dependencies.

Add the bzip2 package to the minimal set, and since newsyslogd uses
bzip2 for logfile compression, add a dependency from there.

MFC after:	1 day
Reviewed by:	manu
Differential Revision:	https://reviews.freebsd.org/D52663
2025-09-23 23:06:33 +01:00
Lexi Winter 67c3c3a274 libpmc: Move libpmc and utils to a new pmc package
Due to the size of libpmc.so.5, this reduces the size of the -utilities
package by 10%.

MFC after:	1 day
Reviewed by:	manu, adrian, emaste
Differential Revision:	https://reviews.freebsd.org/D52662
2025-09-23 23:06:33 +01:00
Dag-Erling Smørgrav 155290b23f tzcode: Expose and document offtime() and offtime_r()
Includes diff reduction to upstream version of this patch.

MFC after:	3 days
Sponsored by:	Klara, Inc.
Reviewed by:	philip
Differential Revision:	https://reviews.freebsd.org/D39715
2025-09-23 21:38:49 +02:00
Konstantin Belousov f72908c94d libc: properly reference setgroups@FBSD_1.0 in initgroups@FBSD_1.0
by forwarding the reference to libsys syscall symbol, for the libc.so
case.

Reviewed and tested by:	kevans
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D52672
2025-09-22 08:01:47 +03:00
Xin LI 627b778d9e MFV: libexpat 2.7.2
MFC after:	3 days
2025-09-18 19:43:17 -07:00
Xin LI 14feafd16d Vendor import of expat 2.7.2. 2025-09-18 19:01:56 -07:00
Lexi Winter 9065390ddc packages: Remove the tests-dev package
We don't want a tests-dev package, because this means set-devel depends
on tests-dev, which transitively depends on tests, which means you can't
install set-devel without also getting tests.

The only real "dev" files in tests-dev are from ATF (libprivateatf),
so move that to its own package and add a dependency from tests.

Also move Kyua to its own package, since this might be useful for
running tests even when the user doesn't want the whole set of base
tests installed.

Add a dependency from -tests to both -atf and -kyua, and a dependency
on -set-base, since the tests won't work without the full base system
installed.

The remaining "dev" files in tests are actually test artifacts, not real
development libraries.  Add a new NO_DEV_PACKAGE option to bsd.lib.mk,
which causes dev files to be installed in the base package instead of
creating a -dev package, and set this option for everything that
installs test libraries.

While here, add a slightly more informative description for the tests
package.

MFC after:	3 seconds
Reviewed by:	bapt, emaste
Differential Revision:	https://reviews.freebsd.org/D52597
2025-09-18 10:26:12 +01:00
Christos Margiolis 3d14cc82d7 sdp(3): Change bdaddr parameter type in sdp_register_service()
Fixes compiler error when the caller passes a const bdaddr_t *
paramemeter (e.g., NG_HCI_BDADDR_ANY).

Sponsored by:	The FreeBSD Foundation
MFC after:	1 day
Reviewed by:	markj, emaste
Differential Revision:	https://reviews.freebsd.org/D52582
2025-09-17 17:12:03 +03:00
Olivier Certner 4be38acc82 getgroups.2: Clarify, mention ascending order, add SECURITY CONSIDERATIONS
Clarify and be more precise about the behavior of getgroups(2), in
particular with respect to 'gidsetlen'.

Prefer a terminology referring to POSIX terms, i.e., use "supplementary
groups" instead of "group access list".

Say that getgroups(2) reports the supplementary groups in strictly
ascending order and returns the cardinal of the set they form (and
mention this has been the case since FreeBSD 14.3).

Add a new SECURITY CONSIDERATIONS section contrasting the new behavior
after commit 9da2fe96ff ("kern: fix setgroups(2) and getgroups(2) to
match other platforms") with the historical one.

While here, fix some style.

Note for MFC to stable/14: The content will have to be revised as the
new behavior is not in place.  The latter should be mentioned as
upcoming in 15.

Reviewed by:    gbe (older version)
MFC after:      5 days
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D52286
2025-09-17 14:16:08 +02:00
Olivier Certner 66b54c48b2 setcred.2: Remove now obsolete mention of setgroups(2)'s different behavior
Reviewed by:    gbe
Fixes:          9da2fe96ff ("kern: fix setgroups(2) and getgroups(2) to match other platforms")
MFC after:      5 days
MFC to:         stable/15
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D52285
2025-09-17 14:16:07 +02:00
Olivier Certner 6d22cd6b5f setgroups.2: Add SECURITY CONSIDERATIONS, fix the groups limit, rework
Add a new SECURITY CONSIDERATIONS section describing in details what the
new behavior is after commit 9da2fe96ff ("kern: fix setgroups(2) and
getgroups(2) to match other platforms"), what setgroups(2) does not
do anymore, and how programs using it are affected.

Fix the groups limit after commit 9da2fe96ff ("kern: fix setgroups(2)
and getgroups(2) to match other platforms").

Prefer a terminology referring to POSIX terms, i.e., use "effective
group list" instead of "group access list".

While here, fix some style.

Note for MFC to stable/14: The content will have to be revised as the
new behavior is not in place.  The latter should still be mentioned as
upcoming in 15.

Fixes:          9da2fe96ff ("kern: fix setgroups(2) and getgroups(2) to match other platforms")
MFC after:      5 days
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D52284
2025-09-17 14:16:07 +02:00
Olivier Certner 9294eb44ee getgrouplist.3: Rework, use more appropriate terminology
Bring up to date with NSS by substituting "file" with "database".

Describe more precisely which database is accessed, i.e., only the group
database, which value should be used and where it lands in the result.

Prefer a terminology referring to POSIX terms, i.e., use "effective
group list" instead of "group access list".

Reviewed by:    gbe
MFC after:      5 days
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D52283
2025-09-17 14:16:07 +02:00
Olivier Certner 9dc1ac8691 initgroups(3): Add a pre-FreeBSD-15-compatible version
After commit 9da2fe96ff ("kern: fix setgroups(2) and getgroups(2) to
match other platforms"), initgroups() does not set the effective GID
anymore and uses all passed groups as the supplementary group list.
This effectively breaks backwards compatibility with programs/libraries
compiled on a FreeBSD 14 or earlier system.

Restore compatibility by creating a new version of the 'initgroups'
symbol that designates the current implementation and providing
a pre-FreeBSD-15-compatible version under the symbol's previously
exported version.  The new version calls the new setgroups(2) system
call, while the compatible one calls the original one (called
freebsd14_setgroups()).

Update the manual page with some history and comparison with other
current open-source systems.  Add a "SECURITY CONSIDERATIONS" section
highlighting some security properties of this approach and the reasons
we adopt it.  While here, revamp the manual page, in particular to use
the exact POSIX terminology where possible.

Note for MFC to stable/14: Only the manual page update is to be MFCed,
and the text changed to reflect the old behavior and inform readers of
the new upcoming behavior in 15.

Reviewed by:    kib
Fixes:          9da2fe96ff ("kern: fix setgroups(2) and getgroups(2) to match other platforms")
MFC after:      5 days
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D52282
2025-09-17 14:16:06 +02:00
Olivier Certner 0b018cfd81 initgroups(3): Fix return value on allocation failure
We must not return ENOMEM, but rather -1 with 'errno' set to ENOMEM, as
described in the manual page and as other implementations are doing.
A malloc() failure actually already sets ENOMEM for us.  Add comments
indicating which function set 'errno' each time we return.

While here, improve style and remove useless headers.

Reviewed by:    kib, emaste
Fixes:          54404cfb13 ("In preparation for raising NGROUPS and NGROUPS_MAX, ...")
MFC after:      5 days
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D52580
2025-09-17 14:16:06 +02:00
Olivier Certner 11cbb7d122 libprocstat: procstat_getgroups_kvm(): Output again the effective GID
In particular, fixes 'procstat -s -M' (for processes with more than 16
groups).

Reviewed by:    kib
Fixes:          be1f7435ef ("kern: start tracking cr_gid outside of cr_groups[]")
MFC after:      5 days
MFC to:         stable/15
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D52275
2025-09-17 14:16:00 +02:00
Olivier Certner 580d2d4295 libc: compat.h: Remove a superfluous blank line at end
No functional change (intended).

MFC after:      5 days
Sponsored by:   The FreeBSD Foundation
2025-09-17 14:15:54 +02:00
Christos Margiolis dafd960a3d libsamplerate: Define as PRIVATELIB
Fixes the following warnings:

ld: error: relocation R_X86_64_32S cannot be used against local symbol; recompile with -fPIC

>>> defined in /usr/obj/usr/src/amd64.amd64/lib/libsamplerate/libsamplerate.a(samplerate.o)
>>> referenced by samplerate.c:498 (/usr/src/contrib/libsamplerate/samplerate.c:498)
>>>
>>>   samplerate.o:(src_new) in archive /usr/obj/usr/src/amd64.amd64/lib/libsamplerate/libsamplerate.a

Related discussion: https://reviews.freebsd.org/D52306

Sponsored by:	The FreeBSD Foundation
Reviewed by:	fuz
Differential Revision:	https://reviews.freebsd.org/D52307
2025-09-15 16:09:38 +03:00
Kristof Provost c00aca9a71 pf: Show pf fragment reassembly counters.
Framgent count and statistics are stored in struct pf_status.  From
there pfctl(8) and systat(1) collect and show them.  Note that pfctl
-s info needs the -v switch to show fragments.

input claudio@; OK henning@

Obtained from:	OpenBSD, bluhm <bluhm@openbsd.org>, 19e99d0613
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2025-09-15 11:32:34 +02:00
Olivier Certner ef2f36be8f jail.2: Mention EPERM is returned on open directories
The manual page does not directly mention this reason for getting EPERM,
instead referring the reader to chroot(2).  We have had some questions
about it recently, in part due to a bug (fixed), and this case is not an
obvious permission/problem, so let's be more explicit.

PR:             280809
Reviewed by:    jamie
MFC after:      3 days
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D52319
2025-09-15 11:29:44 +02:00
Warner Losh 455426da07 Fix floaing point test. (again)
Fixes: 9dd78db9c3
2025-09-14 08:48:40 -06:00
Warner Losh 4c91a542d3 Fix floaing point test.
I botched a style fix to a pull request, and didn't catch it on amd64,
but it broke almost everything else. It's a false positive to the style
program and spaces cannot be inserted here. It's not math, but a funky
notation.

Fixes: 9dd78db9c3
2025-09-14 06:14:02 -06:00
Osamu Sho 9dd78db9c3 libc: prevent incorrect %a/%La rounding at full precision
In __hdtoa() and __hldtoa(), rounding is incorrectly applied when
the requested precision exactly matches the number of significant
hexadecimal digits. In this case, the redux adjustment can trigger
an unintended exponent increment and shift the rounding position
left by one bit. This causes the least significant digit to be
rounded incorrectly.

The fix adds a new condition based on MAX_HEX_DIGITS (derived from
MANT_DIG) so that rounding is performed only when precision is
strictly less than the number of significant digits. This avoids
the unintended shift while preserving correct rounding for other
cases.

A new regression test
(printfloat_test:hexadecimal_rounding_offset_eq_exp) covers both
the binary64 (%.13a) and binary128 (%.28La on arm64) cases that
previously fail, ensuring the bug does not regress.

Note: MAX_HEX_DIGITS represents the maximum number of hexadecimal
digits needed to express the mantissa. It is computed by subtracting
the implicit integer bit from [L]DBL_MANT_DIG, dividing the remaining
mantissa bits by 4 (with +3 to round up any remainder), and finally
adding +1 for the leading integer digit. This makes its meaning
explicit and distinct from SIGFIGS, which serves a different purpose.

Fixes: 76303a9735 ("Make several changes to the way printf handles hex floating point (%a):")
Signed-off-by: Osamu Sho <osamusho@gmail.com>
Reviewed by: imp,jlduran
Pull Request: https://github.com/freebsd/freebsd-src/pull/1837
2025-09-13 21:09:26 -06:00
Jamie Gritton e75dda31c1 jaildesc: remove desc from the sysctl parameter list
Like lastjid, desc should count as a pseudo-parameter.  The difference
lies entirely in the security.jail.param sysctls, which list all of
the jail parameters.  Since desc opens and returns a file descriptor,
it has no place in such uses as "jls all."  Like lastjid, it's still
recognized by the kernel if passed in/out, and hard-coded into libjail
so it can be recognized there.

MFC after:	3 days
2025-09-13 15:30:14 -07:00
Kyle Evans 91ea7e2ce2 libc: fix the _FORTIFY_SOURCE build of getgrouplist(3)
We need <unistd.h> to get our prototype normally, but WARNS in libc is
way too low to surface that.

Additionally, _FORTIFY_SOURCE needs to include <ssp/unistd.h> by way of
<unistd.h> to actually export an implementation of getgrouplist(3).  The
version defined in the .c gets named __ssp_real_getgrouplist() and the
actual implementation comes from the redirect stub in <ssp/unistd.h>,
which basically gets optimized away in the built object because our
__builtin_object_size() check is trivially false when we cannot resolve
any object sizes in this translation unit.

This could be argued as a design flaw in _FORTIFY_SOURCE, but we should
grab <unistd.h> for our prototype anyways so let's kick the can down
the road instead of re-thinking it for 15.0.

Reported by:	Shawn Webb (HardenedBSD)
Fixes:		d3f8ed6066 ("getgrouplist(3): Remove superfluous [...]")
MFC after:	3 days
2025-09-13 17:19:46 -05:00
Ed Maste e0eaabb80d libc: Have memcmp test what the standard requires
libc's C memcmp currently returns the difference in byte values rather
than just -1/0/1 as the AArch64 assembly implementation, many non-
FreeBSD implementations, and compiler built-in optimizations do.

It is a bug for a user to expect memcmp to return the difference in the
byte values as the compiler is free to inline memcmp() with an
implementation that does not do this.  Change the test to validate only
what the standard requires.

PR:		289084
Reviewed by:	markj, fuz
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D52502
2025-09-13 15:30:31 -04:00
Lexi Winter 29185c9a26 packages: Use LIB_PACKAGE for zfs and ufs packages
Commit f9513c334f moved the shared libraries for ZFS and UFS into
separate packages (libzfs and libufs), which resulted in a rather
large number of packages being created, e.g. for ZFS:

FreeBSD-libzfs
FreeBSD-libzfs-dbg
FreeBSD-libzfs-dbg-lib32
FreeBSD-libzfs-dev
FreeBSD-libzfs-dev-lib32
FreeBSD-libzfs-lib32
FreeBSD-zfs
FreeBSD-zfs-dbg
FreeBSD-zfs-dbg-lib32
FreeBSD-zfs-dev
FreeBSD-zfs-dev-lib32
FreeBSD-zfs-lib32
FreeBSD-zfs-man

Use LIB_PACKAGE instead, which significantly reduces the number of
packages:

FreeBSD-zfs
FreeBSD-zfs-dbg
FreeBSD-zfs-dbg-lib32
FreeBSD-zfs-dev
FreeBSD-zfs-dev-lib32
FreeBSD-zfs-lib
FreeBSD-zfs-lib32
FreeBSD-zfs-man

MFC after:	3 days
Reviewed by:	bapt
Differential Revision:	https://reviews.freebsd.org/D52416
2025-09-12 21:56:51 +01:00
Jamie Gritton 66d8ffe304 jaildesc: add kevent support
Give jail descriptors the same kevent flags as jails.  Also fix the
event reporting in jails, where it was including data for events the
user didn't ask for.

MFC after:	3 days
2025-09-12 11:33:19 -07:00
Olivier Certner d3f8ed6066 getgrouplist(3): Remove superfluous headers, bogus comment and whitespace
No functional change (intended).

Fixes:          a59d6a8724 ("Implementing 'fallback' nsswitch source.")
MFC after:      3 days
Sponsored by:   The FreeBSD Foundation
2025-09-12 16:08:02 +02:00