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
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
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
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
- 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
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
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)")
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
* 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
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
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
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
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")
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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")
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
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
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
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
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
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
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
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