Commit Graph

21570 Commits

Author SHA1 Message Date
Mark Johnston a9be8f9968 setaudit: Bump WARNS and fix some style bugs
- Cast sockaddrs through void to silence warnings about expected
  alignment.
- Fix cast style.
- Sort includes.
- Make some global variables local.
- Sort options.

No functional change intended.

Reviewed by:	csjp
MFC after:	2 weeks
Sponsored by:	Modirum MDPay
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D53670
2025-11-18 16:24:20 +00:00
Mark Johnston dcb0790bad setaudit: Initial import
Unmodified sources from https://github.com/csjayp/setaudit at commit
aa4dd9dfa40b6437030d718834236f4eaeb18ccb.

Some follow-up changes will fix a few issues and make it easier to use
this utility in the rc framework.

Reviewed by:	csjp
MFC after:	2 weeks
Sponsored by:	Modirum MDPay
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D53669
2025-11-18 16:24:20 +00:00
Martin Matuska 4303bde429 zfs: fix build after openzfs/zfs@e63d026b9
Fix Makefiles
Update zfs_config.h and zfs_gitrev.h
2025-11-17 17:11:56 +01:00
Ed Maste af4ba95daf freebsd-update: Add some diagnositic information for a failure case
Users report freebsd-update failing with "The update metadata index is
correctly signed, but failed an integrity check."  Add a hint at which
of the cases is failing to help track down the issue.

PR:		264205
Reviewed by:	dch
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D52222
2025-11-17 09:42:17 -05:00
Ed Maste 4c736cfc69 Deprecate fdc(4) and floppy utilities
Floppies have been obsolete for over a decade.  Add a deprecation note
now and plan to remove fdc(4) support in 16.

Reviewed by:	ziaee
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D41549
2025-11-16 17:46:12 -05:00
Colin Percival a96230e032 bsdinstall: Enable FreeBSD-base repo when pkgbase
When performing a pkgbase install, create a configuration file in
/usr/local/etc/pkg/repos/FreeBSD.conf which enables the FreeBSD-base
repository.  (This repository is defined in /etc/pkg/FreeBSD.conf as
being disabled by default.)

Reported by:	Mark Millard
Reviewed by:	markj
MFC after:	immediately (needed for 15.0-RC1)
Differential Revision:	https://reviews.freebsd.org/D53777
2025-11-15 14:05:50 -08:00
Colin Percival 8e0b1a1c03 pkg: Add FreeBSD-base to /etc/pkg/FreeBSD.conf
On -CURRENT and -STABLE this gets bits from pkg.freebsd.org; but we get
base system bits from pkgbase.freebsd.org for BETA/RC/RELEASE.

Note that this repository is disabled by default, but can still be used
by explicitly specifying it, e.g. "pkg upgrade -r FreeBSD-base".

With hat:	re
MFC after:	8 hours (needed in 15.0-RC1)
2025-11-14 23:58:41 -08:00
Colin Percival bdfc223c7a bsdinstall: Don't install FreeBSD-base.conf
When installing e.g. 15.0-RC1, we want to get files from the 15.0-RC1
pkgbase repository; but running 'pkg upgrade' after installation should
get the latest bits build from releng/15.0.

With hat:	re
MFC after:	8 hours (needed in 15.0-RC1)
2025-11-14 23:58:41 -08:00
Colin Percival 51184e38c9 bsdinstall: Use pkgbase.f.o for BETA/RC/RELEASE
For BETA/RC/RELEASE builds, fetch files from the appropriate repository
on pkgbase.freebsd.org, using the appropriate signing keys.  Note that
there is a separate repository for each BETA and RC; this ensures that
someone installing from e.g. a 15.0-RC1 ISO will get 15.0-RC1 bits and
not whatever happens to be the most recent build from releng/15.0.

