| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
libopenbsd retains recallocarray() during bootstrapping for now
as it is needed for mandoc.
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D52864
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
sdl_data isn't always NULL terminated
Signed-off-by: nreilly@qnx.com
PR: 288958
Reviewed by: markj
MFC after: 1 week
|
| | | |
| | |
| | |
| | |
| | | |
PR: 289948
Approved by: eduardo (mentor)
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Put virtual_oss, /etc/devd/snd.conf and the other audio-related tools
into a new "sound" package. Don't create a separate -lib package,
since it's unlikely someone will want mixer(3) without mixer(8).
Put the sound package in the optional set rather than minimal, since
it's not actually required for audio hardware support, and many systems
(including nearly all servers) won't want it installed.
MFC after: 3 seconds
Reviewed by: christos
Sponsored by: https://www.patreon.com/bsdivy
Differential Revision: https://reviews.freebsd.org/D52823
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
While preserving compatibility ('root' implied if no user is specified,
option '-i' not setting groups), introduce options to control finely
which user and group IDs are set in the launched process.
To minimize the risks of user error, mdo(1) by default enforces that all
user and group IDs are specified, either with explicit values from the
command-line or, if a known user name is passed with '-u', from the
corresponding content of the password and group databases. The other
main type of use cases is to start from the current process'
credentials, only amending part of them. It is now also possible to
blend both approaches, where some parts must be specified and the others
can just be amended or left as is.
Options:
* As before:
-u: Specifies a user name or ID to change all user IDs to. If a known
name is passed, also automatically sets all groups as per the
password and group databases.
-i: Starts from the current groups, instead of having to specify them
by using '-u' with a known user name or explicitly.
* New:
-k: Starts from the current users (incompatible with '-u'). Implies '-i'.
-g: Sets/overrides the primary group IDs with the passed group name or ID.
-G: Sets/overrides the supplementary groups set with the passed list of
comma-separated names or IDs.
-s: Amend the supplementary groups set according to the list of
comma-separated directives from the following:
- @: Empties the set. Must be the first directive. Incompatible with '-G'.
- +<group>: Add a group to the set.
- -<group>: Remove a group from the set. Takes precedence over +<group>.
--euid: Overrides the effective user ID.
--ruid: Overrides the real user ID.
--svuid: Overrides the saved user ID.
--egid: Overrides the effective group ID.
--rgid: Overrides the real group ID.
--svgid: Overrides the saved group ID.
Option '-k' was introduced as a requirement to be explicit when one
wants to keep the current user(s) instead of specifying new ones. This
is both for the purpose of avoiding foot-shooting and preserving the
possibility to omit '-u' to switch to 'root'. In order to avoid
confusion, if any user or group overrides are specified, mdo(1) however
enforces that either '-u' or '-k' has been specified (so, in practice,
'-u root' is implied only in the absence of any other options except
'-i').
Some base supplementary groups set is needed when '-s' is used without
directive '@'. It can be an explicit one specified with '-G',
effectively meaning that '-G' is processed before '-s'. Else, it is
determined from the password/group database (see initgroups(3)) if '-u'
with a user name was passed, or is simply the current set if '-i' (or
'-k') was specified. Other cases require specifying the full set (using
'-G' or '-s' with '@'), and will fail otherwise.
As the release process for 15.0 is progressing, this is committed in
advance of the still-in-progress tests and manual page updates.
Note for MFC to stable/14: As initgroups() has its old behavior,
consistently with it, remove the effective GID from being passed also as
a supplementary group.
Reviewed by: bapt
MFC after: 3 days
Relnotes: yes
Event: EuroBSDCon 2025
Sponsored by: The FreeBSD Foundation
Sponsored by: Google LLC (GSoC 2025)
Co-authored-by: Kushagra Srivastava <kushagra1403@gmail.com>
Differential Revision: https://reviews.freebsd.org/D52613
|
| | | |
| | |
| | |
| | |
| | |
| | | |
Reviewed by: maxim (mentor)
Approved by: maxim (mentor)
Differential Revision: https://reviews.freebsd.org/D52769
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | | |
While here, use Ev for TMPDIR consistently.
MFC after: 3 days
Event: EuroBSDCon 2025
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This was moved to -acct along with the rest of the accounting tools.
While it does work with accounting data, it's also a core Unix tool
that users would expect to be installed without having to install
the whole accounting system.
Move it back to -utilities, which is also where w(1) lives.
MFC after: 1 day
Reviewed by: manu
Differential Revision: https://reviews.freebsd.org/D52653
|
| | | |
| | |
| | |
| | |
| | |
| | | |
MFC after: 1 day
Reviewed by: manu
Differential Revision: https://reviews.freebsd.org/D52650
|
| | | |
| | |
| | |
| | |
| | |
| | | |
MFC after: 1 day
Reviewed by: manu, imp, emaste
Differential Revision: https://reviews.freebsd.org/D52648
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
A new version of pfsync packet is introduced: 1500. This version solves
the issues with data alignment introduced in version 1400 and adds syncing
of information needed to sync states created by rules with af-to (original
interface, af and proto separate for wire and stack keys), of rt_af
needed for prefer-ipv6-nexthop, and of tag names.
Reviewed by: kp
Sponsored by: InnoGames GmbH
Differential Revision: https://reviews.freebsd.org/D52176
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Move mandoc to its own package so users can install it independently of
-utilities. Put the package in the minimal set, since we also ship
manpages in minimal and "man" is a basic Unix utility.
Add a pkg-triggers(5) hook to run makewhatis when new manpages are
installed, so that apropos(1) works. This depends on a new pkg(8)
feature expected to be in in the upcoming 2.3.2 release; in the mean
time, this is a no-op (i.e., having an older pkg doesn't break anything,
it just won't run the trigger).
MFC after: 3 seconds
Reviewed by: bapt
Differential Revision: https://reviews.freebsd.org/D52564
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Add a new -h option that causes stat to print a list of holes for each
file argument.
Sponsored by: Klara, Inc.
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D52481
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | | |
MFC after: 3 days
Sponsored by: Klara, Inc.
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D52489
|
| | | |
| | |
| | |
| | | |
Add extra defines required for bc-7.1.0 to the Makefiles.
|
| | | |
| | |
| | |
| | |
| | | |
The “all.sh” script in version 7.1.0 accepts one less parameter for
selecting the tests to be run.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The legacy code handling -j in display() was causing xo_finish() to be
skipped. It has also been causing a memory leak since 0726c6574f8
(sockstat: Add automatic column sizing and remove -w option)
Fixes: 7b35b4d1963 (sockstat: add libxo support)
MFC after: 1 week
Reported by: glebius
Reviewed by: glebius
Sponsored by: ConnectWise
Pull Request: https://github.com/freebsd/freebsd-src/pull/1842
|
| | | |
| | |
| | |
| | |
| | | |
PR: 289245
Fixes: 14b61b2e9317 ("man: Add -l option")
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Add a -l option which causes man to interpret all arguments as paths to
open directly rather than man pages to search for in MANPATH. See the
PR for a detailed rationale.
PR: 289245
MFC after: 1 week
Reviewed by: ziaee, emaste
Differential Revision: https://reviews.freebsd.org/D52385
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Merge the upstream manpage upades into awk.1. This goes through upstream
hash 9acc510. Upstream man page is written in raw nroff with "an"
macros, rather than in mandoc, so convert to mandoc as well. The man
page isn't updated on imports automatically, plus our man page has
diverged somewhat from upstraem's so it's not a mechanical change...
PR: 230730
Sponsored by: Netflix
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Reviewed by: ziaee, bapt
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D52343
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Put SYN-cookie related counters in its own container and use consistent
indentation for them.
Reviewed by: glebius
MFC after: 1 week
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D52227
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This reverts commit f97b6a8f84b3ed209c2aea0958a7b889d0bf27ed, as it
turns out our fuzz implementation is just too naive. We can have more
leading context than trailing context and vice-versa, so we can't really
assume they're the same.
Restore the previous bug and we can work on it post-branch.
Reported by: cy
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The older GNU patch that we had in base did not properly handle spaces
in filenames in unified diffs, but bsdpatch seems to have handled this
fine at least since the version we imported into base initially. Add a
test with spaces in the filename specifically to be sure.
PR: 181272
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
When the first line of a file is a removal, we may not have any leading
context. Only adjusting p_context if context > 0 means that we
incorrectly believe that we have 100 lines of context when the reality
is that we have none.
This fixes a bug with fuzz-checking, which ends up fuzzing away the line
we're trying to replace if it's the first line in the file. We use
pch_context() to determine a reasonable max-fuzz.
PR: 250511
Reviewed by: pfg
Differential Revision: https://reviews.freebsd.org/D51837
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Currently the idle time will show as `true` part of the time in the json
output and quoting depends on what is being printed. Make sure it's
always printed correctly and for consistency treated as a string in the
json output.
Login time delta and since times are currently exposed in the xml
output, expose these times in the json output as well.
In the json and xml outputs expose the number of seconds idle as a new
field or attribute respectively.
MFC after: 1 week
Sponsored by: Modirum MDPay
Event: Oslo Hackathon 202508
Differential Revision: https://reviews.freebsd.org/D52237
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | | |
Provide counters for receive and transmit checksum offloading for
SCTP.
MFC after: 1 week
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
For MIT Kerberos, MK_GSSAPI has no meaning: GSSAPI is a required part of
Kerberos and is always built if MK_KERBEROS is enabled. Backport this
behaviour to Heimdal so it works the same way.
While here, change Heimdal's libcom_err and compile_et to be selected by
MK_KERBEROS, not MK_KERBEROS_SUPPORT, since these are part of Kerberos
and third-party users might need it even if Kerberos support is disabled
in the base system. This means MK_KERBEROS_SUPPORT installs the same
files with both MIT and Heimdal.
Reviewed by: cy
Differential Revision: https://reviews.freebsd.org/D51859
|
| | | |
| | |
| | |
| | | |
Spotted by: Gunther Nikl
|
| | | |
| | |
| | |
| | |
| | |
| | | |
- s/contants/content/
MFC after: 3 days
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
- Make it platform agnostic
- Separate FreeBSD related code
- Fix tests
- Make it report all non-loaded modules instead of the first occurrence
only
- Update kyuafile.5 man page
Reviewed by: ngie
MFC after: 2 weeks
Pull Request: https://github.com/freebsd/kyua/pull/270
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
On most other platforms observed, including OpenBSD, NetBSD, and Linux,
these system calls have long since been converted to only touching the
supplementary groups of the process. This poses both portability and
security concerns in porting software to and from FreeBSD, as this
subtle difference is a landmine waiting to happen. Bugs have been
discovered even in FreeBSD-local sources, since this behavior is
somewhat unintuitive (see, e.g., fix 48fd05999b0f for chroot(8)).
Now that the egid is tracked outside of cr_groups in our ucred, convert
the syscalls to deal with only supplementary groups. Some remaining
stragglers in base that had baked in assumptions about these syscalls
are fixed in the process to avoid heartburn in conversion.
For relnotes: application developers should audit their use of both
setgroups(2) and getgroups(2) for signs that they had assumed the
previous FreeBSD behavior of using the first element for the egid. Any
calls to setgroups() to clear groups that used a single array of the
now or soon-to-be egid can be converted to setgroups(0, NULL) calls to
clear the supplementary groups entirely on all FreeBSD versions.
Co-authored-by: olce (but bugs are likely mine)
Relnotes: yes (see last paragraph)
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D51648
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Report the undelivered multi and broadcast UDP packets separately.
Reviewed by: rrs, cc
MFC after: 1 week
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D51884
|
| | | | |
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | | |
See manpage for new features.
Preliminary review by: imp
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
When reporting undelivered broadcast/multicast datagrams, don't just
report the undelivered broadcast ones. Actually report the sum of both.
Alternatively, one could also report broadcast and multicast datagrams
separately, but that would change the output format of netstat.
While there, use the correct type for casting a variable printed
with %ju.
Reviewed by: cc
MFC after: 1 week
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D51881
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
delivered is already an uint64_t, so no need to cast it to that
type.
MFC after: 1 week
Sponsored by: Netflix, Inc.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The counter udps_noport includes udps_noportbcast, so don't subtract
udps_noportbcast twice.
PR: 288680
Reviewed by: rrs
MFC after: 1 week
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D51870
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* Prefer explicit NULL comparisons to using pointers as booleans
* Prefer explicit 0 comparisons to using strcmp() as a predicate
* Avoid use of strcpy()
Sponsored by: Klara, Inc.
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D51876
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
parse_ports has been broken ever since 7b35b4d, and it's a sufficiently
complicated function that it really deserves some unit tests. Fix it,
and add tests. Refactor the code a little bit to facilitate unit tests.
Chiefly, split the tested functions out of main.c into sockstat.c .
PR: 288731
Fixes: 7b35b4d ("sockstat: add libxo support")
Sponsored by: ConnectWise
PR: https://github.com/freebsd/freebsd-src/pull/1807
Reviewed by: rido
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
In preparation for splitting the file up. This commit is a clean
rename, so git's rename detection will work.
Sponsored by: ConnectWise
PR: https://github.com/freebsd/freebsd-src/pull/1807
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Fixed missing field names in xo_emit() calls for xolint compliance, treated
XO_STYLE_HTML like XO_STYLE_TEXT to apply space-padded formatting for
human-readable output, and updated usage() to indicate that --libxo accepts
arguments.
Reported by: Phil Shafer <phil@juniper.net>
Sponsored by: Google, LLC (GSoC 2025)
MFC after: 2 weeks
Pull Request: https://github.com/freebsd/freebsd-src/pull/1806
Reviewed by: asomers
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | | |
Signed-off-by: Faraz Vahedi <kfv@kfv.io>
Reviewed by: markj, asomers (both earlier version)
Pull Request: https://github.com/freebsd/freebsd-src/pull/1498
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Switch up comparator mapping to avoid these kinds of errors, use a
simple array of (name, comparator) pairs rather than having to maintain
entries in two separate arrays that must have matching indices.
Reviewed by: obiwac
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D37083
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Revert a change that mistakenly used SCTP path state and the field name
`path-state` instead of the correct `conn-state` and `sctp_conn_state()`
call. This was introduced in 7b35b4d during the addition of libxo
support.
Fixes: 7b35b4d ("sockstat: add libxo support")
Reported by: Phil Shafer <phil@juniper.net>
Sponsored by: Google, LLC (GSoC 2025)
Pull Request: https://github.com/freebsd/freebsd-src/pull
Reviewed by: asomers
|