With hat:	re
MFC after:	8 hours (needed in 15.0-RC1)
2025-11-14 23:58:41 -08:00
Colin Percival 6b0909f940 bsdinstall: Copy in all keys
The keys used for pkgbase signing are going to be placed in
/usr/share/keys/pkgbase-N where N is the FreeBSD major version
number; as such it's not sufficient to copy /usr/share/keys/pkg
into the install chroot, but instead we need /usr/share/keys/*.

With hat:	re
MFC after:	8 hours (needed in 15.0-RC1)
Differential Revision:	https://reviews.freebsd.org/D53753
2025-11-14 23:58:40 -08:00
Dag-Erling Smørgrav 2f3adab9d5 quot: Improve manual page
* Rewrite the first paragraph to clarify that quot(8) only supports FFS.

* Document which options can or cannot be combined with each other.

MFC after:	1 week
Reviewed by:	ziaee
Differential Revision:	https://reviews.freebsd.org/D53727
2025-11-14 15:29:05 +01:00
Dag-Erling Smørgrav fa272a5276 quot: Rewrite -n mode input parser
The existing parser was needlessly complicated and wildly inconsistent
in how it handled invalid input.  Rewrite using getline() and treat
invalid input consistently: silently ignore lines that don't begin with
a number, and print a warning if the inode number is out of range.

PR:		290992
MFC after:	1 week
Reviewed by:	obrien
Differential Revision:	https://reviews.freebsd.org/D53726
2025-11-14 15:29:05 +01:00
Alexander Ziaee 477799750a jail.8: Add creating a jail from package base
MFC after:		immediately for inclusion in 15.0R
Reported by:		ivy
Differential Revision:	https://reviews.freebsd.org/D53745
2025-11-13 18:58:00 -05:00
John Baldwin daa1f9b415 apm(8): Drop MLINK to apmconf(8)
apmconf(8) was merged into apm(8) back in 2000 and this note and MLINK
were added as a transition aid, but that aid is no longer needed.
2025-11-12 21:38:35 -05:00
Navdeep Parhar 17b4a0acfa cxgbe(4): T7 related updates to shared code
- Avoid some more registers with read side-effects during regdump.
- mps_tcam_size is 3x the size of T6/T5.
- Update rss_rd_row to work with T7.

Obtained from:	Chelsio Communications
MFC after:	1 week
Sponsored by:	Chelsio Communications
2025-11-12 16:32:38 -08:00
Muhammad Moinur Rahman 5b9fba1cb0 Retire pccard(4)
pccard has been declared obsolete for a long time and also the
support has been removed but the man page still exists. It mentions
being scheduled to be removed before 13.0 but it still exists in the
tree.

[Extracted from review D53434]

Reviewed by: emaste
Fixes: 31b35400c ("pccard: Remove more of the PC Card infrastructure")
2025-11-12 12:09:09 -05:00
Ed Maste 4109cdf0f8 bsdinstall: Use fat32 EFI system partition for ZFS
This is consistent with other operating systems and with bsdinstall's
UFS config and with bsdinstall's ZFS config prior to commit
0b7472b3d8.

Fixes: 0b7472b3d8 ("Mount the EFI system partition (ESP) on newly-installed systems.")
Reviewed by:	imp
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D53642
2025-11-11 13:17:56 -05:00
Christos Margiolis e5c0d7020f virtual_oss(8): Improve hw.snd.basename_clone handling
If we request a /dev/dsp virtual_oss(8) device, we have to replace the
sound(4) one by first disabling hw.snd.basename_clone. This sysctl tells
sound(4) to not create the /dev/dsp alias for the default device. There
are currently two issues with the way this is handled by virtual_oss(8),
however:

1. It uses system(3) instead of sysctlbyname(3).
2. It does not restore hw.snd.basename_clone to its original value, so
   if prior to virtual_oss(8) running, hw.snd.basename_clone was enabled
   (which is the case by default), and it is closed at some point,
   hw.snd.basename_clone stays disabled, which is annoying, because
   users have to manually restore it, otherwise applications that open
   the default device (i.e., most) will not work.

Fix both issues.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D53621
2025-11-11 13:07:44 +01:00
Christos Margiolis 7bedc4634d virtual_oss(8): Use kldload(2) instead of system(3)
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Reviewed by:	imp, markj, emaste
Differential Revision:	https://reviews.freebsd.org/D53617
2025-11-11 13:07:40 +01:00
Ed Maste 4e36942420 bsdinstall: Fix newfs bsddialog menu
The second and third members of struct bsddialog_menuitem are `bool on`
and `unsigned int depth`. The newfs dialog options in bsdinstall's
partition tool had these two swapped, so the default selection did not
work.

PR: 290857
Reviewed by: asiciliano
Fixes: 50e244964e ("bsdinstall/partedit: Replace libdialog with libbsddialog")
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D53639
2025-11-08 10:01:35 -05:00
Wolfram Schneider 385796001c utx.8: protect first name "Ed"
For some people "Ed" is a first name, but for mandoc it is a
macro (end of display block) and needs to be escaped.
2025-11-08 08:04:33 +00:00
Alexander Ziaee d59903481d jail.8: Add creating a jail from distribution set
PR:			200803
MFC after:		3 days
Reviewed by:		jamie
Differential Revision:	https://reviews.freebsd.org/D53631
2025-11-07 13:38:59 -05:00
Alexander Ziaee 3f0dd77246 sysrc.8: Rewrite examples for mdoc conformance
Tag SPDX while here. This is not a content change, so do not bump date.

PR:		274164
MFC after:	3 seconds
2025-11-06 13:43:38 -05:00
Mark Johnston 645352316b freebsd-update: Swap pkg(8) flags in check_pkgbase()
Unbootstrapped pkg will ignore -N if -r is specified first.  Flip the
order.

Prior to commit 66c75fa63a this worked by accident.

PR:		290393
Reported by:	olgeni
MFC after:	3 days
Fixes:		66c75fa63a ("freebsd-update: Fix the pkgbase check")
2025-11-06 16:06:12 +00:00
Lexi Winter 87121747de periodic: Move 320.whatis to the mandoc package
This periodic script only makes sense if mandoc is installed, so move
it to the mandoc package like other periodic scripts.

/usr/libexec/makewhatis.local only exists for the enjoyment of this
script, and doesn't work without mandoc installed, so move that as
well.

This change moves files between packages so, until we have a proper
policy on how to handle this in release/stable branches, it should
not be MFC'd.

MFC after:	never
Reviewed by:	ziaee, manu
Sponsored by:	https://www.patreon.com/bsdivy
Differential Revision:	https://reviews.freebsd.org/D53609
2025-11-06 15:20:52 +00:00
Christos Margiolis 26e7e9a6a2 mixer(8): Update FILES section
While here, change "N" to "X" to match sndctl.8's notation.

Sponsored by:	The FreeBSD Foundation
MFC after:	4 days
Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D53503
2025-11-06 13:56:36 +01:00
Lexi Winter a7c558b4ad inetd.8: Remove the enumeration of examples
The user can trivially see the list of examples in /etc/inetd.conf
by looking at the file, so there's no need to include an entire
paragraph in the manual enumerating the examples which are provided.

MFC after:	3 days
Reviewed by:	0mp
Sponsored by:	https://www.patreon.com/bsdivy
Differential Revision:	https://reviews.freebsd.org/D52740
2025-11-05 23:52:45 +00:00
Xin LI 40d2161838 cron: Use reallocarray() to prevent integer overflow
Apply OpenBSD env.c,v 1.24 and 1.25, which replaces manual size
calculations with reallocarray() to prevent possible integer
overflow.

MFC after:	3 days
2025-11-02 21:59:46 -08:00
Colin Percival 0837b2ebd5 pkg: Die if make -V BRANCH fails
If build logic breaks such that we can't figure out which branch we're
on, we should error out rather than shipping a default (and probably
wrong) /etc/pkg/FreeBSD.conf

Reviewed by:	ivy
MFC after:	5 minutes
Suggested by:	ivy
Differential Revision:	https://reviews.freebsd.org/D53487
2025-10-30 13:50:45 -07:00
Alexander Ziaee 205af037e3 bhyve.8: Correct description for -c flag, tag spdx
The examples only show the usage of `-c <numcpus>`, as did the flag
description, however the -c flag supports more complex cpu topology
specifiers. These were documented correctly in SYNOPSIS, add them to
the body of the DESCRIPTION as well. Someone could go further and do
and example with using them.

MFC after:	3 days
Event:		OpenZFS Developer Summit '25
Reported by:	Levi Worley <levi@gainframe.com>
2025-10-30 11:51:04 -04:00
Ed Maste c6b156e360 pmcstat: Remove no-op -k option
Commit 53d0b9e438 ("pmc: Provide full path to modules from kernel
linker") made pmcstat's -k option have no effect, but the option was
retained for backwards compatibility (while emitting a warning that
-k is not in FreeBSD 15).

Reviewed by:	jrtc27
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D53397
2025-10-28 15:01:38 -04:00
Quentin Thébault 1aad953452 bhyve: add support for ng_device network backend
Signed-off-by: Quentin Thébault <quentin.thebault@defenso.fr>

Reviewed by:	markj
MFC after:	1 month
Sponsored by:	Defenso
Differential Revision:	https://reviews.freebsd.org/D52542
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1880
2025-10-27 12:46:47 +00:00
Gordon Bergling 56a72214a3 fwcontrol(8): Fix a typo in a message
- s/verndor/vendor/

MFC after:	1 week
2025-10-26 16:59:41 +01:00
Gordon Bergling 780a50c729 pmcstat(8): Fix a typo in an error message
- s/evalation/evaluation/

MFC after:	1 week
2025-10-26 16:59:41 +01:00
Gordon Bergling 8f1c946f1c cxgbetool(8): Fix a typo in an error message
- s/MISCELANEOUS/MISCELLANEOUS/

MFC after:	1 week
2025-10-26 16:59:41 +01:00
Gordon Bergling 39d43543b3 rtlbtfw(8): Fix a typo in an error message
- s/Parseing/Parsing/

MFC after:	1 week
2025-10-26 16:59:41 +01:00
Lexi Winter 031e711647 packages: Install development manpages in the -dev package
Add a new per-group SUBPACKAGE option to bsd.man.mk.  When MANSPLITPKG
is enabled, this is forced to "-man", otherwise it defaults to empty
but can be overridden by the caller.

Use this in bsd.lib.mk to install library manpages in the -dev package
instead of the base package.  This is nearly always preferable, since
library manpages are usually in section 2 or 3 and are only relevant
to people with development packages installed.

For manpages which should be installed in the base package even for
libraries, add a new MANNODEV group in bsd.lib.mk.  Update existing
Makefiles to use this where appropriate.

MFC after:	3 days
Discussed with:	olce
Reviewed by:	olce
Sponsored by:	https://www.patreon.com/bsdivy
Differential Revision:	https://reviews.freebsd.org/D52832
2025-10-26 02:26:06 +00:00
Jose Luis Duran 74921426d5 bsdinstall: jail: Fix DISTMENU items
The menu was incorrectly using the fourth column (distname) instead of
the first (dist) of the MANIFEST.

The actual file name is on the first column of the MANIFEST file.
Remove the .txz part of the name to build the menu options.

Reviewed by:	jamie
MFC after:	5 days
Differential Revision:	https://reviews.freebsd.org/D53177
2025-10-22 18:22:44 +00:00
Gordon Bergling 2b2a4f02e0 pmcstat(8): Fix a typo in a source code comment
- s/th/the/

MFC after:	3 days
2025-10-22 13:59:13 +02:00
Christos Margiolis 70b34fbdbe sndctl(8): Modify vchans only on supported directions
Currently mod_play_vchans() and mod_rec_vchans() run unconditionally,
even if the direction (playback, recording) is not supported by the
device. This results in the "autoconv" (see mod_autoconv()) control
failing when run on simplex devices, because we'll be trying to modify
vchans on an unsupported direction.

Test whether the direction is supported and silently move on if it
isn't.

Sponsored by:	The FreeBSD Foundation
MFC after:	4 days
Differential Revision:	https://reviews.freebsd.org/D53233
2025-10-22 13:50:55 +02:00
Dag-Erling Smørgrav fa347930f8 quot: Make nusers unsigned
Fixes:		195b00ec45 ("quot: Clean up")
Reviewed by:	rlibby
Differential Revision:	https://reviews.freebsd.org/D53224
2025-10-20 23:42:13 +02:00
Ed Maste b0c64ce0ea bsdinstall: Use pkgbase release URL for BETA/RC
PR:		290238
Reviewed by:	ivy
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D53214
2025-10-20 09:28:49 -04:00
Jose Luis Duran 4ee348e271 bsdinstall: Fix typos
Reviewed by:	emaste
MFC after:	2 days
Differential Revision:	https://reviews.freebsd.org/D53170
2025-10-18 17:13:16 +00:00
Christos Margiolis 30a873ee37 virtual_oss(8): Retire unused utils.h
Sponsored by:	The FreeBSD Foundation
MFC after:	1 day
Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D53174
2025-10-18 15:17:43 +02:00
Bjoern A. Zeeb 0ee6e36ea9 bluetooth: ng_ubt_rtl/rtlbtfw: remove duplicate entry in device table
Remove the single 8822CU entry in all three places.
It seems the only entry referencing a USB device.  The same device is
listed with the 8822CE devices.

MFC after:	3 days
Reviewed by:	wulf
Differential Revision: https://reviews.freebsd.org/D52324
2025-10-17 16:45:58 +00:00
Dag-Erling Smørgrav aa870a1935 quot: Add tests
To facilitate the task, we change the comparison function so that users
with equal filesystem usage are sorted by UID, and add an undocumented
option that prevents quot from replacing numerical UIDs with names.  We
also switch from getfsfile(3) to getmntpoint(3) so the first line is
identical regardless of whether we pass quot a mountpoint or a device.

Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D53133
2025-10-17 13:55:12 +02:00
Dag-Erling Smørgrav 8209311c51 quot: Drop the -h option
There was probably a time, more than 30 years ago, when the actual
size of a file had to be calculated and this option saved time, but
all it does today is give incorrect results for no benefit.

Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D53132
2025-10-17 13:55:07 +02:00
Dag-Erling Smørgrav 0eaca4a24b quot: Drop the COMPAT version
We've had this code for 30 years, but there has never been a way to
build it.  We have no idea if it still works, or if it ever worked.

Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D53131
2025-10-17 13:55:03 +02:00
Dag-Erling Smørgrav 195b00ec45 quot: Clean up
* Fix numerous style violations.
* Modernize somewhat.
* Don't bother examining errno after calling get_inode(), as it always
  exits on error.
* Fix confusing wording in the manual page.

The code remains somewhat idiosyncratic, e.g. in its insistance on
counting down rather than up in simple for loops, but in the absence
of comprehensive automated tests, the risk of introducing bugs exceeds
the benefit of rewriting these into more idiomatic forms.

Reviewed by:	obiwac
Differential Revision:	https://reviews.freebsd.org/D53130
2025-10-17 13:54:59 +02:00
Dag-Erling Smørgrav 5854d1cbab quot: Fix benign buffer overflow
If it encounters an inode whose owner does not have a pw entry, quot
allocates a 7-byte buffer (8 in practice, since that is the minimum
allocation size) and uses it to store the numeric uid preceded by a
hash character.  This will overflow the allocated buffer if the UID
exceeds 6 decimal digits.  Avoid this by using asprintf() instead.

While here, simplify the common case as well using strdup().

Reported by:	Igor Gabriel Sousa e Souza <igor@bsdtrust.com>
MFC after:	3 days
Reviewed by:	obiwac, emaste
Differential Revision:	https://reviews.freebsd.org/D53129
2025-10-17 13:54:48 +02:00